diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLExecutionContext.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLExecutionContext.cs index 9a7ae96ff4..15f740fd7f 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLExecutionContext.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLExecutionContext.cs @@ -12,6 +12,7 @@ using Squidex.Domain.Apps.Entities.Contents.GraphQL.Cache; using Squidex.Domain.Apps.Entities.Contents.Queries; using Squidex.Infrastructure; +using Squidex.Shared; using Squidex.Shared.Users; namespace Squidex.Domain.Apps.Entities.Contents.GraphQL; @@ -28,6 +29,8 @@ public sealed class GraphQLExecutionContext : QueryExecutionContext public override Context Context { get; } + public bool CanExposePII { get; } + public GraphQLExecutionContext( IDataLoaderContextAccessor dataLoaders, IAssetQueryService assetQuery, @@ -58,6 +61,8 @@ public GraphQLExecutionContext( { batchSize = Math.Max(MinBatchSize, Math.Min(MaxBatchSize, batchSize)); } + + CanExposePII = Context.UserPermissions.Allows(PermissionIds.ForApp(PermissionIds.AppPii, context.App.Name)); } public async ValueTask FindUserAsync(RefToken refToken, diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/UserGraphType.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/UserGraphType.cs index 1746033f7b..b5e000b845 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/UserGraphType.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/UserGraphType.cs @@ -35,7 +35,7 @@ public UserGraphType() AddField(new FieldType { Name = "displayName", - Resolver = Resolve(x => x.Claims.DisplayName()), + Resolver = ResolveOrHide(x => x.Claims.DisplayName()), ResolvedType = Scalars.String, Description = FieldDescriptions.UserDisplayName }); @@ -43,7 +43,7 @@ public UserGraphType() AddField(new FieldType { Name = "email", - Resolver = Resolve(x => x.Email), + Resolver = ResolveOrHide(x => x.Email), ResolvedType = Scalars.String, Description = FieldDescriptions.UserEmail }); @@ -55,4 +55,17 @@ private static IFieldResolver Resolve(Func resolver) { return Resolvers.Sync(resolver); } + + private static IFieldResolver ResolveOrHide(Func resolver) + { + return Resolvers.Sync((source, _, context) => + { + if (context.CanExposePII) + { + return resolver(source); + } + + return "Hidden"; + }); + } } diff --git a/backend/src/Squidex.Shared/PermissionIds.cs b/backend/src/Squidex.Shared/PermissionIds.cs index 77157692f0..d5f3d9a907 100644 --- a/backend/src/Squidex.Shared/PermissionIds.cs +++ b/backend/src/Squidex.Shared/PermissionIds.cs @@ -103,6 +103,9 @@ public static class PermissionIds // App Usage public const string AppUsage = "squidex.apps.{app}.usage"; + // App Expose Users + public const string AppPii = "squidex.apps.{app}.pii"; + // App Comments public const string AppComments = "squidex.apps.{app}.comments"; public const string AppCommentsRead = "squidex.apps.{app}.comments.read"; diff --git a/backend/src/Squidex/appsettings.json b/backend/src/Squidex/appsettings.json index 918492f0cb..22e038e41a 100644 --- a/backend/src/Squidex/appsettings.json +++ b/backend/src/Squidex/appsettings.json @@ -168,7 +168,7 @@ "hideDateTimeModeButton": false, // Show the exposed values as information on the apps overview page. - "showInfo": false, + "showInfo": true, // The number of content items for dropdown selector. "referencesDropdownItemCount": 100 diff --git a/backend/src/Squidex/wwwroot/editor/squidex-editor.css b/backend/src/Squidex/wwwroot/editor/squidex-editor.css index d91d48c449..57f1f71dad 100644 --- a/backend/src/Squidex/wwwroot/editor/squidex-editor.css +++ b/backend/src/Squidex/wwwroot/editor/squidex-editor.css @@ -1 +1 @@ -.remirror-theme{width:100%}.remirror-theme{position:relative}.remirror-theme *{box-sizing:border-box}.remirror-theme .ProseMirror>p{margin-bottom:1rem!important}.remirror-theme .ProseMirror>p:last-child{margin-bottom:0!important}.remirror-theme .ProseMirror h1{margin-top:.5rem!important}.remirror-theme .ProseMirror h1:first-child{margin-top:0!important}.remirror-theme .ProseMirror h2{margin-top:.375rem!important}.remirror-theme .ProseMirror h2:first-child{margin-top:0!important}.remirror-theme .ProseMirror h3,.remirror-theme .ProseMirror h4,.remirror-theme .ProseMirror h5,.remirror-theme .ProseMirror h6{margin-top:.25rem!important}.remirror-theme .ProseMirror h3:first-child,.remirror-theme .ProseMirror h4:first-child,.remirror-theme .ProseMirror h5:first-child,.remirror-theme .ProseMirror h6:first-child{margin-top:0!important}.remirror-theme .ProseMirror hr{border:0;border-top:1px solid #a7a9b4!important}.remirror-editor{min-height:300px!important;max-height:500px}.MuiStack-root>.MuiBox-root{margin-right:5px}.MuiBox-root>.MuiButtonBase-root{border-color:#dedfe3!important;border-radius:0}.MuiBox-root>.MuiButtonBase-root{border-left-width:0!important}.MuiBox-root>.MuiBox-root:first-child>.MuiButtonBase-root{border-left-width:1px!important}.MuiStack-root>.MuiBox-root>.MuiButtonBase-root:first-child{border-left-width:1px!important}.MuiButtonBase-root.Mui-selected:hover{background-color:#3284f4!important}.remirror-editor-wrapper{padding-top:0!important}.custom-icon path{fill:#0000008a}.remirror-theme div.ProseMirror{border:1px solid #dedfe3!important;border-radius:0!important;box-shadow:none!important}.MuiTooltip-popper>div{background-color:#1a2129;border-radius:0;font-size:85%;font-weight:400;padding:.5rem}.MuiMenu-paper{transform:none!important}.squidex-editor-disabled{pointer-events:none}.squidex-editor-menu{border:1px solid #dedfe3;border-bottom:0;padding:5px}.squidex-editor-menu fieldset{border-radius:0;border:0;display:flex;outline:0;padding:0}.squidex-editor-menu fieldset:disabled,.squidex-editor-menu fieldset.disabled{pointer-events:none}.squidex-editor-menu fieldset:disabled,.squidex-editor-menu fieldset.disabled{opacity:.5}.squidex-editor-counter{border:1px solid #dedfe3;border-top:0;font-size:85%;font-weight:400;opacity:.8;padding:4px 10px 4px 4px;text-align:right}.squidex-editor-image-view{border:1px solid #dedfe3;border-radius:0;display:inline-block;margin-top:15px;margin-bottom:15px;overflow:hidden}.squidex-editor-image-buttons{bottom:10px;left:10px;position:absolute}.squidex-editor-image-element{display:block;max-width:400px;max-height:400px}.squidex-editor-image-info{left:10px;top:10px;position:absolute;background-color:#3284f4;color:#fff;font-size:85%;font-weight:400;padding:2px 6px}.squidex-editor-main{position:relative}.squidex-editor-main .ace_editor{bottom:0;left:0;right:0;top:0;position:absolute;border:1px solid #dedfe3}.squidex-editor-content-link{align-items:center;border-radius:2px;border:1px solid #dedfe3;padding:10px;display:flex;flex-direction:row;flex-wrap:nowrap;margin-top:10px;margin-bottom:10px}.squidex-editor-content-schema{display:block;overflow-x:hidden;overflow-y:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;min-width:0;width:auto;border-right:1px solid #c2c4cc;color:#8b8f9d;flex-shrink:0;padding-left:10px;padding-right:10px;width:200px}.squidex-editor-content-name{display:block;overflow-x:hidden;overflow-y:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;min-width:0;width:auto;padding-left:10px;padding-right:0}.squidex-editor-html{margin-bottom:10px;margin-top:10px;position:relative}.squidex-editor-html-label{left:6px;top:0;position:absolute;color:#8b8f9d;font-size:85%;font-weight:400}.squidex-editor-html textarea{border:1px solid #dedfe3;font-family:monospace;font-size:inherit;height:100px;outline:none;overflow-x:hidden;overflow-y:auto;padding:30px 14px 14px;resize:vertical;width:100%}.squidex-editor-button{align-items:center;background-color:#fff;border-radius:0;border:1px solid #dedfe3;bottom:10px;display:inline-flex;font-size:85%;font-weight:400;margin-right:5px;padding:6px 12px}.squidex-editor-button:hover{background-color:#f5f5f5}.squidex-editor-input{border:1px solid #dedfe3;border-radius:0;box-sizing:border-box;height:30px;margin-left:0;margin-right:5px;outline:none;padding:6px 12px}.squidex-editor-input:active{border-color:#3284f4}.squidex-editor-floating{border:1px solid #dedfe3}.squidex-editor-floating .MuiBox-root{margin-right:0!important}.squidex-editor-floating .MuiButtonBase-root{height:30px}.squidex-editor-modal-wrapper,.squidex-editor-modal-backdrop{bottom:0;left:0;right:0;top:0;position:absolute}.squidex-editor-modal-backdrop{background-color:#00000003}.squidex-editor-modal-window{left:50%;top:50%;background-color:#fff;border:0;border-radius:.25rem;box-sizing:border-box;box-shadow:0 3px 16px #0003;margin-top:-50px;margin-left:-150px;position:absolute;width:350px}.squidex-editor-modal-body{display:flex;flex-direction:row;flex-grow:1;padding-top:0!important}.squidex-editor-modal-body,.squidex-editor-modal-title{padding:15px}.squidex-editor-modal-title{font-size:85%}.squidex-editor-modal-window input{flex-grow:1}:has(.remirror-language-select-positioner)~pre[class*=language-]{padding-top:2.5rem!important}.remirror-language-select-positioner{right:5px;top:5px;position:absolute}.b:before{content:"";font-family:monospace;font-size:90%}.b:after{content:"";font-family:monospace;font-size:90%} +.remirror-theme{width:100%}.remirror-theme{position:relative}.remirror-theme *{box-sizing:border-box}.remirror-theme .ProseMirror>p{margin-bottom:1rem!important}.remirror-theme .ProseMirror>p:last-child{margin-bottom:0!important}.remirror-theme .ProseMirror h1{margin-top:.5rem!important}.remirror-theme .ProseMirror h1:first-child{margin-top:0!important}.remirror-theme .ProseMirror h2{margin-top:.375rem!important}.remirror-theme .ProseMirror h2:first-child{margin-top:0!important}.remirror-theme .ProseMirror h3,.remirror-theme .ProseMirror h4,.remirror-theme .ProseMirror h5,.remirror-theme .ProseMirror h6{margin-top:.25rem!important}.remirror-theme .ProseMirror h3:first-child,.remirror-theme .ProseMirror h4:first-child,.remirror-theme .ProseMirror h5:first-child,.remirror-theme .ProseMirror h6:first-child{margin-top:0!important}.remirror-theme .ProseMirror hr{border:0;border-top:1px solid #a7a9b4!important}.remirror-editor{min-height:300px!important;max-height:500px}.MuiStack-root>.MuiBox-root{margin-right:5px}.MuiBox-root>.MuiButtonBase-root{border-color:#dedfe3!important;border-radius:0}.MuiBox-root>.MuiButtonBase-root{border-left-width:0!important}.MuiBox-root>.MuiBox-root:first-child>.MuiButtonBase-root{border-left-width:1px!important}.MuiStack-root>.MuiBox-root>.MuiButtonBase-root:first-child{border-left-width:1px!important}.MuiButtonBase-root.Mui-selected:hover{background-color:#3284f4!important}.remirror-editor-wrapper{padding-top:0!important}.custom-icon path{fill:#0000008a}.remirror-theme div.ProseMirror{border:1px solid #dedfe3!important;border-radius:0!important;box-shadow:none!important}.MuiTooltip-popper>div{background-color:#1a2129;border-radius:0;font-size:85%;font-weight:400;padding:.5rem}.MuiMenu-paper{transform:none!important}.squidex-editor-disabled{pointer-events:none}.squidex-editor-menu{border:1px solid #dedfe3;border-bottom:0;padding:5px}.squidex-editor-menu fieldset{border-radius:0;border:0;display:flex;outline:0;padding:0}.squidex-editor-menu fieldset:disabled,.squidex-editor-menu fieldset.disabled{pointer-events:none}.squidex-editor-menu fieldset:disabled,.squidex-editor-menu fieldset.disabled{opacity:.5}.squidex-editor-counter{border-top:0;border:1px solid #dedfe3;display:flex;flex-direction:row;font-size:85%;font-weight:400;justify-content:space-between;opacity:1;padding:4px;text-align:right}.squidex-editor-counter label{display:flex}.squidex-editor-image-view{border:1px solid #dedfe3;border-radius:0;display:inline-block;margin-top:15px;margin-bottom:15px;overflow:hidden}.squidex-editor-image-buttons{bottom:10px;left:10px;position:absolute}.squidex-editor-image-element{display:block;max-width:400px;max-height:400px}.squidex-editor-image-info{left:10px;top:10px;position:absolute;background-color:#3284f4;color:#fff;font-size:85%;font-weight:400;padding:2px 6px}.squidex-editor-main{position:relative}.squidex-editor-main .ace_editor{bottom:0;left:0;right:0;top:0;position:absolute;border:1px solid #dedfe3}.squidex-editor-content-link{align-items:center;border-radius:2px;border:1px solid #dedfe3;padding:10px;display:flex;flex-direction:row;flex-wrap:nowrap;margin-top:10px;margin-bottom:10px}.squidex-editor-content-schema{display:block;overflow-x:hidden;overflow-y:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;min-width:0;width:auto;border-right:1px solid #c2c4cc;color:#8b8f9d;flex-shrink:0;padding-left:10px;padding-right:10px;width:200px}.squidex-editor-content-name{display:block;overflow-x:hidden;overflow-y:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;min-width:0;width:auto;padding-left:10px;padding-right:0}.squidex-editor-html{margin-bottom:10px;margin-top:10px;position:relative}.squidex-editor-html-label{left:6px;top:0;position:absolute;color:#8b8f9d;font-size:85%;font-weight:400}.squidex-editor-html textarea{border:1px solid #dedfe3;font-family:monospace;font-size:inherit;height:100px;outline:none;overflow-x:hidden;overflow-y:auto;padding:30px 14px 14px;resize:vertical;width:100%}.squidex-editor-button{align-items:center;background-color:#fff;border-radius:0;border:1px solid #dedfe3;bottom:10px;display:inline-flex;font-size:85%;font-weight:400;margin-right:5px;padding:6px 12px}.squidex-editor-button:hover{background-color:#f5f5f5}.squidex-editor-input{border:1px solid #dedfe3;border-radius:0;box-sizing:border-box;height:30px;margin-left:0;margin-right:5px;outline:none;padding:6px 12px}.squidex-editor-input:active{border-color:#3284f4}.squidex-editor-floating{border:1px solid #dedfe3}.squidex-editor-floating.hidden{display:none}.squidex-editor-floating .MuiBox-root{margin-right:0!important}.squidex-editor-floating .MuiButtonBase-root{height:30px}.squidex-editor-modal-wrapper,.squidex-editor-modal-backdrop{bottom:0;left:0;right:0;top:0;position:absolute}.squidex-editor-modal-backdrop{background-color:#00000003}.squidex-editor-modal-window{left:50%;top:50%;background-color:#fff;border:0;border-radius:.25rem;box-sizing:border-box;box-shadow:0 3px 16px #0003;margin-top:-50px;margin-left:-150px;position:absolute;width:350px}.squidex-editor-modal-body{display:flex;flex-direction:row;flex-grow:1;padding-top:0!important}.squidex-editor-modal-body,.squidex-editor-modal-title{padding:15px}.squidex-editor-modal-title{font-size:85%}.squidex-editor-modal-window input{flex-grow:1}:has(.remirror-language-select-positioner)~pre[class*=language-]{padding-top:2.5rem!important}.remirror-language-select-positioner{right:5px;top:5px;position:absolute}.b:before{content:"";font-family:monospace;font-size:90%}.b:after{content:"";font-family:monospace;font-size:90%} diff --git a/backend/src/Squidex/wwwroot/editor/squidex-editor.js b/backend/src/Squidex/wwwroot/editor/squidex-editor.js index 72f553f9c6..b8ba6b344f 100644 --- a/backend/src/Squidex/wwwroot/editor/squidex-editor.js +++ b/backend/src/Squidex/wwwroot/editor/squidex-editor.js @@ -1,4 +1,4 @@ -var ID=Object.defineProperty;var LD=(t,e,n)=>e in t?ID(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var lt=(t,e,n)=>(LD(t,typeof e!="symbol"?e+"":e,n),n),ND=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var qv=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)};var Mp=(t,e,n)=>(ND(t,e,"access private method"),n);function $D(t,e){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var ct=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var uR={exports:{}},dm={},dR={exports:{}},We={};/** +var ND=Object.defineProperty;var $D=(t,e,n)=>e in t?ND(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var lt=(t,e,n)=>($D(t,typeof e!="symbol"?e+"":e,n),n),DD=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var Zv=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)};var Mp=(t,e,n)=>(DD(t,e,"access private method"),n);function PD(t,e){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var ct=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ko(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dR={exports:{}},dm={},hR={exports:{}},We={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var ID=Object.defineProperty;var LD=(t,e,n)=>e in t?ID(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Hh=Symbol.for("react.element"),DD=Symbol.for("react.portal"),PD=Symbol.for("react.fragment"),zD=Symbol.for("react.strict_mode"),FD=Symbol.for("react.profiler"),BD=Symbol.for("react.provider"),HD=Symbol.for("react.context"),UD=Symbol.for("react.forward_ref"),WD=Symbol.for("react.suspense"),VD=Symbol.for("react.memo"),jD=Symbol.for("react.lazy"),uS=Symbol.iterator;function GD(t){return t===null||typeof t!="object"?null:(t=uS&&t[uS]||t["@@iterator"],typeof t=="function"?t:null)}var hR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},pR=Object.assign,fR={};function au(t,e,n){this.props=t,this.context=e,this.refs=fR,this.updater=n||hR}au.prototype.isReactComponent={};au.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};au.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function gR(){}gR.prototype=au.prototype;function fb(t,e,n){this.props=t,this.context=e,this.refs=fR,this.updater=n||hR}var gb=fb.prototype=new gR;gb.constructor=fb;pR(gb,au.prototype);gb.isPureReactComponent=!0;var dS=Array.isArray,mR=Object.prototype.hasOwnProperty,mb={current:null},vR={key:!0,ref:!0,__self:!0,__source:!0};function yR(t,e,n){var r,o={},i=null,s=null;if(e!=null)for(r in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(i=""+e.key),e)mR.call(e,r)&&!vR.hasOwnProperty(r)&&(o[r]=e[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1e in t?ID(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ZD=P,JD=Symbol.for("react.element"),QD=Symbol.for("react.fragment"),e4=Object.prototype.hasOwnProperty,t4=ZD.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n4={key:!0,ref:!0,__self:!0,__source:!0};function bR(t,e,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(s=e.ref);for(r in e)e4.call(e,r)&&!n4.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)o[r]===void 0&&(o[r]=e[r]);return{$$typeof:JD,type:t,key:i,ref:s,props:o,_owner:t4.current}}dm.Fragment=QD;dm.jsx=bR;dm.jsxs=bR;uR.exports=dm;var V=uR.exports,v0={exports:{}};(function(t,e){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,o=Error.captureStackTrace;o===void 0&&(o=function(u){var c=new Error;r(u,"stack",{configurable:!0,get:function(){var h=c.stack;return r(this,"stack",{configurable:!0,value:h,writable:!0}),h},set:function(h){r(u,"stack",{configurable:!0,value:h,writable:!0})}})});function i(a){a!==void 0&&r(this,"message",{configurable:!0,value:a,writable:!0});var u=this.constructor.name;u!==void 0&&u!==this.name&&r(this,"name",{configurable:!0,value:u,writable:!0}),o(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var s=function(){function a(c,d){return r(c,"name",{configurable:!0,value:d})}try{var u=function(){};if(a(u,"foo"),u.name==="foo")return a}catch{}}();function l(a,u){if(u==null||u===Error)u=i;else if(typeof u!="function")throw new TypeError("super_ should be a function");var c;if(typeof a=="string")c=a,a=n!==void 0?function(){return n(u,arguments,this.constructor)}:function(){u.apply(this,arguments)},s!==void 0&&(s(a,c),c=void 0);else if(typeof a!="function")throw new TypeError("constructor should be either a string or a function");a.super_=a.super=u;var d={constructor:{configurable:!0,value:a,writable:!0}};return c!==void 0&&(d.name={configurable:!0,value:c,writable:!0}),a.prototype=Object.create(u.prototype,d),a}e=t.exports=l,e.BaseError=i})(v0,v0.exports);var wR=v0.exports,pS="ProseMirror-selectednode",yb="",xs="\0",fS="__state_override__",r4={LastNodeCompatible:"lastNodeCompatible",FormattingMark:"formattingMark",FormattingNode:"formattingNode",NodeCursor:"nodeCursor",FontStyle:"fontStyle",Link:"link",Color:"color",Alignment:"alignment",Indentation:"indentation",Behavior:"behavior",Code:"code",InlineNode:"inline",ListContainerNode:"listContainer",ListItemNode:"listItemNode",Block:"block",BlockNode:"block",TextBlock:"textBlock",ExcludeInputRules:"excludeFromInputRules",PreventExits:"preventsExits",Media:"media"},ke=r4,Bi=Symbol.for("__remirror__"),yn=(t=>(t.PlainExtension="RemirrorPlainExtension",t.NodeExtension="RemirrorNodeExtension",t.MarkExtension="RemirrorMarkExtension",t.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",t.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",t.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",t.Manager="RemirrorManager",t.Preset="RemirrorPreset",t.PresetConstructor="RemirrorPresetConstructor",t))(yn||{}),ot=(t=>(t[t.Critical=1e6]="Critical",t[t.Highest=1e5]="Highest",t[t.High=1e4]="High",t[t.Medium=1e3]="Medium",t[t.Default=100]="Default",t[t.Low=10]="Low",t[t.Lowest=0]="Lowest",t))(ot||{}),mr=(t=>(t[t.None=0]="None",t[t.Create=1]="Create",t[t.EditorView=2]="EditorView",t[t.Runtime=3]="Runtime",t[t.Destroy=4]="Destroy",t))(mr||{}),oe=(t=>(t.Undo="_|undo|_",t.Redo="_|redo|_",t.Bold="_|bold|_",t.Italic="_|italic|_",t.Underline="_|underline|_",t.Strike="_|strike|_",t.Code="_|code|_",t.Paragraph="_|paragraph|_",t.H1="_|h1|_",t.H2="_|h2|_",t.H3="_|h3|_",t.H4="_|h4|_",t.H5="_|h5|_",t.H6="_|h6|_",t.TaskList="_|task|_",t.BulletList="_|bullet|_",t.OrderedList="_|number|_",t.Quote="_|quote|_",t.Divider="_|divider|_",t.Codeblock="_|codeblock|_",t.ClearFormatting="_|clear|_",t.Superscript="_|sup|_",t.Subscript="_|sub|_",t.LeftAlignment="_|left-align|_",t.CenterAlignment="_|center-align|_",t.RightAlignment="_|right-align|_",t.JustifyAlignment="_|justify-align|_",t.InsertLink="_|link|_",t.Find="_|find|_",t.FindBackwards="_|find-backwards|_",t.FindReplace="_|find-replace|_",t.AddFootnote="_|footnote|_",t.AddComment="_|comment|_",t.ContextMenu="_|context-menu|_",t.IncreaseFontSize="_|inc-font-size|_",t.DecreaseFontSize="_|dec-font-size|_",t.IncreaseIndent="_|indent|_",t.DecreaseIndent="_|dedent|_",t.Shortcuts="_|shortcuts|_",t.Copy="_|copy|_",t.Cut="_|cut|_",t.Paste="_|paste|_",t.PastePlain="_|paste-plain|_",t.SelectAll="_|select-all|_",t.Format="_|format|_",t))(oe||{}),re=(t=>(t.PROD="RMR0000",t.UNKNOWN="RMR0001",t.INVALID_COMMAND_ARGUMENTS="RMR0002",t.CUSTOM="RMR0003",t.CORE_HELPERS="RMR0004",t.MUTATION="RMR0005",t.INTERNAL="RMR0006",t.MISSING_REQUIRED_EXTENSION="RMR0007",t.MANAGER_PHASE_ERROR="RMR0008",t.INVALID_GET_EXTENSION="RMR0010",t.INVALID_MANAGER_ARGUMENTS="RMR0011",t.SCHEMA="RMR0012",t.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",t.INVALID_MANAGER_EXTENSION="RMR0014",t.DUPLICATE_COMMAND_NAMES="RMR0016",t.DUPLICATE_HELPER_NAMES="RMR0017",t.NON_CHAINABLE_COMMAND="RMR0018",t.INVALID_EXTENSION="RMR0019",t.INVALID_CONTENT="RMR0021",t.INVALID_NAME="RMR0050",t.EXTENSION="RMR0100",t.EXTENSION_SPEC="RMR0101",t.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",t.INVALID_SET_EXTENSION_OPTIONS="RMR0103",t.REACT_PROVIDER_CONTEXT="RMR0200",t.REACT_GET_ROOT_PROPS="RMR0201",t.REACT_EDITOR_VIEW="RMR0202",t.REACT_CONTROLLED="RMR0203",t.REACT_NODE_VIEW="RMR0204",t.REACT_GET_CONTEXT="RMR0205",t.REACT_COMPONENTS="RMR0206",t.REACT_HOOKS="RMR0207",t.I18N_CONTEXT="RMR0300",t))(re||{}),o4=function(e){return i4(e)&&!s4(e)};function i4(t){return!!t&&typeof t=="object"}function s4(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||c4(t)}var a4=typeof Symbol=="function"&&Symbol.for,l4=a4?Symbol.for("react.element"):60103;function c4(t){return t.$$typeof===l4}function u4(t){return Array.isArray(t)?[]:{}}function Wd(t,e){return e.clone!==!1&&e.isMergeableObject(t)?Mc(u4(t),t,e):t}function d4(t,e,n){return t.concat(e).map(function(r){return Wd(r,n)})}function h4(t,e){if(!e.customMerge)return Mc;var n=e.customMerge(t);return typeof n=="function"?n:Mc}function p4(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function gS(t){return Object.keys(t).concat(p4(t))}function xR(t,e){try{return e in t}catch{return!1}}function f4(t,e){return xR(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function g4(t,e,n){var r={};return n.isMergeableObject(t)&&gS(t).forEach(function(o){r[o]=Wd(t[o],n)}),gS(e).forEach(function(o){f4(t,o)||(xR(t,o)&&n.isMergeableObject(e[o])?r[o]=h4(o,n)(t[o],e[o],n):r[o]=Wd(e[o],n))}),r}function Mc(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||d4,n.isMergeableObject=n.isMergeableObject||o4,n.cloneUnlessOtherwiseSpecified=Wd;var r=Array.isArray(e),o=Array.isArray(t),i=r===o;return i?r?n.arrayMerge(t,e,n):g4(t,e,n):Wd(e,n)}Mc.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,o){return Mc(r,o,n)},{})};var m4=Mc,v4=m4;const y4=jo(v4);var b4=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n};const w4=jo(b4);/*! + */var QD=D,e4=Symbol.for("react.element"),t4=Symbol.for("react.fragment"),n4=Object.prototype.hasOwnProperty,r4=QD.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o4={key:!0,ref:!0,__self:!0,__source:!0};function wR(t,e,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(s=e.ref);for(r in e)n4.call(e,r)&&!o4.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)o[r]===void 0&&(o[r]=e[r]);return{$$typeof:e4,type:t,key:i,ref:s,props:o,_owner:r4.current}}dm.Fragment=t4;dm.jsx=wR;dm.jsxs=wR;dR.exports=dm;var V=dR.exports,b0={exports:{}};(function(t,e){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,o=Error.captureStackTrace;o===void 0&&(o=function(u){var c=new Error;r(u,"stack",{configurable:!0,get:function(){var h=c.stack;return r(this,"stack",{configurable:!0,value:h,writable:!0}),h},set:function(h){r(u,"stack",{configurable:!0,value:h,writable:!0})}})});function i(a){a!==void 0&&r(this,"message",{configurable:!0,value:a,writable:!0});var u=this.constructor.name;u!==void 0&&u!==this.name&&r(this,"name",{configurable:!0,value:u,writable:!0}),o(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var s=function(){function a(c,d){return r(c,"name",{configurable:!0,value:d})}try{var u=function(){};if(a(u,"foo"),u.name==="foo")return a}catch{}}();function l(a,u){if(u==null||u===Error)u=i;else if(typeof u!="function")throw new TypeError("super_ should be a function");var c;if(typeof a=="string")c=a,a=n!==void 0?function(){return n(u,arguments,this.constructor)}:function(){u.apply(this,arguments)},s!==void 0&&(s(a,c),c=void 0);else if(typeof a!="function")throw new TypeError("constructor should be either a string or a function");a.super_=a.super=u;var d={constructor:{configurable:!0,value:a,writable:!0}};return c!==void 0&&(d.name={configurable:!0,value:c,writable:!0}),a.prototype=Object.create(u.prototype,d),a}e=t.exports=l,e.BaseError=i})(b0,b0.exports);var xR=b0.exports,fS="ProseMirror-selectednode",wb="",xs="\0",gS="__state_override__",i4={LastNodeCompatible:"lastNodeCompatible",FormattingMark:"formattingMark",FormattingNode:"formattingNode",NodeCursor:"nodeCursor",FontStyle:"fontStyle",Link:"link",Color:"color",Alignment:"alignment",Indentation:"indentation",Behavior:"behavior",Code:"code",InlineNode:"inline",ListContainerNode:"listContainer",ListItemNode:"listItemNode",Block:"block",BlockNode:"block",TextBlock:"textBlock",ExcludeInputRules:"excludeFromInputRules",PreventExits:"preventsExits",Media:"media"},ke=i4,Bi=Symbol.for("__remirror__"),yn=(t=>(t.PlainExtension="RemirrorPlainExtension",t.NodeExtension="RemirrorNodeExtension",t.MarkExtension="RemirrorMarkExtension",t.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",t.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",t.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",t.Manager="RemirrorManager",t.Preset="RemirrorPreset",t.PresetConstructor="RemirrorPresetConstructor",t))(yn||{}),ot=(t=>(t[t.Critical=1e6]="Critical",t[t.Highest=1e5]="Highest",t[t.High=1e4]="High",t[t.Medium=1e3]="Medium",t[t.Default=100]="Default",t[t.Low=10]="Low",t[t.Lowest=0]="Lowest",t))(ot||{}),mr=(t=>(t[t.None=0]="None",t[t.Create=1]="Create",t[t.EditorView=2]="EditorView",t[t.Runtime=3]="Runtime",t[t.Destroy=4]="Destroy",t))(mr||{}),oe=(t=>(t.Undo="_|undo|_",t.Redo="_|redo|_",t.Bold="_|bold|_",t.Italic="_|italic|_",t.Underline="_|underline|_",t.Strike="_|strike|_",t.Code="_|code|_",t.Paragraph="_|paragraph|_",t.H1="_|h1|_",t.H2="_|h2|_",t.H3="_|h3|_",t.H4="_|h4|_",t.H5="_|h5|_",t.H6="_|h6|_",t.TaskList="_|task|_",t.BulletList="_|bullet|_",t.OrderedList="_|number|_",t.Quote="_|quote|_",t.Divider="_|divider|_",t.Codeblock="_|codeblock|_",t.ClearFormatting="_|clear|_",t.Superscript="_|sup|_",t.Subscript="_|sub|_",t.LeftAlignment="_|left-align|_",t.CenterAlignment="_|center-align|_",t.RightAlignment="_|right-align|_",t.JustifyAlignment="_|justify-align|_",t.InsertLink="_|link|_",t.Find="_|find|_",t.FindBackwards="_|find-backwards|_",t.FindReplace="_|find-replace|_",t.AddFootnote="_|footnote|_",t.AddComment="_|comment|_",t.ContextMenu="_|context-menu|_",t.IncreaseFontSize="_|inc-font-size|_",t.DecreaseFontSize="_|dec-font-size|_",t.IncreaseIndent="_|indent|_",t.DecreaseIndent="_|dedent|_",t.Shortcuts="_|shortcuts|_",t.Copy="_|copy|_",t.Cut="_|cut|_",t.Paste="_|paste|_",t.PastePlain="_|paste-plain|_",t.SelectAll="_|select-all|_",t.Format="_|format|_",t))(oe||{}),re=(t=>(t.PROD="RMR0000",t.UNKNOWN="RMR0001",t.INVALID_COMMAND_ARGUMENTS="RMR0002",t.CUSTOM="RMR0003",t.CORE_HELPERS="RMR0004",t.MUTATION="RMR0005",t.INTERNAL="RMR0006",t.MISSING_REQUIRED_EXTENSION="RMR0007",t.MANAGER_PHASE_ERROR="RMR0008",t.INVALID_GET_EXTENSION="RMR0010",t.INVALID_MANAGER_ARGUMENTS="RMR0011",t.SCHEMA="RMR0012",t.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",t.INVALID_MANAGER_EXTENSION="RMR0014",t.DUPLICATE_COMMAND_NAMES="RMR0016",t.DUPLICATE_HELPER_NAMES="RMR0017",t.NON_CHAINABLE_COMMAND="RMR0018",t.INVALID_EXTENSION="RMR0019",t.INVALID_CONTENT="RMR0021",t.INVALID_NAME="RMR0050",t.EXTENSION="RMR0100",t.EXTENSION_SPEC="RMR0101",t.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",t.INVALID_SET_EXTENSION_OPTIONS="RMR0103",t.REACT_PROVIDER_CONTEXT="RMR0200",t.REACT_GET_ROOT_PROPS="RMR0201",t.REACT_EDITOR_VIEW="RMR0202",t.REACT_CONTROLLED="RMR0203",t.REACT_NODE_VIEW="RMR0204",t.REACT_GET_CONTEXT="RMR0205",t.REACT_COMPONENTS="RMR0206",t.REACT_HOOKS="RMR0207",t.I18N_CONTEXT="RMR0300",t))(re||{}),s4=function(e){return a4(e)&&!l4(e)};function a4(t){return!!t&&typeof t=="object"}function l4(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||d4(t)}var c4=typeof Symbol=="function"&&Symbol.for,u4=c4?Symbol.for("react.element"):60103;function d4(t){return t.$$typeof===u4}function h4(t){return Array.isArray(t)?[]:{}}function Wd(t,e){return e.clone!==!1&&e.isMergeableObject(t)?Mc(h4(t),t,e):t}function p4(t,e,n){return t.concat(e).map(function(r){return Wd(r,n)})}function f4(t,e){if(!e.customMerge)return Mc;var n=e.customMerge(t);return typeof n=="function"?n:Mc}function g4(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function mS(t){return Object.keys(t).concat(g4(t))}function kR(t,e){try{return e in t}catch{return!1}}function m4(t,e){return kR(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function v4(t,e,n){var r={};return n.isMergeableObject(t)&&mS(t).forEach(function(o){r[o]=Wd(t[o],n)}),mS(e).forEach(function(o){m4(t,o)||(kR(t,o)&&n.isMergeableObject(e[o])?r[o]=f4(o,n)(t[o],e[o],n):r[o]=Wd(e[o],n))}),r}function Mc(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||p4,n.isMergeableObject=n.isMergeableObject||s4,n.cloneUnlessOtherwiseSpecified=Wd;var r=Array.isArray(e),o=Array.isArray(t),i=r===o;return i?r?n.arrayMerge(t,e,n):v4(t,e,n):Wd(e,n)}Mc.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,o){return Mc(r,o,n)},{})};var y4=Mc,b4=y4;const w4=ko(b4);var x4=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n};const k4=ko(x4);/*! * isobject * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var kR=function(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1};/*! + */var ER=function(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1};/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var x4=kR;function mS(t){return x4(t)===!0&&Object.prototype.toString.call(t)==="[object Object]"}var k4=function(e){var n,r;return!(mS(e)===!1||(n=e.constructor,typeof n!="function")||(r=n.prototype,mS(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};/*! + */var E4=ER;function vS(t){return E4(t)===!0&&Object.prototype.toString.call(t)==="[object Object]"}var S4=function(e){var n,r;return!(vS(e)===!1||(n=e.constructor,typeof n!="function")||(r=n.prototype,vS(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};/*! * is-extendable * * Copyright (c) 2015-2017, Jon Schlinkert. * Released under the MIT License. - */var E4=k4,S4=function(e){return E4(e)||typeof e=="function"||Array.isArray(e)};/*! + */var C4=S4,T4=function(e){return C4(e)||typeof e=="function"||Array.isArray(e)};/*! * object.omit * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var C4=S4,T4=function(e,n,r){if(!C4(e))return{};typeof n=="function"&&(r=n,n=[]),typeof n=="string"&&(n=[n]);for(var o=typeof r=="function",i=Object.keys(e),s={},l=0;l * * Copyright (c) 2014-2015 Jon Schlinkert, contributors. * Licensed under the MIT License - */var A4=kR,_4=function(e,n){if(!A4(e)&&typeof e!="function")return{};var r={};if(typeof n=="string")return n in e&&(r[n]=e[n]),r;for(var o=n.length,i=-1;++i{let d=a.prefixes[c]||"",h=u;return n===!1&&(r&&(h=h.normalize("NFD").replace(new RegExp(`[^a-zA-ZØßø0-9${r.join("")}]`,"g"),"")),r||(h=h.normalize("NFD").replace(/[^a-zA-ZØßø0-9]/g,""),d="")),r&&(d=d.replace(new RegExp(`[^${r.join("")}]`,"g"),"")),c===0?d+h:!d&&!h?"":s&&!d&&o.match(/\s/)?" "+h:(d||o)+h}).filter(Boolean)}function O4(t){const e=t.matchAll(ER).next().value,n=e?e.index:0;return t.slice(0,n+1).toUpperCase()+t.slice(n+1).toLowerCase()}function CR(t,e){return SR(t,e).reduce((n,r)=>n+O4(r),"")}function vS(t,e){return SR(t,{...e,prefix:"-"}).join("").toLowerCase()}function b0(t,e,n,r){var o,i=!1,s=0;function l(){o&&clearTimeout(o)}function a(){l(),i=!0}typeof e!="boolean"&&(r=n,n=e,e=void 0);function u(){for(var c=arguments.length,d=new Array(c),h=0;ht?g():e!==!0&&(o=setTimeout(r?m:g,r===void 0?t-f:t))}return u.cancel=a,u}function TR(t,e,n){return n===void 0?b0(t,e,!1):b0(t,n,e!==!1)}function Mt(t,e,n){const r=t[e];return wb(!hm(r),n),r}function wb(t,e){if(!t)throw new I4(e)}var I4=class extends wR.BaseError{constructor(){super(...arguments),this.name="AssertionError"}};function an(t){return Object.entries(t)}function Vd(t){return Object.keys(t)}function Uh(t){return Object.values(t)}function ir(t,e,n){return t.includes(e,n)}function ye(t){return Object.assign(Object.create(null),t)}function AR(t){return Object.prototype.toString.call(t)}function _R(t){return AR(t).slice(8,-1)}function Wh(t,e){return n=>typeof n!==t?!1:e?e(n):!0}function xb(t){return e=>_R(e)===t}var hm=Wh("undefined"),Ee=Wh("string"),qr=Wh("number",t=>!Number.isNaN(t)),Qe=Wh("function");function L4(t){return t===null}function w0(t){return t===!0||t===!1}function Qs(t){if(_R(t)!=="Object")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})}function N4(t){return t==null||/^[bns]/.test(typeof t)}function Bs(t){return L4(t)||hm(t)}function $n(t){return!Bs(t)&&(Qe(t)||Wh("object")(t))}var $4=xb("RegExp");function D4(t){return xb("Map")(t)}function P4(t){return xb("Set")(t)}function jd(t){return $n(t)&&!D4(t)&&!P4(t)&&Object.keys(t).length===0}var Pt=Array.isArray;function Hs(t){return Pt(t)&&t.length===0}function yS(t){return Pt(t)&&t.length>0}function z4(t){return t.charAt(0).toUpperCase()+t.slice(1)}function lu(t,e,n=r=>!!r){e.lastIndex=0;const r=[],o=e.flags;let i;o.includes("g")||(e=new RegExp(e.source,`g${o}`));do i=e.exec(t),i&&r.push(i);while(n(i));return e.lastIndex=0,r}function Yf(){const t=Date.now(),e=Yf.last||t;return Yf.last=t>e?t:e+1}Yf.last=0;function Oc(t=""){return`${t}${Yf().toString(36)}`}function RR(t){return bb(t,e=>!hm(e))}function F4(t){if(!Qs(t))throw new Error("An invalid value was passed into this clone utility. Expected a plain object");return{...t}}var MR=w4;function Ic(t,e=!1){const n=e?[...t].reverse():t,r=new Set(n);return e?[...r].reverse():[...r]}function OR(t){const e=[];for(const n of t){const r=Pt(n)?OR(n):[n];e.push(...r)}return e}function IR(){}function LR(...t){return y4.all(t,{isMergeableObject:Qs})}function B4({min:t,max:e,value:n}){return ne?e:n}function H4(t){return t[t.length-1]}function Us(t,e){return[...t].map((n,r)=>({value:n,index:r})).sort((n,r)=>e(n.value,r.value)||n.index-r.index).map(({value:n})=>n)}function U4(t,e,n){try{if(Ee(e)&&e in t)return t[e];Pt(e)&&(e=`['${e.join("']['")}']`);let r=t;return e.replace(/\[\s*(["'])(.*?)\1\s*]|^\s*(\w+)\s*(?=\.|\[|$)|\.\s*(\w*)\s*(?=\.|\[|$)|\[\s*(-?\d+)\s*]/g,(o,i,s,l,a,u)=>(r=r[s||l||a||u],"")),r===void 0?n:r}catch{return n}}function W4(t,e){const n=F4(e);let r=n;for(const[o,i]of t.entries()){const s=o>=t.length-1;let l=r[i];if(s){if(Pt(r)){const a=Number.parseInt(i.toString(),10);qr(a)&&r.splice(a,1)}else Reflect.deleteProperty(r,i);return n}if(N4(l))return n;l=Pt(l)?[...l]:{...l},r[i]=l,r=l}return n}function V4(t){return e=>U4(e,t)}function kb(t,e,n=!1){const r=[],o=new Set,i=Qe(e)?e:V4(e),s=n?[...t].reverse():t;for(const l of s){const a=i(l);o.has(a)||(o.add(a),r.push(l))}return n?r.reverse():r}function Eb(t,e){const n=Pt(t)?t[0]:t;return qr(e)?n<=e?Array.from({length:e+1-n},(r,o)=>o+n):Array.from({length:n+1-e},(r,o)=>-1*o+n):Array.from({length:Math.abs(n)},(r,o)=>(n<0?-1:1)*o)}function ri(t,...e){const n=e.filter(qr);return t>=Math.min(...n)&&t<=Math.max(...n)}function NR(t){return Qe(t)?t():t}var $R="https://remirror.io/docs/errors",j4={[re.UNKNOWN]:"An error occurred but we're not quite sure why. 🧐",[re.INVALID_COMMAND_ARGUMENTS]:"The arguments passed to the command method were invalid.",[re.CUSTOM]:"This is a custom error, possibly thrown by an external library.",[re.CORE_HELPERS]:"An error occurred in a function called from the `@remirror/core-helpers` library.",[re.MUTATION]:"Mutation of immutable value detected.",[re.INTERNAL]:"This is an error which should not occur and is internal to the remirror codebase.",[re.MISSING_REQUIRED_EXTENSION]:"Your editor is missing a required extension.",[re.MANAGER_PHASE_ERROR]:"This occurs when accessing a method or property before it is available.",[re.INVALID_GET_EXTENSION]:"The user requested an invalid extension from the getExtensions method. Please check the `createExtensions` return method is returning an extension with the defined constructor.",[re.INVALID_MANAGER_ARGUMENTS]:"Invalid value(s) passed into `Manager` constructor. Only `Presets` and `Extensions` are supported.",[re.SCHEMA]:"There is a problem with the schema or you are trying to access a node / mark that doesn't exists.",[re.HELPERS_CALLED_IN_OUTER_SCOPE]:"The `helpers` method which is passed into the ``create*` method should only be called within returned method since it relies on an active view (not present in the outer scope).",[re.INVALID_MANAGER_EXTENSION]:"You requested an invalid extension from the manager.",[re.DUPLICATE_COMMAND_NAMES]:"Command method names must be unique within the editor.",[re.DUPLICATE_HELPER_NAMES]:"Helper method names must be unique within the editor.",[re.NON_CHAINABLE_COMMAND]:"Attempted to chain a non chainable command.",[re.INVALID_EXTENSION]:"The provided extension is invalid.",[re.INVALID_CONTENT]:"The content provided to the editor is not supported.",[re.INVALID_NAME]:"An invalid name was used for the extension.",[re.EXTENSION]:"An error occurred within an extension. More details should be made available.",[re.EXTENSION_SPEC]:"The spec was defined without calling the `defaults`, `parse` or `dom` methods.",[re.EXTENSION_EXTRA_ATTRIBUTES]:"Extra attributes must either be a string or an object.",[re.INVALID_SET_EXTENSION_OPTIONS]:"A call to `extension.setOptions` was made with invalid keys.",[re.REACT_PROVIDER_CONTEXT]:"`useRemirrorContext` was called outside of the `remirror` context. It can only be used within an active remirror context created by the ``.",[re.REACT_GET_ROOT_PROPS]:"`getRootProps` has been attached to the DOM more than once. It should only be attached to the dom once per editor.",[re.REACT_EDITOR_VIEW]:"A problem occurred adding the editor view to the dom.",[re.REACT_CONTROLLED]:"There is a problem with your controlled editor setup.",[re.REACT_NODE_VIEW]:"Something went wrong with your custom ReactNodeView Component.",[re.REACT_GET_CONTEXT]:"You attempted to call `getContext` provided by the `useRemirror` prop during the first render of the editor. This is not possible and should only be after the editor first mounts.",[re.REACT_COMPONENTS]:"An error occurred within a remirror component.",[re.REACT_HOOKS]:"An error occurred within a remirror hook.",[re.I18N_CONTEXT]:"You called `useI18n()` outside of an `I18nProvider` context."};function G4(t){return Ee(t)&&ir(Uh(re),t)}function K4(t,e){const n=j4[t],r=n?`${n} + */var R4=ER,M4=function(e,n){if(!R4(e)&&typeof e!="function")return{};var r={};if(typeof n=="string")return n in e&&(r[n]=e[n]),r;for(var o=n.length,i=-1;++i{let d=a.prefixes[c]||"",h=u;return n===!1&&(r&&(h=h.normalize("NFD").replace(new RegExp(`[^a-zA-ZØßø0-9${r.join("")}]`,"g"),"")),r||(h=h.normalize("NFD").replace(/[^a-zA-ZØßø0-9]/g,""),d="")),r&&(d=d.replace(new RegExp(`[^${r.join("")}]`,"g"),"")),c===0?d+h:!d&&!h?"":s&&!d&&o.match(/\s/)?" "+h:(d||o)+h}).filter(Boolean)}function L4(t){const e=t.matchAll(SR).next().value,n=e?e.index:0;return t.slice(0,n+1).toUpperCase()+t.slice(n+1).toLowerCase()}function TR(t,e){return CR(t,e).reduce((n,r)=>n+L4(r),"")}function yS(t,e){return CR(t,{...e,prefix:"-"}).join("").toLowerCase()}function x0(t,e,n,r){var o,i=!1,s=0;function l(){o&&clearTimeout(o)}function a(){l(),i=!0}typeof e!="boolean"&&(r=n,n=e,e=void 0);function u(){for(var c=arguments.length,d=new Array(c),h=0;ht?g():e!==!0&&(o=setTimeout(r?m:g,r===void 0?t-f:t))}return u.cancel=a,u}function AR(t,e,n){return n===void 0?x0(t,e,!1):x0(t,n,e!==!1)}function Mt(t,e,n){const r=t[e];return kb(!hm(r),n),r}function kb(t,e){if(!t)throw new N4(e)}var N4=class extends xR.BaseError{constructor(){super(...arguments),this.name="AssertionError"}};function an(t){return Object.entries(t)}function Vd(t){return Object.keys(t)}function Uh(t){return Object.values(t)}function ir(t,e,n){return t.includes(e,n)}function ye(t){return Object.assign(Object.create(null),t)}function _R(t){return Object.prototype.toString.call(t)}function RR(t){return _R(t).slice(8,-1)}function Wh(t,e){return n=>typeof n!==t?!1:e?e(n):!0}function Eb(t){return e=>RR(e)===t}var hm=Wh("undefined"),Ee=Wh("string"),qr=Wh("number",t=>!Number.isNaN(t)),Qe=Wh("function");function $4(t){return t===null}function k0(t){return t===!0||t===!1}function Qs(t){if(RR(t)!=="Object")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})}function D4(t){return t==null||/^[bns]/.test(typeof t)}function Bs(t){return $4(t)||hm(t)}function $n(t){return!Bs(t)&&(Qe(t)||Wh("object")(t))}var P4=Eb("RegExp");function z4(t){return Eb("Map")(t)}function F4(t){return Eb("Set")(t)}function jd(t){return $n(t)&&!z4(t)&&!F4(t)&&Object.keys(t).length===0}var Pt=Array.isArray;function Hs(t){return Pt(t)&&t.length===0}function bS(t){return Pt(t)&&t.length>0}function B4(t){return t.charAt(0).toUpperCase()+t.slice(1)}function lu(t,e,n=r=>!!r){e.lastIndex=0;const r=[],o=e.flags;let i;o.includes("g")||(e=new RegExp(e.source,`g${o}`));do i=e.exec(t),i&&r.push(i);while(n(i));return e.lastIndex=0,r}function Yf(){const t=Date.now(),e=Yf.last||t;return Yf.last=t>e?t:e+1}Yf.last=0;function Oc(t=""){return`${t}${Yf().toString(36)}`}function MR(t){return xb(t,e=>!hm(e))}function H4(t){if(!Qs(t))throw new Error("An invalid value was passed into this clone utility. Expected a plain object");return{...t}}var OR=k4;function Ic(t,e=!1){const n=e?[...t].reverse():t,r=new Set(n);return e?[...r].reverse():[...r]}function IR(t){const e=[];for(const n of t){const r=Pt(n)?IR(n):[n];e.push(...r)}return e}function LR(){}function NR(...t){return w4.all(t,{isMergeableObject:Qs})}function U4({min:t,max:e,value:n}){return ne?e:n}function W4(t){return t[t.length-1]}function Us(t,e){return[...t].map((n,r)=>({value:n,index:r})).sort((n,r)=>e(n.value,r.value)||n.index-r.index).map(({value:n})=>n)}function V4(t,e,n){try{if(Ee(e)&&e in t)return t[e];Pt(e)&&(e=`['${e.join("']['")}']`);let r=t;return e.replace(/\[\s*(["'])(.*?)\1\s*]|^\s*(\w+)\s*(?=\.|\[|$)|\.\s*(\w*)\s*(?=\.|\[|$)|\[\s*(-?\d+)\s*]/g,(o,i,s,l,a,u)=>(r=r[s||l||a||u],"")),r===void 0?n:r}catch{return n}}function j4(t,e){const n=H4(e);let r=n;for(const[o,i]of t.entries()){const s=o>=t.length-1;let l=r[i];if(s){if(Pt(r)){const a=Number.parseInt(i.toString(),10);qr(a)&&r.splice(a,1)}else Reflect.deleteProperty(r,i);return n}if(D4(l))return n;l=Pt(l)?[...l]:{...l},r[i]=l,r=l}return n}function G4(t){return e=>V4(e,t)}function Sb(t,e,n=!1){const r=[],o=new Set,i=Qe(e)?e:G4(e),s=n?[...t].reverse():t;for(const l of s){const a=i(l);o.has(a)||(o.add(a),r.push(l))}return n?r.reverse():r}function Cb(t,e){const n=Pt(t)?t[0]:t;return qr(e)?n<=e?Array.from({length:e+1-n},(r,o)=>o+n):Array.from({length:n+1-e},(r,o)=>-1*o+n):Array.from({length:Math.abs(n)},(r,o)=>(n<0?-1:1)*o)}function ri(t,...e){const n=e.filter(qr);return t>=Math.min(...n)&&t<=Math.max(...n)}function $R(t){return Qe(t)?t():t}var DR="https://remirror.io/docs/errors",K4={[re.UNKNOWN]:"An error occurred but we're not quite sure why. 🧐",[re.INVALID_COMMAND_ARGUMENTS]:"The arguments passed to the command method were invalid.",[re.CUSTOM]:"This is a custom error, possibly thrown by an external library.",[re.CORE_HELPERS]:"An error occurred in a function called from the `@remirror/core-helpers` library.",[re.MUTATION]:"Mutation of immutable value detected.",[re.INTERNAL]:"This is an error which should not occur and is internal to the remirror codebase.",[re.MISSING_REQUIRED_EXTENSION]:"Your editor is missing a required extension.",[re.MANAGER_PHASE_ERROR]:"This occurs when accessing a method or property before it is available.",[re.INVALID_GET_EXTENSION]:"The user requested an invalid extension from the getExtensions method. Please check the `createExtensions` return method is returning an extension with the defined constructor.",[re.INVALID_MANAGER_ARGUMENTS]:"Invalid value(s) passed into `Manager` constructor. Only `Presets` and `Extensions` are supported.",[re.SCHEMA]:"There is a problem with the schema or you are trying to access a node / mark that doesn't exists.",[re.HELPERS_CALLED_IN_OUTER_SCOPE]:"The `helpers` method which is passed into the ``create*` method should only be called within returned method since it relies on an active view (not present in the outer scope).",[re.INVALID_MANAGER_EXTENSION]:"You requested an invalid extension from the manager.",[re.DUPLICATE_COMMAND_NAMES]:"Command method names must be unique within the editor.",[re.DUPLICATE_HELPER_NAMES]:"Helper method names must be unique within the editor.",[re.NON_CHAINABLE_COMMAND]:"Attempted to chain a non chainable command.",[re.INVALID_EXTENSION]:"The provided extension is invalid.",[re.INVALID_CONTENT]:"The content provided to the editor is not supported.",[re.INVALID_NAME]:"An invalid name was used for the extension.",[re.EXTENSION]:"An error occurred within an extension. More details should be made available.",[re.EXTENSION_SPEC]:"The spec was defined without calling the `defaults`, `parse` or `dom` methods.",[re.EXTENSION_EXTRA_ATTRIBUTES]:"Extra attributes must either be a string or an object.",[re.INVALID_SET_EXTENSION_OPTIONS]:"A call to `extension.setOptions` was made with invalid keys.",[re.REACT_PROVIDER_CONTEXT]:"`useRemirrorContext` was called outside of the `remirror` context. It can only be used within an active remirror context created by the ``.",[re.REACT_GET_ROOT_PROPS]:"`getRootProps` has been attached to the DOM more than once. It should only be attached to the dom once per editor.",[re.REACT_EDITOR_VIEW]:"A problem occurred adding the editor view to the dom.",[re.REACT_CONTROLLED]:"There is a problem with your controlled editor setup.",[re.REACT_NODE_VIEW]:"Something went wrong with your custom ReactNodeView Component.",[re.REACT_GET_CONTEXT]:"You attempted to call `getContext` provided by the `useRemirror` prop during the first render of the editor. This is not possible and should only be after the editor first mounts.",[re.REACT_COMPONENTS]:"An error occurred within a remirror component.",[re.REACT_HOOKS]:"An error occurred within a remirror hook.",[re.I18N_CONTEXT]:"You called `useI18n()` outside of an `I18nProvider` context."};function Y4(t){return Ee(t)&&ir(Uh(re),t)}function X4(t,e){const n=K4[t],r=n?`${n} `:"",o=e?`${e} -`:"";return`${r}${o}For more information visit ${$R}#${t.toLowerCase()}`}var DR=class extends wR.BaseError{constructor({code:t,message:e,disableLogging:n=!1}={}){const r=G4(t)?t:re.CUSTOM;super(K4(r,e)),this.errorCode=r,this.url=`${$R}#${r.toLowerCase()}`,n||console.error(this.message)}static create(t={}){return new DR(t)}};function we(t,e){if(!t)throw DR.create(e)}function pm(t){if(typeof t!="object"||t===null)return t;const e=Symbol.toStringTag in t&&t[Symbol.toStringTag]==="Module"?t.default??t:t;return e&&typeof t=="object"&&"__esModule"in e&&e.__esModule&&e.default!==void 0?e.default:e}function La(t,e={}){return t}function _n(t){this.content=t}_n.prototype={constructor:_n,find:function(t){for(var e=0;e>1}};_n.from=function(t){if(t instanceof _n)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new _n(e)};function PR(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=PR(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function zR(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),l=e.child(--i),a=s.nodeSize;if(s==l){n-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let u=0,c=Math.min(s.text.length,l.text.length);for(;ue&&r(a,o+l,i||null,s)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,e-c),Math.min(a.content.size,n-c),r,o+c)}l=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",s=!0;return this.nodesBetween(e,n,(l,a)=>{l.isText?(i+=l.text.slice(Math.max(e,a)-a,n-a),s=!r):l.isLeaf?(o?i+=typeof o=="function"?o(l):o:l.type.spec.leafText&&(i+=l.type.spec.leafText(l)),s=!r):!s&&l.isBlock&&(i+=r,s=!0)},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);ie)for(let i=0,s=0;se&&((sn)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,n-s-1))),r.push(l),o+=l.nodeSize),s=a}return new J(r,o)}cutByIndex(e,n){return e==n?J.empty:e==0&&n==this.content.length?this:new J(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new J(o,i)}addToStart(e){return new J([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new J(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;nthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),s=o+i.nodeSize;if(s>=e)return s==e||n>0?Ip(r+1,s):Ip(r,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return J.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new J(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return J.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;nr.type.rank-o.type.rank),n}}je.none=[];class qf extends Error{}class ae{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=BR(this.content,e+this.openStart,n);return r&&new ae(r,this.openStart,this.openEnd)}removeBetween(e,n){return new ae(FR(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return ae.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ae(J.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new ae(e,r,o)}}ae.empty=new ae(J.empty,0,0);function FR(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:l}=t.findIndex(n);if(o==e||i.isText){if(l!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(FR(i.content,e-o-1,n-o-1)))}function BR(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),s=t.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let l=BR(s.content,e-i-1,n);return l&&t.replaceChild(o,s.copy(l))}function Y4(t,e,n){if(n.openStart>t.depth)throw new qf("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new qf("Inconsistent open depths");return HR(t,e,n,0)}function HR(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Ed(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Ua(t.nodeAfter,r),i++));for(let l=i;lo&&x0(t,e,o+1),s=r.depth>o&&x0(n,r,o+1),l=[];return Ed(null,t,o,l),i&&s&&e.index(o)==n.index(o)?(UR(i,s),Ua(Wa(i,WR(t,e,n,r,o+1)),l)):(i&&Ua(Wa(i,Zf(t,e,o+1)),l),Ed(e,n,o,l),s&&Ua(Wa(s,Zf(n,r,o+1)),l)),Ed(r,null,o,l),new J(l)}function Zf(t,e,n){let r=[];if(Ed(null,t,n,r),t.depth>n){let o=x0(t,e,n+1);Ua(Wa(o,Zf(t,e,n+1)),r)}return Ed(e,null,n,r),new J(r)}function X4(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(J.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class Lc{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Xa(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=e;;){let{index:l,offset:a}=s.content.findIndex(i),u=i-a;if(r.push(s,l,o+a),!u||(s=s.child(l),s.isText))break;i=u-1,o+=a+1}return new Lc(n,r,i)}static resolveCached(e,n){for(let o=0;oe&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),VR(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=J.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=o;an.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=J.fromJSON(e,n.content);return e.nodeType(n.type).create(n.attrs,o,r)}};As.prototype.text=void 0;class Jf extends As{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):VR(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Jf(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Jf(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function VR(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class qa{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new J4(e,n);if(r.next==null)return qa.empty;let o=jR(r);r.next&&r.err("Unexpected trailing text");let i=iP(oP(o));return sP(i,r),i}matchType(e){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+e.indexOf(r.next[s].next);return i}).join(` -`)}}qa.empty=new qa(!0);class J4{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function jR(t){let e=[];do e.push(Q4(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Q4(t){let e=[];do e.push(eP(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function eP(t){let e=rP(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=tP(t,e);else break;return e}function bS(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function tP(t,e){let n=bS(t),r=n;return t.eat(",")&&(t.next!="}"?r=bS(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function nP(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.groups.indexOf(e)>-1&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function rP(t){if(t.eat("(")){let e=jR(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=nP(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function oP(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,l,a){let u={term:a,to:l};return e[s].push(u),u}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,u)=>a.concat(i(u,l)),[]);if(s.type=="seq")for(let a=0;;a++){let u=i(s.exprs[a],l);if(a==s.exprs.length-1)return u;o(u,l=n())}else if(s.type=="star"){let a=n();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=n();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let u=0;u{t[s].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c{u||o.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let i=e[r.join(",")]=new qa(r.indexOf(t.length-1)>-1);for(let s=0;s-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;nr[i]=new qR(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class aP{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Vh{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=XR(o.attrs),this.excluded=null;let i=KR(this.attrs);this.instance=i?new je(this,i):null}create(e=null){return!e&&this.instance?this.instance:new je(this,YR(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new Vh(i,o++,n,s)),r}removeFromSet(e){for(var n=0;n-1}}let lP=class{constructor(e){this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=_n.from(e.nodes),n.marks=_n.from(e.marks||{}),this.nodes=E0.compile(this.spec.nodes,this),this.marks=Vh.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",l=i.spec.marks;i.contentMatch=r[s]||(r[s]=qa.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=l=="_"?null:l?xS(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:xS(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof E0){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,o)}text(e,n){let r=this.nodes.text;return new Jf(r,r.defaultAttrs,e,je.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return As.fromJSON(this,e)}markFromJSON(e){return je.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}};function xS(t,e){let n=[];for(let r=0;r-1)&&n.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class Za{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=e.nodes[r.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new ES(this,n,!1);return r.addAll(e,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new ES(this,n,!0);return r.addAll(e,n.from,n.to),ae.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;oe.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(s.getAttrs){let a=s.getAttrs(n);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(e){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=SS(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=SS(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Za(e,Za.schemaRules(e)))}}const ZR={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},cP={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},JR={ol:!0,ul:!0},Qf=1,eg=2,Sd=4;function kS(t,e,n){return e!=null?(e?Qf:0)|(e==="full"?eg:0):t&&t.whitespace=="pre"?Qf|eg:n&~Sd}class Lp{constructor(e,n,r,o,i,s,l){this.type=e,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=l,this.content=[],this.activeMarks=je.none,this.stashMarks=[],this.match=s||(l&Sd?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(J.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Qf)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=J.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(J.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(e){for(let n=this.stashMarks.length-1;n>=0;n--)if(e.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(e){for(let n=0,r=this.pendingMarks;nthis.addAll(e)),s&&this.sync(l),this.needsBlock=a}else this.withStyleRules(e,()=>{this.addElementByRule(e,i,i.consuming===!1?o:void 0)})}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` -`))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let n=je.none,r=je.none;for(let o=0;o{s.clearMark(l)&&(r=l.addToSet(r))}):n=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(n),s.consuming===!1)i=s;else break}return[n,r]}addElementByRule(e,n,r){let o,i,s;n.node?(i=this.parser.schema.nodes[n.node],i.isLeaf?this.insertNode(i.create(n.attrs))||this.leafFallback(e):o=this.enter(i,n.attrs||null,n.preserveWhitespace)):(s=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(s));let l=this.top;if(i&&i.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a)}o&&this.sync(l)&&this.open--,s&&this.removePendingMark(s,l)}addAll(e,n,r){let o=n||0;for(let i=n?e.childNodes[n]:e.firstChild,s=r==null?null:e.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i);this.findAtPoint(e,o)}findPlace(e){let n,r;for(let o=this.open;o>=0;o--){let i=this.nodes[o],s=i.findWrapping(e);if(s&&(!n||n.length>s.length)&&(n=s,r=i,!s.length)||i.solid)break}if(!n)return!1;this.sync(r);for(let o=0;othis.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));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(e){for(let n=this.open;n>=0;n--)if(this.nodes[n]==e)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let c=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!c||c.name!=u&&c.groups.indexOf(u)==-1)return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.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}}addPendingMark(e){let n=fP(e,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,n){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(e)>-1)o.pendingMarks=e.removeFromSet(o.pendingMarks);else{o.activeMarks=e.removeFromSet(o.activeMarks);let s=o.popFromStashMark(e);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==n)break}}}function uP(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&JR.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function dP(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function hP(t){let e=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=e.exec(t);)r.push(n[1],n[2].trim());return r}function SS(t){let e={};for(let n in t)e[n]=t[n];return e}function pP(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=l=>{i.push(l);for(let a=0;a{if(i.length||s.marks.length){let l=0,a=0;for(;l=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&Vr.renderSpec(t1(r),o(e,n))}static renderSpec(e,n,r=null){if(typeof n=="string")return{dom:e.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let o=n[0],i=o.indexOf(" ");i>0&&(r=o.slice(0,i),o=o.slice(i+1));let s,l=r?e.createElementNS(r,o):e.createElement(o),a=n[1],u=1;if(a&&typeof a=="object"&&a.nodeType==null&&!Array.isArray(a)){u=2;for(let c in a)if(a[c]!=null){let d=c.indexOf(" ");d>0?l.setAttributeNS(c.slice(0,d),c.slice(d+1),a[c]):l.setAttribute(c,a[c])}}for(let c=u;cu)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:p}=Vr.renderSpec(e,d,r);if(l.appendChild(h),p){if(s)throw new RangeError("Multiple content holes");s=p}}}return{dom:l,contentDOM:s}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Vr(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=CS(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return CS(e.marks)}}function CS(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function t1(t){return t.document||window.document}const QR=65535,e2=Math.pow(2,16);function gP(t,e){return t+e*e2}function TS(t){return t&QR}function mP(t){return(t-(t&QR))/e2}const t2=1,n2=2,gf=4,r2=8;class S0{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&r2)>0}get deletedBefore(){return(this.delInfo&(t2|gf))>0}get deletedAfter(){return(this.delInfo&(n2|gf))>0}get deletedAcross(){return(this.delInfo&gf)>0}}class Ur{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Ur.empty)return Ur.empty}recover(e){let n=0,r=TS(e);if(!this.inverted)for(let o=0;oe)break;let u=this.ranges[l+i],c=this.ranges[l+s],d=a+u;if(e<=d){let h=u?e==a?-1:e==d?1:n:n,p=a+o+(h<0?0:c);if(r)return p;let f=e==(n<0?a:d)?null:gP(l/3,e-a),g=e==a?n2:e==d?t2:gf;return(n<0?e!=a:e!=d)&&(g|=r2),new S0(p,g,f)}o+=c-u}return r?e+o:new S0(e+o,0,null)}touches(e,n){let r=0,o=TS(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;le)break;let u=this.ranges[l+i],c=a+u;if(e<=c&&l==o*3)return!0;r+=this.ranges[l+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=e.getMirror(n);this.appendMap(e.maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new mc;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;ri&&a!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return Kt.fromReplace(e,this.from,this.to,i)}invert(){return new Po(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ii(n.pos,r.pos,this.mark)}merge(e){return e instanceof Ii&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ii(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ii(n.from,n.to,e.markFromJSON(n.mark))}}cn.jsonID("addMark",Ii);class Po extends cn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new ae(Sb(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return Kt.fromReplace(e,this.from,this.to,r)}invert(){return new Ii(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Po(n.pos,r.pos,this.mark)}merge(e){return e instanceof Po&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Po(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Po(n.from,n.to,e.markFromJSON(n.mark))}}cn.jsonID("removeMark",Po);class ks extends cn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Kt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Kt.fromReplace(e,this.pos,this.pos+1,new ae(J.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new Yt(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Yt(n.from,n.to,n.gapFrom,n.gapTo,ae.fromJSON(e,n.slice),n.insert,!!n.structure)}}cn.jsonID("replaceAround",Yt);function C0(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function vP(t,e,n,r){let o=[],i=[],s,l;t.doc.nodesBetween(e,n,(a,u,c)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let h=Math.max(u,e),p=Math.min(u+a.nodeSize,n),f=r.addToSet(d);for(let g=0;gt.step(a)),i.forEach(a=>t.step(a))}function yP(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(s,l)=>{if(!s.isInline)return;i++;let a=null;if(r instanceof Vh){let u=s.marks,c;for(;c=r.isInSet(u);)(a||(a=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let u=Math.min(l+s.nodeSize,n);for(let c=0;ct.step(new Po(s.from,s.to,s.style)))}function bP(t,e,n,r=n.contentMatch){let o=t.doc.nodeAt(e),i=[],s=e+1;for(let l=0;l=0;l--)t.step(i[l])}function wP(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function cu(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let o=t.$from.node(r),i=t.$from.index(r),s=t.$to.indexAfter(r);if(rn;f--)g||r.index(f)>0?(g=!0,c=J.from(r.node(f).copy(c)),d++):a--;let h=J.empty,p=0;for(let f=i,g=!1;f>n;f--)g||o.after(f+1)=0;s--){if(r.size){let l=n[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=J.from(n[s].type.create(n[s].attrs,r))}let o=e.start,i=e.end;t.step(new Yt(o,i,o,i,new ae(r,0,0),n.length,!0))}function CP(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,l)=>{if(s.isTextblock&&!s.hasMarkup(r,o)&&TP(t.doc,t.mapping.slice(i).map(l),r)){t.clearIncompatible(t.mapping.slice(i).map(l,1),r);let a=t.mapping.slice(i),u=a.map(l,1),c=a.map(l+s.nodeSize,1);return t.step(new Yt(u,c,u+1,c-1,new ae(J.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function TP(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function AP(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new Yt(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new ae(J.from(s),0,0),1,!0))}function vc(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,c=n-2;u>i;u--,c--){let d=o.node(u),h=o.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(h,d.childCount),f=r&&r[c+1];f&&(p=p.replaceChild(0,f.type.create(f.attrs)));let g=r&&r[c]||d;if(!d.canReplace(h+1,d.childCount)||!g.type.validContent(p))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function _P(t,e,n=1,r){let o=t.doc.resolve(e),i=J.empty,s=J.empty;for(let l=o.depth,a=o.depth-n,u=n-1;l>a;l--,u--){i=J.from(o.node(l).copy(i));let c=r&&r[u];s=J.from(c?c.type.create(c.attrs,s):o.node(l).copy(s))}t.step(new vn(e,e,new ae(i.append(s),n,n),!0))}function jh(t,e){let n=t.resolve(e),r=n.index();return RP(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function RP(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function MP(t,e,n){let r=new vn(e-n,e+n,ae.empty,!0);t.step(r)}function o2(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),u=r.node(s),c=!1;if(i==1)c=u.canReplace(a,a,o);else{let d=u.contentMatchAt(a).findWrapping(o.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function Tb(t,e,n=e,r=ae.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return i2(o,i,r)?new vn(e,n,r):new IP(o,i,r).fit()}function i2(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class IP{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=J.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=J.from(e.node(o).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 e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new ae(i,s,l);return e>-1?new Yt(r.pos,e,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new vn(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=r1(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],c,d=null;if(n==1&&(s?u.matchType(s.type)||(d=u.fillBefore(J.from(s),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:d};if(n==2&&s&&(c=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:c};if(i&&u.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=r1(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new ae(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=r1(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new ae(Uu(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new ae(Uu(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let g=0;g1||a==0||g.content.size)&&(d=m,c.push(s2(g.mark(h.allowedMarks(g.marks)),u==1?a:0,u==l.childCount?p:-1)))}let f=u==l.childCount;f||(p=-1),this.placed=Wu(this.placed,n,J.from(c)),this.frontier[n].match=d,f&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,m=l;g1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;l--){let{match:a,type:u}=this.frontier[l],c=o1(e,l,u,a,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Wu(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=Wu(this.placed,this.depth,J.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(J.empty,!0);n.childCount&&(this.placed=Wu(this.placed,this.frontier.length,n))}}function Uu(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Uu(t.firstChild.content,e-1,n)))}function Wu(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Wu(t.lastChild.content,e-1,n)))}function r1(t,e){for(let n=0;n1&&(r=r.replaceChild(0,s2(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(J.empty,!0)))),t.copy(r)}function o1(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!LP(n,i.content,s)?l:null}function LP(t,e,n){for(let r=n;r0;h--,p--){let f=o.node(h).type.spec;if(f.defining||f.definingAsContext||f.isolating)break;s.indexOf(h)>-1?l=h:o.before(h)==p&&s.splice(1,0,-h)}let a=s.indexOf(l),u=[],c=r.openStart;for(let h=r.content,p=0;;p++){let f=h.firstChild;if(u.push(f),p==r.openStart)break;h=f.content}for(let h=c-1;h>=0;h--){let p=u[h],f=NP(p.type);if(f&&!p.sameMarkup(o.node(Math.abs(l)-1)))c=h;else if(f||!p.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let p=(h+c+1)%(r.openStart+1),f=u[p];if(f)for(let g=0;g=0&&(t.replace(e,n,r),!(t.steps.length>d));h--){let p=s[h];p<0||(e=o.before(p),n=i.after(p))}}function a2(t,e,n,r,o){if(er){let i=o.contentMatchAt(0),s=i.fillBefore(t).append(t);t=s.append(i.matchFragment(s).fillBefore(J.empty,!0))}return t}function DP(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=o2(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new ae(J.from(r),0,0))}function PP(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=l2(r,o);for(let s=0;s0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return t.delete(r.before(l),o.after(l))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s)return t.delete(r.before(s),n);t.delete(e,n)}function l2(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let i=t.start(o);if(ie.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&n.push(o)}return n}class yc extends cn{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return Kt.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return Kt.fromReplace(e,this.pos,this.pos+1,new ae(J.from(o),0,n.isLeaf?0:1))}getMap(){return Ur.empty}invert(e){return new yc(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new yc(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new yc(n.pos,n.attr,n.value)}}cn.jsonID("attr",yc);class Gd extends cn{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Kt.ok(r)}getMap(){return Ur.empty}invert(e){return new Gd(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Gd(n.attr,n.value)}}cn.jsonID("docAttr",Gd);let $c=class extends Error{};$c=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};$c.prototype=Object.create(Error.prototype);$c.prototype.constructor=$c;$c.prototype.name="TransformError";class zP{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new mc}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new $c(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=ae.empty){let o=Tb(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new ae(J.from(r),0,0))}delete(e,n){return this.replace(e,n,ae.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return $P(this,e,n,r),this}replaceRangeWith(e,n,r){return DP(this,e,n,r),this}deleteRange(e,n){return PP(this,e,n),this}lift(e,n){return xP(this,e,n),this}join(e,n=1){return MP(this,e,n),this}wrap(e,n){return SP(this,e,n),this}setBlockType(e,n=e,r,o=null){return CP(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return AP(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new yc(e,n,r)),this}setDocAttribute(e,n){return this.step(new Gd(e,n)),this}addNodeMark(e,n){return this.step(new ks(e,n)),this}removeNodeMark(e,n){if(!(n instanceof je)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n=n.isInSet(r.marks),!n)return this}return this.step(new Nc(e,n)),this}split(e,n=1,r){return _P(this,e,n,r),this}addMark(e,n,r){return vP(this,e,n,r),this}removeMark(e,n,r){return yP(this,e,n,r),this}clearIncompatible(e,n,r){return bP(this,e,n,r),this}}const i1=Object.create(null);class Be{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new FP(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n=0;i--){let s=n<0?Gl(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):Gl(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new rr(e.node(0))}static atStart(e){return Gl(e,e,0,0,1)||new rr(e)}static atEnd(e){return Gl(e,e,e.content.size,e.childCount,-1)||new rr(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=i1[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in i1)throw new RangeError("Duplicate use of selection JSON ID "+e);return i1[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Me.between(this.$anchor,this.$head).getBookmark()}}Be.prototype.visible=!0;class FP{constructor(e,n){this.$from=e,this.$to=n}}let _S=!1;function RS(t){!_S&&!t.parent.inlineContent&&(_S=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Me extends Be{constructor(e,n=e){RS(e),RS(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return Be.near(r);let o=e.resolve(n.map(this.anchor));return new Me(o.parent.inlineContent?o:r,r)}replace(e,n=ae.empty){if(super.replace(e,n),n==ae.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Me&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new fm(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Me(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=Be.findFrom(n,r,!0)||Be.findFrom(n,-r,!0);if(i)n=i.$head;else return Be.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(Be.findFrom(e,-r,!0)||Be.findFrom(e,r,!0)).$anchor,e.pos0?0:1);o>0?s=0;s+=o){let l=e.child(s);if(l.isAtom){if(!i&&Oe.isSelectable(l))return Oe.create(t,n-(o<0?l.nodeSize:0))}else{let a=Gl(t,l,n+o,o<0?l.childCount:0,o,i);if(a)return a}n+=l.nodeSize*o}return null}function MS(t,e,n){let r=t.steps.length-1;if(r{s==null&&(s=c)}),t.setSelection(Be.near(t.doc.resolve(s),n))}const OS=1,Np=2,IS=4;class HP extends zP{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Np,this}ensureMarks(e){return je.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Np)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Np,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||je.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,i)),this.selection.empty||this.setSelection(Be.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=IS,this}get scrolledIntoView(){return(this.updated&IS)>0}}function LS(t,e){return!e||!t?t:t.bind(e)}class Vu{constructor(e,n,r){this.name=e,this.init=LS(n.init,r),this.apply=LS(n.apply,r)}}const UP=[new Vu("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Vu("selection",{init(t,e){return t.selection||Be.atStart(e.doc)},apply(t){return t.selection}}),new Vu("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Vu("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class s1{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=UP.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Vu(r.key,r.spec.state,r))})}}class Na{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;rr.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new s1(e.schema,e.plugins),i=new Na(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=As.fromJSON(e.schema,n.doc);else if(s.name=="selection")i.selection=Be.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],u=a.spec.state;if(a.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){i[s.name]=u.fromJSON.call(a,e,n[l],i);return}}i[s.name]=s.init(e,i)}}),i}}function c2(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=c2(o,e,{})),n[r]=o}return n}class mi{constructor(e){this.spec=e,this.props={},e.props&&c2(e.props,this,this.props),this.key=e.key?e.key.key:u2("plugin")}getState(e){return e[this.key]}}const a1=Object.create(null);function u2(t){return t in a1?t+"$"+ ++a1[t]:(a1[t]=0,t+"$")}class vl{constructor(e="key"){this.key=u2(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}var WP=/[A-Z]/g,VP=/^ms-/,l1={};function jP(t){return"-"+t.toLowerCase()}function GP(t){if(l1.hasOwnProperty(t))return l1[t];var e=t.replace(WP,jP);return l1[t]=VP.test(e)?"-"+e:e}function KP(t){return GP(t)}function YP(t,e){return KP(t)+":"+e}function XP(t){var e="";for(var n in t){var r=t[n];typeof r!="string"&&typeof r!="number"||(e&&(e+=";"),e+=YP(n,r))}return e}function d2(){return typeof document<"u"?document:null}function h2(t,e){if(typeof t!="string")return[t];var n=[t];typeof e=="string"||Array.isArray(e)?e={brackets:e}:e||(e={});var r=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],o=e.escape||"___",i=!!e.flat;r.forEach(function(a){var u=new RegExp(["\\",a[0],"[^\\",a[0],"\\",a[1],"]*\\",a[1]].join("")),c=[];function d(h,p,f){var g=n.push(h.slice(a[0].length,-a[1].length))-1;return c.push(g),o+g+o}n.forEach(function(h,p){for(var f,g=0;h!=f;)if(f=h,h=h.replace(u,d),g++>1e4)throw Error("References have circular dependency. Please, check them.");n[p]=h}),c=c.reverse(),n=n.map(function(h){return c.forEach(function(p){h=h.replace(new RegExp("(\\"+o+p+"\\"+o+")","g"),a[0]+"$1"+a[1])}),h})});var s=new RegExp("\\"+o+"([0-9]+)\\"+o);function l(a,u,c){for(var d=[],h,p=0;h=s.exec(a);){if(p++>1e4)throw Error("Circular references in parenthesis");d.push(a.slice(0,h.index)),d.push(l(u[h[1]],u)),a=a.slice(h.index+h[0].length)}return d.push(a),d}return i?n:l(n[0],n)}function p2(t,e){if(e&&e.flat){var n=e&&e.escape||"___",r=t[0],o;if(!r)return"";for(var i=new RegExp("\\"+n+"([0-9]+)\\"+n),s=0;r!=o;){if(s++>1e4)throw Error("Circular references in "+t);o=r,r=r.replace(i,l)}return r}return t.reduce(function a(u,c){return Array.isArray(c)&&(c=c.reduce(a,"")),u+c},"");function l(a,u){if(t[u]==null)throw Error("Reference "+u+"is undefined");return t[u]}}function f2(t,e){return Array.isArray(t)?p2(t,e):h2(t,e)}f2.parse=h2;f2.stringify=p2;const qP={id:"extension.command.copy.label",message:"Copy",comment:"Label for copy command."},ZP={id:"extension.command.copy.description",message:"Copy the selected text",comment:"Description for copy command."},JP={id:"extension.command.cut.label",message:"Cut",comment:"Label for cut command."},QP={id:"extension.command.cut.description",message:"Cut the selected text",comment:"Description for cut command."},e5={id:"extension.command.paste.label",message:"Paste",comment:"Label for paste command."},t5={id:"extension.command.paste.description",message:"Paste content into the editor",comment:"Description for paste command."},n5={id:"extension.command.select-all.label",message:"Select all",comment:"Label for select all command."},r5={id:"extension.command.select-all.description",message:"Select all content within the editor",comment:"Description for select all command."};var Ws=Object.freeze({__proto__:null,COPY_DESCRIPTION:ZP,COPY_LABEL:qP,CUT_DESCRIPTION:QP,CUT_LABEL:JP,PASTE_DESCRIPTION:t5,PASTE_LABEL:e5,SELECT_ALL_DESCRIPTION:r5,SELECT_ALL_LABEL:n5});const o5={id:"keyboard.shortcut.escape",message:"Enter",comment:"Label for escape key in shortcuts."},i5={id:"keyboard.shortcut.command",message:"Command",comment:"Label for command key in shortcuts."},s5={id:"keyboard.shortcut.control",message:"Control",comment:"Label for control key in shortcuts."},a5={id:"keyboard.shortcut.enter",message:"Enter",comment:"Label for enter key in shortcuts."},l5={id:"keyboard.shortcut.shift",message:"Shift",comment:"Label for shift key in shortcuts."},c5={id:"keyboard.shortcut.alt",message:"Alt",comment:"Label for alt key in shortcuts."},u5={id:"keyboard.shortcut.capsLock",message:"Caps Lock",comment:"Label for caps lock key in shortcuts."},d5={id:"keyboard.shortcut.backspace",message:"Backspace",comment:"Label for backspace key in shortcuts."},h5={id:"keyboard.shortcut.tab",message:"Tab",comment:"Label for tab key in shortcuts."},p5={id:"keyboard.shortcut.space",message:"Space",comment:"Label for space key in shortcuts."},f5={id:"keyboard.shortcut.delete",message:"Delete",comment:"Label for delete key in shortcuts."},g5={id:"keyboard.shortcut.pageUp",message:"Page Up",comment:"Label for page up key in shortcuts."},m5={id:"keyboard.shortcut.pageDown",message:"Page Down",comment:"Label for page down key in shortcuts."},v5={id:"keyboard.shortcut.home",message:"Home",comment:"Label for home key in shortcuts."},y5={id:"keyboard.shortcut.end",message:"End",comment:"Label for end key in shortcuts."},b5={id:"keyboard.shortcut.arrowLeft",message:"Arrow Left",comment:"Label for arrow left key in shortcuts."},w5={id:"keyboard.shortcut.arrowRight",message:"Arrow Right",comment:"Label for arrow right key in shortcuts."},x5={id:"keyboard.shortcut.arrowUp",message:"Arrow Up",comment:"Label for arrow up key in shortcuts."},k5={id:"keyboard.shortcut.arrowDown",message:"Arrow Down",comment:"Label for arrowDown key in shortcuts."};var nn=Object.freeze({__proto__:null,ALT_KEY:c5,ARROW_DOWN_KEY:k5,ARROW_LEFT_KEY:b5,ARROW_RIGHT_KEY:w5,ARROW_UP_KEY:x5,BACKSPACE_KEY:d5,CAPS_LOCK_KEY:u5,COMMAND_KEY:i5,CONTROL_KEY:s5,DELETE_KEY:f5,END_KEY:y5,ENTER_KEY:a5,ESCAPE_KEY:o5,HOME_KEY:v5,PAGE_DOWN_KEY:m5,PAGE_UP_KEY:g5,SHIFT_KEY:l5,SPACE_KEY:p5,TAB_KEY:h5});const E5={id:"extension.command.toggle-blockquote.label",message:"Blockquote",comment:"Label for blockquote formatting command."},S5={id:"extension.command.toggle-blockquote.description",message:"Add blockquote formatting to the selected text",comment:"Description for blockquote formatting command."};var NS=Object.freeze({__proto__:null,DESCRIPTION:S5,LABEL:E5});const C5={id:"extension.command.toggle-bold.label",message:"Bold",comment:"Label for bold formatting command."},T5={id:"extension.command.toggle-bold.description",message:"Add bold formatting to the selected text",comment:"Description for bold formatting command."};var $S=Object.freeze({__proto__:null,DESCRIPTION:T5,LABEL:C5});const A5={id:"extension.command.toggle-code-block.label",message:"Codeblock",comment:"Label for the code block command."},_5={id:"extension.command.toggle-code-block.description",message:"Add a code block",comment:"Description for the code block command."};var R5=Object.freeze({__proto__:null,DESCRIPTION:_5,LABEL:A5});const M5={id:"extension.command.toggle-code.label",message:"Code",comment:"Label for the inline code formatting."},O5={id:"extension.command.toggle-code.description",message:"Add inline code formatting to the selected text",comment:"Description for the inline code formatting command."};var I5=Object.freeze({__proto__:null,DESCRIPTION:O5,LABEL:M5});const L5={id:"extension.command.toggle-heading.label",message:`{level, select, 1 {Heading 1} +`:"";return`${r}${o}For more information visit ${DR}#${t.toLowerCase()}`}var PR=class extends xR.BaseError{constructor({code:t,message:e,disableLogging:n=!1}={}){const r=Y4(t)?t:re.CUSTOM;super(X4(r,e)),this.errorCode=r,this.url=`${DR}#${r.toLowerCase()}`,n||console.error(this.message)}static create(t={}){return new PR(t)}};function we(t,e){if(!t)throw PR.create(e)}function pm(t){if(typeof t!="object"||t===null)return t;const e=Symbol.toStringTag in t&&t[Symbol.toStringTag]==="Module"?t.default??t:t;return e&&typeof t=="object"&&"__esModule"in e&&e.__esModule&&e.default!==void 0?e.default:e}function La(t,e={}){return t}function _n(t){this.content=t}_n.prototype={constructor:_n,find:function(t){for(var e=0;e>1}};_n.from=function(t){if(t instanceof _n)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new _n(e)};function zR(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=zR(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function FR(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),l=e.child(--i),a=s.nodeSize;if(s==l){n-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let u=0,c=Math.min(s.text.length,l.text.length);for(;ue&&r(a,o+l,i||null,s)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,e-c),Math.min(a.content.size,n-c),r,o+c)}l=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",s=!0;return this.nodesBetween(e,n,(l,a)=>{l.isText?(i+=l.text.slice(Math.max(e,a)-a,n-a),s=!r):l.isLeaf?(o?i+=typeof o=="function"?o(l):o:l.type.spec.leafText&&(i+=l.type.spec.leafText(l)),s=!r):!s&&l.isBlock&&(i+=r,s=!0)},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);ie)for(let i=0,s=0;se&&((sn)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,n-s-1))),r.push(l),o+=l.nodeSize),s=a}return new J(r,o)}cutByIndex(e,n){return e==n?J.empty:e==0&&n==this.content.length?this:new J(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new J(o,i)}addToStart(e){return new J([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new J(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;nthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),s=o+i.nodeSize;if(s>=e)return s==e||n>0?Ip(r+1,s):Ip(r,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return J.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new J(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return J.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;nr.type.rank-o.type.rank),n}}je.none=[];class qf extends Error{}class ae{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=HR(this.content,e+this.openStart,n);return r&&new ae(r,this.openStart,this.openEnd)}removeBetween(e,n){return new ae(BR(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return ae.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ae(J.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new ae(e,r,o)}}ae.empty=new ae(J.empty,0,0);function BR(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:l}=t.findIndex(n);if(o==e||i.isText){if(l!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(BR(i.content,e-o-1,n-o-1)))}function HR(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),s=t.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let l=HR(s.content,e-i-1,n);return l&&t.replaceChild(o,s.copy(l))}function q4(t,e,n){if(n.openStart>t.depth)throw new qf("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new qf("Inconsistent open depths");return UR(t,e,n,0)}function UR(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Ed(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Ua(t.nodeAfter,r),i++));for(let l=i;lo&&E0(t,e,o+1),s=r.depth>o&&E0(n,r,o+1),l=[];return Ed(null,t,o,l),i&&s&&e.index(o)==n.index(o)?(WR(i,s),Ua(Wa(i,VR(t,e,n,r,o+1)),l)):(i&&Ua(Wa(i,Zf(t,e,o+1)),l),Ed(e,n,o,l),s&&Ua(Wa(s,Zf(n,r,o+1)),l)),Ed(r,null,o,l),new J(l)}function Zf(t,e,n){let r=[];if(Ed(null,t,n,r),t.depth>n){let o=E0(t,e,n+1);Ua(Wa(o,Zf(t,e,n+1)),r)}return Ed(e,null,n,r),new J(r)}function Z4(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(J.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class Lc{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Xa(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=e;;){let{index:l,offset:a}=s.content.findIndex(i),u=i-a;if(r.push(s,l,o+a),!u||(s=s.child(l),s.isText))break;i=u-1,o+=a+1}return new Lc(n,r,i)}static resolveCached(e,n){for(let o=0;oe&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),jR(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=J.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=o;an.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=J.fromJSON(e,n.content);return e.nodeType(n.type).create(n.attrs,o,r)}};As.prototype.text=void 0;class Jf extends As{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):jR(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Jf(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Jf(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function jR(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class qa{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new eP(e,n);if(r.next==null)return qa.empty;let o=GR(r);r.next&&r.err("Unexpected trailing text");let i=aP(sP(o));return lP(i,r),i}matchType(e){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+e.indexOf(r.next[s].next);return i}).join(` +`)}}qa.empty=new qa(!0);class eP{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function GR(t){let e=[];do e.push(tP(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function tP(t){let e=[];do e.push(nP(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function nP(t){let e=iP(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=rP(t,e);else break;return e}function wS(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function rP(t,e){let n=wS(t),r=n;return t.eat(",")&&(t.next!="}"?r=wS(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function oP(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.groups.indexOf(e)>-1&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function iP(t){if(t.eat("(")){let e=GR(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=oP(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function sP(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,l,a){let u={term:a,to:l};return e[s].push(u),u}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,u)=>a.concat(i(u,l)),[]);if(s.type=="seq")for(let a=0;;a++){let u=i(s.exprs[a],l);if(a==s.exprs.length-1)return u;o(u,l=n())}else if(s.type=="star"){let a=n();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=n();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let u=0;u{t[s].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c{u||o.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let i=e[r.join(",")]=new qa(r.indexOf(t.length-1)>-1);for(let s=0;s-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;nr[i]=new ZR(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class cP{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Vh{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=qR(o.attrs),this.excluded=null;let i=YR(this.attrs);this.instance=i?new je(this,i):null}create(e=null){return!e&&this.instance?this.instance:new je(this,XR(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new Vh(i,o++,n,s)),r}removeFromSet(e){for(var n=0;n-1}}let uP=class{constructor(e){this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=_n.from(e.nodes),n.marks=_n.from(e.marks||{}),this.nodes=C0.compile(this.spec.nodes,this),this.marks=Vh.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",l=i.spec.marks;i.contentMatch=r[s]||(r[s]=qa.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=l=="_"?null:l?kS(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:kS(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof C0){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,o)}text(e,n){let r=this.nodes.text;return new Jf(r,r.defaultAttrs,e,je.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return As.fromJSON(this,e)}markFromJSON(e){return je.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}};function kS(t,e){let n=[];for(let r=0;r-1)&&n.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class Za{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=e.nodes[r.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new SS(this,n,!1);return r.addAll(e,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new SS(this,n,!0);return r.addAll(e,n.from,n.to),ae.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;oe.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(s.getAttrs){let a=s.getAttrs(n);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(e){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=CS(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=CS(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Za(e,Za.schemaRules(e)))}}const JR={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},dP={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},QR={ol:!0,ul:!0},Qf=1,eg=2,Sd=4;function ES(t,e,n){return e!=null?(e?Qf:0)|(e==="full"?eg:0):t&&t.whitespace=="pre"?Qf|eg:n&~Sd}class Lp{constructor(e,n,r,o,i,s,l){this.type=e,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=l,this.content=[],this.activeMarks=je.none,this.stashMarks=[],this.match=s||(l&Sd?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(J.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Qf)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=J.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(J.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(e){for(let n=this.stashMarks.length-1;n>=0;n--)if(e.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(e){for(let n=0,r=this.pendingMarks;nthis.addAll(e)),s&&this.sync(l),this.needsBlock=a}else this.withStyleRules(e,()=>{this.addElementByRule(e,i,i.consuming===!1?o:void 0)})}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` +`))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let n=je.none,r=je.none;for(let o=0;o{s.clearMark(l)&&(r=l.addToSet(r))}):n=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(n),s.consuming===!1)i=s;else break}return[n,r]}addElementByRule(e,n,r){let o,i,s;n.node?(i=this.parser.schema.nodes[n.node],i.isLeaf?this.insertNode(i.create(n.attrs))||this.leafFallback(e):o=this.enter(i,n.attrs||null,n.preserveWhitespace)):(s=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(s));let l=this.top;if(i&&i.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a)}o&&this.sync(l)&&this.open--,s&&this.removePendingMark(s,l)}addAll(e,n,r){let o=n||0;for(let i=n?e.childNodes[n]:e.firstChild,s=r==null?null:e.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i);this.findAtPoint(e,o)}findPlace(e){let n,r;for(let o=this.open;o>=0;o--){let i=this.nodes[o],s=i.findWrapping(e);if(s&&(!n||n.length>s.length)&&(n=s,r=i,!s.length)||i.solid)break}if(!n)return!1;this.sync(r);for(let o=0;othis.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));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(e){for(let n=this.open;n>=0;n--)if(this.nodes[n]==e)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let c=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!c||c.name!=u&&c.groups.indexOf(u)==-1)return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.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}}addPendingMark(e){let n=mP(e,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,n){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(e)>-1)o.pendingMarks=e.removeFromSet(o.pendingMarks);else{o.activeMarks=e.removeFromSet(o.activeMarks);let s=o.popFromStashMark(e);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==n)break}}}function hP(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&QR.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function pP(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function fP(t){let e=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=e.exec(t);)r.push(n[1],n[2].trim());return r}function CS(t){let e={};for(let n in t)e[n]=t[n];return e}function gP(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=l=>{i.push(l);for(let a=0;a{if(i.length||s.marks.length){let l=0,a=0;for(;l=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&Vr.renderSpec(n1(r),o(e,n))}static renderSpec(e,n,r=null){if(typeof n=="string")return{dom:e.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let o=n[0],i=o.indexOf(" ");i>0&&(r=o.slice(0,i),o=o.slice(i+1));let s,l=r?e.createElementNS(r,o):e.createElement(o),a=n[1],u=1;if(a&&typeof a=="object"&&a.nodeType==null&&!Array.isArray(a)){u=2;for(let c in a)if(a[c]!=null){let d=c.indexOf(" ");d>0?l.setAttributeNS(c.slice(0,d),c.slice(d+1),a[c]):l.setAttribute(c,a[c])}}for(let c=u;cu)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:p}=Vr.renderSpec(e,d,r);if(l.appendChild(h),p){if(s)throw new RangeError("Multiple content holes");s=p}}}return{dom:l,contentDOM:s}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Vr(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=TS(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return TS(e.marks)}}function TS(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function n1(t){return t.document||window.document}const e2=65535,t2=Math.pow(2,16);function vP(t,e){return t+e*t2}function AS(t){return t&e2}function yP(t){return(t-(t&e2))/t2}const n2=1,r2=2,gf=4,o2=8;class T0{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&o2)>0}get deletedBefore(){return(this.delInfo&(n2|gf))>0}get deletedAfter(){return(this.delInfo&(r2|gf))>0}get deletedAcross(){return(this.delInfo&gf)>0}}class Ur{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Ur.empty)return Ur.empty}recover(e){let n=0,r=AS(e);if(!this.inverted)for(let o=0;oe)break;let u=this.ranges[l+i],c=this.ranges[l+s],d=a+u;if(e<=d){let h=u?e==a?-1:e==d?1:n:n,p=a+o+(h<0?0:c);if(r)return p;let f=e==(n<0?a:d)?null:vP(l/3,e-a),g=e==a?r2:e==d?n2:gf;return(n<0?e!=a:e!=d)&&(g|=o2),new T0(p,g,f)}o+=c-u}return r?e+o:new T0(e+o,0,null)}touches(e,n){let r=0,o=AS(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;le)break;let u=this.ranges[l+i],c=a+u;if(e<=c&&l==o*3)return!0;r+=this.ranges[l+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=e.getMirror(n);this.appendMap(e.maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new mc;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;ri&&a!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return Kt.fromReplace(e,this.from,this.to,i)}invert(){return new zo(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ii(n.pos,r.pos,this.mark)}merge(e){return e instanceof Ii&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ii(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ii(n.from,n.to,e.markFromJSON(n.mark))}}cn.jsonID("addMark",Ii);class zo extends cn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new ae(Tb(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return Kt.fromReplace(e,this.from,this.to,r)}invert(){return new Ii(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new zo(n.pos,r.pos,this.mark)}merge(e){return e instanceof zo&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new zo(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new zo(n.from,n.to,e.markFromJSON(n.mark))}}cn.jsonID("removeMark",zo);class ks extends cn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Kt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Kt.fromReplace(e,this.pos,this.pos+1,new ae(J.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new Yt(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Yt(n.from,n.to,n.gapFrom,n.gapTo,ae.fromJSON(e,n.slice),n.insert,!!n.structure)}}cn.jsonID("replaceAround",Yt);function A0(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function bP(t,e,n,r){let o=[],i=[],s,l;t.doc.nodesBetween(e,n,(a,u,c)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let h=Math.max(u,e),p=Math.min(u+a.nodeSize,n),f=r.addToSet(d);for(let g=0;gt.step(a)),i.forEach(a=>t.step(a))}function wP(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(s,l)=>{if(!s.isInline)return;i++;let a=null;if(r instanceof Vh){let u=s.marks,c;for(;c=r.isInSet(u);)(a||(a=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let u=Math.min(l+s.nodeSize,n);for(let c=0;ct.step(new zo(s.from,s.to,s.style)))}function xP(t,e,n,r=n.contentMatch){let o=t.doc.nodeAt(e),i=[],s=e+1;for(let l=0;l=0;l--)t.step(i[l])}function kP(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function cu(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let o=t.$from.node(r),i=t.$from.index(r),s=t.$to.indexAfter(r);if(rn;f--)g||r.index(f)>0?(g=!0,c=J.from(r.node(f).copy(c)),d++):a--;let h=J.empty,p=0;for(let f=i,g=!1;f>n;f--)g||o.after(f+1)=0;s--){if(r.size){let l=n[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=J.from(n[s].type.create(n[s].attrs,r))}let o=e.start,i=e.end;t.step(new Yt(o,i,o,i,new ae(r,0,0),n.length,!0))}function AP(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,l)=>{if(s.isTextblock&&!s.hasMarkup(r,o)&&_P(t.doc,t.mapping.slice(i).map(l),r)){t.clearIncompatible(t.mapping.slice(i).map(l,1),r);let a=t.mapping.slice(i),u=a.map(l,1),c=a.map(l+s.nodeSize,1);return t.step(new Yt(u,c,u+1,c-1,new ae(J.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function _P(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function RP(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new Yt(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new ae(J.from(s),0,0),1,!0))}function vc(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,c=n-2;u>i;u--,c--){let d=o.node(u),h=o.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(h,d.childCount),f=r&&r[c+1];f&&(p=p.replaceChild(0,f.type.create(f.attrs)));let g=r&&r[c]||d;if(!d.canReplace(h+1,d.childCount)||!g.type.validContent(p))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function MP(t,e,n=1,r){let o=t.doc.resolve(e),i=J.empty,s=J.empty;for(let l=o.depth,a=o.depth-n,u=n-1;l>a;l--,u--){i=J.from(o.node(l).copy(i));let c=r&&r[u];s=J.from(c?c.type.create(c.attrs,s):o.node(l).copy(s))}t.step(new vn(e,e,new ae(i.append(s),n,n),!0))}function jh(t,e){let n=t.resolve(e),r=n.index();return OP(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function OP(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function IP(t,e,n){let r=new vn(e-n,e+n,ae.empty,!0);t.step(r)}function i2(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),u=r.node(s),c=!1;if(i==1)c=u.canReplace(a,a,o);else{let d=u.contentMatchAt(a).findWrapping(o.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function _b(t,e,n=e,r=ae.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return s2(o,i,r)?new vn(e,n,r):new NP(o,i,r).fit()}function s2(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class NP{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=J.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=J.from(e.node(o).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 e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new ae(i,s,l);return e>-1?new Yt(r.pos,e,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new vn(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=o1(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],c,d=null;if(n==1&&(s?u.matchType(s.type)||(d=u.fillBefore(J.from(s),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:d};if(n==2&&s&&(c=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:c};if(i&&u.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=o1(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new ae(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=o1(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new ae(Uu(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new ae(Uu(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let g=0;g1||a==0||g.content.size)&&(d=m,c.push(a2(g.mark(h.allowedMarks(g.marks)),u==1?a:0,u==l.childCount?p:-1)))}let f=u==l.childCount;f||(p=-1),this.placed=Wu(this.placed,n,J.from(c)),this.frontier[n].match=d,f&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,m=l;g1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;l--){let{match:a,type:u}=this.frontier[l],c=i1(e,l,u,a,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Wu(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=Wu(this.placed,this.depth,J.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(J.empty,!0);n.childCount&&(this.placed=Wu(this.placed,this.frontier.length,n))}}function Uu(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Uu(t.firstChild.content,e-1,n)))}function Wu(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Wu(t.lastChild.content,e-1,n)))}function o1(t,e){for(let n=0;n1&&(r=r.replaceChild(0,a2(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(J.empty,!0)))),t.copy(r)}function i1(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!$P(n,i.content,s)?l:null}function $P(t,e,n){for(let r=n;r0;h--,p--){let f=o.node(h).type.spec;if(f.defining||f.definingAsContext||f.isolating)break;s.indexOf(h)>-1?l=h:o.before(h)==p&&s.splice(1,0,-h)}let a=s.indexOf(l),u=[],c=r.openStart;for(let h=r.content,p=0;;p++){let f=h.firstChild;if(u.push(f),p==r.openStart)break;h=f.content}for(let h=c-1;h>=0;h--){let p=u[h],f=DP(p.type);if(f&&!p.sameMarkup(o.node(Math.abs(l)-1)))c=h;else if(f||!p.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let p=(h+c+1)%(r.openStart+1),f=u[p];if(f)for(let g=0;g=0&&(t.replace(e,n,r),!(t.steps.length>d));h--){let p=s[h];p<0||(e=o.before(p),n=i.after(p))}}function l2(t,e,n,r,o){if(er){let i=o.contentMatchAt(0),s=i.fillBefore(t).append(t);t=s.append(i.matchFragment(s).fillBefore(J.empty,!0))}return t}function zP(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=i2(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new ae(J.from(r),0,0))}function FP(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=c2(r,o);for(let s=0;s0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return t.delete(r.before(l),o.after(l))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s)return t.delete(r.before(s),n);t.delete(e,n)}function c2(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let i=t.start(o);if(ie.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&n.push(o)}return n}class yc extends cn{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return Kt.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return Kt.fromReplace(e,this.pos,this.pos+1,new ae(J.from(o),0,n.isLeaf?0:1))}getMap(){return Ur.empty}invert(e){return new yc(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new yc(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new yc(n.pos,n.attr,n.value)}}cn.jsonID("attr",yc);class Gd extends cn{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Kt.ok(r)}getMap(){return Ur.empty}invert(e){return new Gd(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Gd(n.attr,n.value)}}cn.jsonID("docAttr",Gd);let $c=class extends Error{};$c=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};$c.prototype=Object.create(Error.prototype);$c.prototype.constructor=$c;$c.prototype.name="TransformError";class BP{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new mc}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new $c(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=ae.empty){let o=_b(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new ae(J.from(r),0,0))}delete(e,n){return this.replace(e,n,ae.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return PP(this,e,n,r),this}replaceRangeWith(e,n,r){return zP(this,e,n,r),this}deleteRange(e,n){return FP(this,e,n),this}lift(e,n){return EP(this,e,n),this}join(e,n=1){return IP(this,e,n),this}wrap(e,n){return TP(this,e,n),this}setBlockType(e,n=e,r,o=null){return AP(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return RP(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new yc(e,n,r)),this}setDocAttribute(e,n){return this.step(new Gd(e,n)),this}addNodeMark(e,n){return this.step(new ks(e,n)),this}removeNodeMark(e,n){if(!(n instanceof je)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n=n.isInSet(r.marks),!n)return this}return this.step(new Nc(e,n)),this}split(e,n=1,r){return MP(this,e,n,r),this}addMark(e,n,r){return bP(this,e,n,r),this}removeMark(e,n,r){return wP(this,e,n,r),this}clearIncompatible(e,n,r){return xP(this,e,n,r),this}}const s1=Object.create(null);class Be{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new HP(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n=0;i--){let s=n<0?Gl(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):Gl(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new rr(e.node(0))}static atStart(e){return Gl(e,e,0,0,1)||new rr(e)}static atEnd(e){return Gl(e,e,e.content.size,e.childCount,-1)||new rr(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=s1[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in s1)throw new RangeError("Duplicate use of selection JSON ID "+e);return s1[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Me.between(this.$anchor,this.$head).getBookmark()}}Be.prototype.visible=!0;class HP{constructor(e,n){this.$from=e,this.$to=n}}let RS=!1;function MS(t){!RS&&!t.parent.inlineContent&&(RS=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Me extends Be{constructor(e,n=e){MS(e),MS(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return Be.near(r);let o=e.resolve(n.map(this.anchor));return new Me(o.parent.inlineContent?o:r,r)}replace(e,n=ae.empty){if(super.replace(e,n),n==ae.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Me&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new fm(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Me(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=Be.findFrom(n,r,!0)||Be.findFrom(n,-r,!0);if(i)n=i.$head;else return Be.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(Be.findFrom(e,-r,!0)||Be.findFrom(e,r,!0)).$anchor,e.pos0?0:1);o>0?s=0;s+=o){let l=e.child(s);if(l.isAtom){if(!i&&Oe.isSelectable(l))return Oe.create(t,n-(o<0?l.nodeSize:0))}else{let a=Gl(t,l,n+o,o<0?l.childCount:0,o,i);if(a)return a}n+=l.nodeSize*o}return null}function OS(t,e,n){let r=t.steps.length-1;if(r{s==null&&(s=c)}),t.setSelection(Be.near(t.doc.resolve(s),n))}const IS=1,Np=2,LS=4;class WP extends BP{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Np,this}ensureMarks(e){return je.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Np)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Np,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||je.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,i)),this.selection.empty||this.setSelection(Be.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=LS,this}get scrolledIntoView(){return(this.updated&LS)>0}}function NS(t,e){return!e||!t?t:t.bind(e)}class Vu{constructor(e,n,r){this.name=e,this.init=NS(n.init,r),this.apply=NS(n.apply,r)}}const VP=[new Vu("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Vu("selection",{init(t,e){return t.selection||Be.atStart(e.doc)},apply(t){return t.selection}}),new Vu("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Vu("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class a1{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=VP.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Vu(r.key,r.spec.state,r))})}}class Na{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;rr.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new a1(e.schema,e.plugins),i=new Na(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=As.fromJSON(e.schema,n.doc);else if(s.name=="selection")i.selection=Be.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],u=a.spec.state;if(a.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){i[s.name]=u.fromJSON.call(a,e,n[l],i);return}}i[s.name]=s.init(e,i)}}),i}}function u2(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=u2(o,e,{})),n[r]=o}return n}class mi{constructor(e){this.spec=e,this.props={},e.props&&u2(e.props,this,this.props),this.key=e.key?e.key.key:d2("plugin")}getState(e){return e[this.key]}}const l1=Object.create(null);function d2(t){return t in l1?t+"$"+ ++l1[t]:(l1[t]=0,t+"$")}class vl{constructor(e="key"){this.key=d2(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}var jP=/[A-Z]/g,GP=/^ms-/,c1={};function KP(t){return"-"+t.toLowerCase()}function YP(t){if(c1.hasOwnProperty(t))return c1[t];var e=t.replace(jP,KP);return c1[t]=GP.test(e)?"-"+e:e}function XP(t){return YP(t)}function qP(t,e){return XP(t)+":"+e}function ZP(t){var e="";for(var n in t){var r=t[n];typeof r!="string"&&typeof r!="number"||(e&&(e+=";"),e+=qP(n,r))}return e}function h2(){return typeof document<"u"?document:null}function p2(t,e){if(typeof t!="string")return[t];var n=[t];typeof e=="string"||Array.isArray(e)?e={brackets:e}:e||(e={});var r=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],o=e.escape||"___",i=!!e.flat;r.forEach(function(a){var u=new RegExp(["\\",a[0],"[^\\",a[0],"\\",a[1],"]*\\",a[1]].join("")),c=[];function d(h,p,f){var g=n.push(h.slice(a[0].length,-a[1].length))-1;return c.push(g),o+g+o}n.forEach(function(h,p){for(var f,g=0;h!=f;)if(f=h,h=h.replace(u,d),g++>1e4)throw Error("References have circular dependency. Please, check them.");n[p]=h}),c=c.reverse(),n=n.map(function(h){return c.forEach(function(p){h=h.replace(new RegExp("(\\"+o+p+"\\"+o+")","g"),a[0]+"$1"+a[1])}),h})});var s=new RegExp("\\"+o+"([0-9]+)\\"+o);function l(a,u,c){for(var d=[],h,p=0;h=s.exec(a);){if(p++>1e4)throw Error("Circular references in parenthesis");d.push(a.slice(0,h.index)),d.push(l(u[h[1]],u)),a=a.slice(h.index+h[0].length)}return d.push(a),d}return i?n:l(n[0],n)}function f2(t,e){if(e&&e.flat){var n=e&&e.escape||"___",r=t[0],o;if(!r)return"";for(var i=new RegExp("\\"+n+"([0-9]+)\\"+n),s=0;r!=o;){if(s++>1e4)throw Error("Circular references in "+t);o=r,r=r.replace(i,l)}return r}return t.reduce(function a(u,c){return Array.isArray(c)&&(c=c.reduce(a,"")),u+c},"");function l(a,u){if(t[u]==null)throw Error("Reference "+u+"is undefined");return t[u]}}function g2(t,e){return Array.isArray(t)?f2(t,e):p2(t,e)}g2.parse=p2;g2.stringify=f2;const JP={id:"extension.command.copy.label",message:"Copy",comment:"Label for copy command."},QP={id:"extension.command.copy.description",message:"Copy the selected text",comment:"Description for copy command."},e5={id:"extension.command.cut.label",message:"Cut",comment:"Label for cut command."},t5={id:"extension.command.cut.description",message:"Cut the selected text",comment:"Description for cut command."},n5={id:"extension.command.paste.label",message:"Paste",comment:"Label for paste command."},r5={id:"extension.command.paste.description",message:"Paste content into the editor",comment:"Description for paste command."},o5={id:"extension.command.select-all.label",message:"Select all",comment:"Label for select all command."},i5={id:"extension.command.select-all.description",message:"Select all content within the editor",comment:"Description for select all command."};var Ws=Object.freeze({__proto__:null,COPY_DESCRIPTION:QP,COPY_LABEL:JP,CUT_DESCRIPTION:t5,CUT_LABEL:e5,PASTE_DESCRIPTION:r5,PASTE_LABEL:n5,SELECT_ALL_DESCRIPTION:i5,SELECT_ALL_LABEL:o5});const s5={id:"keyboard.shortcut.escape",message:"Enter",comment:"Label for escape key in shortcuts."},a5={id:"keyboard.shortcut.command",message:"Command",comment:"Label for command key in shortcuts."},l5={id:"keyboard.shortcut.control",message:"Control",comment:"Label for control key in shortcuts."},c5={id:"keyboard.shortcut.enter",message:"Enter",comment:"Label for enter key in shortcuts."},u5={id:"keyboard.shortcut.shift",message:"Shift",comment:"Label for shift key in shortcuts."},d5={id:"keyboard.shortcut.alt",message:"Alt",comment:"Label for alt key in shortcuts."},h5={id:"keyboard.shortcut.capsLock",message:"Caps Lock",comment:"Label for caps lock key in shortcuts."},p5={id:"keyboard.shortcut.backspace",message:"Backspace",comment:"Label for backspace key in shortcuts."},f5={id:"keyboard.shortcut.tab",message:"Tab",comment:"Label for tab key in shortcuts."},g5={id:"keyboard.shortcut.space",message:"Space",comment:"Label for space key in shortcuts."},m5={id:"keyboard.shortcut.delete",message:"Delete",comment:"Label for delete key in shortcuts."},v5={id:"keyboard.shortcut.pageUp",message:"Page Up",comment:"Label for page up key in shortcuts."},y5={id:"keyboard.shortcut.pageDown",message:"Page Down",comment:"Label for page down key in shortcuts."},b5={id:"keyboard.shortcut.home",message:"Home",comment:"Label for home key in shortcuts."},w5={id:"keyboard.shortcut.end",message:"End",comment:"Label for end key in shortcuts."},x5={id:"keyboard.shortcut.arrowLeft",message:"Arrow Left",comment:"Label for arrow left key in shortcuts."},k5={id:"keyboard.shortcut.arrowRight",message:"Arrow Right",comment:"Label for arrow right key in shortcuts."},E5={id:"keyboard.shortcut.arrowUp",message:"Arrow Up",comment:"Label for arrow up key in shortcuts."},S5={id:"keyboard.shortcut.arrowDown",message:"Arrow Down",comment:"Label for arrowDown key in shortcuts."};var nn=Object.freeze({__proto__:null,ALT_KEY:d5,ARROW_DOWN_KEY:S5,ARROW_LEFT_KEY:x5,ARROW_RIGHT_KEY:k5,ARROW_UP_KEY:E5,BACKSPACE_KEY:p5,CAPS_LOCK_KEY:h5,COMMAND_KEY:a5,CONTROL_KEY:l5,DELETE_KEY:m5,END_KEY:w5,ENTER_KEY:c5,ESCAPE_KEY:s5,HOME_KEY:b5,PAGE_DOWN_KEY:y5,PAGE_UP_KEY:v5,SHIFT_KEY:u5,SPACE_KEY:g5,TAB_KEY:f5});const C5={id:"extension.command.toggle-blockquote.label",message:"Blockquote",comment:"Label for blockquote formatting command."},T5={id:"extension.command.toggle-blockquote.description",message:"Add blockquote formatting to the selected text",comment:"Description for blockquote formatting command."};var $S=Object.freeze({__proto__:null,DESCRIPTION:T5,LABEL:C5});const A5={id:"extension.command.toggle-bold.label",message:"Bold",comment:"Label for bold formatting command."},_5={id:"extension.command.toggle-bold.description",message:"Add bold formatting to the selected text",comment:"Description for bold formatting command."};var DS=Object.freeze({__proto__:null,DESCRIPTION:_5,LABEL:A5});const R5={id:"extension.command.toggle-code-block.label",message:"Codeblock",comment:"Label for the code block command."},M5={id:"extension.command.toggle-code-block.description",message:"Add a code block",comment:"Description for the code block command."};var O5=Object.freeze({__proto__:null,DESCRIPTION:M5,LABEL:R5});const I5={id:"extension.command.toggle-code.label",message:"Code",comment:"Label for the inline code formatting."},L5={id:"extension.command.toggle-code.description",message:"Add inline code formatting to the selected text",comment:"Description for the inline code formatting command."};var N5=Object.freeze({__proto__:null,DESCRIPTION:L5,LABEL:I5});const $5={id:"extension.command.toggle-heading.label",message:`{level, select, 1 {Heading 1} 2 {Heading 2} 3 {Heading 3} 4 {Heading 4} 5 {Heading 5} 6 {Heading 6} -other {Heading}}`,comment:"Label for heading command with support for levels."};var N5=Object.freeze({__proto__:null,LABEL:L5});const $5={id:"extension.command.undo.label",message:"Undo",comment:"Label for undo."},D5={id:"extension.command.undo.description",message:"Undo the most recent action",comment:"Description for undo."},P5={id:"extension.command.redo.label",message:"Redo",comment:"Label for redo."},z5={id:"extension.command.redo.description",message:"Redo the most recent action",comment:"Description for redo."};var tg=Object.freeze({__proto__:null,REDO_DESCRIPTION:z5,REDO_LABEL:P5,UNDO_DESCRIPTION:D5,UNDO_LABEL:$5});const F5={id:"extension.command.insert-horizontal-rule.label",message:"Divider",comment:"Label for inserting a horizontal rule (divider) command."},B5={id:"extension.command.insert-horizontal-rule.description",message:"Separate content with a diving horizontal line",comment:"Description for inserting a horizontal rule (divider) command."};var DS=Object.freeze({__proto__:null,DESCRIPTION:B5,LABEL:F5});const H5={id:"extension.command.toggle-italic.label",message:"Italic",comment:"Label for italic formatting command."},U5={id:"extension.command.toggle-italic.description",message:"Italicize the selected text",comment:"Description for italic formatting command."};var PS=Object.freeze({__proto__:null,DESCRIPTION:U5,LABEL:H5});const W5={id:"extension.command.toggle-ordered-list.label",message:"Ordered list",comment:"Label for inserting an ordered list into the editor."},V5={id:"extension.command.toggle-bullet-list.description",message:"Bulleted list",comment:"Description for inserting a bullet list into the editor."},j5={id:"extension.command.toggle-task-list.description",message:"Tasked list",comment:"Description for inserting a task list into the editor."};var _b=Object.freeze({__proto__:null,BULLET_LIST_LABEL:V5,ORDERED_LIST_LABEL:W5,TASK_LIST_LABEL:j5});const G5={id:"extension.command.insert-paragraph.label",message:"Insert Paragraph",comment:"Label for inserting a paragraph."},K5={id:"extension.command.insert-paragraph.description",message:"Insert a new paragraph",comment:"Description for inserting a paragraph."},Y5={id:"extension.command.convert-paragraph.label",message:"Convert Paragraph",comment:"Label for converting the current node into a paragraph."},X5={id:"extension.command.convert-paragraph.description",message:"Convert current block into a paragraph block.",comment:"Description for converting a paragraph."};var ng=Object.freeze({__proto__:null,CONVERT_DESCRIPTION:X5,CONVERT_LABEL:Y5,INSERT_DESCRIPTION:K5,INSERT_LABEL:G5});const q5={id:"extension.command.toggle-strike.label",message:"Strikethrough",comment:"Label for strike formatting command."},Z5={id:"extension.command.toggle-strike.description",message:"Strikethrough the selected text",comment:"Description for strike formatting command."};var zS=Object.freeze({__proto__:null,DESCRIPTION:Z5,LABEL:q5});const J5={id:"extension.command.toggle-underline.label",message:"Underline",comment:"Label for underline formatting command."},Q5={id:"extension.command.toggle-underline.description",message:"Underline the selected text",comment:"Description for underline formatting command."};var FS=Object.freeze({__proto__:null,DESCRIPTION:Q5,LABEL:J5});class yl{constructor(e,n){this.match=e,this.match=e,this.handler=typeof n=="string"?e3(n):n}}function e3(t){return function(e,n,r,o){let i=t;if(n[1]){let s=n[0].lastIndexOf(n[1]);i+=n[0].slice(s+n[1].length),r+=s;let l=r-o;l>0&&(i=n[0].slice(s-l,s)+i,r=o)}return e.tr.insertText(i,r,o)}}const t3=500;function n3({rules:t}){let e=new mi({state:{init(){return null},apply(n,r){let o=n.getMeta(this);return o||(n.selectionSet||n.docChanged?null:r)}},props:{handleTextInput(n,r,o,i){return BS(n,r,o,i,t,e)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&BS(n,r.pos,r.pos,"",t,e)})}}},isInputRules:!0});return e}function BS(t,e,n,r,o,i){if(t.composing)return!1;let s=t.state,l=s.doc.resolve(e);if(l.parent.type.spec.code)return!1;let a=l.parent.textBetween(Math.max(0,l.parentOffset-t3),l.parentOffset,null,"")+r;for(let u=0;u{let n=t.plugins;for(let r=0;r=0;a--)s.step(l.steps[a].invert(l.docs[a]));if(i.text){let a=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,t.schema.text(i.text,a))}else s.delete(i.from,i.to);e(s)}return!0}}return!1};function gm(t,e,n=null,r){return new yl(t,(o,i,s,l)=>{let a=n instanceof Function?n(i):n,u=o.tr.delete(s,l),c=u.doc.resolve(s),d=c.blockRange(),h=d&&Cb(d,e,a);if(!h)return null;u.wrap(d,h);let p=u.doc.resolve(s-1).nodeBefore;return p&&p.type==e&&jh(u.doc,s-1)&&(!r||r(i,p))&&u.join(s-1),u})}function o3(t,e,n=null){return new yl(t,(r,o,i,s)=>{let l=r.doc.resolve(i),a=n instanceof Function?n(o):n;return l.node(-1).canReplaceWith(l.index(-1),l.indexAfter(-1),e)?r.tr.delete(i,s).setBlockType(i,i,e,a):null})}const tr=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Kd=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let HS=null;const Ai=function(t,e,n){let r=HS||(HS=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},Ja=function(t,e,n,r){return n&&(US(t,e,n,r,-1)||US(t,e,n,r,1))},i3=/^(img|br|input|textarea|hr)$/i;function US(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:ei(t))){let i=t.parentNode;if(!i||i.nodeType!=1||Rb(t)||i3.test(t.nodeName)||t.contentEditable=="false")return!1;e=tr(t)+(o<0?0:1),t=i}else if(t.nodeType==1){if(t=t.childNodes[e+(o<0?-1:0)],t.contentEditable=="false")return!1;e=o<0?ei(t):0}else return!1}}function ei(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function s3(t,e,n){for(let r=e==0,o=e==ei(t);r||o;){if(t==n)return!0;let i=tr(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==ei(t)}}function Rb(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const mm=function(t){return t.focusNode&&Ja(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Ia(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function a3(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function l3(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}const di=typeof navigator<"u"?navigator:null,WS=typeof document<"u"?document:null,ea=di&&di.userAgent||"",T0=/Edge\/(\d+)/.exec(ea),g2=/MSIE \d/.exec(ea),A0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ea),kr=!!(g2||A0||T0),_s=g2?document.documentMode:A0?+A0[1]:T0?+T0[1]:0,Ho=!kr&&/gecko\/(\d+)/i.test(ea);Ho&&+(/Firefox\/(\d+)/.exec(ea)||[0,0])[1];const _0=!kr&&/Chrome\/(\d+)/.exec(ea),Gn=!!_0,c3=_0?+_0[1]:0,sr=!kr&&!!di&&/Apple Computer/.test(di.vendor),Dc=sr&&(/Mobile\/\w+/.test(ea)||!!di&&di.maxTouchPoints>2),ao=Dc||(di?/Mac/.test(di.platform):!1),u3=di?/Win/.test(di.platform):!1,Lo=/Android \d/.test(ea),Gh=!!WS&&"webkitFontSmoothing"in WS.documentElement.style,d3=Gh?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function h3(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function wi(t,e){return typeof t=="number"?t:t[e]}function p3(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function VS(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;s=Kd(s)){if(s.nodeType!=1)continue;let l=s,a=l==i.body,u=a?h3(i):p3(l),c=0,d=0;if(e.topu.bottom-wi(r,"bottom")&&(d=e.bottom-e.top>u.bottom-u.top?e.top+wi(o,"top")-u.top:e.bottom-u.bottom+wi(o,"bottom")),e.leftu.right-wi(r,"right")&&(c=e.right-u.right+wi(o,"right")),c||d)if(a)i.defaultView.scrollBy(c,d);else{let h=l.scrollLeft,p=l.scrollTop;d&&(l.scrollTop+=d),c&&(l.scrollLeft+=c);let f=l.scrollLeft-h,g=l.scrollTop-p;e={left:e.left-f,top:e.top-g,right:e.right-f,bottom:e.bottom-g}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function f3(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=n+1;s=n-20){r=l,o=a.top;break}}return{refDOM:r,refTop:o,stack:m2(t.dom)}}function m2(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Kd(r));return e}function g3({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;v2(n,r==0?0:r-e)}function v2(t,e){for(let n=0;n=l){s=Math.max(f.bottom,s),l=Math.min(f.top,l);let g=f.left>e.left?f.left-e.left:f.right=(f.left+f.right)/2?1:0));continue}}else f.top>e.top&&!a&&f.left<=e.left&&f.right>=e.left&&(a=c,u={left:Math.max(f.left,Math.min(f.right,e.left)),top:f.top});!n&&(e.left>=f.right&&e.top>=f.top||e.left>=f.left&&e.top>=f.bottom)&&(i=d+1)}}return!n&&a&&(n=a,o=u,r=0),n&&n.nodeType==3?v3(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:y2(n,o)}function v3(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function Mb(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function y3(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}function w3(t,e,n,r){let o=-1;for(let i=e,s=!1;i!=t.dom;){let l=t.docView.nearestDesc(i,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent&&!s||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&!s&&(s=!0,a.left>r.left||a.top>r.top?o=l.posBefore:(a.right-1?o:t.docView.posFromDOM(e,n,-1)}function b2(t,e,n){let r=t.childNodes.length;if(r&&n.tope.top&&o++}let u;Gh&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=w3(t,r,o,e))}l==null&&(l=b3(t,s,e));let a=t.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function jS(t){return t.top=0&&o==r.nodeValue.length?(a--,c=1):n<0?a--:u++,Cu(ls(Ai(r,a,u),c),c<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==ei(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return c1(a.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==ei(r))){let a=r.childNodes[o-1],u=a.nodeType==3?Ai(a,ei(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return Cu(ls(u,1),!1)}if(i==null&&o=0)}function Cu(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function c1(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function x2(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function E3(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return x2(t,e,()=>{let{node:i}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let l=t.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let s=w2(t,o.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Ai(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}const S3=/[\u0590-\u08ac]/;function C3(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=t.domSelection();return!S3.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?i:s:x2(t,e,()=>{let{focusNode:a,focusOffset:u,anchorNode:c,anchorOffset:d}=t.domSelectionRange(),h=l.caretBidiLevel;l.modify("move",n,"character");let p=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:f,focusOffset:g}=t.domSelectionRange(),m=f&&!p.contains(f.nodeType==1?f:f.parentNode)||a==f&&u==g;try{l.collapse(c,d),a&&(a!=c||u!=d)&&l.extend&&l.extend(a,u)}catch{}return h!=null&&(l.caretBidiLevel=h),m})}let GS=null,KS=null,YS=!1;function T3(t,e,n){return GS==e&&KS==n?YS:(GS=e,KS=n,YS=n=="up"||n=="down"?E3(t,e,n):C3(t,e,n))}const po=0,XS=1,$a=2,hi=3;class Kh{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=po,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;ntr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;ne||s instanceof E2){o=e-i;break}i=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof k2&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?tr(i.dom)+1:0}}else{let i,s=!0;for(;i=r=c&&n<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,n,c);e=s;for(let d=l;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=tr(h.dom)+1;break}e-=h.size}o==-1&&(o=0)}if(o>-1&&(u>n||l==this.children.length-1)){n=u;for(let c=l+1;cp&&sn){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o=r:er){let l=r+i.border,a=s-i.border;if(e>=l&&n<=a){this.dirty=e==r||n==s?$a:XS,e==l&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=hi:i.markDirty(e-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?$a:hi}r=s}this.dirty=$a}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?$a:XS;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==po&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.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 A3 extends Kh{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Qa extends Kh{constructor(e,n,r,o){super(e,[],r,o),this.mark=n}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=Vr.renderSpec(document,n.type.spec.toDOM(n,r))),new Qa(e,n,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&hi||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=hi&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=po){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=O0(i,0,e,r));for(let l=0;l{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=Vr.renderSpec(document,n.type.spec.toDOM(n)));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let h=c;return c=T2(c,r,n),u?a=new _3(e,n,r,o,c,d||null,h,u,i,s+1):n.isText?new vm(e,n,r,o,c,h,i):new Rs(e,n,r,o,c,d||null,h,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.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)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>J.empty)}return e}matchesNode(e,n,r){return this.dirty==po&&e.eq(this.node)&&M0(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,i=e.composing?this.localCompositionInfo(e,n):null,s=i&&i.pos>-1?i:null,l=i&&i.pos<0,a=new M3(this,s&&s.node,e);L3(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?a.syncToMarks(u.spec.marks,r,e):u.type.side>=0&&!d&&a.syncToMarks(c==this.node.childCount?je.none:this.node.child(c).marks,r,e),a.placeWidget(u,e,o)},(u,c,d,h)=>{a.syncToMarks(u.marks,r,e);let p;a.findNodeMatch(u,c,d,h)||l&&e.state.selection.from>o&&e.state.selection.to-1&&a.updateNodeAt(u,c,d,p,e)||a.updateNextNode(u,c,d,e,h,o)||a.addNode(u,c,d,e,o),o+=u.nodeSize}),a.syncToMarks([],r,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==$a)&&(s&&this.protectLocalComposition(e,s),S2(this.contentDOM,this.children,e),Dc&&N3(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof Me)||rn+this.node.content.size)return null;let i=e.domSelectionRange(),s=$3(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let l=s.nodeValue,a=D3(this.node.content,l,r-n,o-n);return a<0?null:{node:s,pos:a,text:l}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new A3(this,i,n,o);e.input.compositionNodes.push(s),this.children=O0(this.children,r,r+o.length,e,s)}update(e,n,r,o){return this.dirty==hi||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=po}updateOuterDeco(e){if(M0(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=C2(this.dom,this.nodeDOM,R0(this.outerDeco,this.node,n),R0(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function qS(t,e,n,r,o){T2(r,e,t);let i=new Rs(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class vm extends Rs{constructor(e,n,r,o,i,s,l){super(e,n,r,o,i,null,s,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==hi||this.dirty!=po&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=po||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=po,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),i=document.createTextNode(o.text);return new vm(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=hi)}get domAtom(){return!1}}class E2 extends Kh{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==po&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class _3 extends Rs{constructor(e,n,r,o,i,s,l,a,u,c){super(e,n,r,o,i,s,l,u,c),this.spec=a}update(e,n,r,o){if(this.dirty==hi)return!1;if(this.spec.update){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r):super.setSelection(e,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function S2(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,e.length);for(;o-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=Qa.create(this.top,e[i],n,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,i++}}findNodeMatch(e,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))i=this.top.children.indexOf(s,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l0;){let l;for(;;)if(r){let u=n.children[r-1];if(u instanceof Qa)n=u,r=u.children.length;else{l=u,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=t.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}function I3(t,e){return t.type.side-e.type.side}function L3(t,e,n,r){let o=e.locals(t),i=0;if(o.length==0){for(let u=0;ui;)l.push(o[s++]);let f=i+h.nodeSize;if(h.isText){let m=f;s!m.inline):l.slice();r(h,g,e.forChild(i,h),p),i=f}}function N3(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function $3(t,e){for(;;){if(t.nodeType==3)return t;if(t.nodeType==1&&e>0){if(t.childNodes.length>e&&t.childNodes[e].nodeType==3)return t.childNodes[e];t=t.childNodes[e-1],e=ei(t)}else if(t.nodeType==1&&e=n){if(i>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let u=l=0&&u+e.length+l>=n)return l+u;if(n==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function O0(t,e,n,r,o){let i=[];for(let s=0,l=0;s=n||c<=e?i.push(a):(un&&i.push(a.slice(n-u,a.size,r)))}return i}function Ob(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,u;if(mm(n)){for(a=l;o&&!o.node;)o=o.parent;let c=o.node;if(o&&c.isAtom&&Oe.isSelectable(c)&&o.parent&&!(c.isInline&&s3(n.focusNode,n.focusOffset,o.dom))){let d=o.posBefore;u=new Oe(s==d?l:r.resolve(d))}}else{let c=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null;a=r.resolve(c)}if(!u){let c=e=="pointer"||t.state.selection.head{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!A2(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function z3(t){let e=t.domSelection(),n=document.createRange(),r=t.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setEnd(r.parentNode,tr(r)+1):n.setEnd(r,0),n.collapse(!1),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&kr&&_s<=11&&(r.disabled=!0,r.disabled=!1)}function _2(t,e){if(e instanceof Oe){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(tC(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else tC(t)}function tC(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Ib(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||Me.between(e,n,r)}function nC(t){return t.editable&&!t.hasFocus()?!1:R2(t)}function R2(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function F3(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Ja(e.node,e.offset,n.anchorNode,n.anchorOffset)}function I0(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&Be.findFrom(i,e)}function fs(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function rC(t,e,n){let r=t.state.selection;if(r instanceof Me)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=t.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return fs(t,new Me(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=I0(t.state,e);return o&&o instanceof Oe?fs(t,o):!1}else if(!(ao&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let l=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=t.docView.descAt(l))&&!s.contentDOM?Oe.isSelectable(i)?fs(t,new Oe(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):Gh?fs(t,new Me(t.state.doc.resolve(e<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Oe&&r.node.isInline)return fs(t,new Me(e>0?r.$to:r.$from));{let o=I0(t.state,e);return o?fs(t,o):!1}}}function rg(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Td(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function $l(t,e){return e<0?B3(t):H3(t)}function B3(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(Ho&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(Td(l,-1))o=n,i=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(M2(n))break;{let l=n.previousSibling;for(;l&&Td(l,-1);)o=n.parentNode,i=tr(l),l=l.previousSibling;if(l)n=l,r=rg(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?L0(t,n,r):o&&L0(t,o,i)}function H3(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=rg(n),i,s;for(;;)if(r{t.state==o&&zi(t)},50)}function oC(t,e){let n=t.state.doc.resolve(e);if(!(Gn||u3)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function iC(t,e,n){let r=t.state.selection;if(r instanceof Me&&!r.empty||n.indexOf("s")>-1||ao&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=I0(t.state,e);if(s&&s instanceof Oe)return fs(t,s)}if(!o.parent.inlineContent){let s=e<0?o:i,l=r instanceof rr?Be.near(s,e):Be.findFrom(s,e);return l?fs(t,l):!1}return!1}function sC(t,e){if(!(t.state.selection instanceof Me))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=t.state.tr;return e<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),t.dispatch(s),!0}return!1}function aC(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function V3(t){if(!sr||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;aC(t,r,"true"),setTimeout(()=>aC(t,r,"false"),20)}return!1}function j3(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function G3(t,e){let n=e.keyCode,r=j3(e);if(n==8||ao&&n==72&&r=="c")return sC(t,-1)||$l(t,-1);if(n==46&&!e.shiftKey||ao&&n==68&&r=="c")return sC(t,1)||$l(t,1);if(n==13||n==27)return!0;if(n==37||ao&&n==66&&r=="c"){let o=n==37?oC(t,t.state.selection.from)=="ltr"?-1:1:-1;return rC(t,o,r)||$l(t,o)}else if(n==39||ao&&n==70&&r=="c"){let o=n==39?oC(t,t.state.selection.from)=="ltr"?1:-1:1;return rC(t,o,r)||$l(t,o)}else{if(n==38||ao&&n==80&&r=="c")return iC(t,-1,r)||$l(t,-1);if(n==40||ao&&n==78&&r=="c")return V3(t)||iC(t,1,r)||$l(t,1);if(r==(ao?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function O2(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=t.someProp("clipboardSerializer")||Vr.fromSchema(t.state.schema),l=P2(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=D2[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let f=l.createElement(c[p]);for(;a.firstChild;)f.appendChild(a.firstChild);a.appendChild(f),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,` +other {Heading}}`,comment:"Label for heading command with support for levels."};var D5=Object.freeze({__proto__:null,LABEL:$5});const P5={id:"extension.command.undo.label",message:"Undo",comment:"Label for undo."},z5={id:"extension.command.undo.description",message:"Undo the most recent action",comment:"Description for undo."},F5={id:"extension.command.redo.label",message:"Redo",comment:"Label for redo."},B5={id:"extension.command.redo.description",message:"Redo the most recent action",comment:"Description for redo."};var tg=Object.freeze({__proto__:null,REDO_DESCRIPTION:B5,REDO_LABEL:F5,UNDO_DESCRIPTION:z5,UNDO_LABEL:P5});const H5={id:"extension.command.insert-horizontal-rule.label",message:"Divider",comment:"Label for inserting a horizontal rule (divider) command."},U5={id:"extension.command.insert-horizontal-rule.description",message:"Separate content with a diving horizontal line",comment:"Description for inserting a horizontal rule (divider) command."};var PS=Object.freeze({__proto__:null,DESCRIPTION:U5,LABEL:H5});const W5={id:"extension.command.toggle-italic.label",message:"Italic",comment:"Label for italic formatting command."},V5={id:"extension.command.toggle-italic.description",message:"Italicize the selected text",comment:"Description for italic formatting command."};var zS=Object.freeze({__proto__:null,DESCRIPTION:V5,LABEL:W5});const j5={id:"extension.command.toggle-ordered-list.label",message:"Ordered list",comment:"Label for inserting an ordered list into the editor."},G5={id:"extension.command.toggle-bullet-list.description",message:"Bulleted list",comment:"Description for inserting a bullet list into the editor."},K5={id:"extension.command.toggle-task-list.description",message:"Tasked list",comment:"Description for inserting a task list into the editor."};var Mb=Object.freeze({__proto__:null,BULLET_LIST_LABEL:G5,ORDERED_LIST_LABEL:j5,TASK_LIST_LABEL:K5});const Y5={id:"extension.command.insert-paragraph.label",message:"Insert Paragraph",comment:"Label for inserting a paragraph."},X5={id:"extension.command.insert-paragraph.description",message:"Insert a new paragraph",comment:"Description for inserting a paragraph."},q5={id:"extension.command.convert-paragraph.label",message:"Convert Paragraph",comment:"Label for converting the current node into a paragraph."},Z5={id:"extension.command.convert-paragraph.description",message:"Convert current block into a paragraph block.",comment:"Description for converting a paragraph."};var ng=Object.freeze({__proto__:null,CONVERT_DESCRIPTION:Z5,CONVERT_LABEL:q5,INSERT_DESCRIPTION:X5,INSERT_LABEL:Y5});const J5={id:"extension.command.toggle-strike.label",message:"Strikethrough",comment:"Label for strike formatting command."},Q5={id:"extension.command.toggle-strike.description",message:"Strikethrough the selected text",comment:"Description for strike formatting command."};var FS=Object.freeze({__proto__:null,DESCRIPTION:Q5,LABEL:J5});const e3={id:"extension.command.toggle-underline.label",message:"Underline",comment:"Label for underline formatting command."},t3={id:"extension.command.toggle-underline.description",message:"Underline the selected text",comment:"Description for underline formatting command."};var BS=Object.freeze({__proto__:null,DESCRIPTION:t3,LABEL:e3});class yl{constructor(e,n){this.match=e,this.match=e,this.handler=typeof n=="string"?n3(n):n}}function n3(t){return function(e,n,r,o){let i=t;if(n[1]){let s=n[0].lastIndexOf(n[1]);i+=n[0].slice(s+n[1].length),r+=s;let l=r-o;l>0&&(i=n[0].slice(s-l,s)+i,r=o)}return e.tr.insertText(i,r,o)}}const r3=500;function o3({rules:t}){let e=new mi({state:{init(){return null},apply(n,r){let o=n.getMeta(this);return o||(n.selectionSet||n.docChanged?null:r)}},props:{handleTextInput(n,r,o,i){return HS(n,r,o,i,t,e)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&HS(n,r.pos,r.pos,"",t,e)})}}},isInputRules:!0});return e}function HS(t,e,n,r,o,i){if(t.composing)return!1;let s=t.state,l=s.doc.resolve(e);if(l.parent.type.spec.code)return!1;let a=l.parent.textBetween(Math.max(0,l.parentOffset-r3),l.parentOffset,null,"")+r;for(let u=0;u{let n=t.plugins;for(let r=0;r=0;a--)s.step(l.steps[a].invert(l.docs[a]));if(i.text){let a=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,t.schema.text(i.text,a))}else s.delete(i.from,i.to);e(s)}return!0}}return!1};function gm(t,e,n=null,r){return new yl(t,(o,i,s,l)=>{let a=n instanceof Function?n(i):n,u=o.tr.delete(s,l),c=u.doc.resolve(s),d=c.blockRange(),h=d&&Ab(d,e,a);if(!h)return null;u.wrap(d,h);let p=u.doc.resolve(s-1).nodeBefore;return p&&p.type==e&&jh(u.doc,s-1)&&(!r||r(i,p))&&u.join(s-1),u})}function s3(t,e,n=null){return new yl(t,(r,o,i,s)=>{let l=r.doc.resolve(i),a=n instanceof Function?n(o):n;return l.node(-1).canReplaceWith(l.index(-1),l.indexAfter(-1),e)?r.tr.delete(i,s).setBlockType(i,i,e,a):null})}const tr=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Kd=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let US=null;const Ai=function(t,e,n){let r=US||(US=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},Ja=function(t,e,n,r){return n&&(WS(t,e,n,r,-1)||WS(t,e,n,r,1))},a3=/^(img|br|input|textarea|hr)$/i;function WS(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:ei(t))){let i=t.parentNode;if(!i||i.nodeType!=1||Ob(t)||a3.test(t.nodeName)||t.contentEditable=="false")return!1;e=tr(t)+(o<0?0:1),t=i}else if(t.nodeType==1){if(t=t.childNodes[e+(o<0?-1:0)],t.contentEditable=="false")return!1;e=o<0?ei(t):0}else return!1}}function ei(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function l3(t,e,n){for(let r=e==0,o=e==ei(t);r||o;){if(t==n)return!0;let i=tr(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==ei(t)}}function Ob(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const mm=function(t){return t.focusNode&&Ja(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Ia(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function c3(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function u3(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}const di=typeof navigator<"u"?navigator:null,VS=typeof document<"u"?document:null,ea=di&&di.userAgent||"",_0=/Edge\/(\d+)/.exec(ea),m2=/MSIE \d/.exec(ea),R0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ea),kr=!!(m2||R0||_0),_s=m2?document.documentMode:R0?+R0[1]:_0?+_0[1]:0,Uo=!kr&&/gecko\/(\d+)/i.test(ea);Uo&&+(/Firefox\/(\d+)/.exec(ea)||[0,0])[1];const M0=!kr&&/Chrome\/(\d+)/.exec(ea),Gn=!!M0,d3=M0?+M0[1]:0,sr=!kr&&!!di&&/Apple Computer/.test(di.vendor),Dc=sr&&(/Mobile\/\w+/.test(ea)||!!di&&di.maxTouchPoints>2),ao=Dc||(di?/Mac/.test(di.platform):!1),h3=di?/Win/.test(di.platform):!1,No=/Android \d/.test(ea),Gh=!!VS&&"webkitFontSmoothing"in VS.documentElement.style,p3=Gh?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function f3(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function wi(t,e){return typeof t=="number"?t:t[e]}function g3(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function jS(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;s=Kd(s)){if(s.nodeType!=1)continue;let l=s,a=l==i.body,u=a?f3(i):g3(l),c=0,d=0;if(e.topu.bottom-wi(r,"bottom")&&(d=e.bottom-e.top>u.bottom-u.top?e.top+wi(o,"top")-u.top:e.bottom-u.bottom+wi(o,"bottom")),e.leftu.right-wi(r,"right")&&(c=e.right-u.right+wi(o,"right")),c||d)if(a)i.defaultView.scrollBy(c,d);else{let h=l.scrollLeft,p=l.scrollTop;d&&(l.scrollTop+=d),c&&(l.scrollLeft+=c);let f=l.scrollLeft-h,g=l.scrollTop-p;e={left:e.left-f,top:e.top-g,right:e.right-f,bottom:e.bottom-g}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function m3(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=n+1;s=n-20){r=l,o=a.top;break}}return{refDOM:r,refTop:o,stack:v2(t.dom)}}function v2(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Kd(r));return e}function v3({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;y2(n,r==0?0:r-e)}function y2(t,e){for(let n=0;n=l){s=Math.max(f.bottom,s),l=Math.min(f.top,l);let g=f.left>e.left?f.left-e.left:f.right=(f.left+f.right)/2?1:0));continue}}else f.top>e.top&&!a&&f.left<=e.left&&f.right>=e.left&&(a=c,u={left:Math.max(f.left,Math.min(f.right,e.left)),top:f.top});!n&&(e.left>=f.right&&e.top>=f.top||e.left>=f.left&&e.top>=f.bottom)&&(i=d+1)}}return!n&&a&&(n=a,o=u,r=0),n&&n.nodeType==3?b3(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:b2(n,o)}function b3(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function Ib(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function w3(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}function k3(t,e,n,r){let o=-1;for(let i=e,s=!1;i!=t.dom;){let l=t.docView.nearestDesc(i,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent&&!s||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&!s&&(s=!0,a.left>r.left||a.top>r.top?o=l.posBefore:(a.right-1?o:t.docView.posFromDOM(e,n,-1)}function w2(t,e,n){let r=t.childNodes.length;if(r&&n.tope.top&&o++}let u;Gh&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=k3(t,r,o,e))}l==null&&(l=x3(t,s,e));let a=t.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function GS(t){return t.top=0&&o==r.nodeValue.length?(a--,c=1):n<0?a--:u++,Cu(ls(Ai(r,a,u),c),c<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==ei(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return u1(a.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==ei(r))){let a=r.childNodes[o-1],u=a.nodeType==3?Ai(a,ei(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return Cu(ls(u,1),!1)}if(i==null&&o=0)}function Cu(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function u1(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function k2(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function C3(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return k2(t,e,()=>{let{node:i}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let l=t.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let s=x2(t,o.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Ai(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}const T3=/[\u0590-\u08ac]/;function A3(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=t.domSelection();return!T3.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?i:s:k2(t,e,()=>{let{focusNode:a,focusOffset:u,anchorNode:c,anchorOffset:d}=t.domSelectionRange(),h=l.caretBidiLevel;l.modify("move",n,"character");let p=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:f,focusOffset:g}=t.domSelectionRange(),m=f&&!p.contains(f.nodeType==1?f:f.parentNode)||a==f&&u==g;try{l.collapse(c,d),a&&(a!=c||u!=d)&&l.extend&&l.extend(a,u)}catch{}return h!=null&&(l.caretBidiLevel=h),m})}let KS=null,YS=null,XS=!1;function _3(t,e,n){return KS==e&&YS==n?XS:(KS=e,YS=n,XS=n=="up"||n=="down"?C3(t,e,n):A3(t,e,n))}const po=0,qS=1,$a=2,hi=3;class Kh{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=po,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;ntr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;ne||s instanceof S2){o=e-i;break}i=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof E2&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?tr(i.dom)+1:0}}else{let i,s=!0;for(;i=r=c&&n<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,n,c);e=s;for(let d=l;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=tr(h.dom)+1;break}e-=h.size}o==-1&&(o=0)}if(o>-1&&(u>n||l==this.children.length-1)){n=u;for(let c=l+1;cp&&sn){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o=r:er){let l=r+i.border,a=s-i.border;if(e>=l&&n<=a){this.dirty=e==r||n==s?$a:qS,e==l&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=hi:i.markDirty(e-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?$a:hi}r=s}this.dirty=$a}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?$a:qS;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==po&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.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 R3 extends Kh{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Qa extends Kh{constructor(e,n,r,o){super(e,[],r,o),this.mark=n}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=Vr.renderSpec(document,n.type.spec.toDOM(n,r))),new Qa(e,n,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&hi||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=hi&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=po){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=L0(i,0,e,r));for(let l=0;l{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=Vr.renderSpec(document,n.type.spec.toDOM(n)));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let h=c;return c=A2(c,r,n),u?a=new M3(e,n,r,o,c,d||null,h,u,i,s+1):n.isText?new vm(e,n,r,o,c,h,i):new Rs(e,n,r,o,c,d||null,h,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.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)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>J.empty)}return e}matchesNode(e,n,r){return this.dirty==po&&e.eq(this.node)&&I0(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,i=e.composing?this.localCompositionInfo(e,n):null,s=i&&i.pos>-1?i:null,l=i&&i.pos<0,a=new I3(this,s&&s.node,e);$3(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?a.syncToMarks(u.spec.marks,r,e):u.type.side>=0&&!d&&a.syncToMarks(c==this.node.childCount?je.none:this.node.child(c).marks,r,e),a.placeWidget(u,e,o)},(u,c,d,h)=>{a.syncToMarks(u.marks,r,e);let p;a.findNodeMatch(u,c,d,h)||l&&e.state.selection.from>o&&e.state.selection.to-1&&a.updateNodeAt(u,c,d,p,e)||a.updateNextNode(u,c,d,e,h,o)||a.addNode(u,c,d,e,o),o+=u.nodeSize}),a.syncToMarks([],r,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==$a)&&(s&&this.protectLocalComposition(e,s),C2(this.contentDOM,this.children,e),Dc&&D3(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof Me)||rn+this.node.content.size)return null;let i=e.domSelectionRange(),s=P3(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let l=s.nodeValue,a=z3(this.node.content,l,r-n,o-n);return a<0?null:{node:s,pos:a,text:l}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new R3(this,i,n,o);e.input.compositionNodes.push(s),this.children=L0(this.children,r,r+o.length,e,s)}update(e,n,r,o){return this.dirty==hi||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=po}updateOuterDeco(e){if(I0(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=T2(this.dom,this.nodeDOM,O0(this.outerDeco,this.node,n),O0(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function ZS(t,e,n,r,o){A2(r,e,t);let i=new Rs(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class vm extends Rs{constructor(e,n,r,o,i,s,l){super(e,n,r,o,i,null,s,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==hi||this.dirty!=po&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=po||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=po,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),i=document.createTextNode(o.text);return new vm(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=hi)}get domAtom(){return!1}}class S2 extends Kh{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==po&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class M3 extends Rs{constructor(e,n,r,o,i,s,l,a,u,c){super(e,n,r,o,i,s,l,u,c),this.spec=a}update(e,n,r,o){if(this.dirty==hi)return!1;if(this.spec.update){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r):super.setSelection(e,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function C2(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,e.length);for(;o-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=Qa.create(this.top,e[i],n,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,i++}}findNodeMatch(e,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))i=this.top.children.indexOf(s,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l0;){let l;for(;;)if(r){let u=n.children[r-1];if(u instanceof Qa)n=u,r=u.children.length;else{l=u,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=t.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}function N3(t,e){return t.type.side-e.type.side}function $3(t,e,n,r){let o=e.locals(t),i=0;if(o.length==0){for(let u=0;ui;)l.push(o[s++]);let f=i+h.nodeSize;if(h.isText){let m=f;s!m.inline):l.slice();r(h,g,e.forChild(i,h),p),i=f}}function D3(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function P3(t,e){for(;;){if(t.nodeType==3)return t;if(t.nodeType==1&&e>0){if(t.childNodes.length>e&&t.childNodes[e].nodeType==3)return t.childNodes[e];t=t.childNodes[e-1],e=ei(t)}else if(t.nodeType==1&&e=n){if(i>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let u=l=0&&u+e.length+l>=n)return l+u;if(n==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function L0(t,e,n,r,o){let i=[];for(let s=0,l=0;s=n||c<=e?i.push(a):(un&&i.push(a.slice(n-u,a.size,r)))}return i}function Lb(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,u;if(mm(n)){for(a=l;o&&!o.node;)o=o.parent;let c=o.node;if(o&&c.isAtom&&Oe.isSelectable(c)&&o.parent&&!(c.isInline&&l3(n.focusNode,n.focusOffset,o.dom))){let d=o.posBefore;u=new Oe(s==d?l:r.resolve(d))}}else{let c=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null;a=r.resolve(c)}if(!u){let c=e=="pointer"||t.state.selection.head{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!_2(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function B3(t){let e=t.domSelection(),n=document.createRange(),r=t.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setEnd(r.parentNode,tr(r)+1):n.setEnd(r,0),n.collapse(!1),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&kr&&_s<=11&&(r.disabled=!0,r.disabled=!1)}function R2(t,e){if(e instanceof Oe){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(nC(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else nC(t)}function nC(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Nb(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||Me.between(e,n,r)}function rC(t){return t.editable&&!t.hasFocus()?!1:M2(t)}function M2(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function H3(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Ja(e.node,e.offset,n.anchorNode,n.anchorOffset)}function N0(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&Be.findFrom(i,e)}function fs(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function oC(t,e,n){let r=t.state.selection;if(r instanceof Me)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=t.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return fs(t,new Me(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=N0(t.state,e);return o&&o instanceof Oe?fs(t,o):!1}else if(!(ao&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let l=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=t.docView.descAt(l))&&!s.contentDOM?Oe.isSelectable(i)?fs(t,new Oe(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):Gh?fs(t,new Me(t.state.doc.resolve(e<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Oe&&r.node.isInline)return fs(t,new Me(e>0?r.$to:r.$from));{let o=N0(t.state,e);return o?fs(t,o):!1}}}function rg(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Td(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function $l(t,e){return e<0?U3(t):W3(t)}function U3(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(Uo&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(Td(l,-1))o=n,i=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(O2(n))break;{let l=n.previousSibling;for(;l&&Td(l,-1);)o=n.parentNode,i=tr(l),l=l.previousSibling;if(l)n=l,r=rg(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?$0(t,n,r):o&&$0(t,o,i)}function W3(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=rg(n),i,s;for(;;)if(r{t.state==o&&zi(t)},50)}function iC(t,e){let n=t.state.doc.resolve(e);if(!(Gn||h3)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function sC(t,e,n){let r=t.state.selection;if(r instanceof Me&&!r.empty||n.indexOf("s")>-1||ao&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=N0(t.state,e);if(s&&s instanceof Oe)return fs(t,s)}if(!o.parent.inlineContent){let s=e<0?o:i,l=r instanceof rr?Be.near(s,e):Be.findFrom(s,e);return l?fs(t,l):!1}return!1}function aC(t,e){if(!(t.state.selection instanceof Me))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=t.state.tr;return e<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),t.dispatch(s),!0}return!1}function lC(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function G3(t){if(!sr||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;lC(t,r,"true"),setTimeout(()=>lC(t,r,"false"),20)}return!1}function K3(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function Y3(t,e){let n=e.keyCode,r=K3(e);if(n==8||ao&&n==72&&r=="c")return aC(t,-1)||$l(t,-1);if(n==46&&!e.shiftKey||ao&&n==68&&r=="c")return aC(t,1)||$l(t,1);if(n==13||n==27)return!0;if(n==37||ao&&n==66&&r=="c"){let o=n==37?iC(t,t.state.selection.from)=="ltr"?-1:1:-1;return oC(t,o,r)||$l(t,o)}else if(n==39||ao&&n==70&&r=="c"){let o=n==39?iC(t,t.state.selection.from)=="ltr"?1:-1:1;return oC(t,o,r)||$l(t,o)}else{if(n==38||ao&&n==80&&r=="c")return sC(t,-1,r)||$l(t,-1);if(n==40||ao&&n==78&&r=="c")return G3(t)||sC(t,1,r)||$l(t,1);if(r==(ao?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function I2(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=t.someProp("clipboardSerializer")||Vr.fromSchema(t.state.schema),l=z2(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=P2[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let f=l.createElement(c[p]);for(;a.firstChild;)f.appendChild(a.firstChild);a.appendChild(f),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,` -`);return{dom:a,text:h}}function I2(t,e,n,r,o){let i=o.parent.type.spec.code,s,l;if(!n&&!e)return null;let a=e&&(r||i||!n);if(a){if(t.someProp("transformPastedText",h=>{e=h(e,i||r,t)}),i)return e?new ae(J.from(t.state.schema.text(e.replace(/\r\n?/g,` -`))),0,0):ae.empty;let d=t.someProp("clipboardTextParser",h=>h(e,o,r,t));if(d)l=d;else{let h=o.marks(),{schema:p}=t.state,f=Vr.fromSchema(p);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let m=s.appendChild(document.createElement("p"));g&&m.appendChild(f.serializeNode(p.text(g,h)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),s=X3(n),Gh&&q3(s);let u=s&&s.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||Za.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||c),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!K3.test(h.parentNode.nodeName)?{ignore:!0}:null}})),c)l=Z3(lC(l,+c[1],+c[2]),c[4]);else if(l=ae.maxOpen(Y3(l.content,o),!0),l.openStart||l.openEnd){let d=0,h=0;for(let p=l.content.firstChild;d{l=d(l,t)}),l}const K3=/^(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 Y3(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),u;if(!a)return s=null;if(u=s.length&&i.length&&N2(a,i,l,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=$2(s[s.length-1],i.length));let c=L2(l,a);s.push(c),o=o.matchType(c.type),i=a}}),s)return J.from(s)}return t}function L2(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,J.from(t));return t}function N2(t,e,n,r,o){if(o1&&(i=0),o=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(J.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function lC(t,e,n){return e]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=P2().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&D2[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"").reverse().join("")),n.innerHTML=t,o)for(let i=0;i=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=J.from(a.create(r[l+1],o)),i++,s++}return new ae(o,i,s)}const ar={},lr={},J3={touchstart:!0,touchmove:!0};class Q3{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.lastAndroidDelete=0,this.composing=!1,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 ez(t){for(let e in ar){let n=ar[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{nz(t,r)&&!Lb(t,r)&&(t.editable||!(r.type in lr))&&n(t,r)},J3[e]?{passive:!0}:void 0)}sr&&t.dom.addEventListener("input",()=>null),$0(t)}function Es(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function tz(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function $0(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Lb(t,r))})}function Lb(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function nz(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function rz(t,e){!Lb(t,e)&&ar[e.type]&&(t.editable||!(e.type in lr))&&ar[e.type](t,e)}lr.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!F2(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Lo&&Gn&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Dc&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,Ia(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||G3(t,n)?n.preventDefault():Es(t,"key")};lr.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};lr.keypress=(t,e)=>{let n=e;if(F2(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||ao&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof Me)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",i=>i(t,r.$from.pos,r.$to.pos,o))&&t.dispatch(t.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function ym(t){return{left:t.clientX,top:t.clientY}}function oz(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Nb(t,e,n,r,o){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(t.someProp(e,l=>s>i.depth?l(t,n,i.nodeAfter,i.before(s),o,!0):l(t,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function bc(t,e,n){t.focused||t.focus();let r=t.state.tr.setSelection(e);n=="pointer"&&r.setMeta("pointer",!0),t.dispatch(r)}function iz(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&Oe.isSelectable(r)?(bc(t,new Oe(n),"pointer"),!0):!1}function sz(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof Oe&&(r=n.node);let i=t.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let l=s>i.depth?i.nodeAfter:i.node(s);if(Oe.isSelectable(l)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(bc(t,Oe.create(t.state.doc,o),"pointer"),!0):!1}function az(t,e,n,r,o){return Nb(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?sz(t,n):iz(t,n))}function lz(t,e,n,r){return Nb(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function cz(t,e,n,r){return Nb(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||uz(t,n,r)}function uz(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(bc(t,Me.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),l=o.before(i);if(s.inlineContent)bc(t,Me.create(r,l+1,l+1+s.content.size),"pointer");else if(Oe.isSelectable(s))bc(t,Oe.create(r,l),"pointer");else continue;return!0}}function $b(t){return og(t)}const z2=ao?"metaKey":"ctrlKey";ar.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=$b(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&oz(n,t.input.lastClick)&&!n[z2]&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=t.posAtCoords(ym(n));s&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new dz(t,s,n,!!r)):(i=="doubleClick"?lz:cz)(t,s.pos,s.inside,n)?n.preventDefault():Es(t,"pointer"))};class dz{constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[z2],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),s=n.inside;else{let c=e.state.doc.resolve(n.pos);i=c.parent,s=c.depth?c.before():0}const l=o?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a?a.dom:null;let{selection:u}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof Oe&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ho&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Es(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>zi(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(ym(e))),this.updateAllowDefault(e),this.allowDefault||!n?Es(this.view,"pointer"):az(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||sr&&this.mightDrag&&!this.mightDrag.node.isAtom||Gn&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(bc(this.view,Be.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):Es(this.view,"pointer")}move(e){this.updateAllowDefault(e),Es(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}ar.touchstart=t=>{t.input.lastTouch=Date.now(),$b(t),Es(t,"pointer")};ar.touchmove=t=>{t.input.lastTouch=Date.now(),Es(t,"pointer")};ar.contextmenu=t=>$b(t);function F2(t,e){return t.composing?!0:sr&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const hz=Lo?5e3:-1;lr.compositionstart=lr.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),og(t,!0),t.markCursor=null;else if(og(t),Ho&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){t.domSelection().collapse(s,s.nodeValue.length);break}else o=s,i=-1}}t.input.composing=!0}B2(t,hz)};lr.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,B2(t,20))};function B2(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>og(t),e))}function H2(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=pz());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function pz(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function og(t,e=!1){if(!(Lo&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),H2(t),e||t.docView&&t.docView.dirty){let n=Ob(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):t.updateState(t.state),!0}return!1}}function fz(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Pc=kr&&_s<15||Dc&&d3<604;ar.copy=lr.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=Pc?null:n.clipboardData,s=r.content(),{dom:l,text:a}=O2(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):fz(t,l),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function gz(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function mz(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Yd(t,r.value,null,o,e):Yd(t,r.textContent,r.innerHTML,o,e)},50)}function Yd(t,e,n,r,o){let i=I2(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",a=>a(t,o,i||ae.empty)))return!0;if(!i)return!1;let s=gz(i),l=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(i);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}lr.paste=(t,e)=>{let n=e;if(t.composing&&!Lo)return;let r=Pc?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Yd(t,r.getData("text/plain"),r.getData("text/html"),o,n)?n.preventDefault():mz(t,n)};class vz{constructor(e,n){this.slice=e,this.move=n}}const U2=ao?"altKey":"ctrlKey";ar.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(ym(n));if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Oe?o.to-1:o.to))){if(r&&r.mightDrag)t.dispatch(t.state.tr.setSelection(Oe.create(t.state.doc,r.mightDrag.pos)));else if(n.target&&n.target.nodeType==1){let u=t.docView.nearestDesc(n.target,!0);u&&u.node.type.spec.draggable&&u!=t.docView&&t.dispatch(t.state.tr.setSelection(Oe.create(t.state.doc,u.posBefore)))}}let s=t.state.selection.content(),{dom:l,text:a}=O2(t,s);n.dataTransfer.clearData(),n.dataTransfer.setData(Pc?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Pc||n.dataTransfer.setData("text/plain",a),t.dragging=new vz(s,!n[U2])};ar.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};lr.dragover=lr.dragenter=(t,e)=>e.preventDefault();lr.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let o=t.posAtCoords(ym(n));if(!o)return;let i=t.state.doc.resolve(o.pos),s=r&&r.slice;s?t.someProp("transformPasted",f=>{s=f(s,t)}):s=I2(t,n.dataTransfer.getData(Pc?"Text":"text/plain"),Pc?null:n.dataTransfer.getData("text/html"),!1,i);let l=!!(r&&!n[U2]);if(t.someProp("handleDrop",f=>f(t,n,s||ae.empty,l))){n.preventDefault();return}if(!s)return;n.preventDefault();let a=s?OP(t.state.doc,i.pos,s):i.pos;a==null&&(a=i.pos);let u=t.state.tr;l&&u.deleteSelection();let c=u.mapping.map(a),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=u.doc;if(d?u.replaceRangeWith(c,c,s.content.firstChild):u.replaceRange(c,c,s),u.doc.eq(h))return;let p=u.doc.resolve(c);if(d&&Oe.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new Oe(p));else{let f=u.mapping.map(a);u.mapping.maps[u.mapping.maps.length-1].forEach((g,m,v,y)=>f=y),u.setSelection(Ib(t,p,u.doc.resolve(f)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))};ar.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&zi(t)},20))};ar.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};ar.beforeinput=(t,e)=>{if(Gn&&Lo&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,Ia(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in lr)ar[t]=lr[t];function Xd(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class ig{constructor(e,n){this.toDOM=e,this.spec=n||Va,this.side=this.spec.side||0}map(e,n,r,o){let{pos:i,deleted:s}=e.mapResult(n.from+o,this.side<0?-1:1);return s?null:new vt(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof ig&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Xd(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Ms{constructor(e,n){this.attrs=e,this.spec=n||Va}map(e,n,r,o){let i=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new vt(i,s,this)}valid(e,n){return n.from=e&&(!i||i(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let s=0;se){let l=this.children[s]+1;this.children[s+2].findInner(e-l,n-l,r,o+l,i)}}map(e,n,r){return this==Wn||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Va)}mapInner(e,n,r,o,i){let s;for(let l=0;l{let u=a+r,c;if(c=V2(n,l,u)){for(o||(o=this.children.slice());il&&d.to=e){this.children[l]==e&&(r=this.children[l+2]);break}let i=e+1,s=i+n.content.size;for(let l=0;li&&a.type instanceof Ms){let u=Math.max(i,a.from)-i,c=Math.min(s,a.to)-i;uo.map(e,n,Va));return ys.from(r)}forChild(e,n){if(n.isLeaf)return He.empty;let r=[];for(let o=0;on instanceof He)?e:e.reduce((n,r)=>n.concat(r instanceof He?r:r.members),[]))}}}function yz(t,e,n,r,o,i,s){let l=t.slice();for(let u=0,c=i;u{let m=g-f-(p-h);for(let v=0;vy+c-d)continue;let b=l[v]+c-d;p>=b?l[v+1]=h<=b?-2:-1:f>=o&&m&&(l[v]+=m,l[v+1]+=m)}d+=m}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u=r.content.size){a=!0;continue}let h=n.map(t[u+1]+i,-1),p=h-o,{index:f,offset:g}=r.content.findIndex(d),m=r.maybeChild(f);if(m&&g==d&&g+m.nodeSize==p){let v=l[u+2].mapInner(n,m,c+1,t[u]+i+1,s);v!=Wn?(l[u]=d,l[u+1]=p,l[u+2]=v):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=bz(l,t,e,n,o,i,s),c=sg(u,r,0,s);e=c.local;for(let d=0;dn&&s.to{let u=V2(t,l,a+n);if(u){i=!0;let c=sg(u,l,n+a+1,r);c!=Wn&&o.push(a,a+l.nodeSize,c)}});let s=W2(i?j2(t):t,-n).sort(ja);for(let l=0;l0;)e++;t.splice(e,0,n)}function d1(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Wn&&e.push(r)}),t.cursorWrapper&&e.push(He.create(t.state.doc,[t.cursorWrapper.deco])),ys.from(e)}const wz={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},xz=kr&&_s<=11;class kz{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Ez{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new kz,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),xz&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,wz)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;nthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(nC(this.view)){if(this.suppressingSelectionUpdates)return zi(this.view);if(kr&&_s<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Ja(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=Kd(i))n.add(i);for(let i=e.anchorNode;i;i=Kd(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&nC(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,l=!1,a=[];if(e.editable)for(let c=0;c1){let c=a.filter(d=>d.nodeName=="BR");if(c.length==2){let d=c[0],h=c[1];d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}}let u=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||o)&&(i>-1&&(e.docView.markDirty(i,s),Sz(e)),this.handleDOMChange(i,s,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||zi(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let c=0;co;m--){let v=r.childNodes[m-1],y=v.pmViewDesc;if(v.nodeName=="BR"&&!y){i=m;break}if(!y||y.size)break}let d=t.state.doc,h=t.someProp("domParser")||Za.fromSchema(t.state.schema),p=d.resolve(s),f=null,g=h.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:Az,context:p});if(u&&u[0].pos!=null){let m=u[0].pos,v=u[1]&&u[1].pos;v==null&&(v=m),f={anchor:m+s,head:v+s}}return{doc:g,sel:f,from:s,to:l}}function Az(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(sr&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||sr&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const _z=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Rz(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let C=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,O=Ob(t,C);if(O&&!t.state.selection.eq(O)){if(Gn&&Lo&&t.input.lastKeyCode===13&&Date.now()-100_(t,Ia(13,"Enter"))))return;let R=t.state.tr.setSelection(O);C=="pointer"?R.setMeta("pointer",!0):C=="key"&&R.scrollIntoView(),i&&R.setMeta("composition",i),t.dispatch(R)}return}let s=t.state.doc.resolve(e),l=s.sharedDepth(n);e=s.before(l+1),n=t.state.doc.resolve(n).after(l+1);let a=t.state.selection,u=Tz(t,e,n),c=t.state.doc,d=c.slice(u.from,u.to),h,p;t.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Lo)&&o.some(C=>C.nodeType==1&&!_z.test(C.nodeName))&&(!f||f.endA>=f.endB)&&t.someProp("handleKeyDown",C=>C(t,Ia(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!f)if(r&&a instanceof Me&&!a.empty&&a.$head.sameParent(a.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))f={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let C=pC(t,t.state.doc,u.sel);if(C&&!C.eq(t.state.selection)){let O=t.state.tr.setSelection(C);i&&O.setMeta("composition",i),t.dispatch(O)}}return}if(Gn&&t.cursorWrapper&&u.sel&&u.sel.anchor==t.cursorWrapper.deco.from&&u.sel.head==u.sel.anchor){let C=f.endB-f.start;u.sel={anchor:u.sel.anchor+C,head:u.sel.anchor+C}}t.input.domChangeCount++,t.state.selection.fromt.state.selection.from&&f.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?f.start=t.state.selection.from:f.endA=t.state.selection.to-2&&t.state.selection.to<=u.to&&(f.endB+=t.state.selection.to-f.endA,f.endA=t.state.selection.to)),kr&&_s<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>u.from&&u.doc.textBetween(f.start-u.from-1,f.start-u.from+1)=="  "&&(f.start--,f.endA--,f.endB--);let g=u.doc.resolveNoCache(f.start-u.from),m=u.doc.resolveNoCache(f.endB-u.from),v=c.resolve(f.start),y=g.sameParent(m)&&g.parent.inlineContent&&v.end()>=f.endA,b;if((Dc&&t.input.lastIOSEnter>Date.now()-225&&(!y||o.some(C=>C.nodeName=="DIV"||C.nodeName=="P"))||!y&&g.posC(t,Ia(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>f.start&&Oz(c,f.start,f.endA,g,m)&&t.someProp("handleKeyDown",C=>C(t,Ia(8,"Backspace")))){Lo&&Gn&&t.domObserver.suppressSelectionUpdates();return}Gn&&Lo&&f.endB==f.start&&(t.input.lastAndroidDelete=Date.now()),Lo&&!y&&g.start()!=m.start()&&m.parentOffset==0&&g.depth==m.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==f.endA&&(f.endB-=2,m=u.doc.resolveNoCache(f.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(C){return C(t,Ia(13,"Enter"))})},20));let w=f.start,k=f.endA,x,S,A;if(y){if(g.pos==m.pos)kr&&_s<=11&&g.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>zi(t),20)),x=t.state.tr.delete(w,k),S=c.resolve(f.start).marksAcross(c.resolve(f.endA));else if(f.endA==f.endB&&(A=Mz(g.parent.content.cut(g.parentOffset,m.parentOffset),v.parent.content.cut(v.parentOffset,f.endA-v.start()))))x=t.state.tr,A.type=="add"?x.addMark(w,k,A.mark):x.removeMark(w,k,A.mark);else if(g.parent.child(g.index()).isText&&g.index()==m.index()-(m.textOffset?0:1)){let C=g.parent.textBetween(g.parentOffset,m.parentOffset);if(t.someProp("handleTextInput",O=>O(t,w,k,C)))return;x=t.state.tr.insertText(C,w,k)}}if(x||(x=t.state.tr.replace(w,k,u.doc.slice(f.start-u.from,f.endB-u.from))),u.sel){let C=pC(t,x.doc,u.sel);C&&!(Gn&&Lo&&t.composing&&C.empty&&(f.start!=f.endB||t.input.lastAndroidDeletee.content.size?null:Ib(t,e.resolve(n.anchor),e.resolve(n.head))}function Mz(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,s,l,a;for(let c=0;cc.mark(l.addToSet(c.marks));else if(o.length==0&&i.length==1)l=i[0],s="remove",a=c=>c.mark(l.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cn||h1(s,!0,!1)0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function Iz(t,e,n,r,o){let i=t.findDiffStart(e,n);if(i==null)return null;let{a:s,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);if(o=="end"){let a=Math.max(0,i-Math.min(s,l));r-=s+a-i}if(s=s?i-r:0;i-=a,l=i+(l-s),s=i}else if(l=l?i-r:0;i-=a,s=i+(s-l),l=i}return{start:i,endA:s,endB:l}}class Lz{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Q3,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(yC),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=mC(this),gC(this),this.nodeViews=vC(this),this.docView=qS(this.state.doc,fC(this),d1(this),this.dom,this),this.domObserver=new Ez(this,(r,o,i,s)=>Rz(this,r,o,i,s)),this.domObserver.start(),ez(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&$0(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(yC),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){let r=this.state,o=!1,i=!1;e.storedMarks&&this.composing&&(H2(this),i=!0),this.state=e;let s=r.plugins!=e.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=vC(this);$z(h,this.nodeViews)&&(this.nodeViews=h,o=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&$0(this),this.editable=mC(this),gC(this);let l=d1(this),a=fC(this),u=r.plugins!=e.plugins&&!r.doc.eq(e.doc)?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",c=o||!this.docView.matchesNode(e.doc,a,l);(c||!e.selection.eq(r.selection))&&(i=!0);let d=u=="preserve"&&i&&this.dom.style.overflowAnchor==null&&f3(this);if(i){this.domObserver.stop();let h=c&&(kr||Gn)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&Nz(r.selection,e.selection);if(c){let p=Gn?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(e.doc,a,l,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=qS(e.doc,a,l,this.dom,this)),p&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&F3(this))?zi(this,h):(_2(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():d&&g3(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Oe){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&VS(this,n.getBoundingClientRect(),e)}else VS(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;nn.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return x3(this,e)}coordsAtPos(e,n=1){return w2(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return T3(this,n||this.state,e)}pasteHTML(e,n){return Yd(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Yd(this,e,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(tz(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],d1(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(e){return rz(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return sr&&this.root.nodeType===11&&a3(this.dom.ownerDocument)==this.dom?Cz(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function fC(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[vt.node(0,t.state.doc.content.size,e)]}function gC(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:vt.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function mC(t){return!t.someProp("editable",e=>e(t.state)===!1)}function Nz(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function vC(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function $z(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function yC(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Dz=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};const Pz=jo(Dz);var G2=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},De=(t,e,n)=>(G2(t,e,"read from private field"),n?n.call(t):e.get(t)),xi=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},wt=(t,e,n,r)=>(G2(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function zz(t){return!!(t.prev&&t.next&&t.prev.text.full!==t.next.text.full)}function Fz(t){return!!(t.prev&&t.next&&t.prev.range.cursor!==t.next.range.cursor)}function Bz(t){return!!(!t.prev&&t.next)}function Hz(t){return!!(t.prev&&!t.next)}function Uz(t){return!!(t.prev&&t.next&&t.prev.range.from!==t.next.range.from)}function Wz(t){return t==="invalid-exit-split"}var Vz=["jump-backward-exit","jump-forward-exit"],jz=["jump-backward-change","jump-forward-change"];function Gz(t){var e,n;return ir(Vz,(e=t.exit)==null?void 0:e.exitReason)||ir(jz,(n=t.change)==null?void 0:n.changeReason)}function bC(t){return!!(t&&t.query.full.length>=t.suggester.matchOffset)}function wC(t){return $n(t)&&t instanceof Me}function br(t){const{match:e,changeReason:n,exitReason:r}=t;return{...e,changeReason:n,exitReason:r}}function Kz(t,e){const{invalidPrefixCharacters:n,validPrefixCharacters:r}=e;return n?!new RegExp(P0(n)).test(t):new RegExp(P0(r)).test(t)}function Yz(t){const{text:e,regexp:n,$pos:r,suggester:o}=t,i=r.start();let s;return lu(e,n).forEach(l=>{const a=l.input.slice(Math.max(0,l.index-1),l.index);if(Kz(a,o)){const u=l.index+i,c=l[0],d=l[1];if(!Ee(c)||!Ee(d))return;const h=u+c.length,p=Math.min(h,r.pos),f=p-u;u=r.pos&&(s={range:{from:u,to:h,cursor:p},match:l,query:{partial:c.slice(d.length,f),full:c.slice(d.length)},text:{partial:c.slice(0,f),full:c},textAfter:r.doc.textBetween(h,r.end(),xs,xs),textBefore:r.doc.textBetween(i,u,xs,xs),suggester:o})}}),s}function K2(t){const{$pos:e,suggester:n}=t,{char:r,name:o,startOfLine:i,supportedCharacters:s,matchOffset:l,multiline:a,caseInsensitive:u,unicode:c}=n,d=rF({char:r,matchOffset:l,startOfLine:i,supportedCharacters:s,multiline:a,caseInsensitive:u,unicode:c}),h=e.doc.textBetween(e.before(),e.end(),xs,xs);return Yz({suggester:n,text:h,regexp:d,$pos:e,char:r,name:o})}function Y2(t){const{state:e,match:n}=t;try{return K2({$pos:e.doc.resolve(n.range.cursor),suggester:n.suggester})}catch{return}}function X2(t){const{prev:e,next:n,state:r}=t;return!n&&e.range.from>=r.doc.nodeSize?{exit:br({match:e,exitReason:"delete"})}:!n||!e.query.partial?{exit:br({match:e,exitReason:"invalid-exit-split"})}:e.range.to===n.range.cursor?{exit:br({match:n,exitReason:"exit-end"})}:e.query.partial?{exit:br({match:n,exitReason:"exit-split"})}:{}}function Xz(t){const{prev:e,next:n,state:r}=t,o=ye(),i=Y2({state:r,match:e}),{exit:s}=i&&i.query.full!==e.query.full?X2({prev:e,next:i,state:r}):o;return e.range.from=e.range.to)?{exit:br({match:e,exitReason:"selection-outside"})}:r.pos>e.range.to?{exit:br({match:e,exitReason:"move-end"})}:r.pos<=e.range.from?{exit:br({match:e,exitReason:"move-start"})}:{}}function Zz(t){const{prev:e,next:n,state:r,$pos:o}=t,i=ye();if(!e&&!n)return i;const s={prev:e,next:n};return Uz(s)?Xz({prev:s.prev,next:s.next,state:r}):Bz(s)?{change:br({match:s.next,changeReason:"start"})}:Hz(s)?qz({$pos:o,match:s.prev,state:r}):zz(s)?{change:br({match:s.next,changeReason:"change-character"})}:Fz(s)?{change:br({match:s.next,changeReason:r.selection.empty?"move":"selection-inside"})}:i}function xC(t,e){for(let n=t.depth;n>0;n--){const r=t.node(n);if(e.includes(r.type.name))return!0}return!1}function D0(t,e){const{$from:n,$to:r}=t;return q2(t,e)?!0:Eb(n.pos,r.pos).some(o=>Jz(n.doc.resolve(o),e))}function q2(t,e){const{$from:n,$to:r}=t,o=new Set((n.marksAcross(r)??[]).map(i=>i.type.name));return e.some(i=>o.has(i))}function Jz(t,e){const n=new Set(t.marks().map(r=>r.type.name));return e.some(r=>n.has(r))}function Qz(t,e){const{$cursor:n}=e,{validMarks:r,validNodes:o,invalidMarks:i,invalidNodes:s}=t;return!r&&!o&&Hs(i)&&Hs(s)?!0:!(r&&!q2(e,r)||o&&!xC(n,o)||!r&&D0(e,i)||!o&&xC(n,s))}function kC(t){const{suggesters:e,$pos:n,selectionEmpty:r}=t;for(const o of e)if(!(o.emptySelectionsOnly&&!r))try{const i=K2({suggester:o,$pos:n});if(!i)continue;const s={$from:n.doc.resolve(i.range.from),$to:n.doc.resolve(i.range.to),$cursor:n};if(Qz(o,s)&&o.isValidPosition(s,i))return i}catch{}}function P0(t){return $4(t)?t.source:t}function eF(t){return t?"^":""}function tF(t,e){return`(?:${P0(t)}){${e},}`}function nF(t){return Ee(t)?new RegExp(Pz(t)):t}function rF(t){const{char:e,matchOffset:n,startOfLine:r,supportedCharacters:o,captureChar:i=!0,caseInsensitive:s=!1,multiline:l=!1,unicode:a=!1}=t,u=`g${l?"m":""}${s?"i":""}${a?"u":""}`;let c=nF(e).source;return i&&(c=`(${c})`),new RegExp(`${eF(r)}${c}${tF(o,n)}`,u)}var oF={appendTransaction:!1,priority:50,ignoredTag:"span",matchOffset:0,disableDecorations:!1,startOfLine:!1,suggestClassName:"suggest",suggestTag:"span",supportedCharacters:/\w+/,validPrefixCharacters:/^[\s\0]?$/,invalidPrefixCharacters:null,ignoredClassName:null,invalidMarks:[],invalidNodes:[],validMarks:null,validNodes:null,isValidPosition:()=>!0,checkNextValidSelection:null,emptySelectionsOnly:!1,caseInsensitive:!1,multiline:!1,unicode:!1,captureChar:!0},Z2="__ignore_prosemirror_suggest_update__",mf,ju,fn,cs,Yl,Yo,on,us,Xl,J2=class{constructor(t){xi(this,mf,!1),xi(this,ju,!1),xi(this,fn,void 0),xi(this,cs,void 0),xi(this,Yl,void 0),xi(this,Yo,ye()),xi(this,on,He.empty),xi(this,us,!1),xi(this,Xl,!1),this.setMarkRemoved=()=>{wt(this,us,!0)},this.findNextTextSelection=n=>{const r=n.$from.doc,o=Math.min(r.nodeSize-2,n.to+1),i=r.resolve(o),s=Be.findFrom(i,1,!0);if(wC(s))return s},this.ignoreNextExit=()=>{wt(this,ju,!0)},this.addIgnored=({from:n,name:r,specific:o=!1})=>{const i=De(this,fn).find(c=>c.name===r);if(!i)throw new Error(`No suggester exists for the name provided: ${r}`);const s=Ee(i.char)?i.char.length:1,l=n+s,a=i.ignoredClassName?{class:i.ignoredClassName}:{},u=vt.inline(n,l,{nodeName:i.ignoredTag,...a},{name:r,specific:o,char:i.char});wt(this,on,De(this,on).add(this.view.state.doc,[u]))},this.removeIgnored=({from:n,name:r})=>{const o=De(this,fn).find(l=>l.name===r);if(!o)throw new Error(`No suggester exists for the name provided: ${r}`);const i=Ee(o.char)?o.char.length:1,s=De(this,on).find(n,n+i)[0];!s||s.spec.name!==r||wt(this,on,De(this,on).remove([s]))},this.clearIgnored=n=>{if(!n){wt(this,on,He.empty);return}const o=De(this,on).find().filter(({spec:i})=>i.name===n);wt(this,on,De(this,on).remove(o))},this.findMatchAtPosition=(n,r)=>{const o=r?De(this,fn).filter(i=>i.name===r):De(this,fn);return kC({suggesters:o,$pos:n,docChanged:!1,selectionEmpty:!0})},this.setLastChangeFromAppend=()=>{wt(this,Xl,!0)};const e=EC();wt(this,fn,t.map(e)),wt(this,fn,Us(De(this,fn),(n,r)=>r.priority-n.priority))}static create(t){return new J2(t)}get decorationSet(){return De(this,on)}get removed(){return De(this,us)}get match(){return De(this,cs)?De(this,cs):De(this,Yl)&&De(this,Yo).exit?De(this,Yl):void 0}init(t){return this.view=t,this}createProps(t){const{name:e,char:n}=t.suggester;return{view:this.view,addIgnored:this.addIgnored,clearIgnored:this.clearIgnored,ignoreNextExit:this.ignoreNextExit,setMarkRemoved:this.setMarkRemoved,name:e,char:n,...t}}shouldRunExit(){return De(this,ju)?(wt(this,ju,!1),!1):!0}updateWithNextSelection(t){var e,n,r;const o=this.findNextTextSelection(t.selection);if(o)for(const i of De(this,fn)){const s=(e=De(this,Yo).change)==null?void 0:e.suggester.name,l=(n=De(this,Yo).exit)==null?void 0:n.suggester.name;(r=i.checkNextValidSelection)==null||r.call(i,o.$from,t,{change:s,exit:l})}}changeHandler(t,e){const{change:n,exit:r}=De(this,Yo),o=this.match;if(!n&&!r||!bC(o))return;const i=e===(r==null?void 0:r.suggester.appendTransaction)&&this.shouldRunExit(),s=e===(n==null?void 0:n.suggester.appendTransaction);if(!(!i&&!s)){if(n&&r&&Gz({change:n,exit:r})){const l=this.createProps(r),a=this.createProps(n),u=r.range.from{const l=Ee(s.char)?s.char.length:1;return i-o!==l});wt(this,on,e.remove(r))}shouldIgnoreMatch({range:t,suggester:{name:e}}){return De(this,on).find().some(({spec:o,from:i})=>i!==t.from?!1:o.specific?o.name===e:!0)}resetState(){wt(this,Yo,ye()),wt(this,cs,void 0),wt(this,us,!1),wt(this,Xl,!1)}updateReasons(t){const{$pos:e,state:n}=t,r=De(this,mf),o=De(this,fn),i=n.selection.empty,s=wC(n.selection)?kC({suggesters:o,$pos:e,docChanged:r,selectionEmpty:i}):void 0;wt(this,cs,s&&this.shouldIgnoreMatch(s)?void 0:s),wt(this,Yo,Zz({next:De(this,cs),prev:De(this,Yl),state:n,$pos:e}))}addSuggester(t){const e=De(this,fn).find(r=>r.name===t.name),n=EC();if(e)wt(this,fn,De(this,fn).map(r=>r===e?n(t):r));else{const r=[...De(this,fn),n(t)];wt(this,fn,Us(r,(o,i)=>i.priority-o.priority))}return()=>this.removeSuggester(t.name)}removeSuggester(t){const e=Ee(t)?t:t.name;wt(this,fn,De(this,fn).filter(n=>n.name!==e)),this.clearIgnored(e)}toJSON(){return this.match}apply(t){const{exit:e,change:n}=De(this,Yo);if(De(this,Xl)&&(wt(this,Xl,!1),!(e!=null&&e.suggester.appendTransaction)&&!(n!=null&&n.suggester.appendTransaction)))return this;const{tr:r,state:o}=t,i=r.docChanged||r.selectionSet;return r.getMeta(Z2)||!i&&!De(this,us)?this:(wt(this,mf,r.docChanged),this.mapIgnoredDecorations(r),e&&this.resetState(),wt(this,Yl,De(this,cs)),this.updateReasons({$pos:r.selection.$from,state:o}),this)}createDecorations(t){const e=this.match;if(!bC(e))return De(this,on);const{disableDecorations:n}=e.suggester;if(Qe(n)?n(t,e):n)return De(this,on);const{range:o,suggester:i}=e,{name:s,suggestTag:l,suggestClassName:a}=i,{from:u,to:c}=o;return this.shouldIgnoreMatch(e)?De(this,on):De(this,on).add(t.doc,[vt.inline(u,c,{nodeName:l,class:s?`${a} suggest-${s}`:a},{name:s})])}},iF=J2;mf=new WeakMap;ju=new WeakMap;fn=new WeakMap;cs=new WeakMap;Yl=new WeakMap;Yo=new WeakMap;on=new WeakMap;us=new WeakMap;Xl=new WeakMap;function EC(){const t=new Set;return e=>{if(t.has(e.name))throw new Error(`A suggester already exists with the name '${e.name}'. The name provided must be unique.`);const n={...oF,...e};return t.add(e.name),n}}var Q2=new vl("suggest");function zb(t){return Q2.getState(t)}function SC(t,e){return zb(t).addSuggester(e)}function CC(t){t.setMeta(Z2,!0)}function sF(t,e){return zb(t).removeSuggester(e)}function aF(...t){const e=iF.create(t);return new mi({key:Q2,view:n=>(e.init(n),{update:r=>e.changeHandler(r.state.tr,!1)}),state:{init:()=>e,apply:(n,r,o,i)=>e.apply({tr:n,state:i})},appendTransaction:(n,r,o)=>{const i=o.tr;return e.updateWithNextSelection(i),e.changeHandler(i,!0),i.docChanged||i.steps.length>0||i.selectionSet||i.storedMarksSet?(e.setLastChangeFromAppend(),i):null},props:{decorations:n=>e.createDecorations(n)}})}function Fb(t,e){const n=Object.getPrototypeOf(e);let r=t.selection,o=t.doc,i=t.storedMarks;const s=ye();for(const[l,a]of Object.entries(e))s[l]={value:a};return Object.create(n,{...s,storedMarks:{get(){return i}},selection:{get(){return r}},doc:{get(){return o}},tr:{get(){return r=t.selection,o=t.doc,i=t.storedMarks,t}}})}function Ad(t){return({state:e,dispatch:n,view:r,tr:o})=>t(Fb(o,e),n,r)}function TC(t){return e=>{var n;return we(e.dispatch===void 0||e.dispatch===((n=e.view)==null?void 0:n.dispatch),{code:re.NON_CHAINABLE_COMMAND}),t(e)}}function lF(...t){return({state:e,dispatch:n,view:r,tr:o,...i})=>{for(const s of t)if(s({state:e,dispatch:n,view:r,tr:o,...i}))return!0;return!1}}var yr={get isBrowser(){return!!(typeof window<"u"&&typeof window.document<"u"&&window.navigator&&window.navigator.userAgent)},get isJSDOM(){return yr.isBrowser&&window.navigator.userAgent.includes("jsdom")},get isNode(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null},get isIos(){return yr.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return yr.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return yr.isNode?process.platform==="darwin":yr.isBrowser?/Mac|iPod|iPhone|iPad/.test(window.navigator.platform):!1},get isDevelopment(){return!1},get isTest(){return!1},get isProduction(){return!0}};function Xo(t,e){var n;const r=DF(t);return((n=r==null?void 0:r.getComputedStyle(t))==null?void 0:n.getPropertyValue(e))??""}function Un(t,e){return Object.assign(t.style,e)}function z0(t){return $n(t)&&qr(t.nodeType)&&Ee(t.nodeName)}function Vt(t){return z0(t)&&t.nodeType===1}function bm(t){const{types:e,node:n}=t;if(!n)return!1;const r=o=>o===n.type||o===n.type.name;return Pt(e)?e.some(r):r(e)}function cF(t,e){const{tr:n}=e;return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function uF({pos:t,tr:e}){const n=e.doc.nodeAt(t);return n&&e.delete(t,t+n.nodeSize),e}function dF({pos:t,tr:e,content:n}){const r=e.doc.nodeAt(t);return r&&e.replaceWith(t,t+r.nodeSize,n),e}function Yh(t){const{predicate:e,selection:n}=t,r=nM(n)?n.selection.$from:Ub(n)?n.$from:n;for(let o=r.depth;o>0;o--){const i=r.node(o),s=o>0?r.before(o):0,l=r.start(o),a=s+i.nodeSize;if(e(i,s))return{pos:s,depth:o,node:i,start:l,end:a}}}function hF(t){const{depth:e}=t,n=e>0?t.before(e):0,r=t.node(e),o=t.start(e),i=n+r.nodeSize;return{pos:n,start:o,node:r,end:i,depth:e}}function pF(t){const e=Yh({predicate:()=>!0,selection:t});return we(e,{message:"No parent node found for the selection provided."}),e}function pi(t){const{types:e,selection:n}=t;return Yh({predicate:r=>bm({types:e,node:r}),selection:n})}function fF(t){const{types:e,selection:n}=t;if(!(!qh(n)||!bm({types:e,node:n.node})))return{pos:n.$from.pos,depth:n.$from.depth,start:n.$from.start(),end:n.$from.pos+n.node.nodeSize,node:n.node}}function Bb(t){return Ub(t)?t.empty:t.selection.empty}function gF(t){return t.docChanged||t.selectionSet}function eM(t){return!!qd(t)}function qd(t){const{state:e,type:n,attrs:r}=t,{selection:o,doc:i}=e,s=Ee(n)?i.type.schema.nodes[n]:n;we(s,{code:re.SCHEMA,message:`No node exists for ${n}`});const l=fF({selection:o,types:n})??Yh({predicate:a=>a.type===s,selection:o});return!r||jd(r)||!l||l.node.hasMarkup(s,{...l.node.attrs,...r})?l:void 0}function ag(...t){return e=>{if(!yS(t))return!1;const[n,...r]=t;let o=!1;const i=(...a)=>()=>{if(!yS(a))return!1;o=!0;const[,...u]=a;return ag(...a)({...e,next:i(...u)})},s=i(...r),l=n({...e,next:s});return o||l?l:s()}}function mF(t,e){const n=new Map,r=ye();for(const o of t)for(const[i,s]of an(o)){const a=[...n.get(i)??[],s],u=ag(...a);n.set(i,a),r[i]=e(u)}return r}function vF(t){return mF(t,e=>(n,r,o)=>e({state:n,dispatch:r,view:o,tr:n.tr,next:()=>!1}))}function Hb(t,e){const n=t.attrs??{};return Object.entries(e).every(([r,o])=>n[r]===o)}function yF(t){return oM(t,[Ii,Yt,vn,Po])}function uu(t){return $n(t)}function du(t,e){return Pt(e)?ir(e,t[Bi]):e===t[Bi]}function bF(t){return $n(t)&&t instanceof E0}function wF(t,e){return Ee(t)?Mt(e.nodes,t):t}function tM(t){return $n(t)&&t instanceof Vh}function xF(t,e){return Ee(t)?Mt(e.marks,t):t}function Xh(t){return $n(t)&&t instanceof As}function kF(t){return $n(t)&&t instanceof J}function EF(t){return $n(t)&&t instanceof je}function nM(t){return $n(t)&&t instanceof Na}function ta(t){return $n(t)&&t instanceof Me}function SF(t){return $n(t)&&t instanceof rr}function Ub(t){return $n(t)&&t instanceof Be}function CF(t){return $n(t)&&t instanceof Lc}function AC(t){const{trState:e,from:n,to:r,type:o,attrs:i={}}=t,{doc:s}=e,l=xF(o,s.type.schema);if(Object.keys(i).length===0)return s.rangeHasMark(n,r,l);let a=!1;return r>n&&s.nodesBetween(n,r,u=>a?!1:(a=(u.marks??[]).some(d=>d.type!==l?!1:Hb(d,i)),!a)),a}function qh(t){return $n(t)&&t instanceof Oe}function lg(t){const{trState:e,type:n,attrs:r={},from:o,to:i}=t,{selection:s,doc:l,storedMarks:a}=e,u=Ee(n)?l.type.schema.marks[n]:n;if(we(u,{code:re.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}),o&&i)try{return Math.max(o,i)d.type!==n?!1:Hb(d,r??{})):AC({...t,from:s.from,to:s.to})}function Wb(t,e={}){const n=TF(t.type.schema);if(!n)return!1;const{ignoreAttributes:r,ignoreDocAttributes:o}=e;return r?rM(n,t):o?n.content.eq(t.content):n.eq(t)}function rM(t,e){if(t===e)return!0;const n=t.type===e.type&&je.sameSet(t.marks,e.marks);function r(){if(t.content===e.content)return!0;if(t.content.size!==e.content.size)return!1;const o=[],i=[];t.content.forEach(s=>o.push(s)),e.content.forEach(s=>i.push(s));for(const[s,l]of o.entries()){const a=i[s];if(!a||!rM(l,a))return!1}return!0}return n&&r()}function TF(t){var e;return((e=t.nodes.doc)==null?void 0:e.createAndFill())??void 0}function wm(t){for(const e of Object.values(t.nodes))if(e.name!=="doc"&&(e.isBlock||e.isTextblock))return e;we(!1,{code:re.SCHEMA,message:"No default block node found for the provided schema."})}function AF(t){return t.type===wm(t.type.schema)}function xm(t){return!!t&&t.type.isBlock&&!t.textContent&&!t.childCount}function Hi(t,e,n){const r=t.parent.childAfter(t.parentOffset);if(!r.node)return;const o=Ee(e)?e:e.name,i=r.node.marks.find(({type:d})=>d.name===o);let s=t.index(),l=t.start()+r.offset,a=s+1,u=l+r.node.nodeSize;if(!i)return n&&u0&&i.isInSet(t.parent.child(s-1).marks);)s-=1,l-=t.parent.child(s).nodeSize;for(;a{e=h(e,i||r,t)}),i)return e?new ae(J.from(t.state.schema.text(e.replace(/\r\n?/g,` +`))),0,0):ae.empty;let d=t.someProp("clipboardTextParser",h=>h(e,o,r,t));if(d)l=d;else{let h=o.marks(),{schema:p}=t.state,f=Vr.fromSchema(p);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let m=s.appendChild(document.createElement("p"));g&&m.appendChild(f.serializeNode(p.text(g,h)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),s=Z3(n),Gh&&J3(s);let u=s&&s.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||Za.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||c),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!X3.test(h.parentNode.nodeName)?{ignore:!0}:null}})),c)l=Q3(cC(l,+c[1],+c[2]),c[4]);else if(l=ae.maxOpen(q3(l.content,o),!0),l.openStart||l.openEnd){let d=0,h=0;for(let p=l.content.firstChild;d{l=d(l,t)}),l}const X3=/^(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 q3(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),u;if(!a)return s=null;if(u=s.length&&i.length&&$2(a,i,l,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=D2(s[s.length-1],i.length));let c=N2(l,a);s.push(c),o=o.matchType(c.type),i=a}}),s)return J.from(s)}return t}function N2(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,J.from(t));return t}function $2(t,e,n,r,o){if(o1&&(i=0),o=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(J.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function cC(t,e,n){return e]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=z2().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&P2[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"").reverse().join("")),n.innerHTML=t,o)for(let i=0;i=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=J.from(a.create(r[l+1],o)),i++,s++}return new ae(o,i,s)}const ar={},lr={},ez={touchstart:!0,touchmove:!0};class tz{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.lastAndroidDelete=0,this.composing=!1,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 nz(t){for(let e in ar){let n=ar[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{oz(t,r)&&!$b(t,r)&&(t.editable||!(r.type in lr))&&n(t,r)},ez[e]?{passive:!0}:void 0)}sr&&t.dom.addEventListener("input",()=>null),P0(t)}function Es(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function rz(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function P0(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>$b(t,r))})}function $b(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function oz(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function iz(t,e){!$b(t,e)&&ar[e.type]&&(t.editable||!(e.type in lr))&&ar[e.type](t,e)}lr.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!B2(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(No&&Gn&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Dc&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,Ia(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||Y3(t,n)?n.preventDefault():Es(t,"key")};lr.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};lr.keypress=(t,e)=>{let n=e;if(B2(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||ao&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof Me)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",i=>i(t,r.$from.pos,r.$to.pos,o))&&t.dispatch(t.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function ym(t){return{left:t.clientX,top:t.clientY}}function sz(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Db(t,e,n,r,o){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(t.someProp(e,l=>s>i.depth?l(t,n,i.nodeAfter,i.before(s),o,!0):l(t,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function bc(t,e,n){t.focused||t.focus();let r=t.state.tr.setSelection(e);n=="pointer"&&r.setMeta("pointer",!0),t.dispatch(r)}function az(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&Oe.isSelectable(r)?(bc(t,new Oe(n),"pointer"),!0):!1}function lz(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof Oe&&(r=n.node);let i=t.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let l=s>i.depth?i.nodeAfter:i.node(s);if(Oe.isSelectable(l)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(bc(t,Oe.create(t.state.doc,o),"pointer"),!0):!1}function cz(t,e,n,r,o){return Db(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?lz(t,n):az(t,n))}function uz(t,e,n,r){return Db(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function dz(t,e,n,r){return Db(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||hz(t,n,r)}function hz(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(bc(t,Me.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),l=o.before(i);if(s.inlineContent)bc(t,Me.create(r,l+1,l+1+s.content.size),"pointer");else if(Oe.isSelectable(s))bc(t,Oe.create(r,l),"pointer");else continue;return!0}}function Pb(t){return og(t)}const F2=ao?"metaKey":"ctrlKey";ar.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Pb(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&sz(n,t.input.lastClick)&&!n[F2]&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=t.posAtCoords(ym(n));s&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new pz(t,s,n,!!r)):(i=="doubleClick"?uz:dz)(t,s.pos,s.inside,n)?n.preventDefault():Es(t,"pointer"))};class pz{constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[F2],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),s=n.inside;else{let c=e.state.doc.resolve(n.pos);i=c.parent,s=c.depth?c.before():0}const l=o?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a?a.dom:null;let{selection:u}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof Oe&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Uo&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Es(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>zi(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(ym(e))),this.updateAllowDefault(e),this.allowDefault||!n?Es(this.view,"pointer"):cz(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||sr&&this.mightDrag&&!this.mightDrag.node.isAtom||Gn&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(bc(this.view,Be.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):Es(this.view,"pointer")}move(e){this.updateAllowDefault(e),Es(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}ar.touchstart=t=>{t.input.lastTouch=Date.now(),Pb(t),Es(t,"pointer")};ar.touchmove=t=>{t.input.lastTouch=Date.now(),Es(t,"pointer")};ar.contextmenu=t=>Pb(t);function B2(t,e){return t.composing?!0:sr&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const fz=No?5e3:-1;lr.compositionstart=lr.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),og(t,!0),t.markCursor=null;else if(og(t),Uo&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){t.domSelection().collapse(s,s.nodeValue.length);break}else o=s,i=-1}}t.input.composing=!0}H2(t,fz)};lr.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,H2(t,20))};function H2(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>og(t),e))}function U2(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=gz());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function gz(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function og(t,e=!1){if(!(No&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),U2(t),e||t.docView&&t.docView.dirty){let n=Lb(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):t.updateState(t.state),!0}return!1}}function mz(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Pc=kr&&_s<15||Dc&&p3<604;ar.copy=lr.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=Pc?null:n.clipboardData,s=r.content(),{dom:l,text:a}=I2(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):mz(t,l),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function vz(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function yz(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Yd(t,r.value,null,o,e):Yd(t,r.textContent,r.innerHTML,o,e)},50)}function Yd(t,e,n,r,o){let i=L2(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",a=>a(t,o,i||ae.empty)))return!0;if(!i)return!1;let s=vz(i),l=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(i);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}lr.paste=(t,e)=>{let n=e;if(t.composing&&!No)return;let r=Pc?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Yd(t,r.getData("text/plain"),r.getData("text/html"),o,n)?n.preventDefault():yz(t,n)};class bz{constructor(e,n){this.slice=e,this.move=n}}const W2=ao?"altKey":"ctrlKey";ar.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(ym(n));if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Oe?o.to-1:o.to))){if(r&&r.mightDrag)t.dispatch(t.state.tr.setSelection(Oe.create(t.state.doc,r.mightDrag.pos)));else if(n.target&&n.target.nodeType==1){let u=t.docView.nearestDesc(n.target,!0);u&&u.node.type.spec.draggable&&u!=t.docView&&t.dispatch(t.state.tr.setSelection(Oe.create(t.state.doc,u.posBefore)))}}let s=t.state.selection.content(),{dom:l,text:a}=I2(t,s);n.dataTransfer.clearData(),n.dataTransfer.setData(Pc?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Pc||n.dataTransfer.setData("text/plain",a),t.dragging=new bz(s,!n[W2])};ar.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};lr.dragover=lr.dragenter=(t,e)=>e.preventDefault();lr.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let o=t.posAtCoords(ym(n));if(!o)return;let i=t.state.doc.resolve(o.pos),s=r&&r.slice;s?t.someProp("transformPasted",f=>{s=f(s,t)}):s=L2(t,n.dataTransfer.getData(Pc?"Text":"text/plain"),Pc?null:n.dataTransfer.getData("text/html"),!1,i);let l=!!(r&&!n[W2]);if(t.someProp("handleDrop",f=>f(t,n,s||ae.empty,l))){n.preventDefault();return}if(!s)return;n.preventDefault();let a=s?LP(t.state.doc,i.pos,s):i.pos;a==null&&(a=i.pos);let u=t.state.tr;l&&u.deleteSelection();let c=u.mapping.map(a),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=u.doc;if(d?u.replaceRangeWith(c,c,s.content.firstChild):u.replaceRange(c,c,s),u.doc.eq(h))return;let p=u.doc.resolve(c);if(d&&Oe.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new Oe(p));else{let f=u.mapping.map(a);u.mapping.maps[u.mapping.maps.length-1].forEach((g,m,v,y)=>f=y),u.setSelection(Nb(t,p,u.doc.resolve(f)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))};ar.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&zi(t)},20))};ar.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};ar.beforeinput=(t,e)=>{if(Gn&&No&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,Ia(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in lr)ar[t]=lr[t];function Xd(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class ig{constructor(e,n){this.toDOM=e,this.spec=n||Va,this.side=this.spec.side||0}map(e,n,r,o){let{pos:i,deleted:s}=e.mapResult(n.from+o,this.side<0?-1:1);return s?null:new vt(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof ig&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Xd(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Ms{constructor(e,n){this.attrs=e,this.spec=n||Va}map(e,n,r,o){let i=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new vt(i,s,this)}valid(e,n){return n.from=e&&(!i||i(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let s=0;se){let l=this.children[s]+1;this.children[s+2].findInner(e-l,n-l,r,o+l,i)}}map(e,n,r){return this==Wn||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Va)}mapInner(e,n,r,o,i){let s;for(let l=0;l{let u=a+r,c;if(c=j2(n,l,u)){for(o||(o=this.children.slice());il&&d.to=e){this.children[l]==e&&(r=this.children[l+2]);break}let i=e+1,s=i+n.content.size;for(let l=0;li&&a.type instanceof Ms){let u=Math.max(i,a.from)-i,c=Math.min(s,a.to)-i;uo.map(e,n,Va));return ys.from(r)}forChild(e,n){if(n.isLeaf)return He.empty;let r=[];for(let o=0;on instanceof He)?e:e.reduce((n,r)=>n.concat(r instanceof He?r:r.members),[]))}}}function wz(t,e,n,r,o,i,s){let l=t.slice();for(let u=0,c=i;u{let m=g-f-(p-h);for(let v=0;vy+c-d)continue;let b=l[v]+c-d;p>=b?l[v+1]=h<=b?-2:-1:f>=o&&m&&(l[v]+=m,l[v+1]+=m)}d+=m}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u=r.content.size){a=!0;continue}let h=n.map(t[u+1]+i,-1),p=h-o,{index:f,offset:g}=r.content.findIndex(d),m=r.maybeChild(f);if(m&&g==d&&g+m.nodeSize==p){let v=l[u+2].mapInner(n,m,c+1,t[u]+i+1,s);v!=Wn?(l[u]=d,l[u+1]=p,l[u+2]=v):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=xz(l,t,e,n,o,i,s),c=sg(u,r,0,s);e=c.local;for(let d=0;dn&&s.to{let u=j2(t,l,a+n);if(u){i=!0;let c=sg(u,l,n+a+1,r);c!=Wn&&o.push(a,a+l.nodeSize,c)}});let s=V2(i?G2(t):t,-n).sort(ja);for(let l=0;l0;)e++;t.splice(e,0,n)}function h1(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Wn&&e.push(r)}),t.cursorWrapper&&e.push(He.create(t.state.doc,[t.cursorWrapper.deco])),ys.from(e)}const kz={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Ez=kr&&_s<=11;class Sz{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Cz{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Sz,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),Ez&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,kz)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;nthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(rC(this.view)){if(this.suppressingSelectionUpdates)return zi(this.view);if(kr&&_s<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Ja(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=Kd(i))n.add(i);for(let i=e.anchorNode;i;i=Kd(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&rC(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,l=!1,a=[];if(e.editable)for(let c=0;c1){let c=a.filter(d=>d.nodeName=="BR");if(c.length==2){let d=c[0],h=c[1];d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}}let u=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||o)&&(i>-1&&(e.docView.markDirty(i,s),Tz(e)),this.handleDOMChange(i,s,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||zi(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let c=0;co;m--){let v=r.childNodes[m-1],y=v.pmViewDesc;if(v.nodeName=="BR"&&!y){i=m;break}if(!y||y.size)break}let d=t.state.doc,h=t.someProp("domParser")||Za.fromSchema(t.state.schema),p=d.resolve(s),f=null,g=h.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:Rz,context:p});if(u&&u[0].pos!=null){let m=u[0].pos,v=u[1]&&u[1].pos;v==null&&(v=m),f={anchor:m+s,head:v+s}}return{doc:g,sel:f,from:s,to:l}}function Rz(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(sr&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||sr&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Mz=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Oz(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let C=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,O=Lb(t,C);if(O&&!t.state.selection.eq(O)){if(Gn&&No&&t.input.lastKeyCode===13&&Date.now()-100_(t,Ia(13,"Enter"))))return;let R=t.state.tr.setSelection(O);C=="pointer"?R.setMeta("pointer",!0):C=="key"&&R.scrollIntoView(),i&&R.setMeta("composition",i),t.dispatch(R)}return}let s=t.state.doc.resolve(e),l=s.sharedDepth(n);e=s.before(l+1),n=t.state.doc.resolve(n).after(l+1);let a=t.state.selection,u=_z(t,e,n),c=t.state.doc,d=c.slice(u.from,u.to),h,p;t.input.lastKeyCode===8&&Date.now()-100Date.now()-225||No)&&o.some(C=>C.nodeType==1&&!Mz.test(C.nodeName))&&(!f||f.endA>=f.endB)&&t.someProp("handleKeyDown",C=>C(t,Ia(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!f)if(r&&a instanceof Me&&!a.empty&&a.$head.sameParent(a.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))f={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let C=fC(t,t.state.doc,u.sel);if(C&&!C.eq(t.state.selection)){let O=t.state.tr.setSelection(C);i&&O.setMeta("composition",i),t.dispatch(O)}}return}if(Gn&&t.cursorWrapper&&u.sel&&u.sel.anchor==t.cursorWrapper.deco.from&&u.sel.head==u.sel.anchor){let C=f.endB-f.start;u.sel={anchor:u.sel.anchor+C,head:u.sel.anchor+C}}t.input.domChangeCount++,t.state.selection.fromt.state.selection.from&&f.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?f.start=t.state.selection.from:f.endA=t.state.selection.to-2&&t.state.selection.to<=u.to&&(f.endB+=t.state.selection.to-f.endA,f.endA=t.state.selection.to)),kr&&_s<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>u.from&&u.doc.textBetween(f.start-u.from-1,f.start-u.from+1)=="  "&&(f.start--,f.endA--,f.endB--);let g=u.doc.resolveNoCache(f.start-u.from),m=u.doc.resolveNoCache(f.endB-u.from),v=c.resolve(f.start),y=g.sameParent(m)&&g.parent.inlineContent&&v.end()>=f.endA,b;if((Dc&&t.input.lastIOSEnter>Date.now()-225&&(!y||o.some(C=>C.nodeName=="DIV"||C.nodeName=="P"))||!y&&g.posC(t,Ia(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>f.start&&Lz(c,f.start,f.endA,g,m)&&t.someProp("handleKeyDown",C=>C(t,Ia(8,"Backspace")))){No&&Gn&&t.domObserver.suppressSelectionUpdates();return}Gn&&No&&f.endB==f.start&&(t.input.lastAndroidDelete=Date.now()),No&&!y&&g.start()!=m.start()&&m.parentOffset==0&&g.depth==m.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==f.endA&&(f.endB-=2,m=u.doc.resolveNoCache(f.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(C){return C(t,Ia(13,"Enter"))})},20));let w=f.start,k=f.endA,x,S,A;if(y){if(g.pos==m.pos)kr&&_s<=11&&g.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>zi(t),20)),x=t.state.tr.delete(w,k),S=c.resolve(f.start).marksAcross(c.resolve(f.endA));else if(f.endA==f.endB&&(A=Iz(g.parent.content.cut(g.parentOffset,m.parentOffset),v.parent.content.cut(v.parentOffset,f.endA-v.start()))))x=t.state.tr,A.type=="add"?x.addMark(w,k,A.mark):x.removeMark(w,k,A.mark);else if(g.parent.child(g.index()).isText&&g.index()==m.index()-(m.textOffset?0:1)){let C=g.parent.textBetween(g.parentOffset,m.parentOffset);if(t.someProp("handleTextInput",O=>O(t,w,k,C)))return;x=t.state.tr.insertText(C,w,k)}}if(x||(x=t.state.tr.replace(w,k,u.doc.slice(f.start-u.from,f.endB-u.from))),u.sel){let C=fC(t,x.doc,u.sel);C&&!(Gn&&No&&t.composing&&C.empty&&(f.start!=f.endB||t.input.lastAndroidDeletee.content.size?null:Nb(t,e.resolve(n.anchor),e.resolve(n.head))}function Iz(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,s,l,a;for(let c=0;cc.mark(l.addToSet(c.marks));else if(o.length==0&&i.length==1)l=i[0],s="remove",a=c=>c.mark(l.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cn||p1(s,!0,!1)0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function Nz(t,e,n,r,o){let i=t.findDiffStart(e,n);if(i==null)return null;let{a:s,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);if(o=="end"){let a=Math.max(0,i-Math.min(s,l));r-=s+a-i}if(s=s?i-r:0;i-=a,l=i+(l-s),s=i}else if(l=l?i-r:0;i-=a,s=i+(s-l),l=i}return{start:i,endA:s,endB:l}}class $z{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new tz,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(bC),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=vC(this),mC(this),this.nodeViews=yC(this),this.docView=ZS(this.state.doc,gC(this),h1(this),this.dom,this),this.domObserver=new Cz(this,(r,o,i,s)=>Oz(this,r,o,i,s)),this.domObserver.start(),nz(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&P0(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(bC),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){let r=this.state,o=!1,i=!1;e.storedMarks&&this.composing&&(U2(this),i=!0),this.state=e;let s=r.plugins!=e.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=yC(this);Pz(h,this.nodeViews)&&(this.nodeViews=h,o=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&P0(this),this.editable=vC(this),mC(this);let l=h1(this),a=gC(this),u=r.plugins!=e.plugins&&!r.doc.eq(e.doc)?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",c=o||!this.docView.matchesNode(e.doc,a,l);(c||!e.selection.eq(r.selection))&&(i=!0);let d=u=="preserve"&&i&&this.dom.style.overflowAnchor==null&&m3(this);if(i){this.domObserver.stop();let h=c&&(kr||Gn)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&Dz(r.selection,e.selection);if(c){let p=Gn?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(e.doc,a,l,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=ZS(e.doc,a,l,this.dom,this)),p&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&H3(this))?zi(this,h):(R2(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():d&&v3(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Oe){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&jS(this,n.getBoundingClientRect(),e)}else jS(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;nn.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return E3(this,e)}coordsAtPos(e,n=1){return x2(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return _3(this,n||this.state,e)}pasteHTML(e,n){return Yd(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Yd(this,e,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(rz(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],h1(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(e){return iz(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return sr&&this.root.nodeType===11&&c3(this.dom.ownerDocument)==this.dom?Az(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function gC(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[vt.node(0,t.state.doc.content.size,e)]}function mC(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:vt.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function vC(t){return!t.someProp("editable",e=>e(t.state)===!1)}function Dz(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function yC(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function Pz(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function bC(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var zz=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};const Fz=ko(zz);var K2=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},De=(t,e,n)=>(K2(t,e,"read from private field"),n?n.call(t):e.get(t)),xi=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},wt=(t,e,n,r)=>(K2(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function Bz(t){return!!(t.prev&&t.next&&t.prev.text.full!==t.next.text.full)}function Hz(t){return!!(t.prev&&t.next&&t.prev.range.cursor!==t.next.range.cursor)}function Uz(t){return!!(!t.prev&&t.next)}function Wz(t){return!!(t.prev&&!t.next)}function Vz(t){return!!(t.prev&&t.next&&t.prev.range.from!==t.next.range.from)}function jz(t){return t==="invalid-exit-split"}var Gz=["jump-backward-exit","jump-forward-exit"],Kz=["jump-backward-change","jump-forward-change"];function Yz(t){var e,n;return ir(Gz,(e=t.exit)==null?void 0:e.exitReason)||ir(Kz,(n=t.change)==null?void 0:n.changeReason)}function wC(t){return!!(t&&t.query.full.length>=t.suggester.matchOffset)}function xC(t){return $n(t)&&t instanceof Me}function br(t){const{match:e,changeReason:n,exitReason:r}=t;return{...e,changeReason:n,exitReason:r}}function Xz(t,e){const{invalidPrefixCharacters:n,validPrefixCharacters:r}=e;return n?!new RegExp(F0(n)).test(t):new RegExp(F0(r)).test(t)}function qz(t){const{text:e,regexp:n,$pos:r,suggester:o}=t,i=r.start();let s;return lu(e,n).forEach(l=>{const a=l.input.slice(Math.max(0,l.index-1),l.index);if(Xz(a,o)){const u=l.index+i,c=l[0],d=l[1];if(!Ee(c)||!Ee(d))return;const h=u+c.length,p=Math.min(h,r.pos),f=p-u;u=r.pos&&(s={range:{from:u,to:h,cursor:p},match:l,query:{partial:c.slice(d.length,f),full:c.slice(d.length)},text:{partial:c.slice(0,f),full:c},textAfter:r.doc.textBetween(h,r.end(),xs,xs),textBefore:r.doc.textBetween(i,u,xs,xs),suggester:o})}}),s}function Y2(t){const{$pos:e,suggester:n}=t,{char:r,name:o,startOfLine:i,supportedCharacters:s,matchOffset:l,multiline:a,caseInsensitive:u,unicode:c}=n,d=iF({char:r,matchOffset:l,startOfLine:i,supportedCharacters:s,multiline:a,caseInsensitive:u,unicode:c}),h=e.doc.textBetween(e.before(),e.end(),xs,xs);return qz({suggester:n,text:h,regexp:d,$pos:e,char:r,name:o})}function X2(t){const{state:e,match:n}=t;try{return Y2({$pos:e.doc.resolve(n.range.cursor),suggester:n.suggester})}catch{return}}function q2(t){const{prev:e,next:n,state:r}=t;return!n&&e.range.from>=r.doc.nodeSize?{exit:br({match:e,exitReason:"delete"})}:!n||!e.query.partial?{exit:br({match:e,exitReason:"invalid-exit-split"})}:e.range.to===n.range.cursor?{exit:br({match:n,exitReason:"exit-end"})}:e.query.partial?{exit:br({match:n,exitReason:"exit-split"})}:{}}function Zz(t){const{prev:e,next:n,state:r}=t,o=ye(),i=X2({state:r,match:e}),{exit:s}=i&&i.query.full!==e.query.full?q2({prev:e,next:i,state:r}):o;return e.range.from=e.range.to)?{exit:br({match:e,exitReason:"selection-outside"})}:r.pos>e.range.to?{exit:br({match:e,exitReason:"move-end"})}:r.pos<=e.range.from?{exit:br({match:e,exitReason:"move-start"})}:{}}function Qz(t){const{prev:e,next:n,state:r,$pos:o}=t,i=ye();if(!e&&!n)return i;const s={prev:e,next:n};return Vz(s)?Zz({prev:s.prev,next:s.next,state:r}):Uz(s)?{change:br({match:s.next,changeReason:"start"})}:Wz(s)?Jz({$pos:o,match:s.prev,state:r}):Bz(s)?{change:br({match:s.next,changeReason:"change-character"})}:Hz(s)?{change:br({match:s.next,changeReason:r.selection.empty?"move":"selection-inside"})}:i}function kC(t,e){for(let n=t.depth;n>0;n--){const r=t.node(n);if(e.includes(r.type.name))return!0}return!1}function z0(t,e){const{$from:n,$to:r}=t;return Z2(t,e)?!0:Cb(n.pos,r.pos).some(o=>eF(n.doc.resolve(o),e))}function Z2(t,e){const{$from:n,$to:r}=t,o=new Set((n.marksAcross(r)??[]).map(i=>i.type.name));return e.some(i=>o.has(i))}function eF(t,e){const n=new Set(t.marks().map(r=>r.type.name));return e.some(r=>n.has(r))}function tF(t,e){const{$cursor:n}=e,{validMarks:r,validNodes:o,invalidMarks:i,invalidNodes:s}=t;return!r&&!o&&Hs(i)&&Hs(s)?!0:!(r&&!Z2(e,r)||o&&!kC(n,o)||!r&&z0(e,i)||!o&&kC(n,s))}function EC(t){const{suggesters:e,$pos:n,selectionEmpty:r}=t;for(const o of e)if(!(o.emptySelectionsOnly&&!r))try{const i=Y2({suggester:o,$pos:n});if(!i)continue;const s={$from:n.doc.resolve(i.range.from),$to:n.doc.resolve(i.range.to),$cursor:n};if(tF(o,s)&&o.isValidPosition(s,i))return i}catch{}}function F0(t){return P4(t)?t.source:t}function nF(t){return t?"^":""}function rF(t,e){return`(?:${F0(t)}){${e},}`}function oF(t){return Ee(t)?new RegExp(Fz(t)):t}function iF(t){const{char:e,matchOffset:n,startOfLine:r,supportedCharacters:o,captureChar:i=!0,caseInsensitive:s=!1,multiline:l=!1,unicode:a=!1}=t,u=`g${l?"m":""}${s?"i":""}${a?"u":""}`;let c=oF(e).source;return i&&(c=`(${c})`),new RegExp(`${nF(r)}${c}${rF(o,n)}`,u)}var sF={appendTransaction:!1,priority:50,ignoredTag:"span",matchOffset:0,disableDecorations:!1,startOfLine:!1,suggestClassName:"suggest",suggestTag:"span",supportedCharacters:/\w+/,validPrefixCharacters:/^[\s\0]?$/,invalidPrefixCharacters:null,ignoredClassName:null,invalidMarks:[],invalidNodes:[],validMarks:null,validNodes:null,isValidPosition:()=>!0,checkNextValidSelection:null,emptySelectionsOnly:!1,caseInsensitive:!1,multiline:!1,unicode:!1,captureChar:!0},J2="__ignore_prosemirror_suggest_update__",mf,ju,fn,cs,Yl,Yo,on,us,Xl,Q2=class{constructor(t){xi(this,mf,!1),xi(this,ju,!1),xi(this,fn,void 0),xi(this,cs,void 0),xi(this,Yl,void 0),xi(this,Yo,ye()),xi(this,on,He.empty),xi(this,us,!1),xi(this,Xl,!1),this.setMarkRemoved=()=>{wt(this,us,!0)},this.findNextTextSelection=n=>{const r=n.$from.doc,o=Math.min(r.nodeSize-2,n.to+1),i=r.resolve(o),s=Be.findFrom(i,1,!0);if(xC(s))return s},this.ignoreNextExit=()=>{wt(this,ju,!0)},this.addIgnored=({from:n,name:r,specific:o=!1})=>{const i=De(this,fn).find(c=>c.name===r);if(!i)throw new Error(`No suggester exists for the name provided: ${r}`);const s=Ee(i.char)?i.char.length:1,l=n+s,a=i.ignoredClassName?{class:i.ignoredClassName}:{},u=vt.inline(n,l,{nodeName:i.ignoredTag,...a},{name:r,specific:o,char:i.char});wt(this,on,De(this,on).add(this.view.state.doc,[u]))},this.removeIgnored=({from:n,name:r})=>{const o=De(this,fn).find(l=>l.name===r);if(!o)throw new Error(`No suggester exists for the name provided: ${r}`);const i=Ee(o.char)?o.char.length:1,s=De(this,on).find(n,n+i)[0];!s||s.spec.name!==r||wt(this,on,De(this,on).remove([s]))},this.clearIgnored=n=>{if(!n){wt(this,on,He.empty);return}const o=De(this,on).find().filter(({spec:i})=>i.name===n);wt(this,on,De(this,on).remove(o))},this.findMatchAtPosition=(n,r)=>{const o=r?De(this,fn).filter(i=>i.name===r):De(this,fn);return EC({suggesters:o,$pos:n,docChanged:!1,selectionEmpty:!0})},this.setLastChangeFromAppend=()=>{wt(this,Xl,!0)};const e=SC();wt(this,fn,t.map(e)),wt(this,fn,Us(De(this,fn),(n,r)=>r.priority-n.priority))}static create(t){return new Q2(t)}get decorationSet(){return De(this,on)}get removed(){return De(this,us)}get match(){return De(this,cs)?De(this,cs):De(this,Yl)&&De(this,Yo).exit?De(this,Yl):void 0}init(t){return this.view=t,this}createProps(t){const{name:e,char:n}=t.suggester;return{view:this.view,addIgnored:this.addIgnored,clearIgnored:this.clearIgnored,ignoreNextExit:this.ignoreNextExit,setMarkRemoved:this.setMarkRemoved,name:e,char:n,...t}}shouldRunExit(){return De(this,ju)?(wt(this,ju,!1),!1):!0}updateWithNextSelection(t){var e,n,r;const o=this.findNextTextSelection(t.selection);if(o)for(const i of De(this,fn)){const s=(e=De(this,Yo).change)==null?void 0:e.suggester.name,l=(n=De(this,Yo).exit)==null?void 0:n.suggester.name;(r=i.checkNextValidSelection)==null||r.call(i,o.$from,t,{change:s,exit:l})}}changeHandler(t,e){const{change:n,exit:r}=De(this,Yo),o=this.match;if(!n&&!r||!wC(o))return;const i=e===(r==null?void 0:r.suggester.appendTransaction)&&this.shouldRunExit(),s=e===(n==null?void 0:n.suggester.appendTransaction);if(!(!i&&!s)){if(n&&r&&Yz({change:n,exit:r})){const l=this.createProps(r),a=this.createProps(n),u=r.range.from{const l=Ee(s.char)?s.char.length:1;return i-o!==l});wt(this,on,e.remove(r))}shouldIgnoreMatch({range:t,suggester:{name:e}}){return De(this,on).find().some(({spec:o,from:i})=>i!==t.from?!1:o.specific?o.name===e:!0)}resetState(){wt(this,Yo,ye()),wt(this,cs,void 0),wt(this,us,!1),wt(this,Xl,!1)}updateReasons(t){const{$pos:e,state:n}=t,r=De(this,mf),o=De(this,fn),i=n.selection.empty,s=xC(n.selection)?EC({suggesters:o,$pos:e,docChanged:r,selectionEmpty:i}):void 0;wt(this,cs,s&&this.shouldIgnoreMatch(s)?void 0:s),wt(this,Yo,Qz({next:De(this,cs),prev:De(this,Yl),state:n,$pos:e}))}addSuggester(t){const e=De(this,fn).find(r=>r.name===t.name),n=SC();if(e)wt(this,fn,De(this,fn).map(r=>r===e?n(t):r));else{const r=[...De(this,fn),n(t)];wt(this,fn,Us(r,(o,i)=>i.priority-o.priority))}return()=>this.removeSuggester(t.name)}removeSuggester(t){const e=Ee(t)?t:t.name;wt(this,fn,De(this,fn).filter(n=>n.name!==e)),this.clearIgnored(e)}toJSON(){return this.match}apply(t){const{exit:e,change:n}=De(this,Yo);if(De(this,Xl)&&(wt(this,Xl,!1),!(e!=null&&e.suggester.appendTransaction)&&!(n!=null&&n.suggester.appendTransaction)))return this;const{tr:r,state:o}=t,i=r.docChanged||r.selectionSet;return r.getMeta(J2)||!i&&!De(this,us)?this:(wt(this,mf,r.docChanged),this.mapIgnoredDecorations(r),e&&this.resetState(),wt(this,Yl,De(this,cs)),this.updateReasons({$pos:r.selection.$from,state:o}),this)}createDecorations(t){const e=this.match;if(!wC(e))return De(this,on);const{disableDecorations:n}=e.suggester;if(Qe(n)?n(t,e):n)return De(this,on);const{range:o,suggester:i}=e,{name:s,suggestTag:l,suggestClassName:a}=i,{from:u,to:c}=o;return this.shouldIgnoreMatch(e)?De(this,on):De(this,on).add(t.doc,[vt.inline(u,c,{nodeName:l,class:s?`${a} suggest-${s}`:a},{name:s})])}},aF=Q2;mf=new WeakMap;ju=new WeakMap;fn=new WeakMap;cs=new WeakMap;Yl=new WeakMap;Yo=new WeakMap;on=new WeakMap;us=new WeakMap;Xl=new WeakMap;function SC(){const t=new Set;return e=>{if(t.has(e.name))throw new Error(`A suggester already exists with the name '${e.name}'. The name provided must be unique.`);const n={...sF,...e};return t.add(e.name),n}}var eM=new vl("suggest");function Bb(t){return eM.getState(t)}function CC(t,e){return Bb(t).addSuggester(e)}function TC(t){t.setMeta(J2,!0)}function lF(t,e){return Bb(t).removeSuggester(e)}function cF(...t){const e=aF.create(t);return new mi({key:eM,view:n=>(e.init(n),{update:r=>e.changeHandler(r.state.tr,!1)}),state:{init:()=>e,apply:(n,r,o,i)=>e.apply({tr:n,state:i})},appendTransaction:(n,r,o)=>{const i=o.tr;return e.updateWithNextSelection(i),e.changeHandler(i,!0),i.docChanged||i.steps.length>0||i.selectionSet||i.storedMarksSet?(e.setLastChangeFromAppend(),i):null},props:{decorations:n=>e.createDecorations(n)}})}function Hb(t,e){const n=Object.getPrototypeOf(e);let r=t.selection,o=t.doc,i=t.storedMarks;const s=ye();for(const[l,a]of Object.entries(e))s[l]={value:a};return Object.create(n,{...s,storedMarks:{get(){return i}},selection:{get(){return r}},doc:{get(){return o}},tr:{get(){return r=t.selection,o=t.doc,i=t.storedMarks,t}}})}function Ad(t){return({state:e,dispatch:n,view:r,tr:o})=>t(Hb(o,e),n,r)}function AC(t){return e=>{var n;return we(e.dispatch===void 0||e.dispatch===((n=e.view)==null?void 0:n.dispatch),{code:re.NON_CHAINABLE_COMMAND}),t(e)}}function uF(...t){return({state:e,dispatch:n,view:r,tr:o,...i})=>{for(const s of t)if(s({state:e,dispatch:n,view:r,tr:o,...i}))return!0;return!1}}var yr={get isBrowser(){return!!(typeof window<"u"&&typeof window.document<"u"&&window.navigator&&window.navigator.userAgent)},get isJSDOM(){return yr.isBrowser&&window.navigator.userAgent.includes("jsdom")},get isNode(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null},get isIos(){return yr.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return yr.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return yr.isNode?process.platform==="darwin":yr.isBrowser?/Mac|iPod|iPhone|iPad/.test(window.navigator.platform):!1},get isDevelopment(){return!1},get isTest(){return!1},get isProduction(){return!0}};function Xo(t,e){var n;const r=zF(t);return((n=r==null?void 0:r.getComputedStyle(t))==null?void 0:n.getPropertyValue(e))??""}function Un(t,e){return Object.assign(t.style,e)}function B0(t){return $n(t)&&qr(t.nodeType)&&Ee(t.nodeName)}function Vt(t){return B0(t)&&t.nodeType===1}function bm(t){const{types:e,node:n}=t;if(!n)return!1;const r=o=>o===n.type||o===n.type.name;return Pt(e)?e.some(r):r(e)}function dF(t,e){const{tr:n}=e;return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function hF({pos:t,tr:e}){const n=e.doc.nodeAt(t);return n&&e.delete(t,t+n.nodeSize),e}function pF({pos:t,tr:e,content:n}){const r=e.doc.nodeAt(t);return r&&e.replaceWith(t,t+r.nodeSize,n),e}function Yh(t){const{predicate:e,selection:n}=t,r=rM(n)?n.selection.$from:Vb(n)?n.$from:n;for(let o=r.depth;o>0;o--){const i=r.node(o),s=o>0?r.before(o):0,l=r.start(o),a=s+i.nodeSize;if(e(i,s))return{pos:s,depth:o,node:i,start:l,end:a}}}function fF(t){const{depth:e}=t,n=e>0?t.before(e):0,r=t.node(e),o=t.start(e),i=n+r.nodeSize;return{pos:n,start:o,node:r,end:i,depth:e}}function gF(t){const e=Yh({predicate:()=>!0,selection:t});return we(e,{message:"No parent node found for the selection provided."}),e}function pi(t){const{types:e,selection:n}=t;return Yh({predicate:r=>bm({types:e,node:r}),selection:n})}function mF(t){const{types:e,selection:n}=t;if(!(!qh(n)||!bm({types:e,node:n.node})))return{pos:n.$from.pos,depth:n.$from.depth,start:n.$from.start(),end:n.$from.pos+n.node.nodeSize,node:n.node}}function Ub(t){return Vb(t)?t.empty:t.selection.empty}function vF(t){return t.docChanged||t.selectionSet}function tM(t){return!!qd(t)}function qd(t){const{state:e,type:n,attrs:r}=t,{selection:o,doc:i}=e,s=Ee(n)?i.type.schema.nodes[n]:n;we(s,{code:re.SCHEMA,message:`No node exists for ${n}`});const l=mF({selection:o,types:n})??Yh({predicate:a=>a.type===s,selection:o});return!r||jd(r)||!l||l.node.hasMarkup(s,{...l.node.attrs,...r})?l:void 0}function ag(...t){return e=>{if(!bS(t))return!1;const[n,...r]=t;let o=!1;const i=(...a)=>()=>{if(!bS(a))return!1;o=!0;const[,...u]=a;return ag(...a)({...e,next:i(...u)})},s=i(...r),l=n({...e,next:s});return o||l?l:s()}}function yF(t,e){const n=new Map,r=ye();for(const o of t)for(const[i,s]of an(o)){const a=[...n.get(i)??[],s],u=ag(...a);n.set(i,a),r[i]=e(u)}return r}function bF(t){return yF(t,e=>(n,r,o)=>e({state:n,dispatch:r,view:o,tr:n.tr,next:()=>!1}))}function Wb(t,e){const n=t.attrs??{};return Object.entries(e).every(([r,o])=>n[r]===o)}function wF(t){return iM(t,[Ii,Yt,vn,zo])}function uu(t){return $n(t)}function du(t,e){return Pt(e)?ir(e,t[Bi]):e===t[Bi]}function xF(t){return $n(t)&&t instanceof C0}function kF(t,e){return Ee(t)?Mt(e.nodes,t):t}function nM(t){return $n(t)&&t instanceof Vh}function EF(t,e){return Ee(t)?Mt(e.marks,t):t}function Xh(t){return $n(t)&&t instanceof As}function SF(t){return $n(t)&&t instanceof J}function CF(t){return $n(t)&&t instanceof je}function rM(t){return $n(t)&&t instanceof Na}function ta(t){return $n(t)&&t instanceof Me}function TF(t){return $n(t)&&t instanceof rr}function Vb(t){return $n(t)&&t instanceof Be}function AF(t){return $n(t)&&t instanceof Lc}function _C(t){const{trState:e,from:n,to:r,type:o,attrs:i={}}=t,{doc:s}=e,l=EF(o,s.type.schema);if(Object.keys(i).length===0)return s.rangeHasMark(n,r,l);let a=!1;return r>n&&s.nodesBetween(n,r,u=>a?!1:(a=(u.marks??[]).some(d=>d.type!==l?!1:Wb(d,i)),!a)),a}function qh(t){return $n(t)&&t instanceof Oe}function lg(t){const{trState:e,type:n,attrs:r={},from:o,to:i}=t,{selection:s,doc:l,storedMarks:a}=e,u=Ee(n)?l.type.schema.marks[n]:n;if(we(u,{code:re.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}),o&&i)try{return Math.max(o,i)d.type!==n?!1:Wb(d,r??{})):_C({...t,from:s.from,to:s.to})}function jb(t,e={}){const n=_F(t.type.schema);if(!n)return!1;const{ignoreAttributes:r,ignoreDocAttributes:o}=e;return r?oM(n,t):o?n.content.eq(t.content):n.eq(t)}function oM(t,e){if(t===e)return!0;const n=t.type===e.type&&je.sameSet(t.marks,e.marks);function r(){if(t.content===e.content)return!0;if(t.content.size!==e.content.size)return!1;const o=[],i=[];t.content.forEach(s=>o.push(s)),e.content.forEach(s=>i.push(s));for(const[s,l]of o.entries()){const a=i[s];if(!a||!oM(l,a))return!1}return!0}return n&&r()}function _F(t){var e;return((e=t.nodes.doc)==null?void 0:e.createAndFill())??void 0}function wm(t){for(const e of Object.values(t.nodes))if(e.name!=="doc"&&(e.isBlock||e.isTextblock))return e;we(!1,{code:re.SCHEMA,message:"No default block node found for the provided schema."})}function RF(t){return t.type===wm(t.type.schema)}function xm(t){return!!t&&t.type.isBlock&&!t.textContent&&!t.childCount}function Hi(t,e,n){const r=t.parent.childAfter(t.parentOffset);if(!r.node)return;const o=Ee(e)?e:e.name,i=r.node.marks.find(({type:d})=>d.name===o);let s=t.index(),l=t.start()+r.offset,a=s+1,u=l+r.node.nodeSize;if(!i)return n&&u0&&i.isInSet(t.parent.child(s-1).marks);)s-=1,l-=t.parent.child(s).nodeSize;for(;at instanceof n)}function _F(t){return kb(t,({from:n,to:r,prevFrom:o,prevTo:i})=>`${n}_${r}_${o}_${i}`).filter((n,r,o)=>!o.some((i,s)=>r===s?!1:n.prevFrom>=i.prevFrom&&n.prevTo<=i.prevTo&&n.from>=i.from&&n.to<=i.to))}function iM(t,e=[]){const n=[],{steps:r,mapping:o}=t,i=o.invert();r.forEach((l,a)=>{if(!oM(l,e))return;const u=[],c=l.getMap(),d=o.slice(a);if(c.ranges.length===0&&yF(l)){const{from:h,to:p}=l;u.push({from:h,to:p})}else c.forEach((h,p)=>{u.push({from:h,to:p})});u.forEach(h=>{const p=d.map(h.from,-1),f=d.map(h.to);n.push({from:p,to:f,prevFrom:i.map(p,-1),prevTo:i.map(f)})})});const s=Us(n,(l,a)=>l.from-a.from);return _F(s)}function RF(t,e){const n=[],r=iM(t,e);for(const o of r)try{const i=t.doc.resolve(o.from),s=t.doc.resolve(o.to),l=i.blockRange(s);l&&n.push(l)}catch{}return n}function MF(t){var e;return((e=t.content.firstChild)==null?void 0:e.textContent)??""}function OF(t,e){if(!ta(t.selection))return;let{from:n,to:r}=t.selection;const o=(s,l)=>MF(Me.between(t.doc.resolve(s),t.doc.resolve(l)).content());for(let s=o(n-1,n);s&&!e.test(s);n--,s=o(n-1,n));for(let s=o(r,r+1);s&&!e.test(s);r++,s=o(r,r+1));if(n===r)return;const i=t.doc.textBetween(n,r,yb,` +`);return{from:l,to:u,text:c,mark:i}}function iM(t,e){return e.length===0||e.some(n=>t instanceof n)}function MF(t){return Sb(t,({from:n,to:r,prevFrom:o,prevTo:i})=>`${n}_${r}_${o}_${i}`).filter((n,r,o)=>!o.some((i,s)=>r===s?!1:n.prevFrom>=i.prevFrom&&n.prevTo<=i.prevTo&&n.from>=i.from&&n.to<=i.to))}function sM(t,e=[]){const n=[],{steps:r,mapping:o}=t,i=o.invert();r.forEach((l,a)=>{if(!iM(l,e))return;const u=[],c=l.getMap(),d=o.slice(a);if(c.ranges.length===0&&wF(l)){const{from:h,to:p}=l;u.push({from:h,to:p})}else c.forEach((h,p)=>{u.push({from:h,to:p})});u.forEach(h=>{const p=d.map(h.from,-1),f=d.map(h.to);n.push({from:p,to:f,prevFrom:i.map(p,-1),prevTo:i.map(f)})})});const s=Us(n,(l,a)=>l.from-a.from);return MF(s)}function OF(t,e){const n=[],r=sM(t,e);for(const o of r)try{const i=t.doc.resolve(o.from),s=t.doc.resolve(o.to),l=i.blockRange(s);l&&n.push(l)}catch{}return n}function IF(t){var e;return((e=t.content.firstChild)==null?void 0:e.textContent)??""}function LF(t,e){if(!ta(t.selection))return;let{from:n,to:r}=t.selection;const o=(s,l)=>IF(Me.between(t.doc.resolve(s),t.doc.resolve(l)).content());for(let s=o(n-1,n);s&&!e.test(s);n--,s=o(n-1,n));for(let s=o(r,r+1);s&&!e.test(s);r++,s=o(r,r+1));if(n===r)return;const i=t.doc.textBetween(n,r,wb,` -`);return{from:n,to:r,text:i}}function sM(t){return OF(t,/\W/)}function wc(t,e=0){const n=Pt(t)?t[e]:t;return wb(Ee(n),`No match string found for match ${t}`),n??""}function IF(t){return ta(t)?t.$cursor:void 0}function LF(t,e){return Xh(t)?e?t.type===e.nodes.doc:t.type.name==="doc":!1}function NF(t){return $n(t)&&qr(t.anchor)&&qr(t.head)}function cr(t,e){const n=e.nodeSize-2,r=0;let o;const i=a=>B4({min:r,max:n,value:a});if(Ub(t))return t;if(t==="all")return new rr(e);if(t==="start"?o=r:t==="end"?o=n:CF(t)?o=t.pos:o=t,qr(o))return o=i(o),Me.near(e.resolve(o));if(NF(o)){const a=i(o.anchor),u=i(o.head);return Me.between(e.resolve(a),e.resolve(u))}const s=i(o.from),l=i(o.to);return Me.between(e.resolve(s),e.resolve(l))}var $F=3;function aM(t){const{content:e,schema:n,document:r,stringHandler:o,onError:i,attempts:s=0}=t,l=i&&s<=$F||s===0;if(we(l,{code:re.INVALID_CONTENT,message:"The invalid content has been called recursively more than ${MAX_ATTEMPTS} times. The content is invalid and the error handler has not been able to recover properly."}),Ee(e))return we(o,{code:re.INVALID_CONTENT,message:`The string '${e}' was added to the editor, but no \`stringHandler\` was added. Please provide a valid string handler which transforms your content to a \`ProsemirrorNode\` to prevent this error.`}),o({document:r,content:e,schema:n});if(nM(e))return e.doc;if(Xh(e))return e;try{return n.nodeFromJSON(e)}catch(a){const u=WF({schema:n,error:a,json:e}),c=i==null?void 0:i(u);return we(c,{code:re.INVALID_CONTENT,message:`An error occurred when processing the content. Please provide an \`onError\` handler to process the invalid content: ${JSON.stringify(u.invalidContent,null,2)}`}),aM({...t,content:c,attempts:s+1})}}function km(){const t=d2();if(t)return t;throw new Error(`Unable to retrieve the document from the global scope. +`);return{from:n,to:r,text:i}}function aM(t){return LF(t,/\W/)}function wc(t,e=0){const n=Pt(t)?t[e]:t;return kb(Ee(n),`No match string found for match ${t}`),n??""}function NF(t){return ta(t)?t.$cursor:void 0}function $F(t,e){return Xh(t)?e?t.type===e.nodes.doc:t.type.name==="doc":!1}function DF(t){return $n(t)&&qr(t.anchor)&&qr(t.head)}function cr(t,e){const n=e.nodeSize-2,r=0;let o;const i=a=>U4({min:r,max:n,value:a});if(Vb(t))return t;if(t==="all")return new rr(e);if(t==="start"?o=r:t==="end"?o=n:AF(t)?o=t.pos:o=t,qr(o))return o=i(o),Me.near(e.resolve(o));if(DF(o)){const a=i(o.anchor),u=i(o.head);return Me.between(e.resolve(a),e.resolve(u))}const s=i(o.from),l=i(o.to);return Me.between(e.resolve(s),e.resolve(l))}var PF=3;function lM(t){const{content:e,schema:n,document:r,stringHandler:o,onError:i,attempts:s=0}=t,l=i&&s<=PF||s===0;if(we(l,{code:re.INVALID_CONTENT,message:"The invalid content has been called recursively more than ${MAX_ATTEMPTS} times. The content is invalid and the error handler has not been able to recover properly."}),Ee(e))return we(o,{code:re.INVALID_CONTENT,message:`The string '${e}' was added to the editor, but no \`stringHandler\` was added. Please provide a valid string handler which transforms your content to a \`ProsemirrorNode\` to prevent this error.`}),o({document:r,content:e,schema:n});if(rM(e))return e.doc;if(Xh(e))return e;try{return n.nodeFromJSON(e)}catch(a){const u=jF({schema:n,error:a,json:e}),c=i==null?void 0:i(u);return we(c,{code:re.INVALID_CONTENT,message:`An error occurred when processing the content. Please provide an \`onError\` handler to process the invalid content: ${JSON.stringify(u.invalidContent,null,2)}`}),lM({...t,content:c,attempts:s+1})}}function km(){const t=h2();if(t)return t;throw new Error(`Unable to retrieve the document from the global scope. It seems that you are running Remirror in a non-browser environment. Remirror need browser APIs to work. If you are using Jest (or other testing frameworks), make sure that you are using the JSDOM environment (https://jestjs.io/docs/29.0/configuration#testenvironment-string). If you are using Next.js (or other server-side rendering frameworks), please use dynamic import with \`ssr: false\` to load the editor component without rendering it on the server (https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr). -If you are using Node.js, you can install JSDOM and Remirror will try to use it automatically, or you can create a fake document and pass it to Remirror`)}function lM(t){var e;return(t==null?void 0:t.defaultView)??(typeof window<"u"?window:void 0)??((e=d2())==null?void 0:e.defaultView)}function DF(t){return lM(t==null?void 0:t.ownerDocument)}function PF(t){const e=lM(t)??km().defaultView;if(e)return e;throw new Error("Unable to retrieve the window from the global scope")}function zF(t,e=km()){const n=LF(t,t.type.schema)?t.content:J.from(t);return Vr.fromSchema(t.type.schema).serializeFragment(n,{document:e})}function FF(t,e){return new(PF(e)).DOMParser().parseFromString(`${t}`,"text/html").body}function BF(t,e=km()){const n=e.createElement("div");return n.append(zF(t,e)),n.innerHTML}function F0(t){const{content:e,schema:n,document:r,fragment:o=!1,...i}=t,s=FF(e,r),l=Za.fromSchema(n);return o?l.parseSlice(s,{..._C,...i}).content:l.parse(s,{..._C,...i})}var _C={preserveWhitespace:!1};function Em(t,e){const n=Vd(e.defaults());return bb({...t},n)}function HF(t,e){let n="";e&&(n=`${e.trim()}`);const r=XP(t);if(!r)return n;const o=(n.endsWith(";")," ");return`${n}${o}${r}`}var UF={remove(t,e){let n=t;for(const r of e)r.invalidParentNode||(n=W4(r.path,n));return n}};function WF({json:t,schema:e,...n}){const r=new Set(Vd(e.marks)),o=new Set(Vd(e.nodes)),i=cM({json:t,path:[],validNodes:o,validMarks:r});return{json:t,invalidContent:i,transformers:UF,...n}}function cM(t){const{json:e,validMarks:n,validNodes:r,path:o=[]}=t,i={validMarks:n,validNodes:r},s=[],{type:l,marks:a,content:u}=e;let{invalidParentMark:c=!1,invalidParentNode:d=!1}=t;if(a){const h=[];for(const[p,f]of a.entries()){const g=Ee(f)?f:f.type;n.has(g)||(h.unshift({name:g,path:[...o,"marks",`${p}`],type:"mark",invalidParentMark:c,invalidParentNode:d}),c=!0)}s.push(...h)}if(r.has(l)||(s.push({name:l,type:"node",path:o,invalidParentMark:c,invalidParentNode:d}),d=!0),u){const h=[];for(const[p,f]of u.entries())h.unshift(...cM({...i,json:f,path:[...o,"content",`${p}`],invalidParentMark:c,invalidParentNode:d}));s.unshift(...h)}return s}function VF(t){return!!(ta(t)&&t.$cursor&&t.$cursor.parentOffset>=t.$cursor.parent.content.size)}function B0(t){return!!(ta(t)&&t.$cursor&&t.$cursor.parentOffset<=0)}function RC(t){const e=Be.atStart(t.$anchor.doc);return!!(B0(t)&&e.anchor===t.anchor)}function jF(t){return({dispatch:e,tr:n})=>{const{type:r,attrs:o=ye(),appendText:i,range:s}=t,l=s?Me.between(n.doc.resolve(s.from),n.doc.resolve(s.to)):n.selection,{$from:a,from:u,to:c}=l;let d=a.depth===0?n.doc.type.allowsMarkType(r):!1;return n.doc.nodesBetween(u,c,h=>{if(d)return!1;if(h.inlineContent&&h.type.allowsMarkType(r)){d=!0;return}}),d?(e==null||e(n.addMark(u,c,r.create(o))&&i?n.insertText(i):n),!0):!1}}function GF({tr:t,dispatch:e}){const{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&cu(o);return!qr(i)||!o?!1:(e==null||e(t.lift(o,i).scrollIntoView()),!0)}function uM(t,e={},n){return function(r){const{tr:o,dispatch:i,state:s}=r,l=Ee(t)?Mt(s.schema.nodes,t):t,{from:a,to:u}=cr(n??o.selection,o.doc),c=o.doc.resolve(a),d=o.doc.resolve(u),h=c.blockRange(d),p=h&&Cb(h,l,e);return!p||!h?!1:(i==null||i(o.wrap(h,p).scrollIntoView()),!0)}}function dM(t,e={},n){return r=>{const{tr:o,state:i}=r,s=Ee(t)?Mt(i.schema.nodes,t):t;return qd({state:o,type:s,attrs:e})?GF(r):uM(t,e,n)(r)}}function Zd(t,e,n,r=!0){return function(o){const{tr:i,dispatch:s,state:l}=o,a=Ee(t)?Mt(l.schema.nodes,t):t,{from:u,to:c}=cr(n??i.selection,i.doc);let d=!1,h;return i.doc.nodesBetween(u,c,(p,f)=>{if(d)return!1;if(!p.isTextblock||p.hasMarkup(a,e))return;if(p.type===a){d=!0,h=p.attrs;return}const g=i.doc.resolve(f),m=g.index();d=g.parent.canReplaceWith(m,m+1,a),d&&(h=g.parent.attrs)}),d?(s==null||s(i.setBlockType(u,c,a,{...r?h:{},...e}).scrollIntoView()),!0):!1}}function Vb(t){return e=>{const{tr:n,state:r}=e,{type:o,attrs:i,preserveAttrs:s=!0}=t,l=qd({state:n,type:o,attrs:i}),a=t.toggleType??wm(r.schema);if(l)return Zd(a,{...s?l.node.attrs:{},...i})(e);const u=qd({state:n,type:a,attrs:i});return Zd(o,{...s?u==null?void 0:u.node.attrs:{},...i})(e)}}function KF(t=0){const e=navigator.userAgent.match(/Chrom(e|ium)\/(\d+)\./);return e?Number.parseInt(Mt(e,2),10)>=t:!1}function YF(t,e){let{head:n,empty:r,anchor:o}=t;for(const i of e.steps)n=i.getMap().map(n);r?e.setSelection(Me.near(e.doc.resolve(n))):e.setSelection(Me.between(e.doc.resolve(o),e.doc.resolve(n)))}function XF(t){const{attrs:e={},appendText:n="",content:r="",keepSelection:o=!1,range:i}=t;return({state:s,tr:l,dispatch:a})=>{var u;const c=s.schema,d=cr(t.selection??i??l.selection,l.doc),h=d.$from.index(),{from:p,to:f,$from:g}=d,m=Ee(t.type)?c.nodes[t.type]??c.marks[t.type]:t.type;if(we(Ee(t.type)?m:!0,{code:re.SCHEMA,message:`Schema contains no marks or nodes with name ${m}`}),bF(m)){if(!g.parent.canReplaceWith(h,h,m))return!1;l.replaceWith(p,f,m.create(e,r?c.text(r):void 0))}else we(r,{message:"`replaceText` cannot be called without content when using a mark type"}),l.replaceWith(p,f,c.text(r,tM(m)?[m.create(e)]:void 0));return n&&l.insertText(n),o&&YF(s.selection,l),a&&(KF(60)&&((u=document.getSelection())==null||u.empty()),a(l)),!0}}function hM(t,e){const n=t.parent.childAfter(t.parentOffset);if(!n.node)return;const{marks:r,nodeSize:o}=n.node;if(r[0])return r[0].type;const s=t.start()+n.offset+o;return hM(t.doc.resolve(s+1))}function pM(t){return({dispatch:e,tr:n,state:r})=>{const{type:o,expand:i=!0,range:s}=t,l=cr(t.selection??s??n.selection,n.doc);let{from:a,to:u,$from:c,$to:d}=l;const h=Ee(o)?r.schema.marks[o]:o;h!==null&&we(h,{code:re.SCHEMA,message:`Mark type: ${o} does not exist on the current schema.`});const p=h??hM(c);if(!p)return!1;const f=Hi(c,p,d);return i&&f&&(a=Math.max(0,Math.min(a,f.from)),u=Math.min(Math.max(u,f.to),n.doc.nodeSize-2)),e==null||e(n.removeMark(a,qr(u)?u:a,tM(h)?h:void 0)),!0}}function qF(t){const e=["command","cmd","meta"];return yr.isMac&&e.push("mod"),e.includes(t)}function ZF(t){const e=["control","ctrl"];return yr.isMac||e.push("mod"),e.includes(t)}function JF(t){const e=[];for(let n of t.split("-")){if(n=n.toLowerCase(),qF(n)){e.push({type:"modifier",symbol:"⌘",key:"command",i18n:nn.COMMAND_KEY});continue}if(ZF(n)){e.push({type:"modifier",symbol:"⌃",key:"control",i18n:nn.CONTROL_KEY});continue}switch(n){case"shift":e.push({type:"modifier",symbol:"⇧",key:n,i18n:nn.SHIFT_KEY});continue;case"alt":e.push({type:"modifier",symbol:"⌥",key:n,i18n:nn.ALT_KEY});continue;case` -`:case"\r":case"enter":e.push({type:"named",symbol:"↵",key:n,i18n:nn.ENTER_KEY});continue;case"backspace":e.push({type:"named",symbol:"⌫",key:n,i18n:nn.BACKSPACE_KEY});continue;case"delete":e.push({type:"named",symbol:"⌦",key:n,i18n:nn.DELETE_KEY});continue;case"escape":e.push({type:"named",symbol:"␛",key:n,i18n:nn.ESCAPE_KEY});continue;case"tab":e.push({type:"named",symbol:"⇥",key:n,i18n:nn.TAB_KEY});continue;case"capslock":e.push({type:"named",symbol:"⇪",key:n,i18n:nn.CAPS_LOCK_KEY});continue;case"space":e.push({type:"named",symbol:"␣",key:n,i18n:nn.SPACE_KEY});continue;case"pageup":e.push({type:"named",symbol:"⤒",key:n,i18n:nn.PAGE_UP_KEY});continue;case"pagedown":e.push({type:"named",symbol:"⤓",key:n,i18n:nn.PAGE_DOWN_KEY});continue;case"home":e.push({type:"named",key:n,i18n:nn.HOME_KEY});continue;case"end":e.push({type:"named",key:n,i18n:nn.END_KEY});continue;case"arrowleft":e.push({type:"named",symbol:"←",key:n,i18n:nn.ARROW_LEFT_KEY});continue;case"arrowright":e.push({type:"named",symbol:"→",key:n,i18n:nn.ARROW_RIGHT_KEY});continue;case"arrowup":e.push({type:"named",symbol:"→",key:n,i18n:nn.ARROW_UP_KEY});continue;case"arrowdown":e.push({type:"named",symbol:"↓",key:n,i18n:nn.ARROW_DOWN_KEY});continue;default:e.push({type:"char",key:n});continue}}return e}function QF(t){const{node:e,predicate:n,descend:r=!0,action:o}=t;we(Xh(e),{code:re.INTERNAL,message:'Invalid "node" parameter passed to "findChildren".'}),we(Qe(n),{code:re.INTERNAL,message:'Invalid "predicate" parameter passed to "findChildren".'});const i=[];return e.descendants((s,l)=>{const a={node:s,pos:l};return n(a)&&(i.push(a),o==null||o(a)),r}),i}function eB(t){const{type:e,...n}=t;return QF({...n,predicate:r=>r.node.type===e})}function tB(t,e={}){const{descend:n=!1,predicate:r,StepTypes:o}=e,i=RF(t,o),s=[];for(const l of i){const{start:a,end:u}=l;t.doc.nodesBetween(a,u,(c,d)=>(((r==null?void 0:r(c,d,l))??!0)&&s.push({node:c,pos:d}),n))}return s}function Jd(t){const{regexp:e,type:n,getAttributes:r,ignoreWhitespace:o=!1,beforeDispatch:i,updateCaptured:s,shouldSkip:l,invalidMarks:a}=t;let u;const c=new yl(e,(d,h,p,f)=>{const{tr:g,schema:m}=d;u||(u=Ee(n)?m.marks[n]:n,we(u,{code:re.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}));let v=h[1],y=h[0];const b=gM({captureGroup:v,fullMatch:y,end:f,start:p,rule:c,state:d,ignoreWhitespace:o,invalidMarks:a,shouldSkip:l,updateCaptured:s});if(!b)return null;({start:p,end:f,captureGroup:v,fullMatch:y}=b);const w=Qe(r)?r(h):r;let k=f,x=[];if(v){const S=y.search(/\S/),A=p+y.indexOf(v),C=A+v.length;x=g.storedMarks??[],Cp&&g.delete(p+S,A),k=p+S+v.length}return g.addMark(p,k,u.create(w)),g.setStoredMarks(x),i==null||i({tr:g,match:h,start:p,end:f}),g});return c}function fM(t){const{regexp:e,type:n,getAttributes:r,beforeDispatch:o,shouldSkip:i,ignoreWhitespace:s=!1,updateCaptured:l,invalidMarks:a}=t,u=new yl(e,(c,d,h,p)=>{const f=Qe(r)?r(d):r,{tr:g,schema:m}=c,v=Ee(n)?m.nodes[n]:n;let y=d[1],b=d[0];const w=gM({captureGroup:y,fullMatch:b,end:p,start:h,rule:u,state:c,ignoreWhitespace:s,invalidMarks:a,shouldSkip:i,updateCaptured:l});if(!w)return null;({start:h,end:p,captureGroup:y,fullMatch:b}=w),we(v,{code:re.SCHEMA,message:`No node exists for ${n} in the schema.`});const k=v.createAndFill(f);return k&&(g.replaceRangeWith(v.isBlock?g.doc.resolve(h).before():h,p,k),o==null||o({tr:g,match:[b,y??""],start:h,end:p})),g});return u}function gM({captureGroup:t,fullMatch:e,end:n,start:r,rule:o,ignoreWhitespace:i,shouldSkip:s,updateCaptured:l,state:a,invalidMarks:u}){var c;if(e==null)return null;const d=(l==null?void 0:l({captureGroup:t,fullMatch:e,start:r,end:n}))??{};t=d.captureGroup??t,e=d.fullMatch??e,r=d.start??r,n=d.end??n;const h=a.doc.resolve(r),p=a.doc.resolve(n);return u&&D0({$from:h,$to:p},u)||o.invalidMarks&&D0({$from:h,$to:p},o.invalidMarks)||i&&(t==null?void 0:t.trim())===""||s!=null&&s({state:a,captureGroup:t,fullMatch:e,start:r,end:n,ruleType:"mark"})||(c=o.shouldSkip)!=null&&c.call(o,{state:a,captureGroup:t,fullMatch:e,start:r,end:n,ruleType:"mark"})?null:{captureGroup:t,end:n,fullMatch:e,start:r}}var nB=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),n={},r=[];e.forEach(i=>{(i?i.split(" "):[]).forEach(l=>{if(l.startsWith("atm_")){const[,a]=l.split("_");n[a]=l}else r.push(l)})});const o=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&o.push(n[i]);return o.push(...r),o.join(" ")},rB=nB;const mM=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function oB(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const vM=(t,e,n)=>{let r=oB(t,n);if(!r)return!1;let o=yM(r);if(!o){let s=r.blockRange(),l=s&&cu(s);return l==null?!1:(e&&e(t.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&xM(t,o,e))return!0;if(r.parent.content.size==0&&(zc(i,"end")||Oe.isSelectable(i))){let s=Tb(t.doc,r.before(),r.after(),ae.empty);if(s&&s.slice.size{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=yM(r)}let s=i&&i.nodeBefore;return!s||!Oe.isSelectable(s)?!1:(e&&e(t.tr.setSelection(Oe.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function yM(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function sB(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset{let r=sB(t,n);if(!r)return!1;let o=bM(r);if(!o)return!1;let i=o.nodeAfter;if(xM(t,o,e))return!0;if(r.parent.content.size==0&&(zc(i,"start")||Oe.isSelectable(i))){let s=Tb(t.doc,r.before(),r.after(),ae.empty);if(s&&s.slice.size{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset=0;e--){let n=t.node(e);if(t.index(e)+1{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(` -`).scrollIntoView()),!0)};function jb(t){for(let e=0;e{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=jb(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let l=n.after(),a=t.tr.replaceWith(l,l,s.createAndFill());a.setSelection(Be.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},uB=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof rr||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=jb(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(vc(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&cu(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function hB(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof Oe&&e.selection.node.isBlock)return!r.parentOffset||!vc(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(n){let i=o.parentOffset==o.parent.content.size,s=e.tr;(e.selection instanceof Me||e.selection instanceof rr)&&s.deleteSelection();let l=r.depth==0?null:jb(r.node(-1).contentMatchAt(r.indexAfter(-1))),a=t&&t(o.parent,i),u=a?[a]:i&&l?[{type:l}]:void 0,c=vc(s.doc,s.mapping.map(r.pos),1,u);if(!u&&!c&&vc(s.doc,s.mapping.map(r.pos),1,l?[{type:l}]:void 0)&&(l&&(u=[{type:l}]),c=!0),c&&(s.split(s.mapping.map(r.pos),1,u),!i&&!r.parentOffset&&r.parent.type!=l)){let d=s.mapping.map(r.before()),h=s.doc.resolve(d);l&&r.node(-1).canReplaceWith(h.index(),h.index()+1,l)&&s.setNodeMarkup(s.mapping.map(r.before()),l)}n(s.scrollIntoView())}return!0}}const pB=hB(),fB=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(Oe.create(t.doc,o))),!0)},gB=(t,e)=>(e&&e(t.tr.setSelection(new rr(t.doc))),!0);function mB(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||jh(t.doc,e.pos))?!1:(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function xM(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i,s;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(mB(t,e,n))return!0;let l=e.parent.canReplace(e.index(),e.index()+1);if(l&&(i=(s=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&s.matchType(i[0]||o.type).validEnd){if(n){let d=e.pos+o.nodeSize,h=J.empty;for(let g=i.length-1;g>=0;g--)h=J.from(i[g].create(null,h));h=J.from(r.copy(h));let p=t.tr.step(new Yt(e.pos-1,d,e.pos,d,new ae(h,1,0),i.length,!0)),f=d+2*i.length;jh(p.doc,f)&&p.join(f),n(p.scrollIntoView())}return!0}let a=Be.findFrom(e,1),u=a&&a.$from.blockRange(a.$to),c=u&&cu(u);if(c!=null&&c>=e.depth)return n&&n(t.tr.lift(u,c).scrollIntoView()),!0;if(l&&zc(o,"start",!0)&&zc(r,"end")){let d=r,h=[];for(;h.push(d),!d.isTextblock;)d=d.lastChild;let p=o,f=1;for(;!p.isTextblock;p=p.firstChild)f++;if(d.canReplace(d.childCount,d.childCount,p.content)){if(n){let g=J.empty;for(let v=h.length-1;v>=0;v--)g=J.from(h[v].copy(g));let m=t.tr.step(new Yt(e.pos-h.length,e.pos+o.nodeSize,e.pos+f,e.pos+o.nodeSize-f,new ae(g,h.length,0),0,!0));n(m.scrollIntoView())}return!0}}return!1}function kM(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(Me.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const vB=kM(-1),yB=kM(1);function bB(t,e,n){for(let r=0;r{if(s)return!1;s=l.inlineContent&&l.type.allowsMarkType(n)}),s)return!0}return!1}function wB(t,e=null){return function(n,r){let{empty:o,$cursor:i,ranges:s}=n.selection;if(o&&!i||!bB(n.doc,s,t))return!1;if(r)if(i)t.isInSet(n.storedMarks||i.marks())?r(n.tr.removeStoredMark(t)):r(n.tr.addStoredMark(t.create(e)));else{let l=!1,a=n.tr;for(let u=0;!l&&u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},kB=typeof navigator<"u"&&/Mac/.test(navigator.platform),EB=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var On=0;On<10;On++)Vs[48+On]=Vs[96+On]=String(On);for(var On=1;On<=24;On++)Vs[On+111]="F"+On;for(var On=65;On<=90;On++)Vs[On]=String.fromCharCode(On+32),cg[On]=String.fromCharCode(On);for(var g1 in Vs)cg.hasOwnProperty(g1)||(cg[g1]=Vs[g1]);function SB(t){var e=kB&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||EB&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?cg:Vs)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const CB=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function TB(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let l=0;l127)&&(i=Vs[r.keyCode])&&i!=o){let l=e[m1(i,r)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}function _B(t){const e=Us(t,(i,s)=>(s.priority??ot.Low)-(i.priority??ot.Low)),n=[],r=[];for(const i of e)$B(i)?n.push(i):r.push(i);let o;return new mi({key:RB,view:i=>(o=i,{}),props:{transformPasted:i=>{var s,l,a;const u=o.state.selection.$from,c=u.node().type.name,d=new Set(u.marks().map(h=>h.type.name));for(const h of n){if((s=h.ignoredNodes)!=null&&s.includes(c)||(l=h.ignoredMarks)!=null&&l.some(y=>d.has(y)))continue;const p=((a=i.content.firstChild)==null?void 0:a.textContent)??"",f=!o.state.selection.empty&&i.content.childCount===1&&p,g=lu(p,h.regexp)[0];if(f&&g&&h.type==="mark"&&h.replaceSelection){const{from:y,to:b}=o.state.selection,w=o.state.doc.slice(y,b),k=w.content.textBetween(0,w.content.size);if(typeof h.replaceSelection!="boolean"?h.replaceSelection(k):h.replaceSelection){const x=[],{getAttributes:S,markType:A}=h,C=Qe(S)?S(g,!0):S,O=A.create(C);return w.content.forEach(R=>{if(R.isText){const _=O.addToSet(R.marks);x.push(R.mark(_))}}),ae.maxOpen(J.fromArray(x))}}const{nodes:m,transformed:v}=LB(i.content,h,o.state.schema);v&&(i=h.type==="node"&&h.nodeType.isBlock?new ae(J.fromArray(m),0,0):new ae(J.fromArray(m),i.openStart,i.openEnd))}return FB(i)},handleDOMEvents:{paste:(i,s)=>{var l,a;const u=s;if(!((a=(l=i.props).editable)!=null&&a.call(l,i.state)))return!1;const{clipboardData:c}=u;if(!c)return!1;const d=[...c.items].map(p=>p.getAsFile()).filter(p=>!!p);if(d.length===0)return!1;const{selection:h}=i.state;for(const{fileHandler:p,regexp:f}of r){const g=f?d.filter(m=>f.test(m.type)):d;if(g.length!==0&&p({event:u,files:g,selection:h,view:i,type:"paste"}))return u.preventDefault(),!0}return!1},drop:(i,s)=>{var l,a,u;const c=s;if(!((a=(l=i.props).editable)!=null&&a.call(l,i.state)))return!1;const{dataTransfer:d,clientX:h,clientY:p}=c;if(!d)return!1;const f=zB(c);if(f.length===0)return!1;const g=((u=i.posAtCoords({left:h,top:p}))==null?void 0:u.pos)??i.state.selection.anchor;for(const{fileHandler:m,regexp:v}of r){const y=v?f.filter(b=>v.test(b.type)):f;if(y.length!==0&&m({event:c,files:y,pos:g,view:i,type:"drop"}))return c.preventDefault(),!0}return!1}}}})}var RB=new vl("pasteRule");function v1(t,e){return function n(r){const{fragment:o,rule:i,nodes:s}=r,{regexp:l,ignoreWhitespace:a,ignoredMarks:u,ignoredNodes:c}=i;let d=!1;return o.forEach(h=>{if(c!=null&&c.includes(h.type.name)||DB(h)){s.push(h);return}if(!h.isText){const g=n({fragment:h.content,rule:i,nodes:[]});d||(d=g.transformed);const m=J.fromArray(g.nodes);h.type.validContent(m)?s.push(h.copy(m)):s.push(...g.nodes);return}if(h.marks.some(g=>PB(g)||(u==null?void 0:u.includes(g.type.name)))){s.push(h);return}const p=h.text??"";let f=0;for(const g of lu(p,l)){const m=g[1],v=g[0];if(a&&(m==null?void 0:m.trim())===""||!v)return;const y=g.index,b=y+v.length;y>f&&s.push(h.cut(f,y));let w=h.cut(y,b);if(v&&m){const k=v.search(/\S/),x=y+v.indexOf(m),S=x+m.length;k&&s.push(h.cut(y,y+k)),w=h.cut(x,S)}t({nodes:s,rule:i,textNode:w,match:g,schema:e}),d=!0,f=b}p&&f0?[...r.files]:(n=r.items)!=null&&n.length?[...r.items].map(o=>o.getAsFile()).filter(o=>!!o):[]:[]}function FB(t){const e=ae.maxOpen(t.content);return e.openStart({events:{},emit(t,...e){(this.events[t]||[]).forEach(n=>n(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(n=>n!==e)}});var BB=Object.defineProperty,HB=Object.getOwnPropertyDescriptor,ge=(t,e,n,r)=>{for(var o=r>1?void 0:r?HB(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&BB(e,n,o),o},SM=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},ce=(t,e,n)=>(SM(t,e,"read from private field"),n?n.call(t):e.get(t)),qt=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},gn=(t,e,n,r)=>(SM(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function UB(t,e){return t===e}function OC(t){const{previousOptions:e,update:n,equals:r=UB}=t,o=La({...e,...n}),i=ye(),s=Vd(e);for(const a of s){const u=e[a],c=o[a];if(r(u,c)){i[a]={changed:!1};continue}i[a]={changed:!0,previousValue:u,value:c}}const l=a=>{const u=ye();for(const c of a){const d=i[c];d!=null&&d.changed&&(u[c]=d.value)}return u};return{changes:La(i),options:o,pickChanged:l}}var WB={[re.DUPLICATE_HELPER_NAMES]:"helper method",[re.DUPLICATE_COMMAND_NAMES]:"command method"};function CM(t){const{name:e,set:n,code:r}=t,o=WB[r];we(!n.has(e),{code:r,message:`There is a naming conflict for the name: ${e} used in this '${o}'. Please rename or remove from the editor to avoid runtime errors.`}),n.add(e)}function Fc(...t){return Ic(rB(...t).split(" ")).join(" ")}var IC="__IGNORE__",VB="__ALL__",hu=class{constructor(t,...[e]){this["~O"]={},this._mappedHandlers=ye(),this.populateMappedHandlers(),this._options=this._initialOptions=LR(t,this.constructor.defaultOptions,e??ye(),this.createDefaultHandlerOptions()),this._dynamicKeys=this.getDynamicKeys(),this.init()}get options(){return this._options}get dynamicKeys(){return this._dynamicKeys}get initialOptions(){return this._initialOptions}init(){}getDynamicKeys(){const t=[],{customHandlerKeys:e,handlerKeys:n,staticKeys:r}=this.constructor;for(const o of Vd(this._options))r.includes(o)||n.includes(o)||e.includes(o)||t.push(o);return t}ensureAllKeysAreDynamic(t){}setOptions(t){var e;const n=this.getDynamicOptions();this.ensureAllKeysAreDynamic(t);const{changes:r,options:o,pickChanged:i}=OC({previousOptions:n,update:t});this.updateDynamicOptions(o),(e=this.onSetOptions)==null||e.call(this,{reason:"set",changes:r,options:o,pickChanged:i,initialOptions:this._initialOptions})}resetOptions(){var t;const e=this.getDynamicOptions(),{changes:n,options:r,pickChanged:o}=OC({previousOptions:e,update:this._initialOptions});this.updateDynamicOptions(r),(t=this.onSetOptions)==null||t.call(this,{reason:"reset",options:r,changes:n,pickChanged:o,initialOptions:this._initialOptions})}getDynamicOptions(){return bb(this._options,[...this.constructor.customHandlerKeys,...this.constructor.handlerKeys])}updateDynamicOptions(t){this._options={...this._options,...t}}populateMappedHandlers(){for(const t of this.constructor.handlerKeys)this._mappedHandlers[t]=[]}createDefaultHandlerOptions(){const t=ye();for(const e of this.constructor.handlerKeys)t[e]=(...n)=>{var r;const{handlerKeyOptions:o}=this.constructor,i=(r=o[e])==null?void 0:r.reducer;let s=i==null?void 0:i.getDefault(...n);for(const[,l]of this._mappedHandlers[e]){const a=l(...n);if(s=i?i.accumulator(s,a,...n):a,jB(o,s,e))return s}return s};return t}addHandler(t,e,n=ot.Default){return this._mappedHandlers[t].push([n,e]),this.sortHandlers(t),()=>this._mappedHandlers[t]=this._mappedHandlers[t].filter(([,r])=>r!==e)}hasHandlers(t){return(this._mappedHandlers[t]??[]).length>0}sortHandlers(t){this._mappedHandlers[t]=Us(this._mappedHandlers[t],([e],[n])=>n-e)}addCustomHandler(t,e){var n;return((n=this.onAddCustomHandler)==null?void 0:n.call(this,{[t]:e}))??IR}};hu.defaultOptions={};hu.staticKeys=[];hu.handlerKeys=[];hu.handlerKeyOptions={};hu.customHandlerKeys=[];function jB(t,e,n){const{[VB]:r}=t,o=t[n];return!r&&!o?!1:!!(o&&o.earlyReturnValue!==IC&&(Qe(o.earlyReturnValue)?o.earlyReturnValue(e)===!0:e===o.earlyReturnValue)||r&&r.earlyReturnValue!==IC&&(Qe(r.earlyReturnValue)?r.earlyReturnValue(e)===!0:e===r.earlyReturnValue))}var Tm=class extends hu{constructor(...t){super(GB,...t),this["~E"]={},this._extensions=kb(this.createExtensions(),e=>e.constructor),this.extensionMap=new Map;for(const e of this._extensions)this.extensionMap.set(e.constructor,e)}get priority(){return this.priorityOverride??this.options.priority??this.constructor.defaultPriority}get constructorName(){return`${CR(this.name)}Extension`}get store(){return we(this._store,{code:re.MANAGER_PHASE_ERROR,message:"An error occurred while attempting to access the 'extension.store' when the Manager has not yet set created the lifecycle methods."}),La(this._store,{requireKeys:!0})}get extensions(){return this._extensions}replaceChildExtension(t,e){this.extensionMap.has(t)&&(this.extensionMap.set(t,e),this._extensions=this.extensions.map(n=>e.constructor===t?e:n))}createExtensions(){return[]}getExtension(t){const e=this.extensionMap.get(t);return we(e,{code:re.INVALID_GET_EXTENSION,message:`'${t.name}' does not exist within the preset: '${this.name}'`}),e}isOfType(t){return this.constructor===t}setStore(t){this._store||(this._store=t)}clone(...t){return new this.constructor(...t)}setPriority(t){this.priorityOverride=t}};Tm.defaultPriority=ot.Default;var ft=class extends Tm{static get[Bi](){return yn.PlainExtensionConstructor}get[Bi](){return yn.PlainExtension}},na=class extends Tm{static get[Bi](){return yn.MarkExtensionConstructor}get[Bi](){return yn.MarkExtension}get type(){return Mt(this.store.schema.marks,this.name)}constructor(...t){super(...t)}};na.disableExtraAttributes=!1;var Dn=class extends Tm{static get[Bi](){return yn.NodeExtensionConstructor}get[Bi](){return yn.NodeExtension}get type(){return Mt(this.store.schema.nodes,this.name)}constructor(...t){super(...t)}};Dn.disableExtraAttributes=!1;var GB={priority:void 0,extraAttributes:{},disableExtraAttributes:!1,exclude:{}};function TM(t){return uu(t)&&du(t,[yn.PlainExtension,yn.MarkExtension,yn.NodeExtension])}function KB(t){return uu(t)&&du(t,[yn.PlainExtensionConstructor,yn.MarkExtensionConstructor,yn.NodeExtensionConstructor])}function AM(t){return uu(t)&&du(t,yn.PlainExtension)}function Zh(t){return uu(t)&&du(t,yn.NodeExtension)}function Am(t){return uu(t)&&du(t,yn.MarkExtension)}function Ne(t){return e=>{const{defaultOptions:n,customHandlerKeys:r,handlerKeys:o,staticKeys:i,defaultPriority:s,handlerKeyOptions:l,...a}=t,u=e;n&&(u.defaultOptions=n),s&&(u.defaultPriority=s),l&&(u.handlerKeyOptions=l),u.staticKeys=i??[],u.handlerKeys=o??[],u.customHandlerKeys=r??[];for(const[c,d]of Object.entries(a))u[c]||(u[c]=d);return u}}var YB=class extends ft{constructor(){super(...arguments),this.attributeList=[],this.attributeObject=ye(),this.updateAttributes=(t=!0)=>{this.transformAttributes(),t&&this.store.commands.forceUpdate("attributes")}}get name(){return"attributes"}onCreate(){this.transformAttributes(),this.store.setExtensionStore("updateAttributes",this.updateAttributes)}transformAttributes(){var t,e,n;if(this.attributeObject=ye(),(t=this.store.managerSettings.exclude)!=null&&t.attributes){this.store.setStoreKey("attributes",this.attributeObject);return}this.attributeList=[];for(const r of this.store.extensions){if((e=r.options.exclude)!=null&&e.attributes)continue;const o=(n=r.createAttributes)==null?void 0:n.call(r),i={...o,class:Fc(...r.classNames??[],o==null?void 0:o.class)};this.attributeList.unshift(i)}for(const r of this.attributeList)this.attributeObject={...this.attributeObject,...r,class:Fc(this.attributeObject.class,r.class)};this.store.setStoreKey("attributes",this.attributeObject)}};function it(t={}){return(e,n,r)=>{(e.decoratedHelpers??(e.decoratedHelpers={}))[n]=t}}function le(t={}){return(e,n,r)=>{(e.decoratedCommands??(e.decoratedCommands={}))[n]=t}}function en(t){return(e,n,r)=>{(e.decoratedKeybindings??(e.decoratedKeybindings={}))[n]=t}}var XB=class{constructor(t){this.promiseCreator=t,this.failureHandlers=[],this.successHandlers=[],this.validateHandlers=[],this.generateCommand=()=>e=>{let n=!0;const{view:r,tr:o,dispatch:i}=e;if(!r)return!1;for(const l of this.validateHandlers)if(!l({...e,dispatch:()=>{}})){n=!1;break}return!i||!n?n:(this.promiseCreator(e).then(l=>{this.runHandlers(this.successHandlers,{value:l,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}).catch(l=>{this.runHandlers(this.failureHandlers,{error:l,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}),i(o),!0)}}validate(t,e="push"){return this.validateHandlers[e](t),this}success(t,e="push"){return this.successHandlers[e](t),this}failure(t,e="push"){return this.failureHandlers[e](t),this}runHandlers(t,e){var n;for(const r of t)if(!r({...e,dispatch:()=>{}}))break;(n=e.dispatch)==null||n.call(e,e.tr)}};function js(t){const{type:e,attrs:n,range:r,selection:o}=t;return i=>{const{dispatch:s,tr:l,state:a}=i,u=Ee(e)?a.schema.marks[e]:e;if(we(u,{code:re.SCHEMA,message:`Mark type: ${e} does not exist on the current schema.`}),r||o){const{from:c,to:d}=cr(o??r??l.selection,l.doc);return lg({trState:l,type:e,...r})?s==null||s(l.removeMark(c,d,u)):s==null||s(l.addMark(c,d,u.create(n))),!0}return Ad(wB(u,n))(i)}}function qB(t,e,n){for(const{$from:r,$to:o}of n){let i=r.depth===0?e.type.allowsMarkType(t):!1;if(e.nodesBetween(r.pos,o.pos,s=>{if(i)return!1;i=s.inlineContent&&s.type.allowsMarkType(t)}),i)return!0}return!1}function ZB(t,e,n){return({tr:r,dispatch:o,state:i})=>{const s=cr(n??r.selection,r.doc),l=IF(s),a=Ee(t)?i.schema.marks[t]:t;if(we(a,{code:re.SCHEMA,message:`Mark type: ${t} does not exist on the current schema.`}),s.empty&&!l||!qB(a,r.doc,s.ranges))return!1;if(!o)return!0;if(l)return r.removeStoredMark(a),e&&r.addStoredMark(a.create(e)),o(r),!0;let u=!1;for(const{$from:c,$to:d}of s.ranges){if(u)break;u=r.doc.rangeHasMark(c.pos,d.pos,a)}for(const{$from:c,$to:d}of s.ranges)u&&r.removeMark(c.pos,d.pos,a),e&&r.addMark(c.pos,d.pos,a.create(e));return o(r),!0}}function JB(t,e={}){return({tr:n,dispatch:r,state:o})=>{const i=o.schema,s=n.selection,{from:l=s.from,to:a=l??s.to,marks:u={}}=e;if(!r)return!0;n.insertText(t,l,a);const c=Mt(n.steps,n.steps.length-1).getMap().map(a);for(const[d,h]of an(u))n.addMark(l,c,Mt(i.marks,d).create(h));return r(n),!0}}var Ue=class extends ft{constructor(){super(...arguments),this.decorated=new Map,this.forceUpdateTransaction=(t,...e)=>{const{forcedUpdates:n}=this.getCommandMeta(t);return this.setCommandMeta(t,{forcedUpdates:Ic([...n,...e])}),t}}get name(){return"commands"}get transaction(){const t=this.store.getState();this._transaction||(this._transaction=t.tr);const e=this._transaction.before.eq(t.doc),n=!Hs(this._transaction.steps);if(!e){const r=t.tr;if(n)for(const o of this._transaction.steps)r.step(o);this._transaction=r}return this._transaction}onCreate(){this.store.setStoreKey("getForcedUpdates",this.getForcedUpdates.bind(this))}onView(t){var e;const{extensions:n,helpers:r}=this.store,o=ye(),i=new Set;let s=ye();const l=u=>{var c;const d=ye(),h=()=>u??this.transaction;let p=[];const f=()=>p;for(const[m,v]of Object.entries(o))(c=s[m])!=null&&c.disableChaining||(d[m]=this.chainedFactory({chain:d,command:v.original,getTr:h,getChain:f}));const g=m=>{we(m===h(),{message:"Chaining currently only supports `CommandFunction` methods which do not use the `state.tr` property. Instead you should use the provided `tr` property."})};return d.run=(m={})=>{const v=p;p=[];for(const y of v)if(!y(g)&&m.exitEarly)return;t.dispatch(h())},d.tr=()=>{const m=p;p=[];for(const v of m)v(g);return h()},d.enabled=()=>{for(const m of p)if(!m())return!1;return!0},d.new=m=>l(m),d};for(const u of n){const c=((e=u.createCommands)==null?void 0:e.call(u))??{},d=u.decoratedCommands??{},h={};s={...s,decoratedCommands:d};for(const[p,f]of Object.entries(d)){const g=Ee(f.shortcut)&&f.shortcut.startsWith("_|")?{shortcut:r.getNamedShortcut(f.shortcut,u.options)}:void 0;this.updateDecorated(p,{...f,name:u.name,...g}),c[p]=u[p].bind(u),f.active&&(h[p]=()=>{var m;return((m=f.active)==null?void 0:m.call(f,u.options,this.store))??!1})}jd(c)||this.addCommands({active:h,names:i,commands:o,extensionCommands:c})}const a=l();for(const[u,c]of Object.entries(a))l[u]=c;this.store.setStoreKey("commands",o),this.store.setStoreKey("chain",l),this.store.setExtensionStore("commands",o),this.store.setExtensionStore("chain",l)}onStateUpdate({state:t}){this._transaction=t.tr}createPlugin(){return{}}customDispatch(t){return t}insertText(t,e={}){return Ee(t)?JB(t,e):this.store.createPlaceholderCommand({promise:t,placeholder:{type:"inline"},onSuccess:(n,r,o)=>this.insertText(n,{...e,...r})(o)}).generateCommand()}selectText(t,e={}){return({tr:n,dispatch:r})=>{const o=cr(t,n.doc);return n.selection.anchor===o.anchor&&n.selection.head===o.head&&!e.forceUpdate?!1:(r==null||r(n.setSelection(o)),!0)}}selectMark(t){return e=>{const{tr:n}=e,r=Hi(n.selection.$from,t);return r?this.store.commands.selectText.original({from:r.from,to:r.to})(e):!1}}delete(t){return({tr:e,dispatch:n})=>{const{from:r,to:o}=t??e.selection;return n==null||n(e.delete(r,o)),!0}}emptyUpdate(t){return({tr:e,dispatch:n})=>(n&&(t==null||t(),n(e)),!0)}forceUpdate(...t){return({tr:e,dispatch:n})=>(n==null||n(this.forceUpdateTransaction(e,...t)),!0)}updateNodeAttributes(t,e){return({tr:n,dispatch:r})=>(r==null||r(n.setNodeMarkup(t,void 0,e)),!0)}setContent(t,e){return n=>{const{tr:r,dispatch:o}=n,i=this.store.manager.createState({content:t,selection:e});return i?(o==null||o(r.replaceRangeWith(0,r.doc.nodeSize-2,i.doc)),!0):!1}}resetContent(){return t=>{const{tr:e,dispatch:n}=t,r=this.store.manager.createEmptyDoc();return r?this.setContent(r)(t):(n==null||n(e.delete(0,e.doc.nodeSize)),!0)}}emptySelection(){return({tr:t,dispatch:e})=>t.selection.empty?!1:(e==null||e(t.setSelection(Me.near(t.selection.$anchor))),!0)}insertNewLine(){return({dispatch:t,tr:e})=>ta(e.selection)?(t==null||t(e.insertText(` -`)),!0):!1}insertNode(t,e={}){return({dispatch:n,tr:r,state:o})=>{var i;const{attrs:s,range:l,selection:a,replaceEmptyParentBlock:u=!1}=e,{from:c,to:d,$from:h}=cr(a??l??r.selection,r.doc);if(Xh(t)||kF(t)){const v=h.before(h.depth);return n==null||n(u&&c===d&&xm(h.parent)?r.replaceWith(v,v+h.parent.nodeSize,t):r.replaceWith(c,d,t)),!0}const p=Ee(t)?o.schema.nodes[t]:t;we(p,{code:re.SCHEMA,message:`The requested node type ${t} does not exist in the schema.`});const f=(i=e.marks)==null?void 0:i.map(v=>{if(v instanceof je)return v;const y=Ee(v)?o.schema.marks[v]:v;return we(y,{code:re.SCHEMA,message:`The requested mark type ${v} does not exist in the schema.`}),y.create()}),g=p.createAndFill(s,Ee(e.content)?o.schema.text(e.content):e.content,f);if(!g)return!1;const m=c!==d;return n==null||n(m?r.replaceRangeWith(c,d,g):r.insert(c,g)),!0}}focus(t){return e=>{const{dispatch:n,tr:r}=e,{view:o}=this.store;if(t===!1||o.hasFocus()&&(t===void 0||t===!0))return!1;if(t===void 0||t===!0){const{from:i=0,to:s=i}=r.selection;t={from:i,to:s}}return n&&this.delayedFocus(),this.selectText(t)(e)}}blur(t){return e=>{const{view:n}=this.store;return n.hasFocus()?(requestAnimationFrame(()=>{n.dom.blur()}),t?this.selectText(t)(e):!0):!1}}setBlockNodeType(t,e,n,r=!0){return Zd(t,e,n,r)}toggleWrappingNode(t,e,n){return dM(t,e,n)}toggleBlockNodeItem(t){return Vb(t)}wrapInNode(t,e,n){return uM(t,e,n)}applyMark(t,e,n){return ZB(t,e,n)}toggleMark(t){return js(t)}removeMark(t){return pM(t)}setMeta(t,e){return({tr:n})=>(n.setMeta(t,e),!0)}selectAll(){return this.selectText("all")}copy(){return t=>t.tr.selection.empty?!1:(t.dispatch&&document.execCommand("copy"),!0)}paste(){return this.store.createPlaceholderCommand({promise:async()=>{var t;return(t=navigator.clipboard)!=null&&t.readText?await navigator.clipboard.readText():""},placeholder:{type:"inline"},onSuccess:(t,e,n)=>this.insertNode(F0({content:t,schema:n.state.schema}),{selection:e})(n)}).generateCommand()}cut(){return t=>t.tr.selection.empty?!1:(t.dispatch&&document.execCommand("cut"),!0)}replaceText(t){return XF(t)}getAllCommandOptions(){const t={};for(const[e,n]of this.decorated)jd(n)||(t[e]=n);return t}getCommandOptions(t){return this.decorated.get(t)}getCommandProp(){return{tr:this.transaction,dispatch:this.store.view.dispatch,state:this.store.view.state,view:this.store.view}}updateDecorated(t,e){if(!e){this.decorated.delete(t);return}const n=this.decorated.get(t)??{name:""};this.decorated.set(t,{...n,...e})}handleIosFocus(){yr.isIos&&this.store.view.dom.focus()}delayedFocus(){this.handleIosFocus(),requestAnimationFrame(()=>{this.store.view.focus(),this.store.view.dispatch(this.transaction.scrollIntoView())})}getForcedUpdates(t){return this.getCommandMeta(t).forcedUpdates}getCommandMeta(t){const e=t.getMeta(this.pluginKey)??{};return{...QB,...e}}setCommandMeta(t,e){const n=this.getCommandMeta(t);t.setMeta(this.pluginKey,{...n,...e})}addCommands(t){const{extensionCommands:e,commands:n,names:r,active:o}=t;for(const[i,s]of an(e))CM({name:i,set:r,code:re.DUPLICATE_COMMAND_NAMES}),we(!eH.has(i),{code:re.DUPLICATE_COMMAND_NAMES,message:"The command name you chose is forbidden."}),n[i]=this.createUnchainedCommand(s,o[i])}unchainedFactory(t){return(...e)=>{const{shouldDispatch:n=!0,command:r}=t,{view:o}=this.store,{state:i}=o;let s;return n&&(s=o.dispatch),r(...e)({state:i,dispatch:s,view:o,tr:i.tr})}}createUnchainedCommand(t,e){const n=this.unchainedFactory({command:t});return n.enabled=this.unchainedFactory({command:t,shouldDispatch:!1}),n.isEnabled=n.enabled,n.original=t,n.active=e,n}chainedFactory(t){return(...e)=>{const{chain:n,command:r,getTr:o,getChain:i}=t,s=i(),{view:l}=this.store,{state:a}=l;return s.push(u=>r(...e)({state:a,dispatch:u,view:l,tr:o()})),n}}};ge([le()],Ue.prototype,"customDispatch",1);ge([le()],Ue.prototype,"insertText",1);ge([le()],Ue.prototype,"selectText",1);ge([le()],Ue.prototype,"selectMark",1);ge([le()],Ue.prototype,"delete",1);ge([le()],Ue.prototype,"emptyUpdate",1);ge([le()],Ue.prototype,"forceUpdate",1);ge([le()],Ue.prototype,"updateNodeAttributes",1);ge([le()],Ue.prototype,"setContent",1);ge([le()],Ue.prototype,"resetContent",1);ge([le()],Ue.prototype,"emptySelection",1);ge([le()],Ue.prototype,"insertNewLine",1);ge([le()],Ue.prototype,"insertNode",1);ge([le()],Ue.prototype,"focus",1);ge([le()],Ue.prototype,"blur",1);ge([le()],Ue.prototype,"setBlockNodeType",1);ge([le()],Ue.prototype,"toggleWrappingNode",1);ge([le()],Ue.prototype,"toggleBlockNodeItem",1);ge([le()],Ue.prototype,"wrapInNode",1);ge([le()],Ue.prototype,"applyMark",1);ge([le()],Ue.prototype,"toggleMark",1);ge([le()],Ue.prototype,"removeMark",1);ge([le()],Ue.prototype,"setMeta",1);ge([le({description:({t})=>t(Ws.SELECT_ALL_DESCRIPTION),label:({t})=>t(Ws.SELECT_ALL_LABEL),shortcut:oe.SelectAll})],Ue.prototype,"selectAll",1);ge([le({description:({t})=>t(Ws.COPY_DESCRIPTION),label:({t})=>t(Ws.COPY_LABEL),shortcut:oe.Copy,icon:"fileCopyLine"})],Ue.prototype,"copy",1);ge([le({description:({t})=>t(Ws.PASTE_DESCRIPTION),label:({t})=>t(Ws.PASTE_LABEL),shortcut:oe.Paste,icon:"clipboardLine"})],Ue.prototype,"paste",1);ge([le({description:({t})=>t(Ws.CUT_DESCRIPTION),label:({t})=>t(Ws.CUT_LABEL),shortcut:oe.Cut,icon:"scissorsFill"})],Ue.prototype,"cut",1);ge([le()],Ue.prototype,"replaceText",1);ge([it()],Ue.prototype,"getAllCommandOptions",1);ge([it()],Ue.prototype,"getCommandOptions",1);ge([it()],Ue.prototype,"getCommandProp",1);Ue=ge([Ne({defaultPriority:ot.Highest,defaultOptions:{trackerClassName:"remirror-tracker-position",trackerNodeName:"span"},staticKeys:["trackerClassName","trackerNodeName"]})],Ue);var QB={forcedUpdates:[]},eH=new Set(["run","chain","original","raw","enabled","tr","new"]),Uo=class extends ft{constructor(){super(...arguments),this.placeholders=He.empty,this.placeholderWidgets=new Map,this.createPlaceholderCommand=t=>{const e=Oc(),{promise:n,placeholder:r,onFailure:o,onSuccess:i}=t;return new XB(n).validate(s=>this.addPlaceholder(e,r)(s)).success(s=>{const{state:l,tr:a,dispatch:u,view:c,value:d}=s,h=this.store.helpers.findPlaceholder(e);if(!h){const p=new Error("The placeholder has been removed");return(o==null?void 0:o({error:p,state:l,tr:a,dispatch:u,view:c}))??!1}return this.removePlaceholder(e)({state:l,tr:a,view:c,dispatch:()=>{}}),i(d,h,{state:l,tr:a,dispatch:u,view:c})}).failure(s=>(this.removePlaceholder(e)({...s,dispatch:()=>{}}),(o==null?void 0:o(s))??!1))}}get name(){return"decorations"}onCreate(){this.store.setExtensionStore("createPlaceholderCommand",this.createPlaceholderCommand)}createPlugin(){return{state:{init:()=>{},apply:t=>{var e,n,r,o,i,s;const{added:l,clearTrackers:a,removed:u,updated:c}=this.getMeta(t);if(a){this.placeholders=He.empty;for(const[,d]of this.placeholderWidgets)(n=(e=d.spec).onDestroy)==null||n.call(e,this.store.view,d.spec.element);this.placeholderWidgets.clear();return}this.placeholders=this.placeholders.map(t.mapping,t.doc,{onRemove:d=>{var h,p;const f=this.placeholderWidgets.get(d.id);f&&((p=(h=f.spec).onDestroy)==null||p.call(h,this.store.view,f.spec.element))}});for(const[,d]of this.placeholderWidgets)(o=(r=d.spec).onUpdate)==null||o.call(r,this.store.view,d.from,d.spec.element,d.spec.data);for(const d of l){if(d.type==="inline"){this.addInlinePlaceholder(d,t);continue}if(d.type==="node"){this.addNodePlaceholder(d,t);continue}if(d.type==="widget"){this.addWidgetPlaceholder(d,t);continue}}for(const{id:d,data:h}of c){const p=this.placeholderWidgets.get(d);if(!p)continue;const f=vt.widget(p.from,p.spec.element,{...p.spec,data:h});this.placeholders=this.placeholders.remove([p]).add(t.doc,[f]),this.placeholderWidgets.set(d,f)}for(const d of u){const h=this.placeholders.find(void 0,void 0,f=>f.id===d&&f.__type===Dl),p=this.placeholderWidgets.get(d);p&&((s=(i=p.spec).onDestroy)==null||s.call(i,this.store.view,p.spec.element)),this.placeholders=this.placeholders.remove(h),this.placeholderWidgets.delete(d)}}},props:{decorations:t=>{let e=this.options.decorations(t);e=e.add(t.doc,this.placeholders.find());for(const n of this.store.extensions){if(!n.createDecorations)continue;const r=n.createDecorations(t).find();e=e.add(t.doc,r)}return e},handleDOMEvents:{blur:t=>(this.options.persistentSelectionClass&&t.dispatch(t.state.tr.setMeta(LC,!1)),!1),focus:t=>(this.options.persistentSelectionClass&&t.dispatch(t.state.tr.setMeta(LC,!0)),!1)}}}}updateDecorations(){return({tr:t,dispatch:e})=>(e==null||e(t),!0)}addPlaceholder(t,e,n){return({dispatch:r,tr:o})=>this.addPlaceholderTransaction(t,e,o,!r)?(r==null||r(n?o.deleteSelection():o),!0):!1}updatePlaceholder(t,e){return({dispatch:n,tr:r})=>this.updatePlaceholderTransaction({id:t,data:e,tr:r,checkOnly:!n})?(n==null||n(r),!0):!1}removePlaceholder(t){return({dispatch:e,tr:n})=>this.removePlaceholderTransaction({id:t,tr:n,checkOnly:!e})?(e==null||e(n),!0):!1}clearPlaceholders(){return({tr:t,dispatch:e})=>this.clearPlaceholdersTransaction({tr:t,checkOnly:!e})?(e==null||e(t),!0):!1}findPlaceholder(t){return this.findAllPlaceholders().get(t)}findAllPlaceholders(){const t=new Map,e=this.placeholders.find(void 0,void 0,n=>n.__type===Dl);for(const n of e)t.set(n.spec.id,{from:n.from,to:n.to});return t}createDecorations(t){var e,n,r;const{persistentSelectionClass:o}=this.options;return!o||(e=this.store.view)!=null&&e.hasFocus()||(r=(n=this.store.helpers).isInteracting)!=null&&r.call(n)?He.empty:nH(t,He.empty,{class:Ee(o)?o:"selection"})}onApplyState(){}addWidgetPlaceholder(t,e){const{pos:n,createElement:r,onDestroy:o,onUpdate:i,className:s,nodeName:l,id:a,type:u}=t,c=(r==null?void 0:r(this.store.view,n))??document.createElement(l);c.classList.add(s);const d=vt.widget(n,c,{id:a,__type:Dl,type:u,element:c,onDestroy:o,onUpdate:i});this.placeholderWidgets.set(a,d),this.placeholders=this.placeholders.add(e.doc,[d])}addInlinePlaceholder(t,e){const{from:n=e.selection.from,to:r=e.selection.to,className:o,nodeName:i,id:s,type:l}=t;let a;if(n===r){const u=document.createElement(i);u.classList.add(o),a=vt.widget(n,u,{id:s,type:l,__type:Dl,widget:u})}else a=vt.inline(n,r,{nodeName:i,class:o},{id:s,__type:Dl});this.placeholders=this.placeholders.add(e.doc,[a])}addNodePlaceholder(t,e){const{pos:n,className:r,nodeName:o,id:i}=t,s=qr(n)?e.doc.resolve(n):e.selection.$from,l=qr(n)?s.nodeAfter?{pos:n,end:s.nodeAfter.nodeSize}:void 0:hF(s);if(!l)return;const a=vt.node(l.pos,l.end,{nodeName:o,class:r},{id:i,__type:Dl});this.placeholders=this.placeholders.add(e.doc,[a])}withRequiredBase(t,e){const{placeholderNodeName:n,placeholderClassName:r}=this.options,{nodeName:o=n,className:i,...s}=e,l=(i?[r,i]:[r]).join(" ");return{nodeName:o,className:l,...s,id:t}}getMeta(t){const e=t.getMeta(this.pluginKey)??{};return{...tH,...e}}setMeta(t,e){const n=this.getMeta(t);t.setMeta(this.pluginKey,{...n,...e})}addPlaceholderTransaction(t,e,n,r=!1){if(this.findPlaceholder(t))return!1;if(r)return!0;const{added:i}=this.getMeta(n);return this.setMeta(n,{added:[...i,this.withRequiredBase(t,e)]}),!0}updatePlaceholderTransaction(t){const{id:e,tr:n,checkOnly:r=!1,data:o}=t;if(!this.findPlaceholder(e))return!1;if(r)return!0;const{updated:s}=this.getMeta(n);return this.setMeta(n,{updated:Ic([...s,{id:e,data:o}])}),!0}removePlaceholderTransaction(t){const{id:e,tr:n,checkOnly:r=!1}=t;if(!this.findPlaceholder(e))return!1;if(r)return!0;const{removed:i}=this.getMeta(n);return this.setMeta(n,{removed:Ic([...i,e])}),!0}clearPlaceholdersTransaction(t){const{tr:e,checkOnly:n=!1}=t;return this.getPluginState()===He.empty?!1:(n||this.setMeta(e,{clearTrackers:!0}),!0)}};ge([le()],Uo.prototype,"updateDecorations",1);ge([le()],Uo.prototype,"addPlaceholder",1);ge([le()],Uo.prototype,"updatePlaceholder",1);ge([le()],Uo.prototype,"removePlaceholder",1);ge([le()],Uo.prototype,"clearPlaceholders",1);ge([it()],Uo.prototype,"findPlaceholder",1);ge([it()],Uo.prototype,"findAllPlaceholders",1);Uo=ge([Ne({defaultOptions:{persistentSelectionClass:void 0,placeholderClassName:"placeholder",placeholderNodeName:"span"},staticKeys:["placeholderClassName","placeholderNodeName"],handlerKeys:["decorations"],handlerKeyOptions:{decorations:{reducer:{accumulator:(t,e,n)=>t.add(n.doc,e.find()),getDefault:()=>He.empty}}},defaultPriority:ot.Low})],Uo);var tH={added:[],updated:[],clearTrackers:!1,removed:[]},Dl="placeholderDecoration",LC="persistentSelectionFocus";function nH(t,e,n){const{selection:r,doc:o}=t;if(r.empty)return e;const{from:i,to:s}=r,l=qh(r)?vt.node(i,s,n):vt.inline(i,s,n);return e.add(o,[l])}var H0=class extends ft{get name(){return"docChanged"}onStateUpdate(t){const{firstUpdate:e,transactions:n,tr:r}=t;e||(n??[r]).some(o=>o==null?void 0:o.docChanged)&&this.options.docChanged(t)}};H0=ge([Ne({handlerKeys:["docChanged"],handlerKeyOptions:{docChanged:{earlyReturnValue:!1}},defaultPriority:ot.Lowest})],H0);var mo=class extends ft{get name(){return"helpers"}onCreate(){var t;this.store.setStringHandler("text",this.textToProsemirrorNode.bind(this)),this.store.setStringHandler("html",F0);const e=ye(),n=ye(),r=ye(),o=new Set;for(const i of this.store.extensions){Zh(i)&&(n[i.name]=l=>eM({state:this.store.getState(),type:i.type,attrs:l}),r[i.name]=l=>{var a;return(a=qd({state:this.store.getState(),type:i.type,attrs:l}))==null?void 0:a.node.attrs}),Am(i)&&(n[i.name]=l=>lg({trState:this.store.getState(),type:i.type,attrs:l}),r[i.name]=l=>{const a=Hi(this.store.getState().selection.$from,i.type);if(!a||!l)return a==null?void 0:a.mark.attrs;if(Hb(a.mark,l))return a.mark.attrs});const s=((t=i.createHelpers)==null?void 0:t.call(i))??{};for(const l of Object.keys(i.decoratedHelpers??{}))s[l]=i[l].bind(i);if(!jd(s))for(const[l,a]of an(s))CM({name:l,set:o,code:re.DUPLICATE_HELPER_NAMES}),e[l]=a}this.store.setStoreKey("attrs",r),this.store.setStoreKey("active",n),this.store.setStoreKey("helpers",e),this.store.setExtensionStore("attrs",r),this.store.setExtensionStore("active",n),this.store.setExtensionStore("helpers",e)}isSelectionEmpty(t=this.store.getState()){return Bb(t)}isViewEditable(t=this.store.getState()){var e,n;return((n=(e=this.store.view.props).editable)==null?void 0:n.call(e,t))??!1}getStateJSON(t=this.store.getState()){return t.toJSON()}getJSON(t=this.store.getState()){return t.doc.toJSON()}getRemirrorJSON(t=this.store.getState()){return this.getJSON(t)}insertHtml(t,e){return n=>{const{state:r}=n,o=F0({content:t,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(o,e)(n)}}getText({lineBreakDivider:t=` +If you are using Node.js, you can install JSDOM and Remirror will try to use it automatically, or you can create a fake document and pass it to Remirror`)}function cM(t){var e;return(t==null?void 0:t.defaultView)??(typeof window<"u"?window:void 0)??((e=h2())==null?void 0:e.defaultView)}function zF(t){return cM(t==null?void 0:t.ownerDocument)}function FF(t){const e=cM(t)??km().defaultView;if(e)return e;throw new Error("Unable to retrieve the window from the global scope")}function BF(t,e=km()){const n=$F(t,t.type.schema)?t.content:J.from(t);return Vr.fromSchema(t.type.schema).serializeFragment(n,{document:e})}function HF(t,e){return new(FF(e)).DOMParser().parseFromString(`${t}`,"text/html").body}function UF(t,e=km()){const n=e.createElement("div");return n.append(BF(t,e)),n.innerHTML}function H0(t){const{content:e,schema:n,document:r,fragment:o=!1,...i}=t,s=HF(e,r),l=Za.fromSchema(n);return o?l.parseSlice(s,{...RC,...i}).content:l.parse(s,{...RC,...i})}var RC={preserveWhitespace:!1};function Em(t,e){const n=Vd(e.defaults());return xb({...t},n)}function WF(t,e){let n="";e&&(n=`${e.trim()}`);const r=ZP(t);if(!r)return n;const o=(n.endsWith(";")," ");return`${n}${o}${r}`}var VF={remove(t,e){let n=t;for(const r of e)r.invalidParentNode||(n=j4(r.path,n));return n}};function jF({json:t,schema:e,...n}){const r=new Set(Vd(e.marks)),o=new Set(Vd(e.nodes)),i=uM({json:t,path:[],validNodes:o,validMarks:r});return{json:t,invalidContent:i,transformers:VF,...n}}function uM(t){const{json:e,validMarks:n,validNodes:r,path:o=[]}=t,i={validMarks:n,validNodes:r},s=[],{type:l,marks:a,content:u}=e;let{invalidParentMark:c=!1,invalidParentNode:d=!1}=t;if(a){const h=[];for(const[p,f]of a.entries()){const g=Ee(f)?f:f.type;n.has(g)||(h.unshift({name:g,path:[...o,"marks",`${p}`],type:"mark",invalidParentMark:c,invalidParentNode:d}),c=!0)}s.push(...h)}if(r.has(l)||(s.push({name:l,type:"node",path:o,invalidParentMark:c,invalidParentNode:d}),d=!0),u){const h=[];for(const[p,f]of u.entries())h.unshift(...uM({...i,json:f,path:[...o,"content",`${p}`],invalidParentMark:c,invalidParentNode:d}));s.unshift(...h)}return s}function GF(t){return!!(ta(t)&&t.$cursor&&t.$cursor.parentOffset>=t.$cursor.parent.content.size)}function U0(t){return!!(ta(t)&&t.$cursor&&t.$cursor.parentOffset<=0)}function MC(t){const e=Be.atStart(t.$anchor.doc);return!!(U0(t)&&e.anchor===t.anchor)}function KF(t){return({dispatch:e,tr:n})=>{const{type:r,attrs:o=ye(),appendText:i,range:s}=t,l=s?Me.between(n.doc.resolve(s.from),n.doc.resolve(s.to)):n.selection,{$from:a,from:u,to:c}=l;let d=a.depth===0?n.doc.type.allowsMarkType(r):!1;return n.doc.nodesBetween(u,c,h=>{if(d)return!1;if(h.inlineContent&&h.type.allowsMarkType(r)){d=!0;return}}),d?(e==null||e(n.addMark(u,c,r.create(o))&&i?n.insertText(i):n),!0):!1}}function YF({tr:t,dispatch:e}){const{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&cu(o);return!qr(i)||!o?!1:(e==null||e(t.lift(o,i).scrollIntoView()),!0)}function dM(t,e={},n){return function(r){const{tr:o,dispatch:i,state:s}=r,l=Ee(t)?Mt(s.schema.nodes,t):t,{from:a,to:u}=cr(n??o.selection,o.doc),c=o.doc.resolve(a),d=o.doc.resolve(u),h=c.blockRange(d),p=h&&Ab(h,l,e);return!p||!h?!1:(i==null||i(o.wrap(h,p).scrollIntoView()),!0)}}function hM(t,e={},n){return r=>{const{tr:o,state:i}=r,s=Ee(t)?Mt(i.schema.nodes,t):t;return qd({state:o,type:s,attrs:e})?YF(r):dM(t,e,n)(r)}}function Zd(t,e,n,r=!0){return function(o){const{tr:i,dispatch:s,state:l}=o,a=Ee(t)?Mt(l.schema.nodes,t):t,{from:u,to:c}=cr(n??i.selection,i.doc);let d=!1,h;return i.doc.nodesBetween(u,c,(p,f)=>{if(d)return!1;if(!p.isTextblock||p.hasMarkup(a,e))return;if(p.type===a){d=!0,h=p.attrs;return}const g=i.doc.resolve(f),m=g.index();d=g.parent.canReplaceWith(m,m+1,a),d&&(h=g.parent.attrs)}),d?(s==null||s(i.setBlockType(u,c,a,{...r?h:{},...e}).scrollIntoView()),!0):!1}}function Gb(t){return e=>{const{tr:n,state:r}=e,{type:o,attrs:i,preserveAttrs:s=!0}=t,l=qd({state:n,type:o,attrs:i}),a=t.toggleType??wm(r.schema);if(l)return Zd(a,{...s?l.node.attrs:{},...i})(e);const u=qd({state:n,type:a,attrs:i});return Zd(o,{...s?u==null?void 0:u.node.attrs:{},...i})(e)}}function XF(t=0){const e=navigator.userAgent.match(/Chrom(e|ium)\/(\d+)\./);return e?Number.parseInt(Mt(e,2),10)>=t:!1}function qF(t,e){let{head:n,empty:r,anchor:o}=t;for(const i of e.steps)n=i.getMap().map(n);r?e.setSelection(Me.near(e.doc.resolve(n))):e.setSelection(Me.between(e.doc.resolve(o),e.doc.resolve(n)))}function ZF(t){const{attrs:e={},appendText:n="",content:r="",keepSelection:o=!1,range:i}=t;return({state:s,tr:l,dispatch:a})=>{var u;const c=s.schema,d=cr(t.selection??i??l.selection,l.doc),h=d.$from.index(),{from:p,to:f,$from:g}=d,m=Ee(t.type)?c.nodes[t.type]??c.marks[t.type]:t.type;if(we(Ee(t.type)?m:!0,{code:re.SCHEMA,message:`Schema contains no marks or nodes with name ${m}`}),xF(m)){if(!g.parent.canReplaceWith(h,h,m))return!1;l.replaceWith(p,f,m.create(e,r?c.text(r):void 0))}else we(r,{message:"`replaceText` cannot be called without content when using a mark type"}),l.replaceWith(p,f,c.text(r,nM(m)?[m.create(e)]:void 0));return n&&l.insertText(n),o&&qF(s.selection,l),a&&(XF(60)&&((u=document.getSelection())==null||u.empty()),a(l)),!0}}function pM(t,e){const n=t.parent.childAfter(t.parentOffset);if(!n.node)return;const{marks:r,nodeSize:o}=n.node;if(r[0])return r[0].type;const s=t.start()+n.offset+o;return pM(t.doc.resolve(s+1))}function fM(t){return({dispatch:e,tr:n,state:r})=>{const{type:o,expand:i=!0,range:s}=t,l=cr(t.selection??s??n.selection,n.doc);let{from:a,to:u,$from:c,$to:d}=l;const h=Ee(o)?r.schema.marks[o]:o;h!==null&&we(h,{code:re.SCHEMA,message:`Mark type: ${o} does not exist on the current schema.`});const p=h??pM(c);if(!p)return!1;const f=Hi(c,p,d);return i&&f&&(a=Math.max(0,Math.min(a,f.from)),u=Math.min(Math.max(u,f.to),n.doc.nodeSize-2)),e==null||e(n.removeMark(a,qr(u)?u:a,nM(h)?h:void 0)),!0}}function JF(t){const e=["command","cmd","meta"];return yr.isMac&&e.push("mod"),e.includes(t)}function QF(t){const e=["control","ctrl"];return yr.isMac||e.push("mod"),e.includes(t)}function eB(t){const e=[];for(let n of t.split("-")){if(n=n.toLowerCase(),JF(n)){e.push({type:"modifier",symbol:"⌘",key:"command",i18n:nn.COMMAND_KEY});continue}if(QF(n)){e.push({type:"modifier",symbol:"⌃",key:"control",i18n:nn.CONTROL_KEY});continue}switch(n){case"shift":e.push({type:"modifier",symbol:"⇧",key:n,i18n:nn.SHIFT_KEY});continue;case"alt":e.push({type:"modifier",symbol:"⌥",key:n,i18n:nn.ALT_KEY});continue;case` +`:case"\r":case"enter":e.push({type:"named",symbol:"↵",key:n,i18n:nn.ENTER_KEY});continue;case"backspace":e.push({type:"named",symbol:"⌫",key:n,i18n:nn.BACKSPACE_KEY});continue;case"delete":e.push({type:"named",symbol:"⌦",key:n,i18n:nn.DELETE_KEY});continue;case"escape":e.push({type:"named",symbol:"␛",key:n,i18n:nn.ESCAPE_KEY});continue;case"tab":e.push({type:"named",symbol:"⇥",key:n,i18n:nn.TAB_KEY});continue;case"capslock":e.push({type:"named",symbol:"⇪",key:n,i18n:nn.CAPS_LOCK_KEY});continue;case"space":e.push({type:"named",symbol:"␣",key:n,i18n:nn.SPACE_KEY});continue;case"pageup":e.push({type:"named",symbol:"⤒",key:n,i18n:nn.PAGE_UP_KEY});continue;case"pagedown":e.push({type:"named",symbol:"⤓",key:n,i18n:nn.PAGE_DOWN_KEY});continue;case"home":e.push({type:"named",key:n,i18n:nn.HOME_KEY});continue;case"end":e.push({type:"named",key:n,i18n:nn.END_KEY});continue;case"arrowleft":e.push({type:"named",symbol:"←",key:n,i18n:nn.ARROW_LEFT_KEY});continue;case"arrowright":e.push({type:"named",symbol:"→",key:n,i18n:nn.ARROW_RIGHT_KEY});continue;case"arrowup":e.push({type:"named",symbol:"→",key:n,i18n:nn.ARROW_UP_KEY});continue;case"arrowdown":e.push({type:"named",symbol:"↓",key:n,i18n:nn.ARROW_DOWN_KEY});continue;default:e.push({type:"char",key:n});continue}}return e}function tB(t){const{node:e,predicate:n,descend:r=!0,action:o}=t;we(Xh(e),{code:re.INTERNAL,message:'Invalid "node" parameter passed to "findChildren".'}),we(Qe(n),{code:re.INTERNAL,message:'Invalid "predicate" parameter passed to "findChildren".'});const i=[];return e.descendants((s,l)=>{const a={node:s,pos:l};return n(a)&&(i.push(a),o==null||o(a)),r}),i}function nB(t){const{type:e,...n}=t;return tB({...n,predicate:r=>r.node.type===e})}function rB(t,e={}){const{descend:n=!1,predicate:r,StepTypes:o}=e,i=OF(t,o),s=[];for(const l of i){const{start:a,end:u}=l;t.doc.nodesBetween(a,u,(c,d)=>(((r==null?void 0:r(c,d,l))??!0)&&s.push({node:c,pos:d}),n))}return s}function Jd(t){const{regexp:e,type:n,getAttributes:r,ignoreWhitespace:o=!1,beforeDispatch:i,updateCaptured:s,shouldSkip:l,invalidMarks:a}=t;let u;const c=new yl(e,(d,h,p,f)=>{const{tr:g,schema:m}=d;u||(u=Ee(n)?m.marks[n]:n,we(u,{code:re.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}));let v=h[1],y=h[0];const b=mM({captureGroup:v,fullMatch:y,end:f,start:p,rule:c,state:d,ignoreWhitespace:o,invalidMarks:a,shouldSkip:l,updateCaptured:s});if(!b)return null;({start:p,end:f,captureGroup:v,fullMatch:y}=b);const w=Qe(r)?r(h):r;let k=f,x=[];if(v){const S=y.search(/\S/),A=p+y.indexOf(v),C=A+v.length;x=g.storedMarks??[],Cp&&g.delete(p+S,A),k=p+S+v.length}return g.addMark(p,k,u.create(w)),g.setStoredMarks(x),i==null||i({tr:g,match:h,start:p,end:f}),g});return c}function gM(t){const{regexp:e,type:n,getAttributes:r,beforeDispatch:o,shouldSkip:i,ignoreWhitespace:s=!1,updateCaptured:l,invalidMarks:a}=t,u=new yl(e,(c,d,h,p)=>{const f=Qe(r)?r(d):r,{tr:g,schema:m}=c,v=Ee(n)?m.nodes[n]:n;let y=d[1],b=d[0];const w=mM({captureGroup:y,fullMatch:b,end:p,start:h,rule:u,state:c,ignoreWhitespace:s,invalidMarks:a,shouldSkip:i,updateCaptured:l});if(!w)return null;({start:h,end:p,captureGroup:y,fullMatch:b}=w),we(v,{code:re.SCHEMA,message:`No node exists for ${n} in the schema.`});const k=v.createAndFill(f);return k&&(g.replaceRangeWith(v.isBlock?g.doc.resolve(h).before():h,p,k),o==null||o({tr:g,match:[b,y??""],start:h,end:p})),g});return u}function mM({captureGroup:t,fullMatch:e,end:n,start:r,rule:o,ignoreWhitespace:i,shouldSkip:s,updateCaptured:l,state:a,invalidMarks:u}){var c;if(e==null)return null;const d=(l==null?void 0:l({captureGroup:t,fullMatch:e,start:r,end:n}))??{};t=d.captureGroup??t,e=d.fullMatch??e,r=d.start??r,n=d.end??n;const h=a.doc.resolve(r),p=a.doc.resolve(n);return u&&z0({$from:h,$to:p},u)||o.invalidMarks&&z0({$from:h,$to:p},o.invalidMarks)||i&&(t==null?void 0:t.trim())===""||s!=null&&s({state:a,captureGroup:t,fullMatch:e,start:r,end:n,ruleType:"mark"})||(c=o.shouldSkip)!=null&&c.call(o,{state:a,captureGroup:t,fullMatch:e,start:r,end:n,ruleType:"mark"})?null:{captureGroup:t,end:n,fullMatch:e,start:r}}var oB=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),n={},r=[];e.forEach(i=>{(i?i.split(" "):[]).forEach(l=>{if(l.startsWith("atm_")){const[,a]=l.split("_");n[a]=l}else r.push(l)})});const o=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&o.push(n[i]);return o.push(...r),o.join(" ")},iB=oB;const vM=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function sB(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const yM=(t,e,n)=>{let r=sB(t,n);if(!r)return!1;let o=bM(r);if(!o){let s=r.blockRange(),l=s&&cu(s);return l==null?!1:(e&&e(t.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&kM(t,o,e))return!0;if(r.parent.content.size==0&&(zc(i,"end")||Oe.isSelectable(i))){let s=_b(t.doc,r.before(),r.after(),ae.empty);if(s&&s.slice.size{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=bM(r)}let s=i&&i.nodeBefore;return!s||!Oe.isSelectable(s)?!1:(e&&e(t.tr.setSelection(Oe.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function bM(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function lB(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset{let r=lB(t,n);if(!r)return!1;let o=wM(r);if(!o)return!1;let i=o.nodeAfter;if(kM(t,o,e))return!0;if(r.parent.content.size==0&&(zc(i,"start")||Oe.isSelectable(i))){let s=_b(t.doc,r.before(),r.after(),ae.empty);if(s&&s.slice.size{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset=0;e--){let n=t.node(e);if(t.index(e)+1{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(` +`).scrollIntoView()),!0)};function Kb(t){for(let e=0;e{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=Kb(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let l=n.after(),a=t.tr.replaceWith(l,l,s.createAndFill());a.setSelection(Be.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},hB=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof rr||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Kb(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(vc(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&cu(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function fB(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof Oe&&e.selection.node.isBlock)return!r.parentOffset||!vc(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(n){let i=o.parentOffset==o.parent.content.size,s=e.tr;(e.selection instanceof Me||e.selection instanceof rr)&&s.deleteSelection();let l=r.depth==0?null:Kb(r.node(-1).contentMatchAt(r.indexAfter(-1))),a=t&&t(o.parent,i),u=a?[a]:i&&l?[{type:l}]:void 0,c=vc(s.doc,s.mapping.map(r.pos),1,u);if(!u&&!c&&vc(s.doc,s.mapping.map(r.pos),1,l?[{type:l}]:void 0)&&(l&&(u=[{type:l}]),c=!0),c&&(s.split(s.mapping.map(r.pos),1,u),!i&&!r.parentOffset&&r.parent.type!=l)){let d=s.mapping.map(r.before()),h=s.doc.resolve(d);l&&r.node(-1).canReplaceWith(h.index(),h.index()+1,l)&&s.setNodeMarkup(s.mapping.map(r.before()),l)}n(s.scrollIntoView())}return!0}}const gB=fB(),mB=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(Oe.create(t.doc,o))),!0)},vB=(t,e)=>(e&&e(t.tr.setSelection(new rr(t.doc))),!0);function yB(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||jh(t.doc,e.pos))?!1:(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function kM(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i,s;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(yB(t,e,n))return!0;let l=e.parent.canReplace(e.index(),e.index()+1);if(l&&(i=(s=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&s.matchType(i[0]||o.type).validEnd){if(n){let d=e.pos+o.nodeSize,h=J.empty;for(let g=i.length-1;g>=0;g--)h=J.from(i[g].create(null,h));h=J.from(r.copy(h));let p=t.tr.step(new Yt(e.pos-1,d,e.pos,d,new ae(h,1,0),i.length,!0)),f=d+2*i.length;jh(p.doc,f)&&p.join(f),n(p.scrollIntoView())}return!0}let a=Be.findFrom(e,1),u=a&&a.$from.blockRange(a.$to),c=u&&cu(u);if(c!=null&&c>=e.depth)return n&&n(t.tr.lift(u,c).scrollIntoView()),!0;if(l&&zc(o,"start",!0)&&zc(r,"end")){let d=r,h=[];for(;h.push(d),!d.isTextblock;)d=d.lastChild;let p=o,f=1;for(;!p.isTextblock;p=p.firstChild)f++;if(d.canReplace(d.childCount,d.childCount,p.content)){if(n){let g=J.empty;for(let v=h.length-1;v>=0;v--)g=J.from(h[v].copy(g));let m=t.tr.step(new Yt(e.pos-h.length,e.pos+o.nodeSize,e.pos+f,e.pos+o.nodeSize-f,new ae(g,h.length,0),0,!0));n(m.scrollIntoView())}return!0}}return!1}function EM(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(Me.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const bB=EM(-1),wB=EM(1);function xB(t,e,n){for(let r=0;r{if(s)return!1;s=l.inlineContent&&l.type.allowsMarkType(n)}),s)return!0}return!1}function kB(t,e=null){return function(n,r){let{empty:o,$cursor:i,ranges:s}=n.selection;if(o&&!i||!xB(n.doc,s,t))return!1;if(r)if(i)t.isInSet(n.storedMarks||i.marks())?r(n.tr.removeStoredMark(t)):r(n.tr.addStoredMark(t.create(e)));else{let l=!1,a=n.tr;for(let u=0;!l&&u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},SB=typeof navigator<"u"&&/Mac/.test(navigator.platform),CB=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var On=0;On<10;On++)Vs[48+On]=Vs[96+On]=String(On);for(var On=1;On<=24;On++)Vs[On+111]="F"+On;for(var On=65;On<=90;On++)Vs[On]=String.fromCharCode(On+32),cg[On]=String.fromCharCode(On);for(var m1 in Vs)cg.hasOwnProperty(m1)||(cg[m1]=Vs[m1]);function TB(t){var e=SB&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||CB&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?cg:Vs)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const AB=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function _B(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let l=0;l127)&&(i=Vs[r.keyCode])&&i!=o){let l=e[v1(i,r)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}function MB(t){const e=Us(t,(i,s)=>(s.priority??ot.Low)-(i.priority??ot.Low)),n=[],r=[];for(const i of e)PB(i)?n.push(i):r.push(i);let o;return new mi({key:OB,view:i=>(o=i,{}),props:{transformPasted:i=>{var s,l,a;const u=o.state.selection.$from,c=u.node().type.name,d=new Set(u.marks().map(h=>h.type.name));for(const h of n){if((s=h.ignoredNodes)!=null&&s.includes(c)||(l=h.ignoredMarks)!=null&&l.some(y=>d.has(y)))continue;const p=((a=i.content.firstChild)==null?void 0:a.textContent)??"",f=!o.state.selection.empty&&i.content.childCount===1&&p,g=lu(p,h.regexp)[0];if(f&&g&&h.type==="mark"&&h.replaceSelection){const{from:y,to:b}=o.state.selection,w=o.state.doc.slice(y,b),k=w.content.textBetween(0,w.content.size);if(typeof h.replaceSelection!="boolean"?h.replaceSelection(k):h.replaceSelection){const x=[],{getAttributes:S,markType:A}=h,C=Qe(S)?S(g,!0):S,O=A.create(C);return w.content.forEach(R=>{if(R.isText){const _=O.addToSet(R.marks);x.push(R.mark(_))}}),ae.maxOpen(J.fromArray(x))}}const{nodes:m,transformed:v}=$B(i.content,h,o.state.schema);v&&(i=h.type==="node"&&h.nodeType.isBlock?new ae(J.fromArray(m),0,0):new ae(J.fromArray(m),i.openStart,i.openEnd))}return HB(i)},handleDOMEvents:{paste:(i,s)=>{var l,a;const u=s;if(!((a=(l=i.props).editable)!=null&&a.call(l,i.state)))return!1;const{clipboardData:c}=u;if(!c)return!1;const d=[...c.items].map(p=>p.getAsFile()).filter(p=>!!p);if(d.length===0)return!1;const{selection:h}=i.state;for(const{fileHandler:p,regexp:f}of r){const g=f?d.filter(m=>f.test(m.type)):d;if(g.length!==0&&p({event:u,files:g,selection:h,view:i,type:"paste"}))return u.preventDefault(),!0}return!1},drop:(i,s)=>{var l,a,u;const c=s;if(!((a=(l=i.props).editable)!=null&&a.call(l,i.state)))return!1;const{dataTransfer:d,clientX:h,clientY:p}=c;if(!d)return!1;const f=BB(c);if(f.length===0)return!1;const g=((u=i.posAtCoords({left:h,top:p}))==null?void 0:u.pos)??i.state.selection.anchor;for(const{fileHandler:m,regexp:v}of r){const y=v?f.filter(b=>v.test(b.type)):f;if(y.length!==0&&m({event:c,files:y,pos:g,view:i,type:"drop"}))return c.preventDefault(),!0}return!1}}}})}var OB=new vl("pasteRule");function y1(t,e){return function n(r){const{fragment:o,rule:i,nodes:s}=r,{regexp:l,ignoreWhitespace:a,ignoredMarks:u,ignoredNodes:c}=i;let d=!1;return o.forEach(h=>{if(c!=null&&c.includes(h.type.name)||zB(h)){s.push(h);return}if(!h.isText){const g=n({fragment:h.content,rule:i,nodes:[]});d||(d=g.transformed);const m=J.fromArray(g.nodes);h.type.validContent(m)?s.push(h.copy(m)):s.push(...g.nodes);return}if(h.marks.some(g=>FB(g)||(u==null?void 0:u.includes(g.type.name)))){s.push(h);return}const p=h.text??"";let f=0;for(const g of lu(p,l)){const m=g[1],v=g[0];if(a&&(m==null?void 0:m.trim())===""||!v)return;const y=g.index,b=y+v.length;y>f&&s.push(h.cut(f,y));let w=h.cut(y,b);if(v&&m){const k=v.search(/\S/),x=y+v.indexOf(m),S=x+m.length;k&&s.push(h.cut(y,y+k)),w=h.cut(x,S)}t({nodes:s,rule:i,textNode:w,match:g,schema:e}),d=!0,f=b}p&&f0?[...r.files]:(n=r.items)!=null&&n.length?[...r.items].map(o=>o.getAsFile()).filter(o=>!!o):[]:[]}function HB(t){const e=ae.maxOpen(t.content);return e.openStart({events:{},emit(t,...e){(this.events[t]||[]).forEach(n=>n(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(n=>n!==e)}});var UB=Object.defineProperty,WB=Object.getOwnPropertyDescriptor,ge=(t,e,n,r)=>{for(var o=r>1?void 0:r?WB(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&UB(e,n,o),o},CM=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},ce=(t,e,n)=>(CM(t,e,"read from private field"),n?n.call(t):e.get(t)),qt=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},gn=(t,e,n,r)=>(CM(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function VB(t,e){return t===e}function IC(t){const{previousOptions:e,update:n,equals:r=VB}=t,o=La({...e,...n}),i=ye(),s=Vd(e);for(const a of s){const u=e[a],c=o[a];if(r(u,c)){i[a]={changed:!1};continue}i[a]={changed:!0,previousValue:u,value:c}}const l=a=>{const u=ye();for(const c of a){const d=i[c];d!=null&&d.changed&&(u[c]=d.value)}return u};return{changes:La(i),options:o,pickChanged:l}}var jB={[re.DUPLICATE_HELPER_NAMES]:"helper method",[re.DUPLICATE_COMMAND_NAMES]:"command method"};function TM(t){const{name:e,set:n,code:r}=t,o=jB[r];we(!n.has(e),{code:r,message:`There is a naming conflict for the name: ${e} used in this '${o}'. Please rename or remove from the editor to avoid runtime errors.`}),n.add(e)}function Fc(...t){return Ic(iB(...t).split(" ")).join(" ")}var LC="__IGNORE__",GB="__ALL__",hu=class{constructor(t,...[e]){this["~O"]={},this._mappedHandlers=ye(),this.populateMappedHandlers(),this._options=this._initialOptions=NR(t,this.constructor.defaultOptions,e??ye(),this.createDefaultHandlerOptions()),this._dynamicKeys=this.getDynamicKeys(),this.init()}get options(){return this._options}get dynamicKeys(){return this._dynamicKeys}get initialOptions(){return this._initialOptions}init(){}getDynamicKeys(){const t=[],{customHandlerKeys:e,handlerKeys:n,staticKeys:r}=this.constructor;for(const o of Vd(this._options))r.includes(o)||n.includes(o)||e.includes(o)||t.push(o);return t}ensureAllKeysAreDynamic(t){}setOptions(t){var e;const n=this.getDynamicOptions();this.ensureAllKeysAreDynamic(t);const{changes:r,options:o,pickChanged:i}=IC({previousOptions:n,update:t});this.updateDynamicOptions(o),(e=this.onSetOptions)==null||e.call(this,{reason:"set",changes:r,options:o,pickChanged:i,initialOptions:this._initialOptions})}resetOptions(){var t;const e=this.getDynamicOptions(),{changes:n,options:r,pickChanged:o}=IC({previousOptions:e,update:this._initialOptions});this.updateDynamicOptions(r),(t=this.onSetOptions)==null||t.call(this,{reason:"reset",options:r,changes:n,pickChanged:o,initialOptions:this._initialOptions})}getDynamicOptions(){return xb(this._options,[...this.constructor.customHandlerKeys,...this.constructor.handlerKeys])}updateDynamicOptions(t){this._options={...this._options,...t}}populateMappedHandlers(){for(const t of this.constructor.handlerKeys)this._mappedHandlers[t]=[]}createDefaultHandlerOptions(){const t=ye();for(const e of this.constructor.handlerKeys)t[e]=(...n)=>{var r;const{handlerKeyOptions:o}=this.constructor,i=(r=o[e])==null?void 0:r.reducer;let s=i==null?void 0:i.getDefault(...n);for(const[,l]of this._mappedHandlers[e]){const a=l(...n);if(s=i?i.accumulator(s,a,...n):a,KB(o,s,e))return s}return s};return t}addHandler(t,e,n=ot.Default){return this._mappedHandlers[t].push([n,e]),this.sortHandlers(t),()=>this._mappedHandlers[t]=this._mappedHandlers[t].filter(([,r])=>r!==e)}hasHandlers(t){return(this._mappedHandlers[t]??[]).length>0}sortHandlers(t){this._mappedHandlers[t]=Us(this._mappedHandlers[t],([e],[n])=>n-e)}addCustomHandler(t,e){var n;return((n=this.onAddCustomHandler)==null?void 0:n.call(this,{[t]:e}))??LR}};hu.defaultOptions={};hu.staticKeys=[];hu.handlerKeys=[];hu.handlerKeyOptions={};hu.customHandlerKeys=[];function KB(t,e,n){const{[GB]:r}=t,o=t[n];return!r&&!o?!1:!!(o&&o.earlyReturnValue!==LC&&(Qe(o.earlyReturnValue)?o.earlyReturnValue(e)===!0:e===o.earlyReturnValue)||r&&r.earlyReturnValue!==LC&&(Qe(r.earlyReturnValue)?r.earlyReturnValue(e)===!0:e===r.earlyReturnValue))}var Tm=class extends hu{constructor(...t){super(YB,...t),this["~E"]={},this._extensions=Sb(this.createExtensions(),e=>e.constructor),this.extensionMap=new Map;for(const e of this._extensions)this.extensionMap.set(e.constructor,e)}get priority(){return this.priorityOverride??this.options.priority??this.constructor.defaultPriority}get constructorName(){return`${TR(this.name)}Extension`}get store(){return we(this._store,{code:re.MANAGER_PHASE_ERROR,message:"An error occurred while attempting to access the 'extension.store' when the Manager has not yet set created the lifecycle methods."}),La(this._store,{requireKeys:!0})}get extensions(){return this._extensions}replaceChildExtension(t,e){this.extensionMap.has(t)&&(this.extensionMap.set(t,e),this._extensions=this.extensions.map(n=>e.constructor===t?e:n))}createExtensions(){return[]}getExtension(t){const e=this.extensionMap.get(t);return we(e,{code:re.INVALID_GET_EXTENSION,message:`'${t.name}' does not exist within the preset: '${this.name}'`}),e}isOfType(t){return this.constructor===t}setStore(t){this._store||(this._store=t)}clone(...t){return new this.constructor(...t)}setPriority(t){this.priorityOverride=t}};Tm.defaultPriority=ot.Default;var ft=class extends Tm{static get[Bi](){return yn.PlainExtensionConstructor}get[Bi](){return yn.PlainExtension}},na=class extends Tm{static get[Bi](){return yn.MarkExtensionConstructor}get[Bi](){return yn.MarkExtension}get type(){return Mt(this.store.schema.marks,this.name)}constructor(...t){super(...t)}};na.disableExtraAttributes=!1;var Dn=class extends Tm{static get[Bi](){return yn.NodeExtensionConstructor}get[Bi](){return yn.NodeExtension}get type(){return Mt(this.store.schema.nodes,this.name)}constructor(...t){super(...t)}};Dn.disableExtraAttributes=!1;var YB={priority:void 0,extraAttributes:{},disableExtraAttributes:!1,exclude:{}};function AM(t){return uu(t)&&du(t,[yn.PlainExtension,yn.MarkExtension,yn.NodeExtension])}function XB(t){return uu(t)&&du(t,[yn.PlainExtensionConstructor,yn.MarkExtensionConstructor,yn.NodeExtensionConstructor])}function _M(t){return uu(t)&&du(t,yn.PlainExtension)}function Zh(t){return uu(t)&&du(t,yn.NodeExtension)}function Am(t){return uu(t)&&du(t,yn.MarkExtension)}function Ne(t){return e=>{const{defaultOptions:n,customHandlerKeys:r,handlerKeys:o,staticKeys:i,defaultPriority:s,handlerKeyOptions:l,...a}=t,u=e;n&&(u.defaultOptions=n),s&&(u.defaultPriority=s),l&&(u.handlerKeyOptions=l),u.staticKeys=i??[],u.handlerKeys=o??[],u.customHandlerKeys=r??[];for(const[c,d]of Object.entries(a))u[c]||(u[c]=d);return u}}var qB=class extends ft{constructor(){super(...arguments),this.attributeList=[],this.attributeObject=ye(),this.updateAttributes=(t=!0)=>{this.transformAttributes(),t&&this.store.commands.forceUpdate("attributes")}}get name(){return"attributes"}onCreate(){this.transformAttributes(),this.store.setExtensionStore("updateAttributes",this.updateAttributes)}transformAttributes(){var t,e,n;if(this.attributeObject=ye(),(t=this.store.managerSettings.exclude)!=null&&t.attributes){this.store.setStoreKey("attributes",this.attributeObject);return}this.attributeList=[];for(const r of this.store.extensions){if((e=r.options.exclude)!=null&&e.attributes)continue;const o=(n=r.createAttributes)==null?void 0:n.call(r),i={...o,class:Fc(...r.classNames??[],o==null?void 0:o.class)};this.attributeList.unshift(i)}for(const r of this.attributeList)this.attributeObject={...this.attributeObject,...r,class:Fc(this.attributeObject.class,r.class)};this.store.setStoreKey("attributes",this.attributeObject)}};function it(t={}){return(e,n,r)=>{(e.decoratedHelpers??(e.decoratedHelpers={}))[n]=t}}function le(t={}){return(e,n,r)=>{(e.decoratedCommands??(e.decoratedCommands={}))[n]=t}}function en(t){return(e,n,r)=>{(e.decoratedKeybindings??(e.decoratedKeybindings={}))[n]=t}}var ZB=class{constructor(t){this.promiseCreator=t,this.failureHandlers=[],this.successHandlers=[],this.validateHandlers=[],this.generateCommand=()=>e=>{let n=!0;const{view:r,tr:o,dispatch:i}=e;if(!r)return!1;for(const l of this.validateHandlers)if(!l({...e,dispatch:()=>{}})){n=!1;break}return!i||!n?n:(this.promiseCreator(e).then(l=>{this.runHandlers(this.successHandlers,{value:l,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}).catch(l=>{this.runHandlers(this.failureHandlers,{error:l,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}),i(o),!0)}}validate(t,e="push"){return this.validateHandlers[e](t),this}success(t,e="push"){return this.successHandlers[e](t),this}failure(t,e="push"){return this.failureHandlers[e](t),this}runHandlers(t,e){var n;for(const r of t)if(!r({...e,dispatch:()=>{}}))break;(n=e.dispatch)==null||n.call(e,e.tr)}};function js(t){const{type:e,attrs:n,range:r,selection:o}=t;return i=>{const{dispatch:s,tr:l,state:a}=i,u=Ee(e)?a.schema.marks[e]:e;if(we(u,{code:re.SCHEMA,message:`Mark type: ${e} does not exist on the current schema.`}),r||o){const{from:c,to:d}=cr(o??r??l.selection,l.doc);return lg({trState:l,type:e,...r})?s==null||s(l.removeMark(c,d,u)):s==null||s(l.addMark(c,d,u.create(n))),!0}return Ad(kB(u,n))(i)}}function JB(t,e,n){for(const{$from:r,$to:o}of n){let i=r.depth===0?e.type.allowsMarkType(t):!1;if(e.nodesBetween(r.pos,o.pos,s=>{if(i)return!1;i=s.inlineContent&&s.type.allowsMarkType(t)}),i)return!0}return!1}function QB(t,e,n){return({tr:r,dispatch:o,state:i})=>{const s=cr(n??r.selection,r.doc),l=NF(s),a=Ee(t)?i.schema.marks[t]:t;if(we(a,{code:re.SCHEMA,message:`Mark type: ${t} does not exist on the current schema.`}),s.empty&&!l||!JB(a,r.doc,s.ranges))return!1;if(!o)return!0;if(l)return r.removeStoredMark(a),e&&r.addStoredMark(a.create(e)),o(r),!0;let u=!1;for(const{$from:c,$to:d}of s.ranges){if(u)break;u=r.doc.rangeHasMark(c.pos,d.pos,a)}for(const{$from:c,$to:d}of s.ranges)u&&r.removeMark(c.pos,d.pos,a),e&&r.addMark(c.pos,d.pos,a.create(e));return o(r),!0}}function eH(t,e={}){return({tr:n,dispatch:r,state:o})=>{const i=o.schema,s=n.selection,{from:l=s.from,to:a=l??s.to,marks:u={}}=e;if(!r)return!0;n.insertText(t,l,a);const c=Mt(n.steps,n.steps.length-1).getMap().map(a);for(const[d,h]of an(u))n.addMark(l,c,Mt(i.marks,d).create(h));return r(n),!0}}var Ue=class extends ft{constructor(){super(...arguments),this.decorated=new Map,this.forceUpdateTransaction=(t,...e)=>{const{forcedUpdates:n}=this.getCommandMeta(t);return this.setCommandMeta(t,{forcedUpdates:Ic([...n,...e])}),t}}get name(){return"commands"}get transaction(){const t=this.store.getState();this._transaction||(this._transaction=t.tr);const e=this._transaction.before.eq(t.doc),n=!Hs(this._transaction.steps);if(!e){const r=t.tr;if(n)for(const o of this._transaction.steps)r.step(o);this._transaction=r}return this._transaction}onCreate(){this.store.setStoreKey("getForcedUpdates",this.getForcedUpdates.bind(this))}onView(t){var e;const{extensions:n,helpers:r}=this.store,o=ye(),i=new Set;let s=ye();const l=u=>{var c;const d=ye(),h=()=>u??this.transaction;let p=[];const f=()=>p;for(const[m,v]of Object.entries(o))(c=s[m])!=null&&c.disableChaining||(d[m]=this.chainedFactory({chain:d,command:v.original,getTr:h,getChain:f}));const g=m=>{we(m===h(),{message:"Chaining currently only supports `CommandFunction` methods which do not use the `state.tr` property. Instead you should use the provided `tr` property."})};return d.run=(m={})=>{const v=p;p=[];for(const y of v)if(!y(g)&&m.exitEarly)return;t.dispatch(h())},d.tr=()=>{const m=p;p=[];for(const v of m)v(g);return h()},d.enabled=()=>{for(const m of p)if(!m())return!1;return!0},d.new=m=>l(m),d};for(const u of n){const c=((e=u.createCommands)==null?void 0:e.call(u))??{},d=u.decoratedCommands??{},h={};s={...s,decoratedCommands:d};for(const[p,f]of Object.entries(d)){const g=Ee(f.shortcut)&&f.shortcut.startsWith("_|")?{shortcut:r.getNamedShortcut(f.shortcut,u.options)}:void 0;this.updateDecorated(p,{...f,name:u.name,...g}),c[p]=u[p].bind(u),f.active&&(h[p]=()=>{var m;return((m=f.active)==null?void 0:m.call(f,u.options,this.store))??!1})}jd(c)||this.addCommands({active:h,names:i,commands:o,extensionCommands:c})}const a=l();for(const[u,c]of Object.entries(a))l[u]=c;this.store.setStoreKey("commands",o),this.store.setStoreKey("chain",l),this.store.setExtensionStore("commands",o),this.store.setExtensionStore("chain",l)}onStateUpdate({state:t}){this._transaction=t.tr}createPlugin(){return{}}customDispatch(t){return t}insertText(t,e={}){return Ee(t)?eH(t,e):this.store.createPlaceholderCommand({promise:t,placeholder:{type:"inline"},onSuccess:(n,r,o)=>this.insertText(n,{...e,...r})(o)}).generateCommand()}selectText(t,e={}){return({tr:n,dispatch:r})=>{const o=cr(t,n.doc);return n.selection.anchor===o.anchor&&n.selection.head===o.head&&!e.forceUpdate?!1:(r==null||r(n.setSelection(o)),!0)}}selectMark(t){return e=>{const{tr:n}=e,r=Hi(n.selection.$from,t);return r?this.store.commands.selectText.original({from:r.from,to:r.to})(e):!1}}delete(t){return({tr:e,dispatch:n})=>{const{from:r,to:o}=t??e.selection;return n==null||n(e.delete(r,o)),!0}}emptyUpdate(t){return({tr:e,dispatch:n})=>(n&&(t==null||t(),n(e)),!0)}forceUpdate(...t){return({tr:e,dispatch:n})=>(n==null||n(this.forceUpdateTransaction(e,...t)),!0)}updateNodeAttributes(t,e){return({tr:n,dispatch:r})=>(r==null||r(n.setNodeMarkup(t,void 0,e)),!0)}setContent(t,e){return n=>{const{tr:r,dispatch:o}=n,i=this.store.manager.createState({content:t,selection:e});return i?(o==null||o(r.replaceRangeWith(0,r.doc.nodeSize-2,i.doc)),!0):!1}}resetContent(){return t=>{const{tr:e,dispatch:n}=t,r=this.store.manager.createEmptyDoc();return r?this.setContent(r)(t):(n==null||n(e.delete(0,e.doc.nodeSize)),!0)}}emptySelection(){return({tr:t,dispatch:e})=>t.selection.empty?!1:(e==null||e(t.setSelection(Me.near(t.selection.$anchor))),!0)}insertNewLine(){return({dispatch:t,tr:e})=>ta(e.selection)?(t==null||t(e.insertText(` +`)),!0):!1}insertNode(t,e={}){return({dispatch:n,tr:r,state:o})=>{var i;const{attrs:s,range:l,selection:a,replaceEmptyParentBlock:u=!1}=e,{from:c,to:d,$from:h}=cr(a??l??r.selection,r.doc);if(Xh(t)||SF(t)){const v=h.before(h.depth);return n==null||n(u&&c===d&&xm(h.parent)?r.replaceWith(v,v+h.parent.nodeSize,t):r.replaceWith(c,d,t)),!0}const p=Ee(t)?o.schema.nodes[t]:t;we(p,{code:re.SCHEMA,message:`The requested node type ${t} does not exist in the schema.`});const f=(i=e.marks)==null?void 0:i.map(v=>{if(v instanceof je)return v;const y=Ee(v)?o.schema.marks[v]:v;return we(y,{code:re.SCHEMA,message:`The requested mark type ${v} does not exist in the schema.`}),y.create()}),g=p.createAndFill(s,Ee(e.content)?o.schema.text(e.content):e.content,f);if(!g)return!1;const m=c!==d;return n==null||n(m?r.replaceRangeWith(c,d,g):r.insert(c,g)),!0}}focus(t){return e=>{const{dispatch:n,tr:r}=e,{view:o}=this.store;if(t===!1||o.hasFocus()&&(t===void 0||t===!0))return!1;if(t===void 0||t===!0){const{from:i=0,to:s=i}=r.selection;t={from:i,to:s}}return n&&this.delayedFocus(),this.selectText(t)(e)}}blur(t){return e=>{const{view:n}=this.store;return n.hasFocus()?(requestAnimationFrame(()=>{n.dom.blur()}),t?this.selectText(t)(e):!0):!1}}setBlockNodeType(t,e,n,r=!0){return Zd(t,e,n,r)}toggleWrappingNode(t,e,n){return hM(t,e,n)}toggleBlockNodeItem(t){return Gb(t)}wrapInNode(t,e,n){return dM(t,e,n)}applyMark(t,e,n){return QB(t,e,n)}toggleMark(t){return js(t)}removeMark(t){return fM(t)}setMeta(t,e){return({tr:n})=>(n.setMeta(t,e),!0)}selectAll(){return this.selectText("all")}copy(){return t=>t.tr.selection.empty?!1:(t.dispatch&&document.execCommand("copy"),!0)}paste(){return this.store.createPlaceholderCommand({promise:async()=>{var t;return(t=navigator.clipboard)!=null&&t.readText?await navigator.clipboard.readText():""},placeholder:{type:"inline"},onSuccess:(t,e,n)=>this.insertNode(H0({content:t,schema:n.state.schema}),{selection:e})(n)}).generateCommand()}cut(){return t=>t.tr.selection.empty?!1:(t.dispatch&&document.execCommand("cut"),!0)}replaceText(t){return ZF(t)}getAllCommandOptions(){const t={};for(const[e,n]of this.decorated)jd(n)||(t[e]=n);return t}getCommandOptions(t){return this.decorated.get(t)}getCommandProp(){return{tr:this.transaction,dispatch:this.store.view.dispatch,state:this.store.view.state,view:this.store.view}}updateDecorated(t,e){if(!e){this.decorated.delete(t);return}const n=this.decorated.get(t)??{name:""};this.decorated.set(t,{...n,...e})}handleIosFocus(){yr.isIos&&this.store.view.dom.focus()}delayedFocus(){this.handleIosFocus(),requestAnimationFrame(()=>{this.store.view.focus(),this.store.view.dispatch(this.transaction.scrollIntoView())})}getForcedUpdates(t){return this.getCommandMeta(t).forcedUpdates}getCommandMeta(t){const e=t.getMeta(this.pluginKey)??{};return{...tH,...e}}setCommandMeta(t,e){const n=this.getCommandMeta(t);t.setMeta(this.pluginKey,{...n,...e})}addCommands(t){const{extensionCommands:e,commands:n,names:r,active:o}=t;for(const[i,s]of an(e))TM({name:i,set:r,code:re.DUPLICATE_COMMAND_NAMES}),we(!nH.has(i),{code:re.DUPLICATE_COMMAND_NAMES,message:"The command name you chose is forbidden."}),n[i]=this.createUnchainedCommand(s,o[i])}unchainedFactory(t){return(...e)=>{const{shouldDispatch:n=!0,command:r}=t,{view:o}=this.store,{state:i}=o;let s;return n&&(s=o.dispatch),r(...e)({state:i,dispatch:s,view:o,tr:i.tr})}}createUnchainedCommand(t,e){const n=this.unchainedFactory({command:t});return n.enabled=this.unchainedFactory({command:t,shouldDispatch:!1}),n.isEnabled=n.enabled,n.original=t,n.active=e,n}chainedFactory(t){return(...e)=>{const{chain:n,command:r,getTr:o,getChain:i}=t,s=i(),{view:l}=this.store,{state:a}=l;return s.push(u=>r(...e)({state:a,dispatch:u,view:l,tr:o()})),n}}};ge([le()],Ue.prototype,"customDispatch",1);ge([le()],Ue.prototype,"insertText",1);ge([le()],Ue.prototype,"selectText",1);ge([le()],Ue.prototype,"selectMark",1);ge([le()],Ue.prototype,"delete",1);ge([le()],Ue.prototype,"emptyUpdate",1);ge([le()],Ue.prototype,"forceUpdate",1);ge([le()],Ue.prototype,"updateNodeAttributes",1);ge([le()],Ue.prototype,"setContent",1);ge([le()],Ue.prototype,"resetContent",1);ge([le()],Ue.prototype,"emptySelection",1);ge([le()],Ue.prototype,"insertNewLine",1);ge([le()],Ue.prototype,"insertNode",1);ge([le()],Ue.prototype,"focus",1);ge([le()],Ue.prototype,"blur",1);ge([le()],Ue.prototype,"setBlockNodeType",1);ge([le()],Ue.prototype,"toggleWrappingNode",1);ge([le()],Ue.prototype,"toggleBlockNodeItem",1);ge([le()],Ue.prototype,"wrapInNode",1);ge([le()],Ue.prototype,"applyMark",1);ge([le()],Ue.prototype,"toggleMark",1);ge([le()],Ue.prototype,"removeMark",1);ge([le()],Ue.prototype,"setMeta",1);ge([le({description:({t})=>t(Ws.SELECT_ALL_DESCRIPTION),label:({t})=>t(Ws.SELECT_ALL_LABEL),shortcut:oe.SelectAll})],Ue.prototype,"selectAll",1);ge([le({description:({t})=>t(Ws.COPY_DESCRIPTION),label:({t})=>t(Ws.COPY_LABEL),shortcut:oe.Copy,icon:"fileCopyLine"})],Ue.prototype,"copy",1);ge([le({description:({t})=>t(Ws.PASTE_DESCRIPTION),label:({t})=>t(Ws.PASTE_LABEL),shortcut:oe.Paste,icon:"clipboardLine"})],Ue.prototype,"paste",1);ge([le({description:({t})=>t(Ws.CUT_DESCRIPTION),label:({t})=>t(Ws.CUT_LABEL),shortcut:oe.Cut,icon:"scissorsFill"})],Ue.prototype,"cut",1);ge([le()],Ue.prototype,"replaceText",1);ge([it()],Ue.prototype,"getAllCommandOptions",1);ge([it()],Ue.prototype,"getCommandOptions",1);ge([it()],Ue.prototype,"getCommandProp",1);Ue=ge([Ne({defaultPriority:ot.Highest,defaultOptions:{trackerClassName:"remirror-tracker-position",trackerNodeName:"span"},staticKeys:["trackerClassName","trackerNodeName"]})],Ue);var tH={forcedUpdates:[]},nH=new Set(["run","chain","original","raw","enabled","tr","new"]),Wo=class extends ft{constructor(){super(...arguments),this.placeholders=He.empty,this.placeholderWidgets=new Map,this.createPlaceholderCommand=t=>{const e=Oc(),{promise:n,placeholder:r,onFailure:o,onSuccess:i}=t;return new ZB(n).validate(s=>this.addPlaceholder(e,r)(s)).success(s=>{const{state:l,tr:a,dispatch:u,view:c,value:d}=s,h=this.store.helpers.findPlaceholder(e);if(!h){const p=new Error("The placeholder has been removed");return(o==null?void 0:o({error:p,state:l,tr:a,dispatch:u,view:c}))??!1}return this.removePlaceholder(e)({state:l,tr:a,view:c,dispatch:()=>{}}),i(d,h,{state:l,tr:a,dispatch:u,view:c})}).failure(s=>(this.removePlaceholder(e)({...s,dispatch:()=>{}}),(o==null?void 0:o(s))??!1))}}get name(){return"decorations"}onCreate(){this.store.setExtensionStore("createPlaceholderCommand",this.createPlaceholderCommand)}createPlugin(){return{state:{init:()=>{},apply:t=>{var e,n,r,o,i,s;const{added:l,clearTrackers:a,removed:u,updated:c}=this.getMeta(t);if(a){this.placeholders=He.empty;for(const[,d]of this.placeholderWidgets)(n=(e=d.spec).onDestroy)==null||n.call(e,this.store.view,d.spec.element);this.placeholderWidgets.clear();return}this.placeholders=this.placeholders.map(t.mapping,t.doc,{onRemove:d=>{var h,p;const f=this.placeholderWidgets.get(d.id);f&&((p=(h=f.spec).onDestroy)==null||p.call(h,this.store.view,f.spec.element))}});for(const[,d]of this.placeholderWidgets)(o=(r=d.spec).onUpdate)==null||o.call(r,this.store.view,d.from,d.spec.element,d.spec.data);for(const d of l){if(d.type==="inline"){this.addInlinePlaceholder(d,t);continue}if(d.type==="node"){this.addNodePlaceholder(d,t);continue}if(d.type==="widget"){this.addWidgetPlaceholder(d,t);continue}}for(const{id:d,data:h}of c){const p=this.placeholderWidgets.get(d);if(!p)continue;const f=vt.widget(p.from,p.spec.element,{...p.spec,data:h});this.placeholders=this.placeholders.remove([p]).add(t.doc,[f]),this.placeholderWidgets.set(d,f)}for(const d of u){const h=this.placeholders.find(void 0,void 0,f=>f.id===d&&f.__type===Dl),p=this.placeholderWidgets.get(d);p&&((s=(i=p.spec).onDestroy)==null||s.call(i,this.store.view,p.spec.element)),this.placeholders=this.placeholders.remove(h),this.placeholderWidgets.delete(d)}}},props:{decorations:t=>{let e=this.options.decorations(t);e=e.add(t.doc,this.placeholders.find());for(const n of this.store.extensions){if(!n.createDecorations)continue;const r=n.createDecorations(t).find();e=e.add(t.doc,r)}return e},handleDOMEvents:{blur:t=>(this.options.persistentSelectionClass&&t.dispatch(t.state.tr.setMeta(NC,!1)),!1),focus:t=>(this.options.persistentSelectionClass&&t.dispatch(t.state.tr.setMeta(NC,!0)),!1)}}}}updateDecorations(){return({tr:t,dispatch:e})=>(e==null||e(t),!0)}addPlaceholder(t,e,n){return({dispatch:r,tr:o})=>this.addPlaceholderTransaction(t,e,o,!r)?(r==null||r(n?o.deleteSelection():o),!0):!1}updatePlaceholder(t,e){return({dispatch:n,tr:r})=>this.updatePlaceholderTransaction({id:t,data:e,tr:r,checkOnly:!n})?(n==null||n(r),!0):!1}removePlaceholder(t){return({dispatch:e,tr:n})=>this.removePlaceholderTransaction({id:t,tr:n,checkOnly:!e})?(e==null||e(n),!0):!1}clearPlaceholders(){return({tr:t,dispatch:e})=>this.clearPlaceholdersTransaction({tr:t,checkOnly:!e})?(e==null||e(t),!0):!1}findPlaceholder(t){return this.findAllPlaceholders().get(t)}findAllPlaceholders(){const t=new Map,e=this.placeholders.find(void 0,void 0,n=>n.__type===Dl);for(const n of e)t.set(n.spec.id,{from:n.from,to:n.to});return t}createDecorations(t){var e,n,r;const{persistentSelectionClass:o}=this.options;return!o||(e=this.store.view)!=null&&e.hasFocus()||(r=(n=this.store.helpers).isInteracting)!=null&&r.call(n)?He.empty:oH(t,He.empty,{class:Ee(o)?o:"selection"})}onApplyState(){}addWidgetPlaceholder(t,e){const{pos:n,createElement:r,onDestroy:o,onUpdate:i,className:s,nodeName:l,id:a,type:u}=t,c=(r==null?void 0:r(this.store.view,n))??document.createElement(l);c.classList.add(s);const d=vt.widget(n,c,{id:a,__type:Dl,type:u,element:c,onDestroy:o,onUpdate:i});this.placeholderWidgets.set(a,d),this.placeholders=this.placeholders.add(e.doc,[d])}addInlinePlaceholder(t,e){const{from:n=e.selection.from,to:r=e.selection.to,className:o,nodeName:i,id:s,type:l}=t;let a;if(n===r){const u=document.createElement(i);u.classList.add(o),a=vt.widget(n,u,{id:s,type:l,__type:Dl,widget:u})}else a=vt.inline(n,r,{nodeName:i,class:o},{id:s,__type:Dl});this.placeholders=this.placeholders.add(e.doc,[a])}addNodePlaceholder(t,e){const{pos:n,className:r,nodeName:o,id:i}=t,s=qr(n)?e.doc.resolve(n):e.selection.$from,l=qr(n)?s.nodeAfter?{pos:n,end:s.nodeAfter.nodeSize}:void 0:fF(s);if(!l)return;const a=vt.node(l.pos,l.end,{nodeName:o,class:r},{id:i,__type:Dl});this.placeholders=this.placeholders.add(e.doc,[a])}withRequiredBase(t,e){const{placeholderNodeName:n,placeholderClassName:r}=this.options,{nodeName:o=n,className:i,...s}=e,l=(i?[r,i]:[r]).join(" ");return{nodeName:o,className:l,...s,id:t}}getMeta(t){const e=t.getMeta(this.pluginKey)??{};return{...rH,...e}}setMeta(t,e){const n=this.getMeta(t);t.setMeta(this.pluginKey,{...n,...e})}addPlaceholderTransaction(t,e,n,r=!1){if(this.findPlaceholder(t))return!1;if(r)return!0;const{added:i}=this.getMeta(n);return this.setMeta(n,{added:[...i,this.withRequiredBase(t,e)]}),!0}updatePlaceholderTransaction(t){const{id:e,tr:n,checkOnly:r=!1,data:o}=t;if(!this.findPlaceholder(e))return!1;if(r)return!0;const{updated:s}=this.getMeta(n);return this.setMeta(n,{updated:Ic([...s,{id:e,data:o}])}),!0}removePlaceholderTransaction(t){const{id:e,tr:n,checkOnly:r=!1}=t;if(!this.findPlaceholder(e))return!1;if(r)return!0;const{removed:i}=this.getMeta(n);return this.setMeta(n,{removed:Ic([...i,e])}),!0}clearPlaceholdersTransaction(t){const{tr:e,checkOnly:n=!1}=t;return this.getPluginState()===He.empty?!1:(n||this.setMeta(e,{clearTrackers:!0}),!0)}};ge([le()],Wo.prototype,"updateDecorations",1);ge([le()],Wo.prototype,"addPlaceholder",1);ge([le()],Wo.prototype,"updatePlaceholder",1);ge([le()],Wo.prototype,"removePlaceholder",1);ge([le()],Wo.prototype,"clearPlaceholders",1);ge([it()],Wo.prototype,"findPlaceholder",1);ge([it()],Wo.prototype,"findAllPlaceholders",1);Wo=ge([Ne({defaultOptions:{persistentSelectionClass:void 0,placeholderClassName:"placeholder",placeholderNodeName:"span"},staticKeys:["placeholderClassName","placeholderNodeName"],handlerKeys:["decorations"],handlerKeyOptions:{decorations:{reducer:{accumulator:(t,e,n)=>t.add(n.doc,e.find()),getDefault:()=>He.empty}}},defaultPriority:ot.Low})],Wo);var rH={added:[],updated:[],clearTrackers:!1,removed:[]},Dl="placeholderDecoration",NC="persistentSelectionFocus";function oH(t,e,n){const{selection:r,doc:o}=t;if(r.empty)return e;const{from:i,to:s}=r,l=qh(r)?vt.node(i,s,n):vt.inline(i,s,n);return e.add(o,[l])}var W0=class extends ft{get name(){return"docChanged"}onStateUpdate(t){const{firstUpdate:e,transactions:n,tr:r}=t;e||(n??[r]).some(o=>o==null?void 0:o.docChanged)&&this.options.docChanged(t)}};W0=ge([Ne({handlerKeys:["docChanged"],handlerKeyOptions:{docChanged:{earlyReturnValue:!1}},defaultPriority:ot.Lowest})],W0);var mo=class extends ft{get name(){return"helpers"}onCreate(){var t;this.store.setStringHandler("text",this.textToProsemirrorNode.bind(this)),this.store.setStringHandler("html",H0);const e=ye(),n=ye(),r=ye(),o=new Set;for(const i of this.store.extensions){Zh(i)&&(n[i.name]=l=>tM({state:this.store.getState(),type:i.type,attrs:l}),r[i.name]=l=>{var a;return(a=qd({state:this.store.getState(),type:i.type,attrs:l}))==null?void 0:a.node.attrs}),Am(i)&&(n[i.name]=l=>lg({trState:this.store.getState(),type:i.type,attrs:l}),r[i.name]=l=>{const a=Hi(this.store.getState().selection.$from,i.type);if(!a||!l)return a==null?void 0:a.mark.attrs;if(Wb(a.mark,l))return a.mark.attrs});const s=((t=i.createHelpers)==null?void 0:t.call(i))??{};for(const l of Object.keys(i.decoratedHelpers??{}))s[l]=i[l].bind(i);if(!jd(s))for(const[l,a]of an(s))TM({name:l,set:o,code:re.DUPLICATE_HELPER_NAMES}),e[l]=a}this.store.setStoreKey("attrs",r),this.store.setStoreKey("active",n),this.store.setStoreKey("helpers",e),this.store.setExtensionStore("attrs",r),this.store.setExtensionStore("active",n),this.store.setExtensionStore("helpers",e)}isSelectionEmpty(t=this.store.getState()){return Ub(t)}isViewEditable(t=this.store.getState()){var e,n;return((n=(e=this.store.view.props).editable)==null?void 0:n.call(e,t))??!1}getStateJSON(t=this.store.getState()){return t.toJSON()}getJSON(t=this.store.getState()){return t.doc.toJSON()}getRemirrorJSON(t=this.store.getState()){return this.getJSON(t)}insertHtml(t,e){return n=>{const{state:r}=n,o=H0({content:t,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(o,e)(n)}}getText({lineBreakDivider:t=` `,state:e=this.store.getState()}={}){return e.doc.textBetween(0,e.doc.content.size,t,xs)}getTextBetween(t,e,n=this.store.getState().doc){return n.textBetween(t,e,` -`,xs)}getHTML(t=this.store.getState()){return BF(t.doc,this.store.document)}textToProsemirrorNode(t){const e=`
${t.content}
`;return this.store.stringHandlers.html({...t,content:e})}};ge([it()],mo.prototype,"isSelectionEmpty",1);ge([it()],mo.prototype,"isViewEditable",1);ge([it()],mo.prototype,"getStateJSON",1);ge([it()],mo.prototype,"getJSON",1);ge([it()],mo.prototype,"getRemirrorJSON",1);ge([le()],mo.prototype,"insertHtml",1);ge([it()],mo.prototype,"getText",1);ge([it()],mo.prototype,"getTextBetween",1);ge([it()],mo.prototype,"getHTML",1);mo=ge([Ne({})],mo);var U0=class extends ft{get name(){return"inputRules"}onCreate(){this.store.setExtensionStore("rebuildInputRules",this.rebuildInputRules.bind(this))}createExternalPlugins(){return[this.generateInputRulesPlugin()]}generateInputRulesPlugin(){var t,e;const n=[],r=this.store.markTags[ke.ExcludeInputRules];for(const o of this.store.extensions)if(!((t=this.store.managerSettings.exclude)!=null&&t.inputRules||!o.createInputRules||(e=o.options.exclude)!=null&&e.inputRules))for(const i of o.createInputRules())i.shouldSkip=this.options.shouldSkipInputRule,i.invalidMarks=r,n.push(i);return n3({rules:n})}rebuildInputRules(){this.store.updateExtensionPlugins(this)}};U0=ge([Ne({defaultPriority:ot.Default,handlerKeys:["shouldSkipInputRule"],handlerKeyOptions:{shouldSkipInputRule:{earlyReturnValue:!0}}})],U0);var $o=class extends ft{constructor(){super(...arguments),this.extraKeyBindings=[],this.backwardMarkExitTracker=new Map,this.keydownHandler=null,this.onAddCustomHandler=({keymap:t})=>{var e,n;if(t)return this.extraKeyBindings=[...this.extraKeyBindings,t],(n=(e=this.store).rebuildKeymap)==null||n.call(e),()=>{var r,o;this.extraKeyBindings=this.extraKeyBindings.filter(i=>i!==t),(o=(r=this.store).rebuildKeymap)==null||o.call(r)}},this.rebuildKeymap=()=>{this.setupKeydownHandler()}}get name(){return"keymap"}get shortcutMap(){const{shortcuts:t}=this.options;return Ee(t)?sH[t]:t}onCreate(){this.store.setExtensionStore("rebuildKeymap",this.rebuildKeymap)}createExternalPlugins(){var t;return(t=this.store.managerSettings.exclude)!=null&&t.keymap?[]:(this.setupKeydownHandler(),[new mi({props:{handleKeyDown:(e,n)=>{var r;return(r=this.keydownHandler)==null?void 0:r.call(this,e,n)}}})])}setupKeydownHandler(){const t=this.generateKeymapBindings();this.keydownHandler=Gb(t)}generateKeymapBindings(){var t;const e=[],n=this.shortcutMap,r=this.store.getExtension(Ue),o=l=>a=>vf({shortcut:a,map:n,store:this.store,options:l.options});for(const l of this.store.extensions){const a=l.decoratedKeybindings??{};if(!((t=l.options.exclude)!=null&&t.keymap)){l.createKeymap&&e.push(oH(l.createKeymap(o(l)),n));for(const[u,c]of an(a)){if(c.isActive&&!c.isActive(l.options,this.store))continue;const d=l[u].bind(l),h=vf({shortcut:c.shortcut,map:n,options:l.options,store:this.store}),p=Qe(c.priority)?c.priority(l.options,this.store):c.priority??ot.Low,f=ye();for(const g of h)f[g]=d;e.push([p,f]),c.command&&r.updateDecorated(c.command,{shortcut:h})}}}const i=this.sortKeymaps([...this.extraKeyBindings,...e]);return vF(i)}arrowRightShortcut(t){const e=this.store.markTags[ke.PreventExits],n=this.store.nodeTags[ke.PreventExits];return this.exitMarkForwards(e,n)(t)}arrowLeftShortcut(t){const e=this.store.markTags[ke.PreventExits],n=this.store.nodeTags[ke.PreventExits];return ag(this.exitNodeBackwards(n),this.exitMarkBackwards(e,n))(t)}backspace(t){const e=this.store.markTags[ke.PreventExits],n=this.store.nodeTags[ke.PreventExits];return ag(this.exitNodeBackwards(n,!0),this.exitMarkBackwards(e,n,!0))(t)}createKeymap(){const{selectParentNodeOnEscape:t,undoInputRuleOnBackspace:e,excludeBaseKeymap:n}=this.options,r=ye();if(!n)for(const[o,i]of an(f1))r[o]=Ad(i);return e&&f1.Backspace&&(r.Backspace=Ad(Sm(r3,f1.Backspace))),t&&(r.Escape=Ad(fB)),[ot.Low,r]}getNamedShortcut(t,e={}){return t.startsWith("_|")?vf({shortcut:t,map:this.shortcutMap,store:this.store,options:e}):[t]}onSetOptions(t){var e,n;const{changes:r}=t;(r.excludeBaseKeymap.changed||r.selectParentNodeOnEscape.changed||r.undoInputRuleOnBackspace.changed)&&((n=(e=this.store).rebuildKeymap)==null||n.call(e))}sortKeymaps(t){return Us(t.map(e=>Pt(e)?e:[ot.Default,e]),(e,n)=>n[0]-e[0]).map(e=>e[1])}exitMarkForwards(t,e){return n=>{const{tr:r,dispatch:o}=n;if(!VF(r.selection)||pi({selection:r.selection,types:e}))return!1;const l=r.selection.$from.marks().filter(a=>!t.includes(a.type.name));if(Hs(l))return!1;if(!o)return!0;for(const a of l)r.removeStoredMark(a);return o(r.insertText(" ",r.selection.from)),!0}}exitNodeBackwards(t,e=!1){return n=>{const{tr:r}=n;if(!(e?RC:B0)(r.selection))return!1;const i=r.selection.$anchor.node();return!xm(i)||AF(i)||t.includes(i.type.name)?!1:this.store.commands.toggleBlockNodeItem.original({type:i.type})(n)}}exitMarkBackwards(t,e,n=!1){return r=>{const{tr:o,dispatch:i}=r;if(!(n?RC:B0)(o.selection)||this.backwardMarkExitTracker.has(o.selection.anchor))return this.backwardMarkExitTracker.clear(),!1;if(pi({selection:o.selection,types:e}))return!1;const a=[...o.storedMarks??[],...o.selection.$from.marks()].filter(u=>!t.includes(u.type.name));if(Hs(a))return!1;if(!i)return!0;for(const u of a)o.removeStoredMark(u);return this.backwardMarkExitTracker.set(o.selection.anchor,!0),i(o),!0}}};ge([en({shortcut:"ArrowRight",isActive:t=>t.exitMarksOnArrowPress})],$o.prototype,"arrowRightShortcut",1);ge([en({shortcut:"ArrowLeft",isActive:t=>t.exitMarksOnArrowPress})],$o.prototype,"arrowLeftShortcut",1);ge([en({shortcut:"Backspace",isActive:t=>t.exitMarksOnArrowPress})],$o.prototype,"backspace",1);ge([it()],$o.prototype,"getNamedShortcut",1);$o=ge([Ne({defaultPriority:ot.Low,defaultOptions:{shortcuts:"default",undoInputRuleOnBackspace:!0,selectParentNodeOnEscape:!1,excludeBaseKeymap:!1,exitMarksOnArrowPress:!0},customHandlerKeys:["keymap"]})],$o);function rH(t){return ir(Uh(oe),t)}function vf({shortcut:t,map:e,options:n,store:r}){return Ee(t)?[W0(t,e)]:Pt(t)?t.map(o=>W0(o,e)):(t=t(n,r),vf({shortcut:t,map:e,options:n,store:r}))}function W0(t,e){return rH(t)?e[t]:t}function oH(t,e){const n={};let r,o;Pt(t)?[o,r]=t:r=t;for(const[i,s]of an(r))n[W0(i,e)]=s;return hm(o)?n:[o,n]}var _M={[oe.Copy]:"Mod-c",[oe.Cut]:"Mod-x",[oe.Paste]:"Mod-v",[oe.PastePlain]:"Mod-Shift-v",[oe.SelectAll]:"Mod-a",[oe.Undo]:"Mod-z",[oe.Redo]:yr.isMac?"Shift-Mod-z":"Mod-y",[oe.Bold]:"Mod-b",[oe.Italic]:"Mod-i",[oe.Underline]:"Mod-u",[oe.Strike]:"Mod-d",[oe.Code]:"Mod-`",[oe.Paragraph]:"Mod-Shift-0",[oe.H1]:"Mod-Shift-1",[oe.H2]:"Mod-Shift-2",[oe.H3]:"Mod-Shift-3",[oe.H4]:"Mod-Shift-4",[oe.H5]:"Mod-Shift-5",[oe.H6]:"Mod-Shift-6",[oe.TaskList]:"Mod-Shift-7",[oe.BulletList]:"Mod-Shift-8",[oe.OrderedList]:"Mod-Shift-9",[oe.Quote]:"Mod->",[oe.Divider]:"Mod-Shift-|",[oe.Codeblock]:"Mod-Shift-~",[oe.ClearFormatting]:"Mod-Shift-C",[oe.Superscript]:"Mod-.",[oe.Subscript]:"Mod-,",[oe.LeftAlignment]:"Mod-Shift-L",[oe.CenterAlignment]:"Mod-Shift-E",[oe.RightAlignment]:"Mod-Shift-R",[oe.JustifyAlignment]:"Mod-Shift-J",[oe.InsertLink]:"Mod-k",[oe.Find]:"Mod-f",[oe.FindBackwards]:"Mod-Shift-f",[oe.FindReplace]:"Mod-Shift-H",[oe.AddFootnote]:"Mod-Alt-f",[oe.AddComment]:"Mod-Alt-m",[oe.ContextMenu]:"Mod-Shift-\\",[oe.IncreaseFontSize]:"Mod-Shift-.",[oe.DecreaseFontSize]:"Mod-Shift-,",[oe.IncreaseIndent]:"Tab",[oe.DecreaseIndent]:"Shift-Tab",[oe.Shortcuts]:"Mod-/",[oe.Format]:yr.isMac?"Alt-Shift-f":"Shift-Ctrl-f"},iH={..._M,[oe.Strike]:"Mod-Shift-S",[oe.Code]:"Mod-Shift-M",[oe.Paragraph]:"Mod-Alt-0",[oe.H1]:"Mod-Alt-1",[oe.H2]:"Mod-Alt-2",[oe.H3]:"Mod-Alt-3",[oe.H4]:"Mod-Alt-4",[oe.H5]:"Mod-Alt-5",[oe.H6]:"Mod-Alt-6",[oe.OrderedList]:"Mod-Alt-7",[oe.BulletList]:"Mod-Alt-8",[oe.Quote]:"Mod-Alt-9",[oe.ClearFormatting]:"Mod-\\",[oe.IncreaseIndent]:"Mod-[",[oe.DecreaseIndent]:"Mod-]"},sH={default:_M,googleDoc:iH},aH=class extends ft{get name(){return"nodeViews"}createPlugin(){const t=[],e=ye();for(const n of this.store.extensions){if(!n.createNodeViews)continue;const r=n.createNodeViews();t.unshift(Qe(r)?{[n.name]:r}:r)}t.unshift(this.store.managerSettings.nodeViews??{});for(const n of t)Object.assign(e,n);return{props:{nodeViews:e}}}},lH=class extends ft{get name(){return"pasteRules"}createExternalPlugins(){return[this.generatePasteRulesPlugin()]}generatePasteRulesPlugin(){var t,e;const n=[];for(const r of this.store.extensions){if((t=this.store.managerSettings.exclude)!=null&&t.pasteRules||!r.createPasteRules||(e=r.options.exclude)!=null&&e.pasteRules)continue;const o=r.createPasteRules(),i=Pt(o)?o:[o];n.push(...i)}return _B(n)}},ug=class extends ft{constructor(){super(...arguments),this.plugins=[],this.managerPlugins=[],this.applyStateHandlers=[],this.initStateHandlers=[],this.appendTransactionHandlers=[],this.pluginKeys=ye(),this.stateGetters=new Map,this.getPluginStateCreator=t=>e=>t.getState(e??this.store.getState()),this.getStateByName=t=>{const e=this.stateGetters.get(t);return we(e,{message:"No plugin exists for the requested extension name."}),e()}}get name(){return"plugins"}onCreate(){const{setStoreKey:t,setExtensionStore:e,managerSettings:n,extensions:r}=this.store;this.updateExtensionStore();const{plugins:o=[]}=n;this.updatePlugins(o,this.managerPlugins);for(const i of r)i.onApplyState&&this.applyStateHandlers.push(i.onApplyState.bind(i)),i.onInitState&&this.initStateHandlers.push(i.onInitState.bind(i)),i.onAppendTransaction&&this.appendTransactionHandlers.push(i.onAppendTransaction.bind(i)),this.extractExtensionPlugins(i);this.managerPlugins=o,this.store.setStoreKey("plugins",this.plugins),t("pluginKeys",this.pluginKeys),t("getPluginState",this.getStateByName),e("getPluginState",this.getStateByName)}createPlugin(){return{appendTransaction:(t,e,n)=>{const r=n.tr,o={previousState:e,tr:r,transactions:t,state:n};for(const i of this.appendTransactionHandlers)i(o);return this.options.appendTransaction(o),r.docChanged||r.steps.length>0||r.selectionSet||r.storedMarksSet?r:void 0},state:{init:(t,e)=>{for(const n of this.initStateHandlers)n(e)},apply:(t,e,n,r)=>{const o={previousState:n,state:r,tr:t};for(const i of this.applyStateHandlers)i(o);this.options.applyState(o)}}}}extractExtensionPlugins(t){var e,n;if(!(!t.createPlugin&&!t.createExternalPlugins||(e=this.store.managerSettings.exclude)!=null&&e.plugins||(n=t.options.exclude)!=null&&n.plugins)){if(t.createPlugin){const o=new vl(t.name);this.pluginKeys[t.name]=o;const i=this.getPluginStateCreator(o);t.pluginKey=o,t.getPluginState=i,this.stateGetters.set(t.name,i),this.stateGetters.set(t.constructor,i);const s={...t.createPlugin(),key:o},l=new mi(s);this.updatePlugins([l],t.plugin?[t.plugin]:void 0),t.plugin=l}if(t.createExternalPlugins){const o=t.createExternalPlugins();this.updatePlugins(o,t.externalPlugins),t.externalPlugins=o}}}updatePlugins(t,e){if(!e||Hs(e)){this.plugins=[...this.plugins,...t];return}if(t.length!==e.length){this.plugins=[...this.plugins.filter(r=>!e.includes(r)),...t];return}const n=new Map;for(const[r,o]of t.entries())n.set(Mt(e,r),o);this.plugins=this.plugins.map(r=>e.includes(r)?n.get(r):r)}updateExtensionStore(){const{setExtensionStore:t}=this.store;t("updatePlugins",this.updatePlugins.bind(this)),t("dispatchPluginUpdate",this.dispatchPluginUpdate.bind(this)),t("updateExtensionPlugins",this.updateExtensionPlugins.bind(this))}updateExtensionPlugins(t){const e=TM(t)?t:KB(t)?this.store.manager.getExtension(t):this.store.extensions.find(n=>n.name===t);we(e,{code:re.INVALID_MANAGER_EXTENSION,message:`The extension ${t} does not exist within the editor.`}),this.extractExtensionPlugins(e),this.store.setStoreKey("plugins",this.plugins),this.dispatchPluginUpdate()}dispatchPluginUpdate(){we(this.store.phase>=mr.EditorView,{code:re.MANAGER_PHASE_ERROR,message:"`dispatchPluginUpdate` should only be called after the view has been added to the manager."});const{view:t,updateState:e}=this.store,n=t.state.reconfigure({plugins:this.plugins});e(n)}};ug=ge([Ne({defaultPriority:ot.Highest,handlerKeys:["applyState","appendTransaction"]})],ug);var V0=class extends ft{constructor(){super(...arguments),this.dynamicAttributes={marks:ye(),nodes:ye()}}get name(){return"schema"}onCreate(){const{managerSettings:t,tags:e,markNames:n,nodeNames:r,extensions:o}=this.store,{defaultBlockNode:i,disableExtraAttributes:s,nodeOverride:l,markOverride:a}=t,u=f=>!!(f&&e[ke.Block].includes(f));if(t.schema){const{nodes:f,marks:g}=mH(t.schema);this.addSchema(t.schema,f,g);return}const c=u(i)?{doc:ye(),[i]:ye()}:ye(),d=ye(),h=cH({settings:t,gatheredSchemaAttributes:this.gatherExtraAttributes(o),nodeNames:r,markNames:n,tags:e});for(const f of o){h[f.name]={...h[f.name],...f.options.extraAttributes};const g=s===!0||f.options.disableExtraAttributes===!0||f.constructor.disableExtraAttributes===!0;if(Zh(f)){const{spec:m,dynamic:v}=NC({createExtensionSpec:(y,b)=>f.createNodeSpec(y,b),extraAttributes:Mt(h,f.name),override:{...l,...f.options.nodeOverride},ignoreExtraAttributes:g,name:f.constructorName,tags:f.tags});f.spec=m,c[f.name]=m,Object.keys(v).length>0&&(this.dynamicAttributes.nodes[f.name]=v)}if(Am(f)){const{spec:m,dynamic:v}=NC({createExtensionSpec:(y,b)=>f.createMarkSpec(y,b),extraAttributes:Mt(h,f.name),override:{...a,...f.options.markOverride},ignoreExtraAttributes:g,name:f.constructorName,tags:f.tags??[]});f.spec=m,d[f.name]=m,Object.keys(v).length>0&&(this.dynamicAttributes.marks[f.name]=v)}}const p=new lP({nodes:c,marks:d,topNode:"doc"});this.addSchema(p,c,d)}createPlugin(){return{appendTransaction:(t,e,n)=>{const{tr:r}=n;return!t.some(i=>i.docChanged)||Object.keys(this.dynamicAttributes.nodes).length===0&&Object.keys(this.dynamicAttributes.marks).length===0?null:(r.doc.descendants((i,s)=>(this.checkAndUpdateDynamicNodes(i,s,r),this.checkAndUpdateDynamicMarks(i,s,r),!0)),r.steps.length>0?r:null)}}}addSchema(t,e,n){this.store.setStoreKey("nodes",e),this.store.setStoreKey("marks",n),this.store.setStoreKey("schema",t),this.store.setExtensionStore("schema",t),this.store.setStoreKey("defaultBlockNode",wm(t).name);for(const r of Object.values(t.nodes))if(r.name!=="doc"&&(r.isBlock||r.isTextblock))break}checkAndUpdateDynamicNodes(t,e,n){for(const[r,o]of an(this.dynamicAttributes.nodes))if(t.type.name===r)for(const[i,s]of an(o)){if(!Bs(t.attrs[i]))continue;const l={...t.attrs,[i]:s(t)};n.setNodeMarkup(e,void 0,l),CC(n)}}checkAndUpdateDynamicMarks(t,e,n){for(const[r,o]of an(this.dynamicAttributes.marks)){const i=Mt(this.store.schema.marks,r),s=t.marks.find(l=>l.type.name===r);if(s)for(const[l,a]of an(o)){if(!Bs(s.attrs[l]))continue;const u=Hi(n.doc.resolve(e),i);if(!u)continue;const{from:c,to:d}=u,h=i.create({...s.attrs,[l]:a(s)});n.removeMark(c,d,i).addMark(c,d,h),CC(n)}}}gatherExtraAttributes(t){const e=[];for(const n of t)n.createSchemaAttributes&&e.push(...n.createSchemaAttributes());return e}};V0=ge([Ne({defaultPriority:ot.Highest})],V0);function cH(t){const{settings:e,gatheredSchemaAttributes:n,nodeNames:r,markNames:o,tags:i}=t,s=ye();if(e.disableExtraAttributes)return s;const l=[...n,...e.extraAttributes??[]];for(const a of l??[]){const u=dH({identifiers:a.identifiers,nodeNames:r,markNames:o,tags:i});for(const c of u){const d=s[c]??{};s[c]={...d,...a.attributes}}}return s}function uH(t){return Qs(t)&&Pt(t.tags)}function dH(t){const{identifiers:e,nodeNames:n,markNames:r,tags:o}=t;if(e==="nodes")return n;if(e==="marks")return r;if(e==="all")return[...n,...r];if(Pt(e))return e;we(uH(e),{code:re.EXTENSION_EXTRA_ATTRIBUTES,message:"Invalid value passed as an identifier when creating `extraAttributes`."});const{tags:i=[],names:s=[],behavior:l="any",excludeNames:a,excludeTags:u,type:c}=e,d=new Set,h=c==="mark"?r:c==="node"?n:[...r,...n],p=g=>h.includes(g)&&!(a!=null&&a.includes(g));for(const g of s)p(g)&&d.add(g);const f=new Map;for(const g of i)if(!(u!=null&&u.includes(g)))for(const m of o[g]){if(!p(m))continue;if(l==="any"){d.add(m);continue}const v=f.get(m)??new Set;v.add(g),f.set(m,v)}for(const[g,m]of f)m.size===i.length&&d.add(g);return[...d]}function NC(t){var e;const{createExtensionSpec:n,extraAttributes:r,ignoreExtraAttributes:o,name:i,tags:s,override:l}=t,a=ye();function u(m,v){a[m]=v}let c=!1;function d(){c=!0}const h=hH(r,o,d,u),p=pH(r,o),f=fH(r,o),g=n({defaults:h,parse:p,dom:f},l);return we(o||c,{code:re.EXTENSION_SPEC,message:`When creating a node specification you must call the 'defaults', and parse, and 'dom' methods. To avoid this error you can set the static property 'disableExtraAttributes' of '${i}' to 'true'.`}),g.group=[...((e=g.group)==null?void 0:e.split(" "))??[],...s].join(" ")||void 0,{spec:g,dynamic:a}}function Kb(t){return Ee(t)||Qe(t)?{default:t}:(we(t,{message:`${AR(t)} is not supported`,code:re.EXTENSION_EXTRA_ATTRIBUTES}),t)}function hH(t,e,n,r){return()=>{n();const o=ye();if(e)return o;for(const[i,s]of an(t)){let a=Kb(s).default;Qe(a)&&(r(i,a),a=null),o[i]=a===void 0?{}:{default:a}}return o}}function pH(t,e){return n=>{const r=ye();if(e)return r;for(const[o,i]of an(t)){const{parseDOM:s,...l}=Kb(i);if(Vt(n)){if(Bs(s)){r[o]=n.getAttribute(o)??l.default;continue}if(Qe(s)){r[o]=s(n)??l.default;continue}r[o]=n.getAttribute(s)??l.default}}return r}}function fH(t,e){return n=>{const r=ye();if(e)return r;function o(i,s){if(i){if(Ee(i)){r[s]=i;return}if(Pt(i)){const[l,a]=i;r[l]=a??n.attrs[s];return}for(const[l,a]of an(i))r[l]=a}}for(const[i,s]of an(t)){const{toDOM:l,parseDOM:a}=Kb(s);if(Bs(l)){const u=Ee(a)?a:i;r[u]=n.attrs[i];continue}if(Qe(l)){o(l(n.attrs,gH(n)),i);continue}o(l,i)}return r}}function gH(t){return Xh(t)?{node:t}:EF(t)?{mark:t}:{}}function mH(t){const e=ye(),n=ye();for(const[r,o]of Object.entries(t.nodes))e[r]=o.spec;for(const[r,o]of Object.entries(t.marks))n[r]=o.spec;return{nodes:e,marks:n}}var Bc=class extends ft{constructor(){super(...arguments),this.onAddCustomHandler=({suggester:t})=>{var e;if(!(!t||(e=this.store.managerSettings.exclude)!=null&&e.suggesters))return SC(this.store.getState(),t)}}get name(){return"suggest"}onCreate(){this.store.setExtensionStore("addSuggester",t=>SC(this.store.getState(),t)),this.store.setExtensionStore("removeSuggester",t=>sF(this.store.getState(),t))}createExternalPlugins(){var t,e;const n=[];for(const r of this.store.extensions){if((t=this.store.managerSettings.exclude)!=null&&t.suggesters)break;if(!r.createSuggesters||(e=r.options.exclude)!=null&&e.suggesters)continue;const o=r.createSuggesters(),i=Pt(o)?o:[o];n.push(...i)}return[aF(...n)]}getSuggestState(t){return zb(t??this.store.getState())}getSuggestMethods(){const{addIgnored:t,clearIgnored:e,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:l}=this.getSuggestState();return{addIgnored:t,clearIgnored:e,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:l}}isSuggesterActive(t){var e;return ir(Pt(t)?t:[t],(e=this.getSuggestState().match)==null?void 0:e.suggester.name)}};ge([it()],Bc.prototype,"getSuggestState",1);ge([it()],Bc.prototype,"getSuggestMethods",1);ge([it()],Bc.prototype,"isSuggesterActive",1);Bc=ge([Ne({customHandlerKeys:["suggester"]})],Bc);var j0=class extends ft{constructor(){super(...arguments),this.allTags=ye(),this.plainTags=ye(),this.markTags=ye(),this.nodeTags=ye()}get name(){return"tags"}onCreate(){this.resetTags();for(const t of this.store.extensions)this.updateTagForExtension(t);this.store.setStoreKey("tags",this.allTags),this.store.setExtensionStore("tags",this.allTags),this.store.setStoreKey("plainTags",this.plainTags),this.store.setExtensionStore("plainTags",this.plainTags),this.store.setStoreKey("markTags",this.markTags),this.store.setExtensionStore("markTags",this.markTags),this.store.setStoreKey("nodeTags",this.nodeTags),this.store.setExtensionStore("nodeTags",this.nodeTags)}resetTags(){const t=ye(),e=ye(),n=ye(),r=ye();for(const o of Uh(ke))t[o]=[],e[o]=[],n[o]=[],r[o]=[];this.allTags=t,this.plainTags=e,this.markTags=n,this.nodeTags=r}updateTagForExtension(t){var e,n;const r=new Set([...t.tags??[],...((e=t.createTags)==null?void 0:e.call(t))??[],...t.options.extraTags??[],...((n=this.store.managerSettings.extraTags)==null?void 0:n[t.name])??[]]);for(const o of r)we(vH(o),{code:re.EXTENSION,message:`The tag provided by the extension: ${t.constructorName} is not supported by the editor. To add custom tags you can use the 'mutateTag' method.`}),this.allTags[o].push(t.name),AM(t)&&this.plainTags[o].push(t.name),Am(t)&&this.markTags[o].push(t.name),Zh(t)&&this.nodeTags[o].push(t.name);t.tags=[...r]}};j0=ge([Ne({defaultPriority:ot.Highest})],j0);function vH(t){return ir(Uh(ke),t)}var yH=new vl("remirrorFilePlaceholderPlugin");function bH(){const t=new mi({key:yH,state:{init(){return{set:He.empty,payloads:new Map}},apply(e,{set:n,payloads:r}){n=n.map(e.mapping,e.doc);const o=e.getMeta(t);if(o)if(o.type===0){const i=document.createElement("placeholder"),s=vt.widget(o.pos,i,{id:o.id});n=n.add(e.doc,[s]),r.set(o.id,o.payload)}else o.type===1&&(n=n.remove(n.find(void 0,void 0,i=>i.id===o.id)),r.delete(o.id));return{set:n,payloads:r}}},props:{decorations(e){var n;return((n=t.getState(e))==null?void 0:n.set)??null}}});return t}var wH=class extends ft{get name(){return"upload"}createExternalPlugins(){return[bH()]}};function xH(t={}){t={...{exitMarksOnArrowPress:$o.defaultOptions.exitMarksOnArrowPress,excludeBaseKeymap:$o.defaultOptions.excludeBaseKeymap,selectParentNodeOnEscape:$o.defaultOptions.selectParentNodeOnEscape,undoInputRuleOnBackspace:$o.defaultOptions.undoInputRuleOnBackspace,persistentSelectionClass:Uo.defaultOptions.persistentSelectionClass},...t};const n=y0(t,["excludeBaseKeymap","selectParentNodeOnEscape","undoInputRuleOnBackspace"]),r=y0(t,["persistentSelectionClass"]);return[new j0,new V0,new YB,new ug,new U0,new lH,new aH,new Bc,new Ue,new mo,new $o(n),new H0,new wH,new Uo(r)]}var $C=class extends ft{get name(){return"meta"}onCreate(){if(this.store.setStoreKey("getCommandMeta",this.getCommandMeta.bind(this)),!!this.options.capture)for(const t of this.store.extensions)this.captureCommands(t),this.captureKeybindings(t)}createPlugin(){return{}}captureCommands(t){const e=t.decoratedCommands??{},n=t.createCommands;for(const r of Object.keys(e)){const o=t[r];t[r]=(...i)=>s=>{var l;const a=o(...i)(s);return s.dispatch&&a&&this.setCommandMeta(s.tr,{type:"command",chain:s.dispatch!==((l=s.view)==null?void 0:l.dispatch),name:r,extension:t.name,decorated:!0}),a}}n&&(t.createCommands=()=>{const r=n();for(const[o,i]of Object.entries(r))r[o]=(...s)=>l=>{var a;const u=i(...s)(l);return l.dispatch&&u&&this.setCommandMeta(l.tr,{type:"command",chain:l.dispatch!==((a=l.view)==null?void 0:a.dispatch),name:o,extension:t.name,decorated:!1}),u};return r})}captureKeybindings(t){}getCommandMeta(t){return t.getMeta(this.pluginKey)??[]}setCommandMeta(t,e){const n=this.getCommandMeta(t);t.setMeta(this.pluginKey,[...n,e])}};$C=ge([Ne({defaultOptions:{capture:yr.isDevelopment},staticKeys:["capture"],defaultPriority:ot.Highest})],$C);var yf,Gu,bf,ql,ds,wf,xf,kH=class{constructor(t){qt(this,yf,Oc()),qt(this,Gu,void 0),qt(this,bf,void 0),qt(this,ql,!0),qt(this,ds,Cm()),qt(this,wf,void 0),qt(this,xf,void 0),this.getState=()=>this.view.state??this.initialEditorState,this.getPreviousState=()=>this.previousState,this.dispatchTransaction=i=>{var s,l;we(!this.manager.destroyed,{code:re.MANAGER_PHASE_ERROR,message:"A transaction was dispatched to a manager that has already been destroyed. Please check your set up, or open an issue."}),i=((l=(s=this.props).onDispatchTransaction)==null?void 0:l.call(s,i,this.getState()))??i;const a=this.getState(),{state:u,transactions:c}=a.applyTransaction(i);gn(this,bf,a),this.updateState({state:u,tr:i,transactions:c});const d=this.manager.store.getForcedUpdates(i);Hs(d)||this.updateViewProps(...d)},this.onChange=(i=ye())=>{var s,l;const a=this.eventListenerProps(i);ce(this,ql)&&gn(this,ql,!1),(l=(s=this.props).onChange)==null||l.call(s,a)},this.onBlur=i=>{var s,l;const a=this.eventListenerProps();(l=(s=this.props).onBlur)==null||l.call(s,a,i),ce(this,ds).emit("blur",a,i)},this.onFocus=i=>{var s,l;const a=this.eventListenerProps();(l=(s=this.props).onFocus)==null||l.call(s,a,i),ce(this,ds).emit("focus",a,i)},this.setContent=(i,{triggerChange:s=!1}={})=>{const{doc:l}=this.manager.createState({content:i}),a=this.getState(),{state:u}=this.getState().applyTransaction(a.tr.replaceRangeWith(0,a.doc.nodeSize-2,l));if(s)return this.updateState({state:u,triggerChange:s});this.view.updateState(u)},this.clearContent=({triggerChange:i=!1}={})=>{this.setContent(this.manager.createEmptyDoc(),{triggerChange:i})},this.createStateFromContent=(i,s)=>this.manager.createState({content:i,selection:s}),this.focus=i=>{this.manager.store.commands.focus(i)},this.blur=i=>{this.manager.store.commands.blur(i)};const{getProps:e,initialEditorState:n,element:r}=t;if(gn(this,Gu,e),gn(this,xf,n),this.manager.attachFramework(this,this.updateListener.bind(this)),this.manager.view)return;const o=this.createView(n,r);this.manager.addView(o)}get addHandler(){return ce(this,wf)??gn(this,wf,ce(this,ds).on.bind(ce(this,ds)))}get updatableViewProps(){return{attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0}}get firstRender(){return ce(this,ql)}get props(){return ce(this,Gu).call(this)}get previousState(){return this.previousStateOverride??ce(this,bf)??this.initialEditorState}get manager(){return this.props.manager}get view(){return this.manager.view}get uid(){return ce(this,yf)}get initialEditorState(){return ce(this,xf)}updateListener(t){const{state:e,tr:n}=t;return ce(this,ds).emit("updated",this.eventListenerProps({state:e,tr:n}))}update(t){const{getProps:e}=t;return gn(this,Gu,e),this}updateViewProps(...t){const e=y0(this.updatableViewProps,t);this.view.setProps({...this.view.props,...e})}getAttributes(t){var e;const{attributes:n,autoFocus:r,classNames:o=[],label:i,editable:s}=this.props,l=(e=this.manager.store)==null?void 0:e.attributes,a=Qe(n)?n(this.eventListenerProps()):n;let u={};(r||qr(r))&&(u=t?{autoFocus:!0}:{autofocus:"true"});const c=Ic(Fc(t&&"Prosemirror","remirror-editor",l==null?void 0:l.class,...o).split(" ")).join(" "),d={role:"textbox",...u,"aria-multiline":"true",...s??!0?{}:{"aria-readonly":"true"},"aria-label":i??"",...l,class:c};return RR({...d,...a})}addFocusListeners(){this.view.dom.addEventListener("blur",this.onBlur),this.view.dom.addEventListener("focus",this.onFocus)}removeFocusListeners(){this.view.dom.removeEventListener("blur",this.onBlur),this.view.dom.removeEventListener("focus",this.onFocus)}destroy(){ce(this,ds).emit("destroy"),this.view&&this.removeFocusListeners()}eventListenerProps(t=ye()){const{state:e,tr:n,transactions:r}=t;return{tr:n,transactions:r,internalUpdate:!n,view:this.view,firstRender:ce(this,ql),state:e??this.getState(),createStateFromContent:this.createStateFromContent,previousState:this.previousState,helpers:this.manager.store.helpers}}get baseOutput(){return{manager:this.manager,...this.manager.store,addHandler:this.addHandler,focus:this.focus,blur:this.blur,uid:ce(this,yf),view:this.view,getState:this.getState,getPreviousState:this.getPreviousState,getExtension:this.manager.getExtension.bind(this.manager),hasExtension:this.manager.hasExtension.bind(this.manager),clearContent:this.clearContent,setContent:this.setContent}}};yf=new WeakMap;Gu=new WeakMap;bf=new WeakMap;ql=new WeakMap;ds=new WeakMap;wf=new WeakMap;xf=new WeakMap;function EH(t,e){const n=[],r=new WeakMap,o=[],i=new WeakMap;let s=[];const l={duplicateMap:i,parentExtensions:o,gatheredExtensions:s,settings:e};for(const d of t)RM(l,{extension:d});s=Us(s,(d,h)=>h.priority-d.priority);const a=new WeakSet,u=new Set;for(const d of s){const h=d.constructor,p=d.name,f=i.get(h);we(f,{message:`No entries were found for the ExtensionConstructor ${d.name}`,code:re.INTERNAL}),!(a.has(h)||u.has(p))&&(a.add(h),u.add(p),n.push(d),r.set(h,d),f.forEach(g=>g==null?void 0:g.replaceChildExtension(h,d)))}const c=[];for(const d of n)SH({extension:d,found:a,missing:c});return we(Hs(c),{code:re.MISSING_REQUIRED_EXTENSION,message:c.map(({Constructor:d,extension:h})=>`The extension '${h.name}' requires '${d.name} in order to run correctly.`).join(` -`)}),{extensions:n,extensionMap:r}}function RM(t,e){var n;const{gatheredExtensions:r,duplicateMap:o,parentExtensions:i,settings:s}=t,{extension:l,parentExtension:a}=e;let{names:u=[]}=e;we(TM(l),{code:re.INVALID_MANAGER_EXTENSION,message:`An invalid extension: ${l} was provided to the [[\`RemirrorManager\`]].`});const c=l.extensions;if(l.setPriority((n=s.priority)==null?void 0:n[l.name]),r.push(l),CH({duplicateMap:o,extension:l,parentExtension:a}),c.length!==0){if(u.includes(l.name)){`${u.join(" > ")}${l.name}`;return}u=[...u,l.name],i.push(l);for(const d of c)RM(t,{names:u,extension:d,parentExtension:l})}}function SH(t){const{extension:e,found:n,missing:r}=t;if(e.requiredExtensions)for(const o of e.requiredExtensions??[])n.has(o)||r.push({Constructor:o,extension:e})}function CH(t){const{duplicateMap:e,extension:n,parentExtension:r}=t,o=n.constructor,i=e.get(o),s=r?[r]:[];e.set(o,i?[...i,...s]:s)}function TH(t){var e,n,r,o;const{extension:i,nodeNames:s,markNames:l,plainNames:a,store:u,handlers:c}=t;i.setStore(u);const d=(e=i.onCreate)==null?void 0:e.bind(i),h=(n=i.onView)==null?void 0:n.bind(i),p=(r=i.onStateUpdate)==null?void 0:r.bind(i),f=(o=i.onDestroy)==null?void 0:o.bind(i);d&&c.create.push(d),h&&c.view.push(h),p&&c.update.push(p),f&&c.destroy.push(f),Am(i)&&l.push(i.name),Zh(i)&&i.name!=="doc"&&s.push(i.name),AM(i)&&a.push(i.name)}var hs,Ku,_o,Si,Yu,Dr,ya,Xu,ba,qu,wa,Ro,Zu,kf=class{constructor(t,e={}){qt(this,hs,void 0),qt(this,Ku,ye()),qt(this,_o,ye()),qt(this,Si,void 0),qt(this,Yu,void 0),qt(this,Dr,mr.None),qt(this,ya,void 0),qt(this,Xu,!0),qt(this,ba,{create:[],view:[],update:[],destroy:[]}),qt(this,qu,[]),qt(this,wa,Cm()),qt(this,Ro,void 0),qt(this,Zu,void 0),this.getState=()=>{var o;return ce(this,Dr)>=mr.EditorView?this.view.state:(we(ce(this,Ro),{code:re.MANAGER_PHASE_ERROR,message:"`getState` can only be called after the `Framework` or the `EditorView` has been added to the manager`. Check your plugins to make sure that the decorations callback uses the state argument."}),(o=ce(this,Ro))==null?void 0:o.initialEditorState)},this.updateState=o=>{const i=this.getState();this.view.updateState(o),this.onStateUpdate({previousState:i,state:o})};const{extensions:n,extensionMap:r}=EH(t,e);gn(this,ya,e),gn(this,Si,La(n)),gn(this,Yu,r),gn(this,hs,this.createExtensionStore()),gn(this,Dr,mr.Create),this.setupLifecycleHandlers();for(const o of ce(this,ba).create){const i=o();i&&ce(this,qu).push(i)}}static create(t,e={}){return new kf([...NR(t),...xH(e.builtin)],e)}get[Bi](){return yn.Manager}get destroyed(){return ce(this,Dr)===mr.Destroy}get mounted(){return ce(this,Dr)>=mr.EditorView&&ce(this,Dr)ce(this,Si),enumerable:e},phase:{get:()=>ce(this,Dr),enumerable:e},view:{get:()=>this.view,enumerable:e},managerSettings:{get:()=>La(ce(this,ya)),enumerable:e},getState:{value:this.getState,enumerable:e},updateState:{value:this.updateState,enumerable:e},isMounted:{value:()=>this.mounted,enumerable:e},getExtension:{value:this.getExtension.bind(this),enumerable:e},manager:{get:()=>this,enumerable:e},document:{get:()=>this.document,enumerable:e},stringHandlers:{get:()=>ce(this,Ku),enumerable:e},currentState:{get:()=>n??(n=this.getState()),set:o=>{n=o},enumerable:e},previousState:{get:()=>r,set:o=>{r=o},enumerable:e}}),t.getStoreKey=this.getStoreKey.bind(this),t.setStoreKey=this.setStoreKey.bind(this),t.setExtensionStore=this.setExtensionStore.bind(this),t.setStringHandler=this.setStringHandler.bind(this),t}addView(t){if(ce(this,Dr)>=mr.EditorView)return this;gn(this,Xu,!0),gn(this,Dr,mr.EditorView),ce(this,_o).view=t;for(const e of ce(this,ba).view){const n=e(t);n&&ce(this,qu).push(n)}return this}attachFramework(t,e){var n;ce(this,Ro)!==t&&(ce(this,Ro)&&(ce(this,Ro).destroy(),(n=ce(this,Zu))==null||n.call(this)),gn(this,Ro,t),gn(this,Zu,this.addHandler("stateUpdate",e)))}createEmptyDoc(){var t;const e=(t=this.schema.nodes.doc)==null?void 0:t.createAndFill();return we(e,{code:re.INVALID_CONTENT,message:"An empty node could not be created due to an invalid schema."}),e}createState(t={}){const{onError:e,defaultSelection:n="end"}=this.settings,{content:r=this.createEmptyDoc(),selection:o=n,stringHandler:i=this.settings.stringHandler}=t,{schema:s,plugins:l}=this.store,a=aM({stringHandler:Ee(i)?this.stringHandlers[i]:i,document:this.document,content:r,onError:e,schema:s,selection:o});return Na.create({schema:s,doc:a,plugins:l,selection:cr(o,a)})}addHandler(t,e){return ce(this,wa).on(t,e)}onStateUpdate(t){const e=ce(this,Xu);ce(this,hs).currentState=t.state,ce(this,hs).previousState=t.previousState,e&&(gn(this,Dr,mr.Runtime),gn(this,Xu,!1));const n={...t,firstUpdate:e};for(const r of ce(this,ba).update)r(n);ce(this,wa).emit("stateUpdate",n)}getExtension(t){const e=ce(this,Yu).get(t);return we(e,{code:re.INVALID_MANAGER_EXTENSION,message:`'${t.name}' doesn't exist within this manager. Make sure it is properly added before attempting to use it.`}),e}hasExtension(t){return!!ce(this,Yu).get(t)}clone(){const t=ce(this,Si).map(n=>n.clone(n.options)),e=kf.create(()=>t,ce(this,ya));return ce(this,wa).emit("clone",e),e}recreate(t=[],e={}){const n=ce(this,Si).map(o=>o.clone(o.initialOptions)),r=kf.create(()=>[...n,...t],e);return ce(this,wa).emit("recreate",r),r}destroy(){var t,e,n,r,o,i;gn(this,Dr,mr.Destroy);for(const s of((t=this.view)==null?void 0:t.state.plugins)??[])(n=(e=s.getState(this.view.state))==null?void 0:e.destroy)==null||n.call(e);(r=ce(this,Ro))==null||r.destroy(),(o=ce(this,Zu))==null||o.call(this);for(const s of ce(this,qu))s();for(const s of ce(this,ba).destroy)s();(i=this.view)==null||i.destroy(),ce(this,wa).emit("destroy")}includes(t){const e=[],n=[];for(const r of ce(this,Si))e.push(r.name,r.constructorName),n.push(r.constructor);return t.every(r=>Ee(r)?ir(e,r):ir(n,r))}},AH=kf;hs=new WeakMap;Ku=new WeakMap;_o=new WeakMap;Si=new WeakMap;Yu=new WeakMap;Dr=new WeakMap;ya=new WeakMap;Xu=new WeakMap;ba=new WeakMap;qu=new WeakMap;wa=new WeakMap;Ro=new WeakMap;Zu=new WeakMap;function _H(t,e){return!uu(t)||!du(t,yn.Manager)?!1:e?t.includes(e):!0}var RH=Object.defineProperty,MH=Object.getOwnPropertyDescriptor,Jh=(t,e,n,r)=>{for(var o=r>1?void 0:r?MH(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&RH(e,n,o),o},MM=/\S+/g;function OM(t){return t.type.isTextblock?1:t.type.isText?t.textBetween(0,t.nodeSize).length:0}function OH({doc:t},e){let n=0,r=0;return t.nodesBetween(0,t.nodeSize-2,(o,i)=>{if(r>0)return!1;const s=OM(o);return n+s>e?(r=i+1+(e-n),!1):(n+=s,!0)}),r}function IH({doc:t},e){let n=0,r=0;return t.nodesBetween(0,t.nodeSize-2,(o,i)=>{if(r>0)return!1;if(!o.type.isText)return!0;const s=o.textBetween(0,o.nodeSize),l=lu(s,MM);if(n+l.length>e){const a=e-n,u=l[a];return r=i+((u==null?void 0:u.index)??0),!1}return n+=l.length,!0}),r}var Gs=class extends ft{get name(){return"count"}getCountMaximum(){return this.options.maximum}getCharacterCount(t=this.store.getState()){let e=0;return t.doc.nodesBetween(0,t.doc.nodeSize-2,n=>(e+=OM(n),!0)),Math.max(e-1,0)}getWordCount(t=this.store.getState()){const e=this.store.helpers.getText({lineBreakDivider:" ",state:t});return lu(e,MM).length}isCountValid(t=this.store.getState()){const{maximumStrategy:e,maximum:n}=this.options;return n<1?!0:e==="CHARACTERS"?this.store.helpers.getCharacterCount(t)<=n:this.store.helpers.getWordCount(t)<=n}createDecorationSet(t){const{maximum:e=-1,maximumStrategy:n,maximumExceededClassName:r}=this.options,s=(n==="CHARACTERS"?OH:IH)(t,e);return He.create(t.doc,[vt.inline(s,t.doc.nodeSize-2,{class:r})])}createExternalPlugins(){const{maximum:t}=this.options,e=new mi({state:{init:(n,r)=>this.isCountValid(r)?{decorationSet:He.empty}:{decorationSet:this.createDecorationSet(r)},apply:(n,r,o,i)=>!n.docChanged||t<1?r:this.isCountValid(i)?{decorationSet:He.empty}:{decorationSet:this.createDecorationSet(i)}},props:{decorations(n){var r;return((r=e.getState(n))==null?void 0:r.decorationSet)??null}}});return[e]}};Jh([it()],Gs.prototype,"getCountMaximum",1);Jh([it()],Gs.prototype,"getCharacterCount",1);Jh([it()],Gs.prototype,"getWordCount",1);Jh([it()],Gs.prototype,"isCountValid",1);Gs=Jh([Ne({defaultOptions:{maximum:-1,maximumExceededClassName:"remirror-max-count-exceeded",maximumStrategy:"CHARACTERS"},staticKeys:["maximum","maximumStrategy","maximumExceededClassName"]})],Gs);var LH="Expected a function",IM="__lodash_hash_undefined__",NH="[object Function]",$H="[object GeneratorFunction]",DH=/[\\^$.*+?()[\]{}|]/g,PH=/^\[object .+?Constructor\]$/,zH=typeof ct=="object"&&ct&&ct.Object===Object&&ct,FH=typeof self=="object"&&self&&self.Object===Object&&self,LM=zH||FH||Function("return this")();function BH(t,e){return t==null?void 0:t[e]}function HH(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var UH=Array.prototype,WH=Function.prototype,NM=Object.prototype,y1=LM["__core-js_shared__"],DC=function(){var t=/[^.]+$/.exec(y1&&y1.keys&&y1.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),$M=WH.toString,Yb=NM.hasOwnProperty,VH=NM.toString,jH=RegExp("^"+$M.call(Yb).replace(DH,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),GH=UH.splice,KH=DM(LM,"Map"),Qd=DM(Object,"create");function el(t){var e=-1,n=t?t.length:0;for(this.clear();++e-1}function r6(t,e){var n=this.__data__,r=_m(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}pu.prototype.clear=QH;pu.prototype.delete=e6;pu.prototype.get=t6;pu.prototype.has=n6;pu.prototype.set=r6;function bl(t){var e=-1,n=t?t.length:0;for(this.clear();++e4&&n.slice(0,4)===ew&&s9.test(e)&&(e.charAt(4)==="-"?r=c9(e):e=u9(e),o=r9),new o(r,e))}function c9(t){var e=t.slice(5).replace(GM,h9);return ew+e.charAt(0).toUpperCase()+e.slice(1)}function u9(t){var e=t.slice(4);return GM.test(e)?t:(e=e.replace(a9,d9),e.charAt(0)!=="-"&&(e="-"+e),ew+e)}function d9(t){return"-"+t.toLowerCase()}function h9(t){return t.charAt(1).toUpperCase()}var p9=f9,HC=/[#.]/g;function f9(t,e){for(var n=t||"",r=e||"div",o={},i=0,s,l,a;i=48&&e<=57}var DU=PU;function PU(t){var e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}var zU=FU;function FU(t){var e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}var BU=zU,HU=XM,UU=WU;function WU(t){return BU(t)||HU(t)}var Dp,VU=59,jU=GU;function GU(t){var e="&"+t+";",n;return Dp=Dp||document.createElement("i"),Dp.innerHTML=e,n=Dp.textContent,n.charCodeAt(n.length-1)===VU&&t!=="semi"||n===e?!1:n}var YC=LU,XC=NU,KU=XM,YU=DU,qM=UU,XU=jU,qU=c7,ZU={}.hasOwnProperty,Pl=String.fromCharCode,JU=Function.prototype,qC={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},QU=9,ZC=10,e7=12,t7=32,JC=38,n7=59,r7=60,o7=61,i7=35,s7=88,a7=120,l7=65533,Zl="named",rw="hexadecimal",ow="decimal",iw={};iw[rw]=16;iw[ow]=10;var Mm={};Mm[Zl]=qM;Mm[ow]=KU;Mm[rw]=YU;var ZM=1,JM=2,QM=3,eO=4,tO=5,K0=6,nO=7,ra={};ra[ZM]="Named character references must be terminated by a semicolon";ra[JM]="Numeric character references must be terminated by a semicolon";ra[QM]="Named character references cannot be empty";ra[eO]="Numeric character references cannot be empty";ra[tO]="Named character references must be known";ra[K0]="Numeric character references cannot be disallowed";ra[nO]="Numeric character references cannot be outside the permissible Unicode range";function c7(t,e){var n={},r,o;e||(e={});for(o in qC)r=e[o],n[o]=r??qC[o];return(n.position.indent||n.position.start)&&(n.indent=n.position.indent||[],n.position=n.position.start),u7(t,n)}function u7(t,e){var n=e.additional,r=e.nonTerminated,o=e.text,i=e.reference,s=e.warning,l=e.textContext,a=e.referenceContext,u=e.warningContext,c=e.position,d=e.indent||[],h=t.length,p=0,f=-1,g=c.column||1,m=c.line||1,v="",y=[],b,w,k,x,S,A,C,O,R,_,T,E,M,I,N,L,$,D,F;for(typeof n=="string"&&(n=n.charCodeAt(0)),L=U(),O=s?W:JU,p--,h++;++p65535&&(A-=65536,_+=Pl(A>>>10|55296),A=56320|A&1023),A=_+Pl(A))):I!==Zl&&O(eO,D)),A?(B(),L=U(),p=F-1,g+=F-M+1,y.push(A),$=U(),$.offset++,i&&i.call(a,A,{start:L,end:$},t.slice(M-1,F)),L=$):(x=t.slice(M-1,F),v+=x,g+=x.length,p=F-1)}else S===10&&(m++,f++,g=0),S===S?(v+=Pl(S),g++):B();return y.join("");function U(){return{line:m,column:g,offset:p+(c.offset||0)}}function W(H,G){var Y=U();Y.column+=G,Y.offset+=G,s.call(u,ra[H],Y,H)}function B(){v&&(y.push(v),o&&o.call(l,v,{start:L,end:U()}),v="")}}function d7(t){return t>=55296&&t<=57343||t>1114111}function h7(t){return t>=1&&t<=8||t===11||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534}var rO={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** +`,xs)}getHTML(t=this.store.getState()){return UF(t.doc,this.store.document)}textToProsemirrorNode(t){const e=`
${t.content}
`;return this.store.stringHandlers.html({...t,content:e})}};ge([it()],mo.prototype,"isSelectionEmpty",1);ge([it()],mo.prototype,"isViewEditable",1);ge([it()],mo.prototype,"getStateJSON",1);ge([it()],mo.prototype,"getJSON",1);ge([it()],mo.prototype,"getRemirrorJSON",1);ge([le()],mo.prototype,"insertHtml",1);ge([it()],mo.prototype,"getText",1);ge([it()],mo.prototype,"getTextBetween",1);ge([it()],mo.prototype,"getHTML",1);mo=ge([Ne({})],mo);var V0=class extends ft{get name(){return"inputRules"}onCreate(){this.store.setExtensionStore("rebuildInputRules",this.rebuildInputRules.bind(this))}createExternalPlugins(){return[this.generateInputRulesPlugin()]}generateInputRulesPlugin(){var t,e;const n=[],r=this.store.markTags[ke.ExcludeInputRules];for(const o of this.store.extensions)if(!((t=this.store.managerSettings.exclude)!=null&&t.inputRules||!o.createInputRules||(e=o.options.exclude)!=null&&e.inputRules))for(const i of o.createInputRules())i.shouldSkip=this.options.shouldSkipInputRule,i.invalidMarks=r,n.push(i);return o3({rules:n})}rebuildInputRules(){this.store.updateExtensionPlugins(this)}};V0=ge([Ne({defaultPriority:ot.Default,handlerKeys:["shouldSkipInputRule"],handlerKeyOptions:{shouldSkipInputRule:{earlyReturnValue:!0}}})],V0);var Do=class extends ft{constructor(){super(...arguments),this.extraKeyBindings=[],this.backwardMarkExitTracker=new Map,this.keydownHandler=null,this.onAddCustomHandler=({keymap:t})=>{var e,n;if(t)return this.extraKeyBindings=[...this.extraKeyBindings,t],(n=(e=this.store).rebuildKeymap)==null||n.call(e),()=>{var r,o;this.extraKeyBindings=this.extraKeyBindings.filter(i=>i!==t),(o=(r=this.store).rebuildKeymap)==null||o.call(r)}},this.rebuildKeymap=()=>{this.setupKeydownHandler()}}get name(){return"keymap"}get shortcutMap(){const{shortcuts:t}=this.options;return Ee(t)?lH[t]:t}onCreate(){this.store.setExtensionStore("rebuildKeymap",this.rebuildKeymap)}createExternalPlugins(){var t;return(t=this.store.managerSettings.exclude)!=null&&t.keymap?[]:(this.setupKeydownHandler(),[new mi({props:{handleKeyDown:(e,n)=>{var r;return(r=this.keydownHandler)==null?void 0:r.call(this,e,n)}}})])}setupKeydownHandler(){const t=this.generateKeymapBindings();this.keydownHandler=Yb(t)}generateKeymapBindings(){var t;const e=[],n=this.shortcutMap,r=this.store.getExtension(Ue),o=l=>a=>vf({shortcut:a,map:n,store:this.store,options:l.options});for(const l of this.store.extensions){const a=l.decoratedKeybindings??{};if(!((t=l.options.exclude)!=null&&t.keymap)){l.createKeymap&&e.push(sH(l.createKeymap(o(l)),n));for(const[u,c]of an(a)){if(c.isActive&&!c.isActive(l.options,this.store))continue;const d=l[u].bind(l),h=vf({shortcut:c.shortcut,map:n,options:l.options,store:this.store}),p=Qe(c.priority)?c.priority(l.options,this.store):c.priority??ot.Low,f=ye();for(const g of h)f[g]=d;e.push([p,f]),c.command&&r.updateDecorated(c.command,{shortcut:h})}}}const i=this.sortKeymaps([...this.extraKeyBindings,...e]);return bF(i)}arrowRightShortcut(t){const e=this.store.markTags[ke.PreventExits],n=this.store.nodeTags[ke.PreventExits];return this.exitMarkForwards(e,n)(t)}arrowLeftShortcut(t){const e=this.store.markTags[ke.PreventExits],n=this.store.nodeTags[ke.PreventExits];return ag(this.exitNodeBackwards(n),this.exitMarkBackwards(e,n))(t)}backspace(t){const e=this.store.markTags[ke.PreventExits],n=this.store.nodeTags[ke.PreventExits];return ag(this.exitNodeBackwards(n,!0),this.exitMarkBackwards(e,n,!0))(t)}createKeymap(){const{selectParentNodeOnEscape:t,undoInputRuleOnBackspace:e,excludeBaseKeymap:n}=this.options,r=ye();if(!n)for(const[o,i]of an(g1))r[o]=Ad(i);return e&&g1.Backspace&&(r.Backspace=Ad(Sm(i3,g1.Backspace))),t&&(r.Escape=Ad(mB)),[ot.Low,r]}getNamedShortcut(t,e={}){return t.startsWith("_|")?vf({shortcut:t,map:this.shortcutMap,store:this.store,options:e}):[t]}onSetOptions(t){var e,n;const{changes:r}=t;(r.excludeBaseKeymap.changed||r.selectParentNodeOnEscape.changed||r.undoInputRuleOnBackspace.changed)&&((n=(e=this.store).rebuildKeymap)==null||n.call(e))}sortKeymaps(t){return Us(t.map(e=>Pt(e)?e:[ot.Default,e]),(e,n)=>n[0]-e[0]).map(e=>e[1])}exitMarkForwards(t,e){return n=>{const{tr:r,dispatch:o}=n;if(!GF(r.selection)||pi({selection:r.selection,types:e}))return!1;const l=r.selection.$from.marks().filter(a=>!t.includes(a.type.name));if(Hs(l))return!1;if(!o)return!0;for(const a of l)r.removeStoredMark(a);return o(r.insertText(" ",r.selection.from)),!0}}exitNodeBackwards(t,e=!1){return n=>{const{tr:r}=n;if(!(e?MC:U0)(r.selection))return!1;const i=r.selection.$anchor.node();return!xm(i)||RF(i)||t.includes(i.type.name)?!1:this.store.commands.toggleBlockNodeItem.original({type:i.type})(n)}}exitMarkBackwards(t,e,n=!1){return r=>{const{tr:o,dispatch:i}=r;if(!(n?MC:U0)(o.selection)||this.backwardMarkExitTracker.has(o.selection.anchor))return this.backwardMarkExitTracker.clear(),!1;if(pi({selection:o.selection,types:e}))return!1;const a=[...o.storedMarks??[],...o.selection.$from.marks()].filter(u=>!t.includes(u.type.name));if(Hs(a))return!1;if(!i)return!0;for(const u of a)o.removeStoredMark(u);return this.backwardMarkExitTracker.set(o.selection.anchor,!0),i(o),!0}}};ge([en({shortcut:"ArrowRight",isActive:t=>t.exitMarksOnArrowPress})],Do.prototype,"arrowRightShortcut",1);ge([en({shortcut:"ArrowLeft",isActive:t=>t.exitMarksOnArrowPress})],Do.prototype,"arrowLeftShortcut",1);ge([en({shortcut:"Backspace",isActive:t=>t.exitMarksOnArrowPress})],Do.prototype,"backspace",1);ge([it()],Do.prototype,"getNamedShortcut",1);Do=ge([Ne({defaultPriority:ot.Low,defaultOptions:{shortcuts:"default",undoInputRuleOnBackspace:!0,selectParentNodeOnEscape:!1,excludeBaseKeymap:!1,exitMarksOnArrowPress:!0},customHandlerKeys:["keymap"]})],Do);function iH(t){return ir(Uh(oe),t)}function vf({shortcut:t,map:e,options:n,store:r}){return Ee(t)?[j0(t,e)]:Pt(t)?t.map(o=>j0(o,e)):(t=t(n,r),vf({shortcut:t,map:e,options:n,store:r}))}function j0(t,e){return iH(t)?e[t]:t}function sH(t,e){const n={};let r,o;Pt(t)?[o,r]=t:r=t;for(const[i,s]of an(r))n[j0(i,e)]=s;return hm(o)?n:[o,n]}var RM={[oe.Copy]:"Mod-c",[oe.Cut]:"Mod-x",[oe.Paste]:"Mod-v",[oe.PastePlain]:"Mod-Shift-v",[oe.SelectAll]:"Mod-a",[oe.Undo]:"Mod-z",[oe.Redo]:yr.isMac?"Shift-Mod-z":"Mod-y",[oe.Bold]:"Mod-b",[oe.Italic]:"Mod-i",[oe.Underline]:"Mod-u",[oe.Strike]:"Mod-d",[oe.Code]:"Mod-`",[oe.Paragraph]:"Mod-Shift-0",[oe.H1]:"Mod-Shift-1",[oe.H2]:"Mod-Shift-2",[oe.H3]:"Mod-Shift-3",[oe.H4]:"Mod-Shift-4",[oe.H5]:"Mod-Shift-5",[oe.H6]:"Mod-Shift-6",[oe.TaskList]:"Mod-Shift-7",[oe.BulletList]:"Mod-Shift-8",[oe.OrderedList]:"Mod-Shift-9",[oe.Quote]:"Mod->",[oe.Divider]:"Mod-Shift-|",[oe.Codeblock]:"Mod-Shift-~",[oe.ClearFormatting]:"Mod-Shift-C",[oe.Superscript]:"Mod-.",[oe.Subscript]:"Mod-,",[oe.LeftAlignment]:"Mod-Shift-L",[oe.CenterAlignment]:"Mod-Shift-E",[oe.RightAlignment]:"Mod-Shift-R",[oe.JustifyAlignment]:"Mod-Shift-J",[oe.InsertLink]:"Mod-k",[oe.Find]:"Mod-f",[oe.FindBackwards]:"Mod-Shift-f",[oe.FindReplace]:"Mod-Shift-H",[oe.AddFootnote]:"Mod-Alt-f",[oe.AddComment]:"Mod-Alt-m",[oe.ContextMenu]:"Mod-Shift-\\",[oe.IncreaseFontSize]:"Mod-Shift-.",[oe.DecreaseFontSize]:"Mod-Shift-,",[oe.IncreaseIndent]:"Tab",[oe.DecreaseIndent]:"Shift-Tab",[oe.Shortcuts]:"Mod-/",[oe.Format]:yr.isMac?"Alt-Shift-f":"Shift-Ctrl-f"},aH={...RM,[oe.Strike]:"Mod-Shift-S",[oe.Code]:"Mod-Shift-M",[oe.Paragraph]:"Mod-Alt-0",[oe.H1]:"Mod-Alt-1",[oe.H2]:"Mod-Alt-2",[oe.H3]:"Mod-Alt-3",[oe.H4]:"Mod-Alt-4",[oe.H5]:"Mod-Alt-5",[oe.H6]:"Mod-Alt-6",[oe.OrderedList]:"Mod-Alt-7",[oe.BulletList]:"Mod-Alt-8",[oe.Quote]:"Mod-Alt-9",[oe.ClearFormatting]:"Mod-\\",[oe.IncreaseIndent]:"Mod-[",[oe.DecreaseIndent]:"Mod-]"},lH={default:RM,googleDoc:aH},cH=class extends ft{get name(){return"nodeViews"}createPlugin(){const t=[],e=ye();for(const n of this.store.extensions){if(!n.createNodeViews)continue;const r=n.createNodeViews();t.unshift(Qe(r)?{[n.name]:r}:r)}t.unshift(this.store.managerSettings.nodeViews??{});for(const n of t)Object.assign(e,n);return{props:{nodeViews:e}}}},uH=class extends ft{get name(){return"pasteRules"}createExternalPlugins(){return[this.generatePasteRulesPlugin()]}generatePasteRulesPlugin(){var t,e;const n=[];for(const r of this.store.extensions){if((t=this.store.managerSettings.exclude)!=null&&t.pasteRules||!r.createPasteRules||(e=r.options.exclude)!=null&&e.pasteRules)continue;const o=r.createPasteRules(),i=Pt(o)?o:[o];n.push(...i)}return MB(n)}},ug=class extends ft{constructor(){super(...arguments),this.plugins=[],this.managerPlugins=[],this.applyStateHandlers=[],this.initStateHandlers=[],this.appendTransactionHandlers=[],this.pluginKeys=ye(),this.stateGetters=new Map,this.getPluginStateCreator=t=>e=>t.getState(e??this.store.getState()),this.getStateByName=t=>{const e=this.stateGetters.get(t);return we(e,{message:"No plugin exists for the requested extension name."}),e()}}get name(){return"plugins"}onCreate(){const{setStoreKey:t,setExtensionStore:e,managerSettings:n,extensions:r}=this.store;this.updateExtensionStore();const{plugins:o=[]}=n;this.updatePlugins(o,this.managerPlugins);for(const i of r)i.onApplyState&&this.applyStateHandlers.push(i.onApplyState.bind(i)),i.onInitState&&this.initStateHandlers.push(i.onInitState.bind(i)),i.onAppendTransaction&&this.appendTransactionHandlers.push(i.onAppendTransaction.bind(i)),this.extractExtensionPlugins(i);this.managerPlugins=o,this.store.setStoreKey("plugins",this.plugins),t("pluginKeys",this.pluginKeys),t("getPluginState",this.getStateByName),e("getPluginState",this.getStateByName)}createPlugin(){return{appendTransaction:(t,e,n)=>{const r=n.tr,o={previousState:e,tr:r,transactions:t,state:n};for(const i of this.appendTransactionHandlers)i(o);return this.options.appendTransaction(o),r.docChanged||r.steps.length>0||r.selectionSet||r.storedMarksSet?r:void 0},state:{init:(t,e)=>{for(const n of this.initStateHandlers)n(e)},apply:(t,e,n,r)=>{const o={previousState:n,state:r,tr:t};for(const i of this.applyStateHandlers)i(o);this.options.applyState(o)}}}}extractExtensionPlugins(t){var e,n;if(!(!t.createPlugin&&!t.createExternalPlugins||(e=this.store.managerSettings.exclude)!=null&&e.plugins||(n=t.options.exclude)!=null&&n.plugins)){if(t.createPlugin){const o=new vl(t.name);this.pluginKeys[t.name]=o;const i=this.getPluginStateCreator(o);t.pluginKey=o,t.getPluginState=i,this.stateGetters.set(t.name,i),this.stateGetters.set(t.constructor,i);const s={...t.createPlugin(),key:o},l=new mi(s);this.updatePlugins([l],t.plugin?[t.plugin]:void 0),t.plugin=l}if(t.createExternalPlugins){const o=t.createExternalPlugins();this.updatePlugins(o,t.externalPlugins),t.externalPlugins=o}}}updatePlugins(t,e){if(!e||Hs(e)){this.plugins=[...this.plugins,...t];return}if(t.length!==e.length){this.plugins=[...this.plugins.filter(r=>!e.includes(r)),...t];return}const n=new Map;for(const[r,o]of t.entries())n.set(Mt(e,r),o);this.plugins=this.plugins.map(r=>e.includes(r)?n.get(r):r)}updateExtensionStore(){const{setExtensionStore:t}=this.store;t("updatePlugins",this.updatePlugins.bind(this)),t("dispatchPluginUpdate",this.dispatchPluginUpdate.bind(this)),t("updateExtensionPlugins",this.updateExtensionPlugins.bind(this))}updateExtensionPlugins(t){const e=AM(t)?t:XB(t)?this.store.manager.getExtension(t):this.store.extensions.find(n=>n.name===t);we(e,{code:re.INVALID_MANAGER_EXTENSION,message:`The extension ${t} does not exist within the editor.`}),this.extractExtensionPlugins(e),this.store.setStoreKey("plugins",this.plugins),this.dispatchPluginUpdate()}dispatchPluginUpdate(){we(this.store.phase>=mr.EditorView,{code:re.MANAGER_PHASE_ERROR,message:"`dispatchPluginUpdate` should only be called after the view has been added to the manager."});const{view:t,updateState:e}=this.store,n=t.state.reconfigure({plugins:this.plugins});e(n)}};ug=ge([Ne({defaultPriority:ot.Highest,handlerKeys:["applyState","appendTransaction"]})],ug);var G0=class extends ft{constructor(){super(...arguments),this.dynamicAttributes={marks:ye(),nodes:ye()}}get name(){return"schema"}onCreate(){const{managerSettings:t,tags:e,markNames:n,nodeNames:r,extensions:o}=this.store,{defaultBlockNode:i,disableExtraAttributes:s,nodeOverride:l,markOverride:a}=t,u=f=>!!(f&&e[ke.Block].includes(f));if(t.schema){const{nodes:f,marks:g}=yH(t.schema);this.addSchema(t.schema,f,g);return}const c=u(i)?{doc:ye(),[i]:ye()}:ye(),d=ye(),h=dH({settings:t,gatheredSchemaAttributes:this.gatherExtraAttributes(o),nodeNames:r,markNames:n,tags:e});for(const f of o){h[f.name]={...h[f.name],...f.options.extraAttributes};const g=s===!0||f.options.disableExtraAttributes===!0||f.constructor.disableExtraAttributes===!0;if(Zh(f)){const{spec:m,dynamic:v}=$C({createExtensionSpec:(y,b)=>f.createNodeSpec(y,b),extraAttributes:Mt(h,f.name),override:{...l,...f.options.nodeOverride},ignoreExtraAttributes:g,name:f.constructorName,tags:f.tags});f.spec=m,c[f.name]=m,Object.keys(v).length>0&&(this.dynamicAttributes.nodes[f.name]=v)}if(Am(f)){const{spec:m,dynamic:v}=$C({createExtensionSpec:(y,b)=>f.createMarkSpec(y,b),extraAttributes:Mt(h,f.name),override:{...a,...f.options.markOverride},ignoreExtraAttributes:g,name:f.constructorName,tags:f.tags??[]});f.spec=m,d[f.name]=m,Object.keys(v).length>0&&(this.dynamicAttributes.marks[f.name]=v)}}const p=new uP({nodes:c,marks:d,topNode:"doc"});this.addSchema(p,c,d)}createPlugin(){return{appendTransaction:(t,e,n)=>{const{tr:r}=n;return!t.some(i=>i.docChanged)||Object.keys(this.dynamicAttributes.nodes).length===0&&Object.keys(this.dynamicAttributes.marks).length===0?null:(r.doc.descendants((i,s)=>(this.checkAndUpdateDynamicNodes(i,s,r),this.checkAndUpdateDynamicMarks(i,s,r),!0)),r.steps.length>0?r:null)}}}addSchema(t,e,n){this.store.setStoreKey("nodes",e),this.store.setStoreKey("marks",n),this.store.setStoreKey("schema",t),this.store.setExtensionStore("schema",t),this.store.setStoreKey("defaultBlockNode",wm(t).name);for(const r of Object.values(t.nodes))if(r.name!=="doc"&&(r.isBlock||r.isTextblock))break}checkAndUpdateDynamicNodes(t,e,n){for(const[r,o]of an(this.dynamicAttributes.nodes))if(t.type.name===r)for(const[i,s]of an(o)){if(!Bs(t.attrs[i]))continue;const l={...t.attrs,[i]:s(t)};n.setNodeMarkup(e,void 0,l),TC(n)}}checkAndUpdateDynamicMarks(t,e,n){for(const[r,o]of an(this.dynamicAttributes.marks)){const i=Mt(this.store.schema.marks,r),s=t.marks.find(l=>l.type.name===r);if(s)for(const[l,a]of an(o)){if(!Bs(s.attrs[l]))continue;const u=Hi(n.doc.resolve(e),i);if(!u)continue;const{from:c,to:d}=u,h=i.create({...s.attrs,[l]:a(s)});n.removeMark(c,d,i).addMark(c,d,h),TC(n)}}}gatherExtraAttributes(t){const e=[];for(const n of t)n.createSchemaAttributes&&e.push(...n.createSchemaAttributes());return e}};G0=ge([Ne({defaultPriority:ot.Highest})],G0);function dH(t){const{settings:e,gatheredSchemaAttributes:n,nodeNames:r,markNames:o,tags:i}=t,s=ye();if(e.disableExtraAttributes)return s;const l=[...n,...e.extraAttributes??[]];for(const a of l??[]){const u=pH({identifiers:a.identifiers,nodeNames:r,markNames:o,tags:i});for(const c of u){const d=s[c]??{};s[c]={...d,...a.attributes}}}return s}function hH(t){return Qs(t)&&Pt(t.tags)}function pH(t){const{identifiers:e,nodeNames:n,markNames:r,tags:o}=t;if(e==="nodes")return n;if(e==="marks")return r;if(e==="all")return[...n,...r];if(Pt(e))return e;we(hH(e),{code:re.EXTENSION_EXTRA_ATTRIBUTES,message:"Invalid value passed as an identifier when creating `extraAttributes`."});const{tags:i=[],names:s=[],behavior:l="any",excludeNames:a,excludeTags:u,type:c}=e,d=new Set,h=c==="mark"?r:c==="node"?n:[...r,...n],p=g=>h.includes(g)&&!(a!=null&&a.includes(g));for(const g of s)p(g)&&d.add(g);const f=new Map;for(const g of i)if(!(u!=null&&u.includes(g)))for(const m of o[g]){if(!p(m))continue;if(l==="any"){d.add(m);continue}const v=f.get(m)??new Set;v.add(g),f.set(m,v)}for(const[g,m]of f)m.size===i.length&&d.add(g);return[...d]}function $C(t){var e;const{createExtensionSpec:n,extraAttributes:r,ignoreExtraAttributes:o,name:i,tags:s,override:l}=t,a=ye();function u(m,v){a[m]=v}let c=!1;function d(){c=!0}const h=fH(r,o,d,u),p=gH(r,o),f=mH(r,o),g=n({defaults:h,parse:p,dom:f},l);return we(o||c,{code:re.EXTENSION_SPEC,message:`When creating a node specification you must call the 'defaults', and parse, and 'dom' methods. To avoid this error you can set the static property 'disableExtraAttributes' of '${i}' to 'true'.`}),g.group=[...((e=g.group)==null?void 0:e.split(" "))??[],...s].join(" ")||void 0,{spec:g,dynamic:a}}function Xb(t){return Ee(t)||Qe(t)?{default:t}:(we(t,{message:`${_R(t)} is not supported`,code:re.EXTENSION_EXTRA_ATTRIBUTES}),t)}function fH(t,e,n,r){return()=>{n();const o=ye();if(e)return o;for(const[i,s]of an(t)){let a=Xb(s).default;Qe(a)&&(r(i,a),a=null),o[i]=a===void 0?{}:{default:a}}return o}}function gH(t,e){return n=>{const r=ye();if(e)return r;for(const[o,i]of an(t)){const{parseDOM:s,...l}=Xb(i);if(Vt(n)){if(Bs(s)){r[o]=n.getAttribute(o)??l.default;continue}if(Qe(s)){r[o]=s(n)??l.default;continue}r[o]=n.getAttribute(s)??l.default}}return r}}function mH(t,e){return n=>{const r=ye();if(e)return r;function o(i,s){if(i){if(Ee(i)){r[s]=i;return}if(Pt(i)){const[l,a]=i;r[l]=a??n.attrs[s];return}for(const[l,a]of an(i))r[l]=a}}for(const[i,s]of an(t)){const{toDOM:l,parseDOM:a}=Xb(s);if(Bs(l)){const u=Ee(a)?a:i;r[u]=n.attrs[i];continue}if(Qe(l)){o(l(n.attrs,vH(n)),i);continue}o(l,i)}return r}}function vH(t){return Xh(t)?{node:t}:CF(t)?{mark:t}:{}}function yH(t){const e=ye(),n=ye();for(const[r,o]of Object.entries(t.nodes))e[r]=o.spec;for(const[r,o]of Object.entries(t.marks))n[r]=o.spec;return{nodes:e,marks:n}}var Bc=class extends ft{constructor(){super(...arguments),this.onAddCustomHandler=({suggester:t})=>{var e;if(!(!t||(e=this.store.managerSettings.exclude)!=null&&e.suggesters))return CC(this.store.getState(),t)}}get name(){return"suggest"}onCreate(){this.store.setExtensionStore("addSuggester",t=>CC(this.store.getState(),t)),this.store.setExtensionStore("removeSuggester",t=>lF(this.store.getState(),t))}createExternalPlugins(){var t,e;const n=[];for(const r of this.store.extensions){if((t=this.store.managerSettings.exclude)!=null&&t.suggesters)break;if(!r.createSuggesters||(e=r.options.exclude)!=null&&e.suggesters)continue;const o=r.createSuggesters(),i=Pt(o)?o:[o];n.push(...i)}return[cF(...n)]}getSuggestState(t){return Bb(t??this.store.getState())}getSuggestMethods(){const{addIgnored:t,clearIgnored:e,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:l}=this.getSuggestState();return{addIgnored:t,clearIgnored:e,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:l}}isSuggesterActive(t){var e;return ir(Pt(t)?t:[t],(e=this.getSuggestState().match)==null?void 0:e.suggester.name)}};ge([it()],Bc.prototype,"getSuggestState",1);ge([it()],Bc.prototype,"getSuggestMethods",1);ge([it()],Bc.prototype,"isSuggesterActive",1);Bc=ge([Ne({customHandlerKeys:["suggester"]})],Bc);var K0=class extends ft{constructor(){super(...arguments),this.allTags=ye(),this.plainTags=ye(),this.markTags=ye(),this.nodeTags=ye()}get name(){return"tags"}onCreate(){this.resetTags();for(const t of this.store.extensions)this.updateTagForExtension(t);this.store.setStoreKey("tags",this.allTags),this.store.setExtensionStore("tags",this.allTags),this.store.setStoreKey("plainTags",this.plainTags),this.store.setExtensionStore("plainTags",this.plainTags),this.store.setStoreKey("markTags",this.markTags),this.store.setExtensionStore("markTags",this.markTags),this.store.setStoreKey("nodeTags",this.nodeTags),this.store.setExtensionStore("nodeTags",this.nodeTags)}resetTags(){const t=ye(),e=ye(),n=ye(),r=ye();for(const o of Uh(ke))t[o]=[],e[o]=[],n[o]=[],r[o]=[];this.allTags=t,this.plainTags=e,this.markTags=n,this.nodeTags=r}updateTagForExtension(t){var e,n;const r=new Set([...t.tags??[],...((e=t.createTags)==null?void 0:e.call(t))??[],...t.options.extraTags??[],...((n=this.store.managerSettings.extraTags)==null?void 0:n[t.name])??[]]);for(const o of r)we(bH(o),{code:re.EXTENSION,message:`The tag provided by the extension: ${t.constructorName} is not supported by the editor. To add custom tags you can use the 'mutateTag' method.`}),this.allTags[o].push(t.name),_M(t)&&this.plainTags[o].push(t.name),Am(t)&&this.markTags[o].push(t.name),Zh(t)&&this.nodeTags[o].push(t.name);t.tags=[...r]}};K0=ge([Ne({defaultPriority:ot.Highest})],K0);function bH(t){return ir(Uh(ke),t)}var wH=new vl("remirrorFilePlaceholderPlugin");function xH(){const t=new mi({key:wH,state:{init(){return{set:He.empty,payloads:new Map}},apply(e,{set:n,payloads:r}){n=n.map(e.mapping,e.doc);const o=e.getMeta(t);if(o)if(o.type===0){const i=document.createElement("placeholder"),s=vt.widget(o.pos,i,{id:o.id});n=n.add(e.doc,[s]),r.set(o.id,o.payload)}else o.type===1&&(n=n.remove(n.find(void 0,void 0,i=>i.id===o.id)),r.delete(o.id));return{set:n,payloads:r}}},props:{decorations(e){var n;return((n=t.getState(e))==null?void 0:n.set)??null}}});return t}var kH=class extends ft{get name(){return"upload"}createExternalPlugins(){return[xH()]}};function EH(t={}){t={...{exitMarksOnArrowPress:Do.defaultOptions.exitMarksOnArrowPress,excludeBaseKeymap:Do.defaultOptions.excludeBaseKeymap,selectParentNodeOnEscape:Do.defaultOptions.selectParentNodeOnEscape,undoInputRuleOnBackspace:Do.defaultOptions.undoInputRuleOnBackspace,persistentSelectionClass:Wo.defaultOptions.persistentSelectionClass},...t};const n=w0(t,["excludeBaseKeymap","selectParentNodeOnEscape","undoInputRuleOnBackspace"]),r=w0(t,["persistentSelectionClass"]);return[new K0,new G0,new qB,new ug,new V0,new uH,new cH,new Bc,new Ue,new mo,new Do(n),new W0,new kH,new Wo(r)]}var DC=class extends ft{get name(){return"meta"}onCreate(){if(this.store.setStoreKey("getCommandMeta",this.getCommandMeta.bind(this)),!!this.options.capture)for(const t of this.store.extensions)this.captureCommands(t),this.captureKeybindings(t)}createPlugin(){return{}}captureCommands(t){const e=t.decoratedCommands??{},n=t.createCommands;for(const r of Object.keys(e)){const o=t[r];t[r]=(...i)=>s=>{var l;const a=o(...i)(s);return s.dispatch&&a&&this.setCommandMeta(s.tr,{type:"command",chain:s.dispatch!==((l=s.view)==null?void 0:l.dispatch),name:r,extension:t.name,decorated:!0}),a}}n&&(t.createCommands=()=>{const r=n();for(const[o,i]of Object.entries(r))r[o]=(...s)=>l=>{var a;const u=i(...s)(l);return l.dispatch&&u&&this.setCommandMeta(l.tr,{type:"command",chain:l.dispatch!==((a=l.view)==null?void 0:a.dispatch),name:o,extension:t.name,decorated:!1}),u};return r})}captureKeybindings(t){}getCommandMeta(t){return t.getMeta(this.pluginKey)??[]}setCommandMeta(t,e){const n=this.getCommandMeta(t);t.setMeta(this.pluginKey,[...n,e])}};DC=ge([Ne({defaultOptions:{capture:yr.isDevelopment},staticKeys:["capture"],defaultPriority:ot.Highest})],DC);var yf,Gu,bf,ql,ds,wf,xf,SH=class{constructor(t){qt(this,yf,Oc()),qt(this,Gu,void 0),qt(this,bf,void 0),qt(this,ql,!0),qt(this,ds,Cm()),qt(this,wf,void 0),qt(this,xf,void 0),this.getState=()=>this.view.state??this.initialEditorState,this.getPreviousState=()=>this.previousState,this.dispatchTransaction=i=>{var s,l;we(!this.manager.destroyed,{code:re.MANAGER_PHASE_ERROR,message:"A transaction was dispatched to a manager that has already been destroyed. Please check your set up, or open an issue."}),i=((l=(s=this.props).onDispatchTransaction)==null?void 0:l.call(s,i,this.getState()))??i;const a=this.getState(),{state:u,transactions:c}=a.applyTransaction(i);gn(this,bf,a),this.updateState({state:u,tr:i,transactions:c});const d=this.manager.store.getForcedUpdates(i);Hs(d)||this.updateViewProps(...d)},this.onChange=(i=ye())=>{var s,l;const a=this.eventListenerProps(i);ce(this,ql)&&gn(this,ql,!1),(l=(s=this.props).onChange)==null||l.call(s,a)},this.onBlur=i=>{var s,l;const a=this.eventListenerProps();(l=(s=this.props).onBlur)==null||l.call(s,a,i),ce(this,ds).emit("blur",a,i)},this.onFocus=i=>{var s,l;const a=this.eventListenerProps();(l=(s=this.props).onFocus)==null||l.call(s,a,i),ce(this,ds).emit("focus",a,i)},this.setContent=(i,{triggerChange:s=!1}={})=>{const{doc:l}=this.manager.createState({content:i}),a=this.getState(),{state:u}=this.getState().applyTransaction(a.tr.replaceRangeWith(0,a.doc.nodeSize-2,l));if(s)return this.updateState({state:u,triggerChange:s});this.view.updateState(u)},this.clearContent=({triggerChange:i=!1}={})=>{this.setContent(this.manager.createEmptyDoc(),{triggerChange:i})},this.createStateFromContent=(i,s)=>this.manager.createState({content:i,selection:s}),this.focus=i=>{this.manager.store.commands.focus(i)},this.blur=i=>{this.manager.store.commands.blur(i)};const{getProps:e,initialEditorState:n,element:r}=t;if(gn(this,Gu,e),gn(this,xf,n),this.manager.attachFramework(this,this.updateListener.bind(this)),this.manager.view)return;const o=this.createView(n,r);this.manager.addView(o)}get addHandler(){return ce(this,wf)??gn(this,wf,ce(this,ds).on.bind(ce(this,ds)))}get updatableViewProps(){return{attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0}}get firstRender(){return ce(this,ql)}get props(){return ce(this,Gu).call(this)}get previousState(){return this.previousStateOverride??ce(this,bf)??this.initialEditorState}get manager(){return this.props.manager}get view(){return this.manager.view}get uid(){return ce(this,yf)}get initialEditorState(){return ce(this,xf)}updateListener(t){const{state:e,tr:n}=t;return ce(this,ds).emit("updated",this.eventListenerProps({state:e,tr:n}))}update(t){const{getProps:e}=t;return gn(this,Gu,e),this}updateViewProps(...t){const e=w0(this.updatableViewProps,t);this.view.setProps({...this.view.props,...e})}getAttributes(t){var e;const{attributes:n,autoFocus:r,classNames:o=[],label:i,editable:s}=this.props,l=(e=this.manager.store)==null?void 0:e.attributes,a=Qe(n)?n(this.eventListenerProps()):n;let u={};(r||qr(r))&&(u=t?{autoFocus:!0}:{autofocus:"true"});const c=Ic(Fc(t&&"Prosemirror","remirror-editor",l==null?void 0:l.class,...o).split(" ")).join(" "),d={role:"textbox",...u,"aria-multiline":"true",...s??!0?{}:{"aria-readonly":"true"},"aria-label":i??"",...l,class:c};return MR({...d,...a})}addFocusListeners(){this.view.dom.addEventListener("blur",this.onBlur),this.view.dom.addEventListener("focus",this.onFocus)}removeFocusListeners(){this.view.dom.removeEventListener("blur",this.onBlur),this.view.dom.removeEventListener("focus",this.onFocus)}destroy(){ce(this,ds).emit("destroy"),this.view&&this.removeFocusListeners()}eventListenerProps(t=ye()){const{state:e,tr:n,transactions:r}=t;return{tr:n,transactions:r,internalUpdate:!n,view:this.view,firstRender:ce(this,ql),state:e??this.getState(),createStateFromContent:this.createStateFromContent,previousState:this.previousState,helpers:this.manager.store.helpers}}get baseOutput(){return{manager:this.manager,...this.manager.store,addHandler:this.addHandler,focus:this.focus,blur:this.blur,uid:ce(this,yf),view:this.view,getState:this.getState,getPreviousState:this.getPreviousState,getExtension:this.manager.getExtension.bind(this.manager),hasExtension:this.manager.hasExtension.bind(this.manager),clearContent:this.clearContent,setContent:this.setContent}}};yf=new WeakMap;Gu=new WeakMap;bf=new WeakMap;ql=new WeakMap;ds=new WeakMap;wf=new WeakMap;xf=new WeakMap;function CH(t,e){const n=[],r=new WeakMap,o=[],i=new WeakMap;let s=[];const l={duplicateMap:i,parentExtensions:o,gatheredExtensions:s,settings:e};for(const d of t)MM(l,{extension:d});s=Us(s,(d,h)=>h.priority-d.priority);const a=new WeakSet,u=new Set;for(const d of s){const h=d.constructor,p=d.name,f=i.get(h);we(f,{message:`No entries were found for the ExtensionConstructor ${d.name}`,code:re.INTERNAL}),!(a.has(h)||u.has(p))&&(a.add(h),u.add(p),n.push(d),r.set(h,d),f.forEach(g=>g==null?void 0:g.replaceChildExtension(h,d)))}const c=[];for(const d of n)TH({extension:d,found:a,missing:c});return we(Hs(c),{code:re.MISSING_REQUIRED_EXTENSION,message:c.map(({Constructor:d,extension:h})=>`The extension '${h.name}' requires '${d.name} in order to run correctly.`).join(` +`)}),{extensions:n,extensionMap:r}}function MM(t,e){var n;const{gatheredExtensions:r,duplicateMap:o,parentExtensions:i,settings:s}=t,{extension:l,parentExtension:a}=e;let{names:u=[]}=e;we(AM(l),{code:re.INVALID_MANAGER_EXTENSION,message:`An invalid extension: ${l} was provided to the [[\`RemirrorManager\`]].`});const c=l.extensions;if(l.setPriority((n=s.priority)==null?void 0:n[l.name]),r.push(l),AH({duplicateMap:o,extension:l,parentExtension:a}),c.length!==0){if(u.includes(l.name)){`${u.join(" > ")}${l.name}`;return}u=[...u,l.name],i.push(l);for(const d of c)MM(t,{names:u,extension:d,parentExtension:l})}}function TH(t){const{extension:e,found:n,missing:r}=t;if(e.requiredExtensions)for(const o of e.requiredExtensions??[])n.has(o)||r.push({Constructor:o,extension:e})}function AH(t){const{duplicateMap:e,extension:n,parentExtension:r}=t,o=n.constructor,i=e.get(o),s=r?[r]:[];e.set(o,i?[...i,...s]:s)}function _H(t){var e,n,r,o;const{extension:i,nodeNames:s,markNames:l,plainNames:a,store:u,handlers:c}=t;i.setStore(u);const d=(e=i.onCreate)==null?void 0:e.bind(i),h=(n=i.onView)==null?void 0:n.bind(i),p=(r=i.onStateUpdate)==null?void 0:r.bind(i),f=(o=i.onDestroy)==null?void 0:o.bind(i);d&&c.create.push(d),h&&c.view.push(h),p&&c.update.push(p),f&&c.destroy.push(f),Am(i)&&l.push(i.name),Zh(i)&&i.name!=="doc"&&s.push(i.name),_M(i)&&a.push(i.name)}var hs,Ku,Ro,Si,Yu,Dr,ya,Xu,ba,qu,wa,Mo,Zu,kf=class{constructor(t,e={}){qt(this,hs,void 0),qt(this,Ku,ye()),qt(this,Ro,ye()),qt(this,Si,void 0),qt(this,Yu,void 0),qt(this,Dr,mr.None),qt(this,ya,void 0),qt(this,Xu,!0),qt(this,ba,{create:[],view:[],update:[],destroy:[]}),qt(this,qu,[]),qt(this,wa,Cm()),qt(this,Mo,void 0),qt(this,Zu,void 0),this.getState=()=>{var o;return ce(this,Dr)>=mr.EditorView?this.view.state:(we(ce(this,Mo),{code:re.MANAGER_PHASE_ERROR,message:"`getState` can only be called after the `Framework` or the `EditorView` has been added to the manager`. Check your plugins to make sure that the decorations callback uses the state argument."}),(o=ce(this,Mo))==null?void 0:o.initialEditorState)},this.updateState=o=>{const i=this.getState();this.view.updateState(o),this.onStateUpdate({previousState:i,state:o})};const{extensions:n,extensionMap:r}=CH(t,e);gn(this,ya,e),gn(this,Si,La(n)),gn(this,Yu,r),gn(this,hs,this.createExtensionStore()),gn(this,Dr,mr.Create),this.setupLifecycleHandlers();for(const o of ce(this,ba).create){const i=o();i&&ce(this,qu).push(i)}}static create(t,e={}){return new kf([...$R(t),...EH(e.builtin)],e)}get[Bi](){return yn.Manager}get destroyed(){return ce(this,Dr)===mr.Destroy}get mounted(){return ce(this,Dr)>=mr.EditorView&&ce(this,Dr)ce(this,Si),enumerable:e},phase:{get:()=>ce(this,Dr),enumerable:e},view:{get:()=>this.view,enumerable:e},managerSettings:{get:()=>La(ce(this,ya)),enumerable:e},getState:{value:this.getState,enumerable:e},updateState:{value:this.updateState,enumerable:e},isMounted:{value:()=>this.mounted,enumerable:e},getExtension:{value:this.getExtension.bind(this),enumerable:e},manager:{get:()=>this,enumerable:e},document:{get:()=>this.document,enumerable:e},stringHandlers:{get:()=>ce(this,Ku),enumerable:e},currentState:{get:()=>n??(n=this.getState()),set:o=>{n=o},enumerable:e},previousState:{get:()=>r,set:o=>{r=o},enumerable:e}}),t.getStoreKey=this.getStoreKey.bind(this),t.setStoreKey=this.setStoreKey.bind(this),t.setExtensionStore=this.setExtensionStore.bind(this),t.setStringHandler=this.setStringHandler.bind(this),t}addView(t){if(ce(this,Dr)>=mr.EditorView)return this;gn(this,Xu,!0),gn(this,Dr,mr.EditorView),ce(this,Ro).view=t;for(const e of ce(this,ba).view){const n=e(t);n&&ce(this,qu).push(n)}return this}attachFramework(t,e){var n;ce(this,Mo)!==t&&(ce(this,Mo)&&(ce(this,Mo).destroy(),(n=ce(this,Zu))==null||n.call(this)),gn(this,Mo,t),gn(this,Zu,this.addHandler("stateUpdate",e)))}createEmptyDoc(){var t;const e=(t=this.schema.nodes.doc)==null?void 0:t.createAndFill();return we(e,{code:re.INVALID_CONTENT,message:"An empty node could not be created due to an invalid schema."}),e}createState(t={}){const{onError:e,defaultSelection:n="end"}=this.settings,{content:r=this.createEmptyDoc(),selection:o=n,stringHandler:i=this.settings.stringHandler}=t,{schema:s,plugins:l}=this.store,a=lM({stringHandler:Ee(i)?this.stringHandlers[i]:i,document:this.document,content:r,onError:e,schema:s,selection:o});return Na.create({schema:s,doc:a,plugins:l,selection:cr(o,a)})}addHandler(t,e){return ce(this,wa).on(t,e)}onStateUpdate(t){const e=ce(this,Xu);ce(this,hs).currentState=t.state,ce(this,hs).previousState=t.previousState,e&&(gn(this,Dr,mr.Runtime),gn(this,Xu,!1));const n={...t,firstUpdate:e};for(const r of ce(this,ba).update)r(n);ce(this,wa).emit("stateUpdate",n)}getExtension(t){const e=ce(this,Yu).get(t);return we(e,{code:re.INVALID_MANAGER_EXTENSION,message:`'${t.name}' doesn't exist within this manager. Make sure it is properly added before attempting to use it.`}),e}hasExtension(t){return!!ce(this,Yu).get(t)}clone(){const t=ce(this,Si).map(n=>n.clone(n.options)),e=kf.create(()=>t,ce(this,ya));return ce(this,wa).emit("clone",e),e}recreate(t=[],e={}){const n=ce(this,Si).map(o=>o.clone(o.initialOptions)),r=kf.create(()=>[...n,...t],e);return ce(this,wa).emit("recreate",r),r}destroy(){var t,e,n,r,o,i;gn(this,Dr,mr.Destroy);for(const s of((t=this.view)==null?void 0:t.state.plugins)??[])(n=(e=s.getState(this.view.state))==null?void 0:e.destroy)==null||n.call(e);(r=ce(this,Mo))==null||r.destroy(),(o=ce(this,Zu))==null||o.call(this);for(const s of ce(this,qu))s();for(const s of ce(this,ba).destroy)s();(i=this.view)==null||i.destroy(),ce(this,wa).emit("destroy")}includes(t){const e=[],n=[];for(const r of ce(this,Si))e.push(r.name,r.constructorName),n.push(r.constructor);return t.every(r=>Ee(r)?ir(e,r):ir(n,r))}},RH=kf;hs=new WeakMap;Ku=new WeakMap;Ro=new WeakMap;Si=new WeakMap;Yu=new WeakMap;Dr=new WeakMap;ya=new WeakMap;Xu=new WeakMap;ba=new WeakMap;qu=new WeakMap;wa=new WeakMap;Mo=new WeakMap;Zu=new WeakMap;function MH(t,e){return!uu(t)||!du(t,yn.Manager)?!1:e?t.includes(e):!0}var OH=Object.defineProperty,IH=Object.getOwnPropertyDescriptor,Jh=(t,e,n,r)=>{for(var o=r>1?void 0:r?IH(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&OH(e,n,o),o},OM=/\S+/g;function IM(t){return t.type.isTextblock?1:t.type.isText?t.textBetween(0,t.nodeSize).length:0}function LH({doc:t},e){let n=0,r=0;return t.nodesBetween(0,t.nodeSize-2,(o,i)=>{if(r>0)return!1;const s=IM(o);return n+s>e?(r=i+1+(e-n),!1):(n+=s,!0)}),r}function NH({doc:t},e){let n=0,r=0;return t.nodesBetween(0,t.nodeSize-2,(o,i)=>{if(r>0)return!1;if(!o.type.isText)return!0;const s=o.textBetween(0,o.nodeSize),l=lu(s,OM);if(n+l.length>e){const a=e-n,u=l[a];return r=i+((u==null?void 0:u.index)??0),!1}return n+=l.length,!0}),r}var Gs=class extends ft{get name(){return"count"}getCountMaximum(){return this.options.maximum}getCharacterCount(t=this.store.getState()){let e=0;return t.doc.nodesBetween(0,t.doc.nodeSize-2,n=>(e+=IM(n),!0)),Math.max(e-1,0)}getWordCount(t=this.store.getState()){const e=this.store.helpers.getText({lineBreakDivider:" ",state:t});return lu(e,OM).length}isCountValid(t=this.store.getState()){const{maximumStrategy:e,maximum:n}=this.options;return n<1?!0:e==="CHARACTERS"?this.store.helpers.getCharacterCount(t)<=n:this.store.helpers.getWordCount(t)<=n}createDecorationSet(t){const{maximum:e=-1,maximumStrategy:n,maximumExceededClassName:r}=this.options,s=(n==="CHARACTERS"?LH:NH)(t,e);return He.create(t.doc,[vt.inline(s,t.doc.nodeSize-2,{class:r})])}createExternalPlugins(){const{maximum:t}=this.options,e=new mi({state:{init:(n,r)=>this.isCountValid(r)?{decorationSet:He.empty}:{decorationSet:this.createDecorationSet(r)},apply:(n,r,o,i)=>!n.docChanged||t<1?r:this.isCountValid(i)?{decorationSet:He.empty}:{decorationSet:this.createDecorationSet(i)}},props:{decorations(n){var r;return((r=e.getState(n))==null?void 0:r.decorationSet)??null}}});return[e]}};Jh([it()],Gs.prototype,"getCountMaximum",1);Jh([it()],Gs.prototype,"getCharacterCount",1);Jh([it()],Gs.prototype,"getWordCount",1);Jh([it()],Gs.prototype,"isCountValid",1);Gs=Jh([Ne({defaultOptions:{maximum:-1,maximumExceededClassName:"remirror-max-count-exceeded",maximumStrategy:"CHARACTERS"},staticKeys:["maximum","maximumStrategy","maximumExceededClassName"]})],Gs);var $H="Expected a function",LM="__lodash_hash_undefined__",DH="[object Function]",PH="[object GeneratorFunction]",zH=/[\\^$.*+?()[\]{}|]/g,FH=/^\[object .+?Constructor\]$/,BH=typeof ct=="object"&&ct&&ct.Object===Object&&ct,HH=typeof self=="object"&&self&&self.Object===Object&&self,NM=BH||HH||Function("return this")();function UH(t,e){return t==null?void 0:t[e]}function WH(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var VH=Array.prototype,jH=Function.prototype,$M=Object.prototype,b1=NM["__core-js_shared__"],PC=function(){var t=/[^.]+$/.exec(b1&&b1.keys&&b1.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),DM=jH.toString,qb=$M.hasOwnProperty,GH=$M.toString,KH=RegExp("^"+DM.call(qb).replace(zH,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),YH=VH.splice,XH=PM(NM,"Map"),Qd=PM(Object,"create");function el(t){var e=-1,n=t?t.length:0;for(this.clear();++e-1}function i6(t,e){var n=this.__data__,r=_m(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}pu.prototype.clear=t6;pu.prototype.delete=n6;pu.prototype.get=r6;pu.prototype.has=o6;pu.prototype.set=i6;function bl(t){var e=-1,n=t?t.length:0;for(this.clear();++e4&&n.slice(0,4)===nw&&l9.test(e)&&(e.charAt(4)==="-"?r=d9(e):e=h9(e),o=i9),new o(r,e))}function d9(t){var e=t.slice(5).replace(KM,f9);return nw+e.charAt(0).toUpperCase()+e.slice(1)}function h9(t){var e=t.slice(4);return KM.test(e)?t:(e=e.replace(c9,p9),e.charAt(0)!=="-"&&(e="-"+e),nw+e)}function p9(t){return"-"+t.toLowerCase()}function f9(t){return t.charAt(1).toUpperCase()}var g9=m9,UC=/[#.]/g;function m9(t,e){for(var n=t||"",r=e||"div",o={},i=0,s,l,a;i=48&&e<=57}var zU=FU;function FU(t){var e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}var BU=HU;function HU(t){var e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}var UU=BU,WU=qM,VU=jU;function jU(t){return UU(t)||WU(t)}var Dp,GU=59,KU=YU;function YU(t){var e="&"+t+";",n;return Dp=Dp||document.createElement("i"),Dp.innerHTML=e,n=Dp.textContent,n.charCodeAt(n.length-1)===GU&&t!=="semi"||n===e?!1:n}var XC=$U,qC=DU,XU=qM,qU=zU,ZM=VU,ZU=KU,JU=d7,QU={}.hasOwnProperty,Pl=String.fromCharCode,e7=Function.prototype,ZC={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},t7=9,JC=10,n7=12,r7=32,QC=38,o7=59,i7=60,s7=61,a7=35,l7=88,c7=120,u7=65533,Zl="named",iw="hexadecimal",sw="decimal",aw={};aw[iw]=16;aw[sw]=10;var Mm={};Mm[Zl]=ZM;Mm[sw]=XU;Mm[iw]=qU;var JM=1,QM=2,eO=3,tO=4,nO=5,X0=6,rO=7,ra={};ra[JM]="Named character references must be terminated by a semicolon";ra[QM]="Numeric character references must be terminated by a semicolon";ra[eO]="Named character references cannot be empty";ra[tO]="Numeric character references cannot be empty";ra[nO]="Named character references must be known";ra[X0]="Numeric character references cannot be disallowed";ra[rO]="Numeric character references cannot be outside the permissible Unicode range";function d7(t,e){var n={},r,o;e||(e={});for(o in ZC)r=e[o],n[o]=r??ZC[o];return(n.position.indent||n.position.start)&&(n.indent=n.position.indent||[],n.position=n.position.start),h7(t,n)}function h7(t,e){var n=e.additional,r=e.nonTerminated,o=e.text,i=e.reference,s=e.warning,l=e.textContext,a=e.referenceContext,u=e.warningContext,c=e.position,d=e.indent||[],h=t.length,p=0,f=-1,g=c.column||1,m=c.line||1,v="",y=[],b,w,k,x,S,A,C,O,R,_,T,E,M,I,N,L,$,P,F;for(typeof n=="string"&&(n=n.charCodeAt(0)),L=H(),O=s?W:e7,p--,h++;++p65535&&(A-=65536,_+=Pl(A>>>10|55296),A=56320|A&1023),A=_+Pl(A))):I!==Zl&&O(tO,P)),A?(B(),L=H(),p=F-1,g+=F-M+1,y.push(A),$=H(),$.offset++,i&&i.call(a,A,{start:L,end:$},t.slice(M-1,F)),L=$):(x=t.slice(M-1,F),v+=x,g+=x.length,p=F-1)}else S===10&&(m++,f++,g=0),S===S?(v+=Pl(S),g++):B();return y.join("");function H(){return{line:m,column:g,offset:p+(c.offset||0)}}function W(U,G){var Y=H();Y.column+=G,Y.offset+=G,s.call(u,ra[U],Y,U)}function B(){v&&(y.push(v),o&&o.call(l,v,{start:L,end:H()}),v="")}}function p7(t){return t>=55296&&t<=57343||t>1114111}function f7(t){return t>=1&&t<=8||t===11||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534}var oO={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** * Prism: Lightweight, robust, elegant syntax highlighting * * @license MIT * @author Lea Verou * @namespace * @public - */var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,s={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function y(b){return b instanceof a?new a(b.type,y(b.content),b.alias):Array.isArray(b)?b.map(y):b.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(k){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(k.stack)||[])[1];if(y){var b=document.getElementsByTagName("script");for(var w in b)if(b[w].src==y)return b[w]}return null}},isActive:function(y,b,w){for(var k="no-"+b;y;){var x=y.classList;if(x.contains(b))return!0;if(x.contains(k))return!1;y=y.parentElement}return!!w}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(y,b){var w=l.util.clone(l.languages[y]);for(var k in b)w[k]=b[k];return w},insertBefore:function(y,b,w,k){k=k||l.languages;var x=k[y],S={};for(var A in x)if(x.hasOwnProperty(A)){if(A==b)for(var C in w)w.hasOwnProperty(C)&&(S[C]=w[C]);w.hasOwnProperty(A)||(S[A]=x[A])}var O=k[y];return k[y]=S,l.languages.DFS(l.languages,function(R,_){_===O&&R!=y&&(this[R]=S)}),S},DFS:function y(b,w,k,x){x=x||{};var S=l.util.objId;for(var A in b)if(b.hasOwnProperty(A)){w.call(b,A,b[A],k||A);var C=b[A],O=l.util.type(C);O==="Object"&&!x[S(C)]?(x[S(C)]=!0,y(C,w,null,x)):O==="Array"&&!x[S(C)]&&(x[S(C)]=!0,y(C,w,A,x))}}},plugins:{},highlightAll:function(y,b){l.highlightAllUnder(document,y,b)},highlightAllUnder:function(y,b,w){var k={callback:w,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",k),k.elements=Array.prototype.slice.apply(k.container.querySelectorAll(k.selector)),l.hooks.run("before-all-elements-highlight",k);for(var x=0,S;S=k.elements[x++];)l.highlightElement(S,b===!0,k.callback)},highlightElement:function(y,b,w){var k=l.util.getLanguage(y),x=l.languages[k];l.util.setLanguage(y,k);var S=y.parentElement;S&&S.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(S,k);var A=y.textContent,C={element:y,language:k,grammar:x,code:A};function O(_){C.highlightedCode=_,l.hooks.run("before-insert",C),C.element.innerHTML=C.highlightedCode,l.hooks.run("after-highlight",C),l.hooks.run("complete",C),w&&w.call(C.element)}if(l.hooks.run("before-sanity-check",C),S=C.element.parentElement,S&&S.nodeName.toLowerCase()==="pre"&&!S.hasAttribute("tabindex")&&S.setAttribute("tabindex","0"),!C.code){l.hooks.run("complete",C),w&&w.call(C.element);return}if(l.hooks.run("before-highlight",C),!C.grammar){O(l.util.encode(C.code));return}if(b&&r.Worker){var R=new Worker(l.filename);R.onmessage=function(_){O(_.data)},R.postMessage(JSON.stringify({language:C.language,code:C.code,immediateClose:!0}))}else O(l.highlight(C.code,C.grammar,C.language))},highlight:function(y,b,w){var k={code:y,grammar:b,language:w};if(l.hooks.run("before-tokenize",k),!k.grammar)throw new Error('The language "'+k.language+'" has no grammar.');return k.tokens=l.tokenize(k.code,k.grammar),l.hooks.run("after-tokenize",k),a.stringify(l.util.encode(k.tokens),k.language)},tokenize:function(y,b){var w=b.rest;if(w){for(var k in w)b[k]=w[k];delete b.rest}var x=new d;return h(x,x.head,y),c(y,x,b,x.head,0),f(x)},hooks:{all:{},add:function(y,b){var w=l.hooks.all;w[y]=w[y]||[],w[y].push(b)},run:function(y,b){var w=l.hooks.all[y];if(!(!w||!w.length))for(var k=0,x;x=w[k++];)x(b)}},Token:a};r.Prism=l;function a(y,b,w,k){this.type=y,this.content=b,this.alias=w,this.length=(k||"").length|0}a.stringify=function y(b,w){if(typeof b=="string")return b;if(Array.isArray(b)){var k="";return b.forEach(function(O){k+=y(O,w)}),k}var x={type:b.type,content:y(b.content,w),tag:"span",classes:["token",b.type],attributes:{},language:w},S=b.alias;S&&(Array.isArray(S)?Array.prototype.push.apply(x.classes,S):x.classes.push(S)),l.hooks.run("wrap",x);var A="";for(var C in x.attributes)A+=" "+C+'="'+(x.attributes[C]||"").replace(/"/g,""")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+A+">"+x.content+""};function u(y,b,w,k){y.lastIndex=b;var x=y.exec(w);if(x&&k&&x[1]){var S=x[1].length;x.index+=S,x[0]=x[0].slice(S)}return x}function c(y,b,w,k,x,S){for(var A in w)if(!(!w.hasOwnProperty(A)||!w[A])){var C=w[A];C=Array.isArray(C)?C:[C];for(var O=0;O=S.reach);$+=L.value.length,L=L.next){var D=L.value;if(b.length>y.length)return;if(!(D instanceof a)){var F=1,U;if(E){if(U=u(N,$,y,T),!U||U.index>=y.length)break;var G=U.index,W=U.index+U[0].length,B=$;for(B+=L.value.length;G>=B;)L=L.next,B+=L.value.length;if(B-=L.value.length,$=B,L.value instanceof a)continue;for(var H=L;H!==b.tail&&(BS.reach&&(S.reach=te);var de=L.prev;X&&(de=h(b,de,X),$+=X.length),p(b,de,F);var Ie=new a(A,_?l.tokenize(Y,_):Y,M,Y);if(L=h(b,de,Ie),Z&&h(b,L,Z),F>1){var ve={cause:A+","+O,reach:te};c(y,b,w,L.prev,$,ve),S&&ve.reach>S.reach&&(S.reach=ve.reach)}}}}}}function d(){var y={value:null,prev:null,next:null},b={value:null,prev:y,next:null};y.next=b,this.head=y,this.tail=b,this.length=0}function h(y,b,w){var k=b.next,x={value:w,prev:b,next:k};return b.next=x,k.prev=x,y.length++,x}function p(y,b,w){for(var k=b.next,x=0;x/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.value.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(n,r){var o={};o["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[r]},o.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:o}};i["language-"+r]={pattern:/[\s\S]+/,inside:t.languages[r]};var s={};s[n]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:i},t.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml}var g7=aw;aw.displayName="css";aw.aliases=[];function aw(t){(function(e){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(t)}var m7=lw;lw.displayName="clike";lw.aliases=[];function lw(t){t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}var v7=cw;cw.displayName="javascript";cw.aliases=["js"];function cw(t){t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript}var Qu=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof ct=="object"?ct:{},y7=N7();Qu.Prism={manual:!0,disableWorkerMessageHandler:!0};var b7=N9,w7=qU,oO=p7,x7=f7,k7=g7,E7=m7,S7=v7;y7();var uw={}.hasOwnProperty;function iO(){}iO.prototype=oO;var Qt=new iO,C7=Qt;Qt.highlight=A7;Qt.register=ep;Qt.alias=T7;Qt.registered=_7;Qt.listLanguages=R7;ep(x7);ep(k7);ep(E7);ep(S7);Qt.util.encode=I7;Qt.Token.stringify=M7;function ep(t){if(typeof t!="function"||!t.displayName)throw new Error("Expected `function` for `grammar`, got `"+t+"`");Qt.languages[t.displayName]===void 0&&t(Qt)}function T7(t,e){var n=Qt.languages,r=t,o,i,s,l;e&&(r={},r[t]=e);for(o in r)for(i=r[o],i=typeof i=="string"?[i]:i,s=i.length,l=-1;++lparseInt(eh(l,2),16)),parseInt(eh(s[3]||"f",2),16)/255]}const r=B7.exec(e);if(r){const s=Array.from(r).slice(1);return[...s.slice(0,3).map(l=>parseInt(l,16)),parseInt(s[3]||"ff",16)/255]}const o=H7.exec(e);if(o){const s=Array.from(o).slice(1);return[...s.slice(0,3).map(l=>parseInt(l,10)),parseFloat(s[3]||"1")]}const i=U7.exec(e);if(i){const[s,l,a,u]=Array.from(i).slice(1).map(parseFloat);if(Li(0,100,l)!==l)throw new ed(t);if(Li(0,100,a)!==a)throw new ed(t);return[...V7(s,l,a),Number.isNaN(u)?1:u]}throw new ed(t)}function D7(t){let e=5381,n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return(e>>>0)%2341}const QC=t=>parseInt(t.replace(/_/g,""),36),P7="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((t,e)=>{const n=QC(e.substring(0,3)),r=QC(e.substring(3)).toString(16);let o="";for(let i=0;i<6-r.length;i++)o+="0";return t[n]=`${o}${r}`,t},{});function z7(t){const e=t.toLowerCase().trim(),n=P7[D7(e)];if(!n)throw new ed(t);return`#${n}`}const eh=(t,e)=>Array.from(Array(e)).map(()=>t).join(""),F7=new RegExp(`^#${eh("([a-f0-9])",3)}([a-f0-9])?$`,"i"),B7=new RegExp(`^#${eh("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),H7=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${eh(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),U7=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,W7=/^[a-z]+$/i,eT=t=>Math.round(t*255),V7=(t,e,n)=>{let r=n/100;if(e===0)return[r,r,r].map(eT);const o=(t%360+360)%360/60,i=(1-Math.abs(2*r-1))*(e/100),s=i*(1-Math.abs(o%2-1));let l=0,a=0,u=0;o>=0&&o<1?(l=i,a=s):o>=1&&o<2?(l=s,a=i):o>=2&&o<3?(a=i,u=s):o>=3&&o<4?(a=s,u=i):o>=4&&o<5?(l=s,u=i):o>=5&&o<6&&(l=i,u=s);const c=r-i/2,d=l+c,h=a+c,p=u+c;return[d,h,p].map(eT)};function j7(t){const[e,n,r,o]=hw(t).map((d,h)=>h===3?d:d/255),i=Math.max(e,n,r),s=Math.min(e,n,r),l=(i+s)/2;if(i===s)return[0,0,l,o];const a=i-s,u=l>.5?a/(2-i-s):a/(i+s);return[60*(e===i?(n-r)/a+(n.179}function xc(t){return X7(t)?"#000":"#fff"}const q7="remirror-editor-wrapper",Z7="remirror-button-active",J7="remirror-button",Q7="remirror-composite",eW="remirror-dialog",tW="remirror-dialog-backdrop",nW="remirror-form",rW="remirror-form-message",oW="remirror-form-label",iW="remirror-form-group",sW="remirror-group",aW="remirror-input",lW="remirror-menu",cW="remirror-menu-pane",uW="remirror-menu-pane-active",dW="remirror-menu-dropdown-label",hW="remirror-menu-pane-icon",pW="remirror-menu-pane-label",fW="remirror-menu-pane-shortcut",gW="remirror-menu-button-left",mW="remirror-menu-button-right",vW="remirror-menu-button-nested-left",yW="remirror-menu-button-nested-right",bW="remirror-menu-button",wW="remirror-menu-bar",xW="remirror-flex-column",kW="remirror-flex-row",EW="remirror-menu-item",SW="remirror-menu-item-row",CW="remirror-menu-item-column",TW="remirror-menu-item-checkbox",AW="remirror-menu-item-radio",_W="remirror-menu-group",RW="remirror-floating-popover",MW="remirror-popover",OW="remirror-animated-popover",IW="remirror-role",LW="remirror-separator",NW="remirror-tab",$W="remirror-tab-list",DW="remirror-tabbable",PW="remirror-toolbar",zW="remirror-tooltip",FW="remirror-table-size-editor",BW="remirror-table-size-editor-body",HW="remirror-table-size-editor-cell",UW="remirror-table-size-editor-cell-selected",WW="remirror-table-size-editor-footer",VW="remirror-color-picker",jW="remirror-color-picker-cell",GW="remirror-color-picker-cell-selected";var KW=Object.freeze({__proto__:null,ANIMATED_POPOVER:OW,BUTTON:J7,BUTTON_ACTIVE:Z7,COLOR_PICKER:VW,COLOR_PICKER_CELL:jW,COLOR_PICKER_CELL_SELECTED:GW,COMPOSITE:Q7,DIALOG:eW,DIALOG_BACKDROP:tW,EDITOR_WRAPPER:q7,FLEX_COLUMN:xW,FLEX_ROW:kW,FLOATING_POPOVER:RW,FORM:nW,FORM_GROUP:iW,FORM_LABEL:oW,FORM_MESSAGE:rW,GROUP:sW,INPUT:aW,MENU:lW,MENU_BAR:wW,MENU_BUTTON:bW,MENU_BUTTON_LEFT:gW,MENU_BUTTON_NESTED_LEFT:vW,MENU_BUTTON_NESTED_RIGHT:yW,MENU_BUTTON_RIGHT:mW,MENU_DROPDOWN_LABEL:dW,MENU_GROUP:_W,MENU_ITEM:EW,MENU_ITEM_CHECKBOX:TW,MENU_ITEM_COLUMN:CW,MENU_ITEM_RADIO:AW,MENU_ITEM_ROW:SW,MENU_PANE:cW,MENU_PANE_ACTIVE:uW,MENU_PANE_ICON:hW,MENU_PANE_LABEL:pW,MENU_PANE_SHORTCUT:fW,POPOVER:MW,ROLE:IW,SEPARATOR:LW,TAB:NW,TABBABLE:DW,TABLE_SIZE_EDITOR:FW,TABLE_SIZE_EDITOR_BODY:BW,TABLE_SIZE_EDITOR_CELL:HW,TABLE_SIZE_EDITOR_CELL_SELECTED:UW,TABLE_SIZE_EDITOR_FOOTER:WW,TAB_LIST:$W,TOOLBAR:PW,TOOLTIP:zW});const YW="remirror-wrap",XW="remirror-language-select-positioner",qW="remirror-language-select-width",ZW="remirror-a11y-dark",JW="remirror-atom-dark",QW="remirror-base16-ateliersulphurpool-light",eV="remirror-cb",tV="remirror-darcula",nV="remirror-dracula",rV="remirror-duotone-dark",oV="remirror-duotone-earth",iV="remirror-duotone-forest",sV="remirror-duotone-light",aV="remirror-duotone-sea",lV="remirror-duotone-space",cV="remirror-gh-colors",uV="remirror-hopscotch",dV="remirror-pojoaque",hV="remirror-vs",pV="remirror-xonokai";var Y0=Object.freeze({__proto__:null,A11Y_DARK:ZW,ATOM_DARK:JW,BASE16_ATELIERSULPHURPOOL_LIGHT:QW,CB:eV,DARCULA:tV,DRACULA:nV,DUOTONE_DARK:rV,DUOTONE_EARTH:oV,DUOTONE_FOREST:iV,DUOTONE_LIGHT:sV,DUOTONE_SEA:aV,DUOTONE_SPACE:lV,GH_COLORS:cV,HOPSCOTCH:uV,LANGUAGE_SELECT_POSITIONER:XW,LANGUAGE_SELECT_WIDTH:qW,POJOAQUE:dV,VS:hV,WRAP:YW,XONOKAI:pV});const fV="remirror-image-loader";var gV=Object.freeze({__proto__:null,IMAGE_LOADER:fV});const mV="remirror-list-item-with-custom-mark",vV="remirror-ul-list-content",yV="remirror-editor",bV="remirror-list-item-marker-container",wV="remirror-list-item-checkbox",xV="remirror-collapsible-list-item-closed",kV="remirror-collapsible-list-item-button",EV="remirror-list-spine";var Ks=Object.freeze({__proto__:null,COLLAPSIBLE_LIST_ITEM_BUTTON:kV,COLLAPSIBLE_LIST_ITEM_CLOSED:xV,EDITOR:yV,LIST_ITEM_CHECKBOX:wV,LIST_ITEM_MARKER_CONTAINER:bV,LIST_ITEM_WITH_CUSTOM_MARKER:mV,LIST_SPINE:EV,UL_LIST_CONTENT:vV});const SV="remirror-is-empty";var CV=Object.freeze({__proto__:null,IS_EMPTY:SV});const TV="remirror-editor",AV="remirror-positioner",_V="remirror-positioner-widget";var RV=Object.freeze({__proto__:null,EDITOR:TV,POSITIONER:AV,POSITIONER_WIDGET:_V});const MV="remirror-theme";function OV(t={}){const e=[],n={};function r(o,i){if(typeof i=="string"||typeof i=="number"){e.push(`${tT(o)}: ${i};`),n[tT(o)]=i;return}if(!(typeof i!="object"||!i))for(const[s,l]of Object.entries(i))r([...o,s],l)}for(const[o,i]of Object.entries(t))r([o],i);return{css:e.join(` -`),styles:n}}function IV(t){return t.replace(/([a-z])([\dA-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function tT(t){return`--rmr-${t.map(IV).join("-")}`}const Mo={gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},Ni="#000000",pw="#ffffff",LV="#252103",fw=dg(Ni,.75),Om="#7963d2",gw="#bcd263",NV="#fff",$V="#fff",mw=Mo.gray[1],nT="rgba(10,31,68,0.08)",rT="rgba(10,31,68,0.10)",oT="rgba(10,31,68,0.12)",DV=Ef(dg(Ni,.1),.13),vw={background:pw,border:fw,foreground:Ni,muted:mw,primary:Om,secondary:gw,primaryText:NV,secondaryText:$V,text:LV,faded:DV},PV={...vw,background:Hr(pw,.15),border:Hr(fw,.15),foreground:Hr(Ni,.15),muted:Hr(mw,.15),primary:Hr(Om,.15),secondary:Hr(gw,.15),get text(){return xc(this.background)},get primaryText(){return xc(this.primary)},get secondaryText(){return xc(this.secondary)}},zV={...vw,background:Hr(pw,.075),border:Hr(fw,.075),foreground:Hr(Ni,.075),muted:Hr(mw,.075),primary:Hr(Om,.075),secondary:Hr(gw,.075),get text(){return xc(this.background)},get primaryText(){return xc(this.primary)},get secondaryText(){return xc(this.secondary)}},va={color:{...vw,active:PV,hover:zV,shadow1:nT,shadow2:rT,shadow3:oT,backdrop:dg(Ni,.1),outline:dg(Om,.6),table:{default:{border:Ef(Ni,.8),cell:Ef(Ni,.4),controller:Mo.gray[3]},selected:{border:Mo.blue[7],cell:Mo.blue[1],controller:Mo.blue[5]},preselect:{border:Mo.blue[7],cell:Ef(Ni,.4),controller:Mo.blue[5]},predelete:{border:Mo.red[7],cell:Mo.red[1],controller:Mo.red[5]},mark:"#91919196"}},hue:Mo,radius:{border:"0.25rem",extra:"0.5rem",circle:"50%"},fontFamily:{default:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif',heading:"inherit",mono:"Menlo, monospace"},fontSize:{0:"12px",1:"14px",2:"16px",3:"20px",4:"24px",5:"32px",6:"48px",7:"64px",8:"96px",default:"16px"},space:{1:"4px",2:"8px",3:"16px",4:"32px",5:"64px",6:"128px",7:"256px",8:"512px"},fontWeight:{bold:"700",default:"400",heading:"700"},letterSpacing:{tight:"-1px",default:"normal",loose:"1px",wide:"3px"},lineHeight:{heading:"1.25em",default:"1.5em"},boxShadow:{1:`0 1px 1px ${nT}`,2:`0 1px 1px ${rT}`,3:`0 1px 1px ${oT}`}};var FV=Object.defineProperty,BV=Object.getOwnPropertyDescriptor,Yi=(t,e,n,r)=>{for(var o=r>1?void 0:r?BV(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&FV(e,n,o),o},sO=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},rs=(t,e,n)=>(sO(t,e,"read from private field"),n?n.call(t):e.get(t)),b1=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},w1=(t,e,n,r)=>(sO(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),aO="data-code-block-language";function lO(t,e,n=[]){return t.map(r=>{const o=[...n];return r.type==="element"&&r.properties.className?o.push(...r.properties.className):r.type==="text"&&o.length===0&&e&&o.push(e),r.type==="element"?lO(r.children,e,o):{text:r.value,classes:o}})}function HV(t,e){var n;const{node:r,pos:o}=t,i=hg({language:(n=r.attrs.language)==null?void 0:n.replace("language-",""),fallback:"markup"}),s=dw.highlight(r.textContent??"",i),l=lO(s,e);let a=o+1;function u(c){const d=a,h=d+c.text.length;return a=h,{...c,from:d,to:h}}return OR(l).map(u)}function iT(t){const{blocks:e,skipLast:n,plainTextClassName:r}=t,o=[];for(const i of e){const s=HV(i,r),l=n?s.length-1:s.length;for(const a of Eb(l)){const u=s[a],c=u==null?void 0:u.classes;if(!u||!(c!=null&&c.length))continue;const d=vt.inline(u.from,u.to,{class:c.join(" ")});o.push(d)}}return o}function UV(t){return!!(t&&$n(t)&&Ee(t.language)&&t.language.length>0)}function WV(t){return e=>({state:{tr:n,selection:r},dispatch:o})=>{if(!UV(e))throw new Error("Invalid attrs passed to the updateAttributes method");const i=pi({types:t,selection:r});return!i||MR(e,i.node.attrs)?!1:(n.setNodeMarkup(i.pos,t,{...i.node.attrs,...e}),o&&o(n),!0)}}function hg(t){const{language:e,fallback:n}=t;if(!e)return n;const r=dw.listLanguages();for(const o of r)if(o.toLowerCase()===e.toLowerCase())return o;return n}function VV(t,e){const{language:n,wrap:r}=Em(t.attrs,e),{style:o,...i}=e.dom(t);let s=i.style;return r&&(s=HF({whiteSpace:"pre-wrap",wordBreak:"break-all"},s)),["pre",{spellcheck:"false",...i,class:Fc(i.class,`language-${n}`)},["code",{[aO]:n,style:s},0]]}function jV(t){return({pos:e}=ye())=>({tr:n,dispatch:r})=>{const{type:o,formatter:i,defaultLanguage:s}=t,{from:l,to:a}=e?{from:e,to:e}:n.selection,u=pi({types:o,selection:n.selection});if(!u)return!1;const{node:{attrs:c,textContent:d},start:h}=u,p=l-h,f=a-h,g=hg({language:c.language,fallback:s}),m=i({source:d,language:g,cursorOffset:p});let v;if(p!==f&&(v=i({source:d,language:g,cursorOffset:f})),!m)return!1;const{cursorOffset:y,formatted:b}=m;if(b===d)return!1;const w=h+d.length;n.insertText(b,h,w);const k=h+y,x=v?h+v.cursorOffset:void 0;return n.setSelection(Me.between(n.doc.resolve(k),n.doc.resolve(x??k))),r&&r(n),!0}}function GV(t){var e;return(e=t.getAttribute(aO)??t.classList[0])==null?void 0:e.replace("language-","")}var{DESCRIPTION:KV,LABEL:YV}=R5,XV={icon:"bracesLine",description:({t})=>t(KV),label:({t})=>t(YV)},xa,td,nd,qV=class{constructor(t,e){b1(this,xa,void 0),b1(this,td,void 0),b1(this,nd,!1),w1(this,td,t),w1(this,xa,e)}init(t){const e=eB({node:t.doc,type:rs(this,td)});return this.refreshDecorationSet(t.doc,e),this}refreshDecorationSet(t,e){const n=iT({blocks:e,skipLast:rs(this,nd),defaultLanguage:rs(this,xa).options.defaultLanguage,plainTextClassName:rs(this,xa).options.plainTextClassName??void 0});this.decorationSet=He.create(t,n)}apply(t,e){if(!t.docChanged)return this;this.decorationSet=this.decorationSet.map(t.mapping,t.doc);const n=tB(t,{descend:!0,predicate:r=>r.type===rs(this,td),StepTypes:[]});return this.updateDecorationSet(t,n),this}updateDecorationSet(t,e){if(e.length===0)return;let n=this.decorationSet;for(const{node:r,pos:o}of e)n=this.decorationSet.remove(this.decorationSet.find(o,o+r.nodeSize));this.decorationSet=n.add(t.doc,iT({blocks:e,skipLast:rs(this,nd),defaultLanguage:rs(this,xa).options.defaultLanguage,plainTextClassName:rs(this,xa).options.plainTextClassName??void 0}))}setDeleted(t){w1(this,nd,t)}};xa=new WeakMap;td=new WeakMap;nd=new WeakMap;var vo=class extends Dn{get name(){return"codeBlock"}createTags(){return[ke.Block,ke.Code]}init(){this.registerLanguages()}createNodeSpec(t,e){const n=/highlight-(?:text|source)-([\da-z]+)/;return{content:"text*",marks:"",defining:!0,draggable:!1,...e,code:!0,attrs:{...t.defaults(),language:{default:this.options.defaultLanguage},wrap:{default:this.options.defaultWrap}},parseDOM:[{tag:"div.highlight",preserveWhitespace:"full",getAttrs:r=>{var o,i;if(!Vt(r))return!1;const s=r.querySelector("pre.code");if(!Vt(s))return!1;const l=Xo(s,"white-space")==="pre-wrap",a=(i=(o=r.className.match(n))==null?void 0:o[1])==null?void 0:i.replace("language-","");return{...t.parse(r),language:a,wrap:l}}},{tag:"pre",preserveWhitespace:"full",getAttrs:r=>{if(!Vt(r))return!1;const o=r.querySelector("code");if(!Vt(o))return!1;const i=Xo(o,"white-space")==="pre-wrap",s=this.options.getLanguageFromDom(o,r);return{...t.parse(r),language:s,wrap:i}}},...e.parseDOM??[]],toDOM:r=>VV(r,t)}}createAttributes(){return{class:Y0[this.options.syntaxTheme.toUpperCase()]}}createInputRules(){const t=/^```([\dA-Za-z]*) $/,e=n=>({language:hg({language:wc(n,1),fallback:this.options.defaultLanguage})});return[fM({regexp:t,type:this.type,beforeDispatch:({tr:n,start:r})=>{const o=n.doc.resolve(r);n.setSelection(Me.near(o))},getAttributes:e})]}onSetOptions(t){const{changes:e}=t;e.supportedLanguages.changed&&this.registerLanguages(),e.syntaxTheme.changed&&this.store.updateAttributes()}createPlugin(){const t=new qV(this.type,this),e=()=>(t.setDeleted(!0),!1);return{state:{init(n,r){return t.init(r)},apply(n,r,o,i){return t.apply(n,i)}},props:{handleKeyDown:Gb({Backspace:e,"Mod-Backspace":e,Delete:e,"Mod-Delete":e,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e}),decorations(){return t.setDeleted(!1),t.decorationSet}}}}toggleCodeBlock(t={}){return Vb({type:this.type,toggleType:this.options.toggleName,attrs:{language:this.options.defaultLanguage,...t}})}createCodeBlock(t){return Zd(this.type,t)}updateCodeBlock(t){return WV(this.type)(t)}formatCodeBlock(t){return jV({type:this.type,formatter:this.options.formatter,defaultLanguage:this.options.defaultLanguage})(t)}tabKey({state:t,dispatch:e}){const{selection:n,tr:r,schema:o}=t,{node:i}=pF(n);if(!bm({node:i,types:this.type}))return!1;if(n.empty)r.insertText(" ");else{const{from:s,to:l}=n;r.replaceWith(s,l,o.text(" "))}return e&&e(r),!0}backspaceKey({dispatch:t,tr:e,state:n}){if(!e.selection.empty)return!1;const r=pi({types:this.type,selection:e.selection});if((r==null?void 0:r.start)!==e.selection.from)return!1;const{pos:o,node:i,start:s}=r,l=Mt(n.schema.nodes,this.options.toggleName);return i.textContent.trim()===""?e.doc.lastChild===i&&e.doc.firstChild===i?dF({pos:o,tr:e,content:l.create()}):uF({pos:o,tr:e}):s>2?e.setSelection(Me.near(e.doc.resolve(s-2))):(e.insert(0,l.create()),e.setSelection(Me.near(e.doc.resolve(1)))),t&&t(e),!0}enterKey({dispatch:t,tr:e}){if(!(ta(e.selection)&&e.selection.empty))return!1;const{nodeBefore:n,parent:r}=e.selection.$anchor;if(!(n!=null&&n.isText)||!r.type.isTextblock)return!1;const o=/^```([A-Za-z]*)?$/,{text:i,nodeSize:s}=n,{textContent:l}=r;if(!i)return!1;const a=i.match(o),u=l.match(o);if(!a||!u)return!1;const[,c]=a,d=hg({language:c,fallback:this.options.defaultLanguage}),h=e.selection.$from.before(),p=h+s+1;return e.replaceWith(h,p,this.type.create({language:d})),e.setSelection(Me.near(e.doc.resolve(h+1))),t&&t(e),!0}formatShortcut({tr:t}){const e=this.store.commands;if(!eM({type:this.type,state:t}))return!1;const n=e.formatCodeBlock.isEnabled();return n&&e.formatCodeBlock(),n}registerLanguages(){for(const t of this.options.supportedLanguages)dw.register(t)}};Yi([le(XV)],vo.prototype,"toggleCodeBlock",1);Yi([le()],vo.prototype,"createCodeBlock",1);Yi([le()],vo.prototype,"updateCodeBlock",1);Yi([le()],vo.prototype,"formatCodeBlock",1);Yi([en({shortcut:"Tab"})],vo.prototype,"tabKey",1);Yi([en({shortcut:"Backspace"})],vo.prototype,"backspaceKey",1);Yi([en({shortcut:"Enter"})],vo.prototype,"enterKey",1);Yi([en({shortcut:oe.Format})],vo.prototype,"formatShortcut",1);vo=Yi([Ne({defaultOptions:{supportedLanguages:[],toggleName:"paragraph",formatter:({source:t})=>({cursorOffset:0,formatted:t}),syntaxTheme:"a11y_dark",defaultLanguage:"markup",defaultWrap:!1,plainTextClassName:"",getLanguageFromDom:GV},staticKeys:["getLanguageFromDom"]})],vo);var ZV=Object.defineProperty,JV=Object.getOwnPropertyDescriptor,yw=(t,e,n,r)=>{for(var o=r>1?void 0:r?JV(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&ZV(e,n,o),o},cO=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},rn=(t,e,n)=>(cO(t,e,"read from private field"),n?n.call(t):e.get(t)),ki=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},is=(t,e,n,r)=>(cO(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),rd,od,Jl,id,Sf,sd,ad,ld,cd,Cf=class{constructor(t){ki(this,rd,Cm()),ki(this,od,[]),ki(this,Jl,new Map),ki(this,id,[]),ki(this,Sf,!1),ki(this,sd,void 0),ki(this,ad,void 0),ki(this,ld,void 0),ki(this,cd,void 0),this.addListener=(e,n)=>rn(this,rd).on(e,n),is(this,sd,t),is(this,ad,t.getActive),is(this,cd,t.getPosition),is(this,ld,t.getID),this.hasChanged=t.hasChanged,this.events=t.events??["state","scroll"]}static create(t){return new Cf(t)}static fromPositioner(t,e){return Cf.create({...t.basePositioner,...e})}get basePositioner(){return{getActive:rn(this,ad),getPosition:rn(this,cd),hasChanged:this.hasChanged,events:this.events,getID:rn(this,ld)}}onActiveChanged(t){this.recentUpdate=t;const e=rn(this,ad).call(this,t);is(this,od,e),is(this,Jl,new Map),is(this,Sf,!1),is(this,id,[]);const n=[];for(const[r,o]of e.entries()){const i=this.getID(o,r);rn(this,id).push(i),n.push({setElement:s=>this.addProps({...t,data:o,element:s},r),id:i,data:o})}rn(this,rd).emit("update",n)}getID(t,e){var n;return((n=rn(this,ld))==null?void 0:n.call(this,t,e))??e.toString()}addProps(t,e){if(rn(this,Sf)||(rn(this,Jl).set(e,t),rn(this,Jl).sizet;return this.clone(n=>({getActive:r=>n.getActive(r).filter(e)}))}},Gr=Cf;rd=new WeakMap;od=new WeakMap;Jl=new WeakMap;id=new WeakMap;Sf=new WeakMap;sd=new WeakMap;ad=new WeakMap;ld=new WeakMap;cd=new WeakMap;Gr.EMPTY=[];function QV(t,e=dO){const{key:n}=(t==null?void 0:t.getMeta(uO))??{};return n===e}function bw(t){const{tr:e,state:n,previousState:r}=t;return!r||e&&QV(e)?!0:e?gF(e):!n.doc.eq(r.doc)||!n.selection.eq(r.selection)}function ww(t,e,n={}){const r=e.getBoundingClientRect(),{accountForPadding:o=!1}=n;let i=0,s=0,l=0,a=0;if(Vt(e)&&o){const c=Number.parseFloat(Xo(e,"padding-left").replace("px","")),d=Number.parseFloat(Xo(e,"padding-right").replace("px","")),h=Number.parseFloat(Xo(e,"padding-top").replace("px","")),p=Number.parseFloat(Xo(e,"padding-bottom").replace("px","")),f=Number.parseFloat(Xo(e,"border-left").replace("px","")),g=Number.parseFloat(Xo(e,"border-right").replace("px","")),m=Number.parseFloat(Xo(e,"border-top").replace("px","")),v=Number.parseFloat(Xo(e,"border-bottom").replace("px","")),y=e.offsetWidth-e.clientWidth,b=e.offsetHeight-e.clientHeight;i+=c+f+(e.dir==="rtl"?y:0),s+=d+g+(e.dir==="rtl"?0:y),l+=h+m,a+=p+v+b}const u=new DOMRect(r.left+i,r.top+l,r.width-s,r.height-a);for(const[c,d]of[[t.top,t.left],[t.top,t.right],[t.bottom,t.left],[t.bottom,t.right]])if(ri(c,u.top,u.bottom)&&ri(d,u.left,u.right))return!0;return!1}var ej="remirror-positioner-widget",uO="positionerUpdate",dO="__all_positioners__",hO={y:-999999,x:-999999,width:0,height:0},sT={...hO,left:-999999,top:-999999,bottom:-999999,right:-999999},Im={...hO,rect:{...sT,toJSON:()=>sT},visible:!1},pO=Gr.create({hasChanged:bw,getActive(t){const{state:e}=t;if(!Bb(e)||e.selection.$anchor.depth>2)return Gr.EMPTY;const n=Yh({predicate:r=>r.type.isBlock,selection:e});return n?[n]:Gr.EMPTY},getPosition(t){const{view:e,data:n}=t,r=e.nodeDOM(n.pos);if(!Vt(r))return Im;const o=r.getBoundingClientRect(),i=e.dom.getBoundingClientRect(),s=o.height,l=o.width,a=e.dom.scrollLeft+o.left-i.left,u=e.dom.scrollTop+o.top-i.top,c=ww(o,e.dom);return{y:u,x:a,height:s,width:l,rect:o,visible:c}}}),xw=pO.clone(({getActive:t})=>({getActive:e=>{const[n]=t(e);return n&&xm(n.node)&&n.node.type===wm(e.state.schema)?[n]:Gr.EMPTY}})),tj=xw.clone(({getPosition:t})=>({getPosition:e=>({...t(e),width:1})})),nj=xw.clone(({getPosition:t})=>({getPosition:e=>{const{width:n,x:r,y:o,height:i}=t(e);return{...t(e),width:1,x:n+r,rect:new DOMRect(n+r,o,1,i)}}}));function kw(t){return Gr.create({hasChanged:bw,getActive:e=>{const{state:n,view:r}=e;if(!t(n)||!ta(n.selection))return Gr.EMPTY;try{const{head:o,anchor:i}=n.selection;return[{from:r.coordsAtPos(i),to:r.coordsAtPos(o)}]}catch{return Gr.EMPTY}},getPosition(e){const{element:n,data:r,view:o}=e,{from:i,to:s}=r,l=n.offsetParent??o.dom,a=l.getBoundingClientRect(),u=Math.abs(s.bottom-i.top),c=u>i.bottom-i.top,d=Math.min(i.left,s.left),h=Math.min(i.top,s.top),p=l.scrollLeft+(c?s.left-a.left:d-a.left),f=l.scrollTop+h-a.top,g=c?1:Math.abs(i.left-s.right),m=new DOMRect(c?s.left:d,h,g,u),v=ww(m,o.dom);return{rect:m,y:f,x:p,height:u,width:g,visible:v}}})}var fO=kw(t=>!t.selection.empty),rj=kw(t=>t.selection.empty),oj=kw(()=>!0),ij=fO.clone(()=>({getActive:t=>{const{state:e,view:n}=t;if(!e.selection.empty)return Gr.EMPTY;const r=sM(e);if(!r)return Gr.EMPTY;try{return[{from:n.coordsAtPos(r.from),to:n.coordsAtPos(r.to)}]}catch{return Gr.EMPTY}}})),sj={selection:fO,cursor:rj,always:oj,block:pO,emptyBlock:xw,emptyBlockStart:tj,emptyBlockEnd:nj,nearestWord:ij},Hc=class extends ft{constructor(){super(...arguments),this.positioners=[],this.onAddCustomHandler=({positioner:t})=>{if(t)return this.positioners=[...this.positioners,t],this.store.commands.forceUpdate(),()=>{this.positioners=this.positioners.filter(e=>e!==t)}}}get name(){return"positioner"}createAttributes(){return{class:RV.EDITOR}}init(){this.onScroll=TR(this.options.scrollDebounce,this.onScroll.bind(this))}createEventHandlers(){return{scroll:()=>(this.onScroll(),!1),hover:(t,e)=>(this.positioner(this.getBaseProps("hover",{hover:e})),!1),contextmenu:(t,e)=>(this.positioner(this.getBaseProps("contextmenu",{contextmenu:e})),!1)}}onStateUpdate(t){this.positioner({...t,previousState:t.firstUpdate?void 0:t.previousState,event:"state",helpers:this.store.helpers})}createDecorations(t){if(this.element??(this.element=this.createElement()),!this.element.hasChildNodes())return He.empty;const e=vt.widget(0,this.element,{key:"positioner-widget",side:-1,stopEvent:()=>!0});return He.create(t.doc,[e])}forceUpdatePositioners(t=dO){return({tr:e,dispatch:n})=>(n==null||n(e.setMeta(uO,{key:t})),!0)}getPositionerWidget(){return this.element??(this.element=this.createElement())}createElement(){const t=document.createElement("span");return t.dataset.id=ej,t.setAttribute("role","presentation"),t}triggerPositioner(t,e){t.hasChanged(e)&&t.onActiveChanged({...e,view:this.store.view})}positioner(t){for(const e of this.positioners)e.events.includes(t.event)&&this.triggerPositioner(e,t)}getBaseProps(t,e){const n=this.store.getState(),r=this.store.previousState;return{helpers:this.store.helpers,event:t,firstUpdate:!1,previousState:r,state:n,...e}}onScroll(){this.positioner(this.getBaseProps("scroll",{scroll:{scrollTop:this.store.view.dom.scrollTop}}))}};yw([le()],Hc.prototype,"forceUpdatePositioners",1);yw([it()],Hc.prototype,"getPositionerWidget",1);Hc=yw([Ne({defaultOptions:{scrollDebounce:100},customHandlerKeys:["positioner"],staticKeys:["scrollDebounce"]})],Hc);function X0(t){return Ee(t)?sj[t].clone():Qe(t)?t().clone():t.clone()}function aj(t){const e=P.createContext(null),n=lj(e);return[o=>{const i=t(o);return ee.createElement(e.Provider,{value:i},o.children)},n,e]}function lj(t){return(e,n)=>{const r=P.useContext(t),o=cj(r);if(!r)throw new Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!e)return r;if(typeof e!="function")throw new TypeError("invalid arguments passed to `useContextHook`. This hook must be called with zero arguments, a getter function or a path string.");const i=e(r);if(!o||!n)return i;const s=e(o);return n(s,i)?s:i}}function cj(t){const e=P.useRef();return uj(()=>{e.current=t}),e.current}var uj=typeof document<"u"?P.useLayoutEffect:P.useEffect;function dj(t,e){return aj(n=>{const r=P.useRef(null),o=P.useRef(),i=e==null?void 0:e(n),[s,l]=P.useState(()=>t({get:aT(r),set:lT(o),previousContext:void 0,props:n,state:i})),a=[...Object.values(n),i];return P.useEffect(()=>{a.length!==0&&l(u=>t({get:aT(r),set:lT(o),previousContext:u,props:n,state:i}))},a),r.current=s,o.current=l,s})}function aT(t){return e=>{if(!t.current)throw new Error("`get` called outside of function scope. `get` can only be called within a function.");if(!e)return t.current;if(typeof e!="function")throw new TypeError("Invalid arguments passed to `useContextHook`. The hook must be called with zero arguments, a getter function or a path string.");return e(t.current)}}function lT(t){return e=>{if(!t.current)throw new Error("`set` called outside of function scope. `set` can only be called within a function.");t.current(n=>({...n,...typeof e=="function"?e(n):e}))}}var gO={},mO={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.errorMessages=t.ErrorType=void 0;var e;(function(n){n.MalformedUnicode="MALFORMED_UNICODE",n.MalformedHexadecimal="MALFORMED_HEXADECIMAL",n.CodePointLimit="CODE_POINT_LIMIT",n.OctalDeprecation="OCTAL_DEPRECATION",n.EndOfString="END_OF_STRING"})(e=t.ErrorType||(t.ErrorType={})),t.errorMessages=new Map([[e.MalformedUnicode,"malformed Unicode character escape sequence"],[e.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[e.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[e.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[e.EndOfString,"malformed escape sequence at end of string"]])})(mO);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.unraw=t.errorMessages=t.ErrorType=void 0;const e=mO;Object.defineProperty(t,"ErrorType",{enumerable:!0,get:function(){return e.ErrorType}}),Object.defineProperty(t,"errorMessages",{enumerable:!0,get:function(){return e.errorMessages}});function n(p){return!p.match(/[^a-f0-9]/i)?parseInt(p,16):NaN}function r(p,f,g){const m=n(p);if(Number.isNaN(m)||g!==void 0&&g!==p.length)throw new SyntaxError(e.errorMessages.get(f));return m}function o(p){const f=r(p,e.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(f)}function i(p,f){const g=r(p,e.ErrorType.MalformedUnicode,4);if(f!==void 0){const m=r(f,e.ErrorType.MalformedUnicode,4);return String.fromCharCode(g,m)}return String.fromCharCode(g)}function s(p){return p.charAt(0)==="{"&&p.charAt(p.length-1)==="}"}function l(p){if(!s(p))throw new SyntaxError(e.errorMessages.get(e.ErrorType.MalformedUnicode));const f=p.slice(1,-1),g=r(f,e.ErrorType.MalformedUnicode);try{return String.fromCodePoint(g)}catch(m){throw m instanceof RangeError?new SyntaxError(e.errorMessages.get(e.ErrorType.CodePointLimit)):m}}function a(p,f=!1){if(f)throw new SyntaxError(e.errorMessages.get(e.ErrorType.OctalDeprecation));const g=parseInt(p,8);return String.fromCharCode(g)}const u=new Map([["b","\b"],["f","\f"],["n",` -`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function c(p){return u.get(p)||p}const d=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function h(p,f=!1){return p.replace(d,function(g,m,v,y,b,w,k,x,S){if(m!==void 0)return"\\";if(v!==void 0)return o(v);if(y!==void 0)return l(y);if(b!==void 0)return i(b,w);if(k!==void 0)return i(k);if(x==="0")return"\0";if(x!==void 0)return a(x,!f);if(S!==void 0)return c(S);throw new SyntaxError(e.errorMessages.get(e.ErrorType.EndOfString))})}t.unraw=h,t.default=h})(gO);const hj=jo(gO),$i=t=>typeof t=="string",pj=t=>typeof t=="function",cT=new Map;function Ew(t){return[...Array.isArray(t)?t:[t],"en"]}function vO(t,e,n){const r=Ew(t);return pg(()=>fg("date",r,n),()=>new Intl.DateTimeFormat(r,n)).format($i(e)?new Date(e):e)}function q0(t,e,n){const r=Ew(t);return pg(()=>fg("number",r,n),()=>new Intl.NumberFormat(r,n)).format(e)}function uT(t,e,n,{offset:r=0,...o}){const i=Ew(t),s=e?pg(()=>fg("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):pg(()=>fg("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return o[n]??o[s.select(n-r)]??o.other}function pg(t,e){const n=t();let r=cT.get(n);return r||(r=e(),cT.set(n,r)),r}function fg(t,e,n){const r=e.join("-");return`${t}-${r}-${JSON.stringify(n)}`}const yO=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,fj=(t,e,n={})=>{e=e||t;const r=i=>$i(i)?n[i]||{style:i}:i,o=(i,s)=>{const l=Object.keys(n).length?r("number"):{},a=q0(e,i,l);return s.replace("#",a)};return{plural:(i,s)=>{const{offset:l=0}=s,a=uT(e,!1,i,s);return o(i-l,a)},selectordinal:(i,s)=>{const{offset:l=0}=s,a=uT(e,!0,i,s);return o(i-l,a)},select:(i,s)=>s[i]??s.other,number:(i,s)=>q0(e,i,r(s)),date:(i,s)=>vO(e,i,r(s)),undefined:i=>i}};function gj(t,e,n){return(r,o={})=>{const i=fj(e,n,o),s=a=>Array.isArray(a)?a.reduce((u,c)=>{if($i(c))return u+c;const[d,h,p]=c;let f={};p!=null&&!$i(p)?Object.keys(p).forEach(m=>{f[m]=s(p[m])}):f=p;const g=i[h](r[d],f);return g==null?u:u+g},""):a,l=s(t);return $i(l)&&yO.test(l)?hj(l.trim()):$i(l)?l.trim():l}}var mj=Object.defineProperty,vj=(t,e,n)=>e in t?mj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yj=(t,e,n)=>(vj(t,typeof e!="symbol"?e+"":e,n),n);class bj{constructor(){yj(this,"_events",{})}on(e,n){return this._hasEvent(e)||(this._events[e]=[]),this._events[e].push(n),()=>this.removeListener(e,n)}removeListener(e,n){if(!this._hasEvent(e))return;const r=this._events[e].indexOf(n);~r&&this._events[e].splice(r,1)}emit(e,...n){this._hasEvent(e)&&this._events[e].map(r=>r.apply(this,n))}_hasEvent(e){return Array.isArray(this._events[e])}}var wj=Object.defineProperty,xj=(t,e,n)=>e in t?wj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zl=(t,e,n)=>(xj(t,typeof e!="symbol"?e+"":e,n),n);class kj extends bj{constructor(e){super(),zl(this,"_locale"),zl(this,"_locales"),zl(this,"_localeData"),zl(this,"_messages"),zl(this,"_missing"),zl(this,"t",this._.bind(this)),this._messages={},this._localeData={},e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(e.locale!=null||e.locales!=null)&&this.activate(e.locale,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,n){this._localeData[e]==null?this._localeData[e]=n:Object.assign(this._localeData[e],n)}loadLocaleData(e,n){n!=null?this._loadLocaleData(e,n):Object.keys(e).forEach(r=>this._loadLocaleData(r,e[r])),this.emit("change")}_load(e,n){this._messages[e]==null?this._messages[e]=n:Object.assign(this._messages[e],n)}load(e,n){n!=null?this._load(e,n):Object.keys(e).forEach(r=>this._load(r,e[r])),this.emit("change")}loadAndActivate({locale:e,locales:n,messages:r}){this._locale=e,this._locales=n||void 0,this._messages[this._locale]=r,this.emit("change")}activate(e,n){this._locale=e,this._locales=n,this.emit("change")}_(e,n={},{message:r,formats:o}={}){$i(e)||(n=e.values||n,r=e.message,e=e.id);const i=!this.messages[e],s=this._missing;if(s&&i)return pj(s)?s(this._locale,e):s;i&&this.emit("missing",{id:e,locale:this._locale});let l=this.messages[e]||r||e;return $i(l)&&yO.test(l)?JSON.parse(`"${l}"`):$i(l)?l:gj(l,this._locale,this._locales)(n,o)}date(e,n){return vO(this._locales||this._locale,e,n)}number(e,n){return q0(this._locales||this._locale,e,n)}}function Ej(t={}){return new kj(t)}const Lm=Ej();function se(t,e){return e?"other":t==1?"one":"other"}function Xi(t,e){return e?"other":t==0||t==1?"one":"other"}function Ir(t,e){var n=String(t).split("."),r=!n[1];return e?"other":t==1&&r?"one":"other"}function st(t,e){return"other"}function oa(t,e){return e?"other":t==1?"one":t==2?"two":"other"}const Sj=st,Cj=se,Tj=Xi;function Aj(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const _j=se;function Rj(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function Mj(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function Oj(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const Ij=se,Lj=Ir;function Nj(t,e){var n=String(t).split("."),r=n[0],o=r.slice(-1),i=r.slice(-2),s=r.slice(-3);return e?o==1||o==2||o==5||o==7||o==8||i==20||i==50||i==70||i==80?"one":o==3||o==4||s==100||s==200||s==300||s==400||s==500||s==600||s==700||s==800||s==900?"few":r==0||o==6||i==40||i==60||i==90?"many":"other":t==1?"one":"other"}function $j(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?(o==2||o==3)&&i!=12&&i!=13?"few":"other":o==1&&i!=11?"one":o>=2&&o<=4&&(i<12||i>14)?"few":r&&o==0||o>=5&&o<=9||i>=11&&i<=14?"many":"other"}const Dj=se,Pj=se,zj=se,Fj=Xi,Bj=st;function Hj(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const Uj=st;function Wj(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2),s=r&&n[0].slice(-6);return e?"other":o==1&&i!=11&&i!=71&&i!=91?"one":o==2&&i!=12&&i!=72&&i!=92?"two":(o==3||o==4||o==9)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":t!=0&&r&&s==0?"many":"other"}const Vj=se;function jj(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}function Gj(t,e){var n=String(t).split("."),r=!n[1];return e?t==1||t==3?"one":t==2?"two":t==4?"few":"other":t==1&&r?"one":"other"}const Kj=se;function Yj(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=o.slice(-1);return e?"other":i&&(r==1||r==2||r==3)||i&&s!=4&&s!=6&&s!=9||!i&&l!=4&&l!=6&&l!=9?"one":"other"}const Xj=se,qj=se,Zj=se;function Jj(t,e){var n=String(t).split("."),r=n[0],o=!n[1];return e?"other":t==1&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function Qj(t,e){return e?t==0||t==7||t==8||t==9?"zero":t==1?"one":t==2?"two":t==3||t==4?"few":t==5||t==6?"many":"other":t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"}function eG(t,e){var n=String(t).split("."),r=n[0],o=Number(n[0])==t;return e?"other":t==1||!o&&(r==0||r==1)?"one":"other"}const tG=Ir;function nG(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),l=o.slice(-2);return e?"other":i&&s==1||l==1?"one":i&&s==2||l==2?"two":i&&(s==3||s==4)||l==3||l==4?"few":"other"}const rG=se,oG=st,iG=se,sG=se;function aG(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return e?i==1&&s!=11?"one":i==2&&s!=12?"two":i==3&&s!=13?"few":"other":t==1&&r?"one":"other"}const lG=se,cG=se,uG=Ir,dG=se;function hG(t,e){return e?"other":t>=0&&t<=1?"one":"other"}function pG(t,e){return e?"other":t>=0&&t<2?"one":"other"}const fG=Ir;function gG(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=o.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&s!=4&&s!=6&&s!=9||!i&&l!=4&&l!=6&&l!=9?"one":"other"}const mG=se;function vG(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const yG=se,bG=Ir;function wG(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1?"one":"other":t==1?"one":t==2?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"}function xG(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==11?"one":t==2||t==12?"two":t==3||t==13?"few":"other":t==1||t==11?"one":t==2||t==12?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"}const kG=Ir,EG=se;function SG(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const CG=Xi;function TG(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return e?"other":o&&i==1?"one":o&&i==2?"two":o&&(s==0||s==20||s==40||s==60||s==80)?"few":o?"other":"many"}const AG=se,_G=se;function RG(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=Number(n[0])==t,s=i&&n[0].slice(-1);return e?"other":t==1&&o?"one":r==2&&o?"two":o&&(t<0||t>10)&&i&&s==0?"many":"other"}function MG(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}function OG(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}function IG(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),l=o.slice(-2);return e?"other":i&&s==1||l==1?"one":i&&s==2||l==2?"two":i&&(s==3||s==4)||l==3||l==4?"few":"other"}function LG(t,e){return e?t==1||t==5?"one":"other":t==1?"one":"other"}function NG(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const $G=Ir,DG=st,PG=st,zG=st,FG=Ir;function BG(t,e){var n=String(t).split("."),r=n[0],o=Number(n[0])==t,i=r.slice(-1),s=r.slice(-2);return e?"other":o&&i==1&&s!=11||!o?"one":"other"}function HG(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const UG=oa;function WG(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=Number(n[0])==t,s=i&&n[0].slice(-1);return e?"other":t==1&&o?"one":r==2&&o?"two":o&&(t<0||t>10)&&i&&s==0?"many":"other"}const VG=st,jG=st,GG=se,KG=Ir,YG=se,XG=st,qG=st;function ZG(t,e){var n=String(t).split("."),r=n[0],o=r.slice(-2);return e?r==1?"one":r==0||o>=2&&o<=20||o==40||o==60||o==80?"many":"other":t==1?"one":"other"}function JG(t,e){return e?"other":t>=0&&t<2?"one":"other"}const QG=se,eK=se,tK=st,nK=st;function rK(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1);return e?o==6||o==9||r&&o==0&&t!=0?"many":"other":t==1?"one":"other"}const oK=se,iK=se,sK=st;function aK(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const lK=st,cK=se,uK=se;function dK(t,e){return e?"other":t==0?"zero":t==1?"one":"other"}const hK=se;function pK(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2),i=r&&n[0].slice(-3),s=r&&n[0].slice(-5),l=r&&n[0].slice(-6);return e?r&&t>=1&&t<=4||o>=1&&o<=4||o>=21&&o<=24||o>=41&&o<=44||o>=61&&o<=64||o>=81&&o<=84?"one":t==5||o==5?"many":"other":t==0?"zero":t==1?"one":o==2||o==22||o==42||o==62||o==82||r&&i==0&&(s>=1e3&&s<=2e4||s==4e4||s==6e4||s==8e4)||t!=0&&l==1e5?"two":o==3||o==23||o==43||o==63||o==83?"few":t!=1&&(o==1||o==21||o==41||o==61||o==81)?"many":"other"}const fK=se;function gK(t,e){var n=String(t).split("."),r=n[0];return e?"other":t==0?"zero":(r==0||r==1)&&t!=0?"one":"other"}const mK=se,vK=se,yK=st,bK=Xi;function wK(t,e){return e&&t==1?"one":"other"}function xK(t,e){var n=String(t).split("."),r=n[1]||"",o=Number(n[0])==t,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return e?"other":i==1&&(s<11||s>19)?"one":i>=2&&i<=9&&(s<11||s>19)?"few":r!=0?"many":"other"}function kK(t,e){var n=String(t).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==t,s=i&&n[0].slice(-1),l=i&&n[0].slice(-2),a=r.slice(-2),u=r.slice(-1);return e?"other":i&&s==0||l>=11&&l<=19||o==2&&a>=11&&a<=19?"zero":s==1&&l!=11||o==2&&u==1&&a!=11||o!=2&&u==1?"one":"other"}const EK=se,SK=Xi,CK=se;function TK(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?s==1&&l!=11?"one":s==2&&l!=12?"two":(s==7||s==8)&&l!=17&&l!=18?"many":"other":i&&s==1&&l!=11||a==1&&u!=11?"one":"other"}const AK=se,_K=se;function RK(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}function MK(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":"other":t==1?"one":"other"}function OK(t,e){return e&&t==1?"one":"other"}function IK(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2);return e?"other":t==1?"one":t==0||o>=2&&o<=10?"few":o>=11&&o<=19?"many":"other"}const LK=st,NK=se,$K=oa,DK=se,PK=se;function zK(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?r&&t>=1&&t<=4?"one":"other":t==1?"one":"other"}const FK=Ir,BK=se,HK=se,UK=se,WK=st,VK=se,jK=Xi,GK=se,KK=se,YK=se;function XK(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==5||r&&t>=7&&t<=9?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t==1?"one":"other"}const qK=se,ZK=st,JK=Xi,QK=se;function eY(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return e?"other":t==1&&o?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&r!=1&&(i==0||i==1)||o&&i>=5&&i<=9||o&&s>=12&&s<=14?"many":"other"}function tY(t,e){var n=String(t).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==t,s=i&&n[0].slice(-1),l=i&&n[0].slice(-2),a=r.slice(-2),u=r.slice(-1);return e?"other":i&&s==0||l>=11&&l<=19||o==2&&a>=11&&a<=19?"zero":s==1&&l!=11||o==2&&u==1&&a!=11||o!=2&&u==1?"one":"other"}const nY=se;function rY(t,e){var n=String(t).split("."),r=n[0];return e?"other":r==0||r==1?"one":"other"}const oY=Ir,iY=se;function sY(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}const aY=se,lY=st;function cY(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return e?"other":o&&i==1&&s!=11?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&i==0||o&&i>=5&&i<=9||o&&s>=11&&s<=14?"many":"other"}const uY=se,dY=st,hY=se;function pY(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}function fY(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const gY=se,mY=se,vY=oa,yY=se,bY=st,wY=st;function xY(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}function kY(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t>=0&&t<=1?"one":r&&t>=2&&t<=10?"few":"other"}function EY(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"";return e?"other":t==0||t==1||r==0&&o==1?"one":"other"}function SY(t,e){var n=String(t).split("."),r=n[0],o=!n[1];return e?"other":t==1&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function CY(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-2);return e?"other":o&&i==1?"one":o&&i==2?"two":o&&(i==3||i==4)||!o?"few":"other"}const TY=oa,AY=oa,_Y=oa,RY=oa,MY=oa,OY=se,IY=se;function LY(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?t==1?"one":o==4&&i!=14?"many":"other":t==1?"one":"other"}function NY(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}const $Y=se,DY=se,PY=se,zY=st;function FY(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return e?(i==1||i==2)&&s!=11&&s!=12?"one":"other":t==1&&r?"one":"other"}const BY=Ir,HY=se,UY=se,WY=se,VY=se,jY=st,GY=Xi,KY=se;function YY(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1);return e?o==6||o==9||t==10?"few":"other":t==1?"one":"other"}function XY(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=o.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&s!=4&&s!=6&&s!=9||!i&&l!=4&&l!=6&&l!=9?"one":"other"}const qY=se,ZY=st,JY=se,QY=se;function eX(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t==0||t==1||r&&t>=11&&t<=99?"one":"other"}const tX=se;function nX(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=Number(n[0])==t,s=i&&n[0].slice(-1),l=i&&n[0].slice(-2),a=r.slice(-1),u=r.slice(-2);return e?s==3&&l!=13?"few":"other":o&&a==1&&u!=11?"one":o&&a>=2&&a<=4&&(u<12||u>14)?"few":o&&a==0||o&&a>=5&&a<=9||o&&u>=11&&u<=14?"many":"other"}const rX=Ir,oX=se,iX=se;function sX(t,e){return e&&t==1?"one":"other"}const aX=se,lX=se,cX=Xi,uX=se,dX=st,hX=se,pX=se,fX=Ir,gX=st,mX=st,vX=st;function yX(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const bX=Object.freeze(Object.defineProperty({__proto__:null,_in:Sj,af:Cj,ak:Tj,am:Aj,an:_j,ar:Rj,ars:Mj,as:Oj,asa:Ij,ast:Lj,az:Nj,be:$j,bem:Dj,bez:Pj,bg:zj,bho:Fj,bm:Bj,bn:Hj,bo:Uj,br:Wj,brx:Vj,bs:jj,ca:Gj,ce:Kj,ceb:Yj,cgg:Xj,chr:qj,ckb:Zj,cs:Jj,cy:Qj,da:eG,de:tG,dsb:nG,dv:rG,dz:oG,ee:iG,el:sG,en:aG,eo:lG,es:cG,et:uG,eu:dG,fa:hG,ff:pG,fi:fG,fil:gG,fo:mG,fr:vG,fur:yG,fy:bG,ga:wG,gd:xG,gl:kG,gsw:EG,gu:SG,guw:CG,gv:TG,ha:AG,haw:_G,he:RG,hi:MG,hr:OG,hsb:IG,hu:LG,hy:NG,ia:$G,id:DG,ig:PG,ii:zG,io:FG,is:BG,it:HG,iu:UG,iw:WG,ja:VG,jbo:jG,jgo:GG,ji:KG,jmc:YG,jv:XG,jw:qG,ka:ZG,kab:JG,kaj:QG,kcg:eK,kde:tK,kea:nK,kk:rK,kkj:oK,kl:iK,km:sK,kn:aK,ko:lK,ks:cK,ksb:uK,ksh:dK,ku:hK,kw:pK,ky:fK,lag:gK,lb:mK,lg:vK,lkt:yK,ln:bK,lo:wK,lt:xK,lv:kK,mas:EK,mg:SK,mgo:CK,mk:TK,ml:AK,mn:_K,mo:RK,mr:MK,ms:OK,mt:IK,my:LK,nah:NK,naq:$K,nb:DK,nd:PK,ne:zK,nl:FK,nn:BK,nnh:HK,no:UK,nqo:WK,nr:VK,nso:jK,ny:GK,nyn:KK,om:YK,or:XK,os:qK,osa:ZK,pa:JK,pap:QK,pl:eY,prg:tY,ps:nY,pt:rY,pt_PT:oY,rm:iY,ro:sY,rof:aY,root:lY,ru:cY,rwk:uY,sah:dY,saq:hY,sc:pY,scn:fY,sd:gY,sdh:mY,se:vY,seh:yY,ses:bY,sg:wY,sh:xY,shi:kY,si:EY,sk:SY,sl:CY,sma:TY,smi:AY,smj:_Y,smn:RY,sms:MY,sn:OY,so:IY,sq:LY,sr:NY,ss:$Y,ssy:DY,st:PY,su:zY,sv:FY,sw:BY,syr:HY,ta:UY,te:WY,teo:VY,th:jY,ti:GY,tig:KY,tk:YY,tl:XY,tn:qY,to:ZY,tr:JY,ts:QY,tzm:eX,ug:tX,uk:nX,ur:rX,uz:oX,ve:iX,vi:sX,vo:aX,vun:lX,wa:cX,wae:uX,wo:dX,xh:hX,xog:pX,yi:fX,yo:gX,yue:mX,zh:vX,zu:yX},Symbol.toStringTag,{value:"Module"}));var wX=Object.defineProperty,xX=Object.getOwnPropertyDescriptor,kX=Object.getOwnPropertyNames,EX=Object.prototype.hasOwnProperty,dT=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of kX(e))!EX.call(t,o)&&o!==n&&wX(t,o,{get:()=>e[o],enumerable:!(r=xX(e,o))||r.enumerable});return t},SX=(t,e,n)=>(dT(t,e,"default"),n&&dT(n,e,"default")),CX=JSON.parse('{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all content within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all content within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}'),bO={};SX(bO,bX);Lm.loadLocaleData("en",{plurals:bO.en});Lm.load("en",CX);Lm.activate("en");var TX=Object.defineProperty,AX=Object.getOwnPropertyDescriptor,Sw=(t,e,n,r)=>{for(var o=r>1?void 0:r?AX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&TX(e,n,o),o},Uc=class extends Dn{get name(){return"doc"}createNodeSpec(t,e){const{docAttributes:n,content:r}=this.options,o=ye();if(Qs(n))for(const[i,s]of an(n))o[i]={default:s};else for(const i of n)o[i]={default:null};return{attrs:o,content:r,...e}}setDocAttributes(t){return({tr:e,dispatch:n})=>{if(n){for(const[r,o]of Object.entries(t))e.step(new th(r,o));n(e)}return!0}}isDefaultDocNode({state:t=this.store.getState(),options:e}={}){return Wb(t.doc,e)}};Sw([le()],Uc.prototype,"setDocAttributes",1);Sw([it()],Uc.prototype,"isDefaultDocNode",1);Uc=Sw([Ne({defaultOptions:{content:"block+",docAttributes:[]},defaultPriority:ot.Medium,staticKeys:["content","docAttributes"],disableExtraAttributes:!0})],Uc);var wO="SetDocAttribute",xO="RevertSetDocAttribute",th=class extends cn{constructor(t,e,n=wO){super(),this.stepType=n,this.key=t,this.value=e}static fromJSON(t,e){return new th(e.key,e.value,e.stepType)}apply(t){this.previous=t.attrs[this.key];const e={...t.attrs,[this.key]:this.value};return Kt.ok(t.type.create(e,t.content,t.marks))}invert(){return new th(this.key,this.previous,xO)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}};try{cn.jsonID(wO,th),cn.jsonID(xO,th)}catch(t){if(!t.message.startsWith("Duplicate use of step JSON ID"))throw t}var _X=Object.defineProperty,RX=Object.getOwnPropertyDescriptor,kO=(t,e,n,r)=>{for(var o=r>1?void 0:r?RX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&_X(e,n,o),o};function MX(t,e,n,r){const o=t.docView.posFromDOM(e,n,r);return o===null||o<0?null:o}function OX(t,e){const n=e.target;if(n){const r=MX(t,n,0);if(r!==null){const o=t.state.doc.resolve(r),i=o.node().isLeaf?0:1,s=o.start()-i;return{pos:r,inside:s}}}return t.posAtCoords({left:e.clientX,top:e.clientY})??void 0}var gg=class extends ft{constructor(){super(...arguments),this.mousedown=!1,this.mouseover=!1,this.createMouseEventHandler=t=>(e,n)=>{const r=n,o=OX(e,r);if(!o)return!1;const i=[],s=[],{inside:l,pos:a}=o;if(l===-1)return!1;const u=e.state.doc.resolve(a),c=u.depth+1;for(const d of Eb(c,1))i.push({node:d>u.depth&&u.nodeAfter?u.nodeAfter:u.node(d),pos:u.before(d)});for(const{type:d}of u.marksAcross(u)??[]){const h=Hi(u,d);h&&s.push(h)}return t(r,{view:e,nodes:i,marks:s,getMark:d=>{const h=Ee(d)?e.state.schema.marks[d]:d;return we(h,{code:re.EXTENSION,message:`The mark ${d} being checked does not exist within the editor schema.`}),s.find(p=>p.mark.type===h)},getNode:d=>{var h;const p=Ee(d)?e.state.schema.nodes[d]:d;we(p,{code:re.EXTENSION,message:"The node being checked does not exist"});const f=i.find(({node:g})=>g.type===p);if(f)return{...f,isRoot:!!((h=i[0])!=null&&h.node.eq(f.node))}}})}}get name(){return"events"}onView(){var t,e;if(!((t=this.store.managerSettings.exclude)!=null&&t.clickHandler))for(const n of this.store.extensions){if(!n.createEventHandlers||(e=n.options.exclude)!=null&&e.clickHandler)continue;const r=n.createEventHandlers();for(const[o,i]of an(r))this.addHandler(o,i)}}createPlugin(){const t=new WeakMap,e=(n,r,o,i,s,l,a,u)=>{const c=this.store.currentState,{schema:d,doc:h}=c,p=h.resolve(i),f=t.has(a),g=IX({$pos:p,handled:f,view:o,state:c});let m=!1;f||(m=n(a,g)||m);const v={...g,pos:i,direct:u,nodeWithPosition:{node:s,pos:l},getNode:y=>{const b=Ee(y)?d.nodes[y]:y;return we(b,{code:re.EXTENSION,message:"The node being checked does not exist"}),b===s.type?{node:s,pos:l}:void 0}};return t.set(a,!0),r(a,v)||m};return{props:{handleKeyPress:(n,r)=>this.options.keypress(r)||!1,handleKeyDown:(n,r)=>this.options.keydown(r)||!1,handleTextInput:(n,r,o,i)=>this.options.textInput({from:r,to:o,text:i})||!1,handleClickOn:(n,r,o,i,s,l)=>e(this.options.clickMark,this.options.click,n,r,o,i,s,l),handleDoubleClickOn:(n,r,o,i,s,l)=>e(this.options.doubleClickMark,this.options.doubleClick,n,r,o,i,s,l),handleTripleClickOn:(n,r,o,i,s,l)=>e(this.options.tripleClickMark,this.options.tripleClick,n,r,o,i,s,l),handleDOMEvents:{focus:(n,r)=>this.options.focus(r)||!1,blur:(n,r)=>this.options.blur(r)||!1,mousedown:(n,r)=>(this.startMouseover(),this.options.mousedown(r)||!1),mouseup:(n,r)=>(this.endMouseover(),this.options.mouseup(r)||!1),mouseleave:(n,r)=>(this.mouseover=!1,this.options.mouseleave(r)||!1),mouseenter:(n,r)=>(this.mouseover=!0,this.options.mouseenter(r)||!1),keyup:(n,r)=>this.options.keyup(r)||!1,mouseout:this.createMouseEventHandler((n,r)=>{const o={...r,hovering:!1};return this.options.hover(n,o)||!1}),mouseover:this.createMouseEventHandler((n,r)=>{const o={...r,hovering:!0};return this.options.hover(n,o)||!1}),contextmenu:this.createMouseEventHandler((n,r)=>this.options.contextmenu(n,r)||!1),scroll:(n,r)=>this.options.scroll(r)||!1,copy:(n,r)=>this.options.copy(r)||!1,cut:(n,r)=>this.options.cut(r)||!1,paste:(n,r)=>this.options.paste(r)||!1}},view:n=>{let r=n.editable;const o=this.options;return{update(i){const s=i.editable;s!==r&&(o.editable(s),r=s)}}}}}isInteracting(){return this.mousedown&&this.mouseover}startMouseover(){this.mouseover=!0,!this.mousedown&&(this.mousedown=!0,this.store.document.documentElement.addEventListener("mouseup",()=>{this.endMouseover()},{once:!0}))}endMouseover(){this.mousedown&&(this.mousedown=!1,this.store.commands.emptyUpdate())}};kO([it()],gg.prototype,"isInteracting",1);gg=kO([Ne({handlerKeys:["blur","focus","mousedown","mouseup","mouseenter","mouseleave","textInput","keypress","keyup","keydown","click","clickMark","doubleClick","doubleClickMark","tripleClick","tripleClickMark","contextmenu","hover","scroll","copy","cut","paste","editable"],handlerKeyOptions:{blur:{earlyReturnValue:!0},focus:{earlyReturnValue:!0},mousedown:{earlyReturnValue:!0},mouseleave:{earlyReturnValue:!0},mouseup:{earlyReturnValue:!0},click:{earlyReturnValue:!0},doubleClick:{earlyReturnValue:!0},tripleClick:{earlyReturnValue:!0},hover:{earlyReturnValue:!0},contextmenu:{earlyReturnValue:!0},scroll:{earlyReturnValue:!0},copy:{earlyReturnValue:!0},cut:{earlyReturnValue:!0},paste:{earlyReturnValue:!0}},defaultPriority:ot.High})],gg);function IX(t){const{handled:e,view:n,$pos:r,state:o}=t,i={getMark:IR,markRanges:[],view:n,state:o};if(e)return i;for(const{type:s}of r.marksAcross(r)??[]){const l=Hi(r,s);l&&i.markRanges.push(l)}return i.getMark=s=>{const l=Ee(s)?o.schema.marks[s]:s;return we(l,{code:re.EXTENSION,message:`The mark ${s} being checked does not exist within the editor schema.`}),i.markRanges.find(a=>a.mark.type===l)},i}class Wt extends Be{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return Wt.valid(r)?new Wt(r):Be.near(r)}content(){return ae.empty}eq(e){return e instanceof Wt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Wt(e.resolve(n.pos))}getBookmark(){return new Cw(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!LX(e)||!NX(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&Wt.valid(e))return e;let o=e.pos,i=null;for(let s=e.depth;;s--){let l=e.node(s);if(n>0?e.indexAfter(s)0){i=l.child(n>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;o+=n;let a=e.doc.resolve(o);if(Wt.valid(a))return a}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!Oe.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let l=e.doc.resolve(o);if(Wt.valid(l))return l}return null}}}Wt.prototype.visible=!1;Wt.findFrom=Wt.findGapCursorFrom;Be.jsonID("gapcursor",Wt);class Cw{constructor(e){this.pos=e}map(e){return new Cw(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return Wt.valid(n)?new Wt(n):Be.near(n)}}function LX(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function NX(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function $X(){return new mi({props:{decorations:FX,createSelectionBetween(t,e,n){return e.pos==n.pos&&Wt.valid(n)?new Wt(n):null},handleClick:PX,handleKeyDown:DX,handleDOMEvents:{beforeinput:zX}}})}const DX=Gb({ArrowLeft:Pp("horiz",-1),ArrowRight:Pp("horiz",1),ArrowUp:Pp("vert",-1),ArrowDown:Pp("vert",1)});function Pp(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,i){let s=r.selection,l=e>0?s.$to:s.$from,a=s.empty;if(s instanceof Me){if(!i.endOfTextblock(n)||l.depth==0)return!1;a=!1,l=r.doc.resolve(e>0?l.after():l.before())}let u=Wt.findGapCursorFrom(l,e,a);return u?(o&&o(r.tr.setSelection(new Wt(u))),!0):!1}}function PX(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!Wt.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&Oe.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new Wt(r))),!0)}function zX(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof Wt))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=J.empty;for(let s=r.length-1;s>=0;s--)o=J.from(r[s].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new ae(o,0,0));return i.setSelection(Me.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function FX(t){if(!(t.selection instanceof Wt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",He.create(t.doc,[vt.widget(t.selection.head,e,{key:"gapcursor"})])}var BX=Object.defineProperty,HX=Object.getOwnPropertyDescriptor,UX=(t,e,n,r)=>{for(var o=r>1?void 0:r?HX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&BX(e,n,o),o},Z0=class extends ft{get name(){return"gapCursor"}createExternalPlugins(){return[$X()]}};Z0=UX([Ne({})],Z0);var mg=200,bn=function(){};bn.prototype.append=function(e){return e.length?(e=bn.from(e),!this.length&&e||e.length=n?bn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};bn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};bn.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};bn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(e(i,s))},n,r),o};bn.from=function(e){return e instanceof bn?e:e&&e.length?new EO(e):bn.empty};var EO=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,s,l){for(var a=i;a=s;a--)if(o(this.values[a],l+a)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=mg)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=mg)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(bn);bn.empty=new EO([]);var WX=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return rl&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,i)-l,s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,s){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(i,l)-l,s+l)===!1||i=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(bn);const VX=500;class Do{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=e.tr,l,a,u=[],c=[];return this.items.forEach((d,h)=>{if(!d.step){o||(o=this.remapping(r,h+1),i=o.maps.length),i--,c.push(d);return}if(o){c.push(new qo(d.map));let p=d.step.map(o.slice(i)),f;p&&s.maybeStep(p).doc&&(f=s.mapping.maps[s.mapping.maps.length-1],u.push(new qo(f,void 0,void 0,u.length+c.length))),i--,f&&o.appendMap(f,i)}else s.maybeStep(d.step);if(d.selection)return l=o?d.selection.map(o.slice(i)):d.selection,a=new Do(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:s,selection:l}}addTransform(e,n,r,o){let i=[],s=this.eventCount,l=this.items,a=!o&&l.length?l.get(l.length-1):null;for(let c=0;cGX&&(l=jX(l,u),s-=u),new Do(l.append(i),s)}remapping(e,n){let r=new mc;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new Do(this.items.append(e.map(n=>new qo(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,s=e.steps.length,l=this.eventCount;this.items.forEach(h=>{h.selection&&l--},o);let a=n;this.items.forEach(h=>{let p=i.getMirror(--a);if(p==null)return;s=Math.min(s,p);let f=i.maps[p];if(h.step){let g=e.steps[p].invert(e.docs[p]),m=h.selection&&h.selection.map(i.slice(a+1,p));m&&l++,r.push(new qo(f,g,m))}else r.push(new qo(f))},o);let u=[];for(let h=n;hVX&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((s,l)=>{if(l>=e)o.push(s),s.selection&&i++;else if(s.step){let a=s.step.map(n.slice(r)),u=a&&a.getMap();if(r--,u&&n.appendMap(u,r),a){let c=s.selection&&s.selection.map(n.slice(r));c&&i++;let d=new qo(u.invert(),a,c),h,p=o.length-1;(h=o.length&&o[p].merge(d))?o[p]=h:o.push(d)}}else s.map&&r--},this.items.length,0),new Do(bn.from(o.reverse()),i)}}Do.empty=new Do(bn.empty,0);function jX(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class qo{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new qo(n.getMap().invert(),n,this.selection)}}}class gs{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const GX=20;function KX(t,e,n,r){let o=n.getMeta(si),i;if(o)return o.historyState;n.getMeta(XX)&&(t=new gs(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(si))return s.getMeta(si).redo?new gs(t.done.addTransform(n,void 0,r,Tf(e)),t.undone,hT(n.mapping.maps[n.steps.length-1]),t.prevTime,t.prevComposition):new gs(t.done,t.undone.addTransform(n,void 0,r,Tf(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),a=t.prevTime==0||!s&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-r.newGroupDelay||!YX(n,t.prevRanges)),u=s?x1(t.prevRanges,n.mapping):hT(n.mapping.maps[n.steps.length-1]);return new gs(t.done.addTransform(n,a?e.selection.getBookmark():void 0,r,Tf(e)),Do.empty,u,n.time,l??t.prevComposition)}else return(i=n.getMeta("rebased"))?new gs(t.done.rebased(n,i),t.undone.rebased(n,i),x1(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new gs(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),x1(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function YX(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i=e[i]&&(n=!0)}),n}function hT(t){let e=[];return t.forEach((n,r,o,i)=>e.push(o,i)),e}function x1(t,e){if(!t)return null;let n=[];for(let r=0;r{let n=si.getState(t);return!n||n.done.eventCount==0?!1:(e&&SO(n,t,e,!1),!0)},ud=(t,e)=>{let n=si.getState(t);return!n||n.undone.eventCount==0?!1:(e&&SO(n,t,e,!0),!0)};function J0(t){let e=si.getState(t);return e?e.done.eventCount:0}function ZX(t){let e=si.getState(t);return e?e.undone.eventCount:0}var JX=Object.defineProperty,QX=Object.getOwnPropertyDescriptor,xl=(t,e,n,r)=>{for(var o=r>1?void 0:r?QX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&JX(e,n,o),o},fi=class extends ft{constructor(){super(...arguments),this.wrapMethod=(t,e)=>({state:n,dispatch:r,view:o})=>{const{getState:i,getDispatch:s}=this.options,l=Qe(i)?i():n,a=Qe(s)&&r?s():r,u=t(l,a,o);return e==null||e(u),u}}get name(){return"history"}createKeymap(){return{"Mod-y":yr.isMac?()=>!1:this.wrapMethod(ud,this.options.onRedo),"Mod-z":this.wrapMethod(Af,this.options.onUndo),"Shift-Mod-z":this.wrapMethod(ud,this.options.onRedo)}}undoShortcut(t){return this.wrapMethod(Af,this.options.onUndo)(t)}redoShortcut(t){return this.wrapMethod(ud,this.options.onRedo)(t)}createExternalPlugins(){const{depth:t,newGroupDelay:e}=this.options;return[qX({depth:t,newGroupDelay:e})]}undo(){return TC(this.wrapMethod(Af,this.options.onUndo))}redo(){return TC(this.wrapMethod(ud,this.options.onRedo))}undoDepth(t=this.store.getState()){return J0(t)}redoDepth(t=this.store.getState()){return ZX(t)}};xl([en({shortcut:oe.Undo,command:"undo"})],fi.prototype,"undoShortcut",1);xl([en({shortcut:oe.Redo,command:"redo"})],fi.prototype,"redoShortcut",1);xl([le({disableChaining:!0,description:({t})=>t(tg.UNDO_DESCRIPTION),label:({t})=>t(tg.UNDO_LABEL),icon:"arrowGoBackFill"})],fi.prototype,"undo",1);xl([le({disableChaining:!0,description:({t})=>t(tg.REDO_DESCRIPTION),label:({t})=>t(tg.REDO_LABEL),icon:"arrowGoForwardFill"})],fi.prototype,"redo",1);xl([it()],fi.prototype,"undoDepth",1);xl([it()],fi.prototype,"redoDepth",1);fi=xl([Ne({defaultOptions:{depth:100,newGroupDelay:500,getDispatch:void 0,getState:void 0},staticKeys:["depth","newGroupDelay"],handlerKeys:["onUndo","onRedo"]})],fi);var eq=Object.defineProperty,tq=Object.getOwnPropertyDescriptor,Nm=(t,e,n,r)=>{for(var o=r>1?void 0:r?tq(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&eq(e,n,o),o},nq={icon:"paragraph",label:({t})=>t(ng.INSERT_LABEL),description:({t})=>t(ng.INSERT_DESCRIPTION)},rq={icon:"paragraph",label:({t})=>t(ng.CONVERT_LABEL),description:({t})=>t(ng.CONVERT_DESCRIPTION)},tl=class extends Dn{get name(){return"paragraph"}createTags(){return[ke.LastNodeCompatible,ke.TextBlock,ke.Block,ke.FormattingNode]}createNodeSpec(t,e){return{content:"inline*",draggable:!1,...e,attrs:{...t.defaults()},parseDOM:[{tag:"p",getAttrs:n=>({...t.parse(n)})},...e.parseDOM??[]],toDOM:n=>["p",t.dom(n),0]}}convertParagraph(t={}){const{attrs:e,selection:n,preserveAttrs:r}=t;return this.store.commands.setBlockNodeType.original(this.type,e,n,r)}insertParagraph(t,e={}){const{selection:n,attrs:r}=e;return this.store.commands.insertNode.original(this.type,{content:t,selection:n,attrs:r})}shortcut(t){return this.convertParagraph()(t)}};Nm([le(rq)],tl.prototype,"convertParagraph",1);Nm([le(nq)],tl.prototype,"insertParagraph",1);Nm([en({shortcut:oe.Paragraph,command:"convertParagraph"})],tl.prototype,"shortcut",1);tl=Nm([Ne({defaultPriority:ot.Medium})],tl);var oq=Object.defineProperty,iq=Object.getOwnPropertyDescriptor,sq=(t,e,n,r)=>{for(var o=r>1?void 0:r?iq(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&oq(e,n,o),o},Q0=class extends Dn{get name(){return"text"}createTags(){return[ke.InlineNode]}createNodeSpec(){return{}}};Q0=sq([Ne({disableExtraAttributes:!0,defaultPriority:ot.Medium})],Q0);var aq={...Uc.defaultOptions,...tl.defaultOptions,...fi.defaultOptions,excludeExtensions:[]};function lq(t={}){t={...aq,...t};const{content:e,depth:n,getDispatch:r,getState:o,newGroupDelay:i,excludeExtensions:s}=t,l={};for(const u of s??[])l[u]=!0;const a=[];if(!l.history){const u=new fi({depth:n,getDispatch:r,getState:o,newGroupDelay:i});a.push(u)}return l.doc||a.push(new Uc({content:e})),l.text||a.push(new Q0),l.paragraph||a.push(new tl),l.positioner||a.push(new Hc),l.gapCursor||a.push(new Z0),l.events||a.push(new gg),a}var cq=Object.defineProperty,uq=Object.getOwnPropertyDescriptor,dq=(t,e,n,r)=>{for(var o=r>1?void 0:r?uq(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&cq(e,n,o),o},nl=class extends ft{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(t,e)=>({...this.options,empty:Wb(e.doc,{ignoreAttributes:!0})}),apply:(t,e,n,r)=>hq({pluginState:e,tr:t,extension:this,state:r})},props:{decorations:t=>pq({state:t,extension:this})}}}onSetOptions(t){const{changes:e}=t;e.placeholder.changed&&this.store.phase>=mr.EditorView&&this.store.updateAttributes()}};nl=dq([Ne({defaultOptions:{emptyNodeClass:CV.IS_EMPTY,placeholder:""}})],nl);function hq(t){const{pluginState:e,extension:n,tr:r,state:o}=t;return r.docChanged?{...n.options,empty:Wb(o.doc)}:e}function pq(t){const{extension:e,state:n}=t,{empty:r}=e.pluginKey.getState(n),{emptyNodeClass:o,placeholder:i}=e.options;if(!r)return null;const s=[];return n.doc.descendants((l,a)=>{const u=vt.node(a,a+l.nodeSize,{class:o,"data-placeholder":i});s.push(u)}),He.create(n.doc,s)}var CO={exports:{}},Qr={},TO={exports:{}},AO={};/** + */var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,s={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function y(b){return b instanceof a?new a(b.type,y(b.content),b.alias):Array.isArray(b)?b.map(y):b.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(k){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(k.stack)||[])[1];if(y){var b=document.getElementsByTagName("script");for(var w in b)if(b[w].src==y)return b[w]}return null}},isActive:function(y,b,w){for(var k="no-"+b;y;){var x=y.classList;if(x.contains(b))return!0;if(x.contains(k))return!1;y=y.parentElement}return!!w}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(y,b){var w=l.util.clone(l.languages[y]);for(var k in b)w[k]=b[k];return w},insertBefore:function(y,b,w,k){k=k||l.languages;var x=k[y],S={};for(var A in x)if(x.hasOwnProperty(A)){if(A==b)for(var C in w)w.hasOwnProperty(C)&&(S[C]=w[C]);w.hasOwnProperty(A)||(S[A]=x[A])}var O=k[y];return k[y]=S,l.languages.DFS(l.languages,function(R,_){_===O&&R!=y&&(this[R]=S)}),S},DFS:function y(b,w,k,x){x=x||{};var S=l.util.objId;for(var A in b)if(b.hasOwnProperty(A)){w.call(b,A,b[A],k||A);var C=b[A],O=l.util.type(C);O==="Object"&&!x[S(C)]?(x[S(C)]=!0,y(C,w,null,x)):O==="Array"&&!x[S(C)]&&(x[S(C)]=!0,y(C,w,A,x))}}},plugins:{},highlightAll:function(y,b){l.highlightAllUnder(document,y,b)},highlightAllUnder:function(y,b,w){var k={callback:w,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",k),k.elements=Array.prototype.slice.apply(k.container.querySelectorAll(k.selector)),l.hooks.run("before-all-elements-highlight",k);for(var x=0,S;S=k.elements[x++];)l.highlightElement(S,b===!0,k.callback)},highlightElement:function(y,b,w){var k=l.util.getLanguage(y),x=l.languages[k];l.util.setLanguage(y,k);var S=y.parentElement;S&&S.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(S,k);var A=y.textContent,C={element:y,language:k,grammar:x,code:A};function O(_){C.highlightedCode=_,l.hooks.run("before-insert",C),C.element.innerHTML=C.highlightedCode,l.hooks.run("after-highlight",C),l.hooks.run("complete",C),w&&w.call(C.element)}if(l.hooks.run("before-sanity-check",C),S=C.element.parentElement,S&&S.nodeName.toLowerCase()==="pre"&&!S.hasAttribute("tabindex")&&S.setAttribute("tabindex","0"),!C.code){l.hooks.run("complete",C),w&&w.call(C.element);return}if(l.hooks.run("before-highlight",C),!C.grammar){O(l.util.encode(C.code));return}if(b&&r.Worker){var R=new Worker(l.filename);R.onmessage=function(_){O(_.data)},R.postMessage(JSON.stringify({language:C.language,code:C.code,immediateClose:!0}))}else O(l.highlight(C.code,C.grammar,C.language))},highlight:function(y,b,w){var k={code:y,grammar:b,language:w};if(l.hooks.run("before-tokenize",k),!k.grammar)throw new Error('The language "'+k.language+'" has no grammar.');return k.tokens=l.tokenize(k.code,k.grammar),l.hooks.run("after-tokenize",k),a.stringify(l.util.encode(k.tokens),k.language)},tokenize:function(y,b){var w=b.rest;if(w){for(var k in w)b[k]=w[k];delete b.rest}var x=new d;return h(x,x.head,y),c(y,x,b,x.head,0),f(x)},hooks:{all:{},add:function(y,b){var w=l.hooks.all;w[y]=w[y]||[],w[y].push(b)},run:function(y,b){var w=l.hooks.all[y];if(!(!w||!w.length))for(var k=0,x;x=w[k++];)x(b)}},Token:a};r.Prism=l;function a(y,b,w,k){this.type=y,this.content=b,this.alias=w,this.length=(k||"").length|0}a.stringify=function y(b,w){if(typeof b=="string")return b;if(Array.isArray(b)){var k="";return b.forEach(function(O){k+=y(O,w)}),k}var x={type:b.type,content:y(b.content,w),tag:"span",classes:["token",b.type],attributes:{},language:w},S=b.alias;S&&(Array.isArray(S)?Array.prototype.push.apply(x.classes,S):x.classes.push(S)),l.hooks.run("wrap",x);var A="";for(var C in x.attributes)A+=" "+C+'="'+(x.attributes[C]||"").replace(/"/g,""")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+A+">"+x.content+""};function u(y,b,w,k){y.lastIndex=b;var x=y.exec(w);if(x&&k&&x[1]){var S=x[1].length;x.index+=S,x[0]=x[0].slice(S)}return x}function c(y,b,w,k,x,S){for(var A in w)if(!(!w.hasOwnProperty(A)||!w[A])){var C=w[A];C=Array.isArray(C)?C:[C];for(var O=0;O=S.reach);$+=L.value.length,L=L.next){var P=L.value;if(b.length>y.length)return;if(!(P instanceof a)){var F=1,H;if(E){if(H=u(N,$,y,T),!H||H.index>=y.length)break;var G=H.index,W=H.index+H[0].length,B=$;for(B+=L.value.length;G>=B;)L=L.next,B+=L.value.length;if(B-=L.value.length,$=B,L.value instanceof a)continue;for(var U=L;U!==b.tail&&(BS.reach&&(S.reach=te);var de=L.prev;X&&(de=h(b,de,X),$+=X.length),p(b,de,F);var Ie=new a(A,_?l.tokenize(Y,_):Y,M,Y);if(L=h(b,de,Ie),Z&&h(b,L,Z),F>1){var ve={cause:A+","+O,reach:te};c(y,b,w,L.prev,$,ve),S&&ve.reach>S.reach&&(S.reach=ve.reach)}}}}}}function d(){var y={value:null,prev:null,next:null},b={value:null,prev:y,next:null};y.next=b,this.head=y,this.tail=b,this.length=0}function h(y,b,w){var k=b.next,x={value:w,prev:b,next:k};return b.next=x,k.prev=x,y.length++,x}function p(y,b,w){for(var k=b.next,x=0;x/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.value.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(n,r){var o={};o["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[r]},o.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:o}};i["language-"+r]={pattern:/[\s\S]+/,inside:t.languages[r]};var s={};s[n]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:i},t.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml}var v7=cw;cw.displayName="css";cw.aliases=[];function cw(t){(function(e){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(t)}var y7=uw;uw.displayName="clike";uw.aliases=[];function uw(t){t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}var b7=dw;dw.displayName="javascript";dw.aliases=["js"];function dw(t){t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript}var Qu=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof ct=="object"?ct:{},w7=D7();Qu.Prism={manual:!0,disableWorkerMessageHandler:!0};var x7=D9,k7=JU,iO=g7,E7=m7,S7=v7,C7=y7,T7=b7;w7();var hw={}.hasOwnProperty;function sO(){}sO.prototype=iO;var Qt=new sO,A7=Qt;Qt.highlight=R7;Qt.register=ep;Qt.alias=_7;Qt.registered=M7;Qt.listLanguages=O7;ep(E7);ep(S7);ep(C7);ep(T7);Qt.util.encode=N7;Qt.Token.stringify=I7;function ep(t){if(typeof t!="function"||!t.displayName)throw new Error("Expected `function` for `grammar`, got `"+t+"`");Qt.languages[t.displayName]===void 0&&t(Qt)}function _7(t,e){var n=Qt.languages,r=t,o,i,s,l;e&&(r={},r[t]=e);for(o in r)for(i=r[o],i=typeof i=="string"?[i]:i,s=i.length,l=-1;++lparseInt(eh(l,2),16)),parseInt(eh(s[3]||"f",2),16)/255]}const r=U7.exec(e);if(r){const s=Array.from(r).slice(1);return[...s.slice(0,3).map(l=>parseInt(l,16)),parseInt(s[3]||"ff",16)/255]}const o=W7.exec(e);if(o){const s=Array.from(o).slice(1);return[...s.slice(0,3).map(l=>parseInt(l,10)),parseFloat(s[3]||"1")]}const i=V7.exec(e);if(i){const[s,l,a,u]=Array.from(i).slice(1).map(parseFloat);if(Li(0,100,l)!==l)throw new ed(t);if(Li(0,100,a)!==a)throw new ed(t);return[...G7(s,l,a),Number.isNaN(u)?1:u]}throw new ed(t)}function z7(t){let e=5381,n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return(e>>>0)%2341}const eT=t=>parseInt(t.replace(/_/g,""),36),F7="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((t,e)=>{const n=eT(e.substring(0,3)),r=eT(e.substring(3)).toString(16);let o="";for(let i=0;i<6-r.length;i++)o+="0";return t[n]=`${o}${r}`,t},{});function B7(t){const e=t.toLowerCase().trim(),n=F7[z7(e)];if(!n)throw new ed(t);return`#${n}`}const eh=(t,e)=>Array.from(Array(e)).map(()=>t).join(""),H7=new RegExp(`^#${eh("([a-f0-9])",3)}([a-f0-9])?$`,"i"),U7=new RegExp(`^#${eh("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),W7=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${eh(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),V7=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,j7=/^[a-z]+$/i,tT=t=>Math.round(t*255),G7=(t,e,n)=>{let r=n/100;if(e===0)return[r,r,r].map(tT);const o=(t%360+360)%360/60,i=(1-Math.abs(2*r-1))*(e/100),s=i*(1-Math.abs(o%2-1));let l=0,a=0,u=0;o>=0&&o<1?(l=i,a=s):o>=1&&o<2?(l=s,a=i):o>=2&&o<3?(a=i,u=s):o>=3&&o<4?(a=s,u=i):o>=4&&o<5?(l=s,u=i):o>=5&&o<6&&(l=i,u=s);const c=r-i/2,d=l+c,h=a+c,p=u+c;return[d,h,p].map(tT)};function K7(t){const[e,n,r,o]=fw(t).map((d,h)=>h===3?d:d/255),i=Math.max(e,n,r),s=Math.min(e,n,r),l=(i+s)/2;if(i===s)return[0,0,l,o];const a=i-s,u=l>.5?a/(2-i-s):a/(i+s);return[60*(e===i?(n-r)/a+(n.179}function xc(t){return Z7(t)?"#000":"#fff"}const J7="remirror-editor-wrapper",Q7="remirror-button-active",eW="remirror-button",tW="remirror-composite",nW="remirror-dialog",rW="remirror-dialog-backdrop",oW="remirror-form",iW="remirror-form-message",sW="remirror-form-label",aW="remirror-form-group",lW="remirror-group",cW="remirror-input",uW="remirror-menu",dW="remirror-menu-pane",hW="remirror-menu-pane-active",pW="remirror-menu-dropdown-label",fW="remirror-menu-pane-icon",gW="remirror-menu-pane-label",mW="remirror-menu-pane-shortcut",vW="remirror-menu-button-left",yW="remirror-menu-button-right",bW="remirror-menu-button-nested-left",wW="remirror-menu-button-nested-right",xW="remirror-menu-button",kW="remirror-menu-bar",EW="remirror-flex-column",SW="remirror-flex-row",CW="remirror-menu-item",TW="remirror-menu-item-row",AW="remirror-menu-item-column",_W="remirror-menu-item-checkbox",RW="remirror-menu-item-radio",MW="remirror-menu-group",OW="remirror-floating-popover",IW="remirror-popover",LW="remirror-animated-popover",NW="remirror-role",$W="remirror-separator",DW="remirror-tab",PW="remirror-tab-list",zW="remirror-tabbable",FW="remirror-toolbar",BW="remirror-tooltip",HW="remirror-table-size-editor",UW="remirror-table-size-editor-body",WW="remirror-table-size-editor-cell",VW="remirror-table-size-editor-cell-selected",jW="remirror-table-size-editor-footer",GW="remirror-color-picker",KW="remirror-color-picker-cell",YW="remirror-color-picker-cell-selected";var XW=Object.freeze({__proto__:null,ANIMATED_POPOVER:LW,BUTTON:eW,BUTTON_ACTIVE:Q7,COLOR_PICKER:GW,COLOR_PICKER_CELL:KW,COLOR_PICKER_CELL_SELECTED:YW,COMPOSITE:tW,DIALOG:nW,DIALOG_BACKDROP:rW,EDITOR_WRAPPER:J7,FLEX_COLUMN:EW,FLEX_ROW:SW,FLOATING_POPOVER:OW,FORM:oW,FORM_GROUP:aW,FORM_LABEL:sW,FORM_MESSAGE:iW,GROUP:lW,INPUT:cW,MENU:uW,MENU_BAR:kW,MENU_BUTTON:xW,MENU_BUTTON_LEFT:vW,MENU_BUTTON_NESTED_LEFT:bW,MENU_BUTTON_NESTED_RIGHT:wW,MENU_BUTTON_RIGHT:yW,MENU_DROPDOWN_LABEL:pW,MENU_GROUP:MW,MENU_ITEM:CW,MENU_ITEM_CHECKBOX:_W,MENU_ITEM_COLUMN:AW,MENU_ITEM_RADIO:RW,MENU_ITEM_ROW:TW,MENU_PANE:dW,MENU_PANE_ACTIVE:hW,MENU_PANE_ICON:fW,MENU_PANE_LABEL:gW,MENU_PANE_SHORTCUT:mW,POPOVER:IW,ROLE:NW,SEPARATOR:$W,TAB:DW,TABBABLE:zW,TABLE_SIZE_EDITOR:HW,TABLE_SIZE_EDITOR_BODY:UW,TABLE_SIZE_EDITOR_CELL:WW,TABLE_SIZE_EDITOR_CELL_SELECTED:VW,TABLE_SIZE_EDITOR_FOOTER:jW,TAB_LIST:PW,TOOLBAR:FW,TOOLTIP:BW});const qW="remirror-wrap",ZW="remirror-language-select-positioner",JW="remirror-language-select-width",QW="remirror-a11y-dark",eV="remirror-atom-dark",tV="remirror-base16-ateliersulphurpool-light",nV="remirror-cb",rV="remirror-darcula",oV="remirror-dracula",iV="remirror-duotone-dark",sV="remirror-duotone-earth",aV="remirror-duotone-forest",lV="remirror-duotone-light",cV="remirror-duotone-sea",uV="remirror-duotone-space",dV="remirror-gh-colors",hV="remirror-hopscotch",pV="remirror-pojoaque",fV="remirror-vs",gV="remirror-xonokai";var q0=Object.freeze({__proto__:null,A11Y_DARK:QW,ATOM_DARK:eV,BASE16_ATELIERSULPHURPOOL_LIGHT:tV,CB:nV,DARCULA:rV,DRACULA:oV,DUOTONE_DARK:iV,DUOTONE_EARTH:sV,DUOTONE_FOREST:aV,DUOTONE_LIGHT:lV,DUOTONE_SEA:cV,DUOTONE_SPACE:uV,GH_COLORS:dV,HOPSCOTCH:hV,LANGUAGE_SELECT_POSITIONER:ZW,LANGUAGE_SELECT_WIDTH:JW,POJOAQUE:pV,VS:fV,WRAP:qW,XONOKAI:gV});const mV="remirror-image-loader";var vV=Object.freeze({__proto__:null,IMAGE_LOADER:mV});const yV="remirror-list-item-with-custom-mark",bV="remirror-ul-list-content",wV="remirror-editor",xV="remirror-list-item-marker-container",kV="remirror-list-item-checkbox",EV="remirror-collapsible-list-item-closed",SV="remirror-collapsible-list-item-button",CV="remirror-list-spine";var Ks=Object.freeze({__proto__:null,COLLAPSIBLE_LIST_ITEM_BUTTON:SV,COLLAPSIBLE_LIST_ITEM_CLOSED:EV,EDITOR:wV,LIST_ITEM_CHECKBOX:kV,LIST_ITEM_MARKER_CONTAINER:xV,LIST_ITEM_WITH_CUSTOM_MARKER:yV,LIST_SPINE:CV,UL_LIST_CONTENT:bV});const TV="remirror-is-empty";var AV=Object.freeze({__proto__:null,IS_EMPTY:TV});const _V="remirror-editor",RV="remirror-positioner",MV="remirror-positioner-widget";var OV=Object.freeze({__proto__:null,EDITOR:_V,POSITIONER:RV,POSITIONER_WIDGET:MV});const IV="remirror-theme";function LV(t={}){const e=[],n={};function r(o,i){if(typeof i=="string"||typeof i=="number"){e.push(`${nT(o)}: ${i};`),n[nT(o)]=i;return}if(!(typeof i!="object"||!i))for(const[s,l]of Object.entries(i))r([...o,s],l)}for(const[o,i]of Object.entries(t))r([o],i);return{css:e.join(` +`),styles:n}}function NV(t){return t.replace(/([a-z])([\dA-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function nT(t){return`--rmr-${t.map(NV).join("-")}`}const Oo={gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},Ni="#000000",gw="#ffffff",$V="#252103",mw=dg(Ni,.75),Om="#7963d2",vw="#bcd263",DV="#fff",PV="#fff",yw=Oo.gray[1],rT="rgba(10,31,68,0.08)",oT="rgba(10,31,68,0.10)",iT="rgba(10,31,68,0.12)",zV=Ef(dg(Ni,.1),.13),bw={background:gw,border:mw,foreground:Ni,muted:yw,primary:Om,secondary:vw,primaryText:DV,secondaryText:PV,text:$V,faded:zV},FV={...bw,background:Hr(gw,.15),border:Hr(mw,.15),foreground:Hr(Ni,.15),muted:Hr(yw,.15),primary:Hr(Om,.15),secondary:Hr(vw,.15),get text(){return xc(this.background)},get primaryText(){return xc(this.primary)},get secondaryText(){return xc(this.secondary)}},BV={...bw,background:Hr(gw,.075),border:Hr(mw,.075),foreground:Hr(Ni,.075),muted:Hr(yw,.075),primary:Hr(Om,.075),secondary:Hr(vw,.075),get text(){return xc(this.background)},get primaryText(){return xc(this.primary)},get secondaryText(){return xc(this.secondary)}},va={color:{...bw,active:FV,hover:BV,shadow1:rT,shadow2:oT,shadow3:iT,backdrop:dg(Ni,.1),outline:dg(Om,.6),table:{default:{border:Ef(Ni,.8),cell:Ef(Ni,.4),controller:Oo.gray[3]},selected:{border:Oo.blue[7],cell:Oo.blue[1],controller:Oo.blue[5]},preselect:{border:Oo.blue[7],cell:Ef(Ni,.4),controller:Oo.blue[5]},predelete:{border:Oo.red[7],cell:Oo.red[1],controller:Oo.red[5]},mark:"#91919196"}},hue:Oo,radius:{border:"0.25rem",extra:"0.5rem",circle:"50%"},fontFamily:{default:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif',heading:"inherit",mono:"Menlo, monospace"},fontSize:{0:"12px",1:"14px",2:"16px",3:"20px",4:"24px",5:"32px",6:"48px",7:"64px",8:"96px",default:"16px"},space:{1:"4px",2:"8px",3:"16px",4:"32px",5:"64px",6:"128px",7:"256px",8:"512px"},fontWeight:{bold:"700",default:"400",heading:"700"},letterSpacing:{tight:"-1px",default:"normal",loose:"1px",wide:"3px"},lineHeight:{heading:"1.25em",default:"1.5em"},boxShadow:{1:`0 1px 1px ${rT}`,2:`0 1px 1px ${oT}`,3:`0 1px 1px ${iT}`}};var HV=Object.defineProperty,UV=Object.getOwnPropertyDescriptor,Yi=(t,e,n,r)=>{for(var o=r>1?void 0:r?UV(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&HV(e,n,o),o},aO=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},rs=(t,e,n)=>(aO(t,e,"read from private field"),n?n.call(t):e.get(t)),w1=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},x1=(t,e,n,r)=>(aO(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),lO="data-code-block-language";function cO(t,e,n=[]){return t.map(r=>{const o=[...n];return r.type==="element"&&r.properties.className?o.push(...r.properties.className):r.type==="text"&&o.length===0&&e&&o.push(e),r.type==="element"?cO(r.children,e,o):{text:r.value,classes:o}})}function WV(t,e){var n;const{node:r,pos:o}=t,i=hg({language:(n=r.attrs.language)==null?void 0:n.replace("language-",""),fallback:"markup"}),s=pw.highlight(r.textContent??"",i),l=cO(s,e);let a=o+1;function u(c){const d=a,h=d+c.text.length;return a=h,{...c,from:d,to:h}}return IR(l).map(u)}function sT(t){const{blocks:e,skipLast:n,plainTextClassName:r}=t,o=[];for(const i of e){const s=WV(i,r),l=n?s.length-1:s.length;for(const a of Cb(l)){const u=s[a],c=u==null?void 0:u.classes;if(!u||!(c!=null&&c.length))continue;const d=vt.inline(u.from,u.to,{class:c.join(" ")});o.push(d)}}return o}function VV(t){return!!(t&&$n(t)&&Ee(t.language)&&t.language.length>0)}function jV(t){return e=>({state:{tr:n,selection:r},dispatch:o})=>{if(!VV(e))throw new Error("Invalid attrs passed to the updateAttributes method");const i=pi({types:t,selection:r});return!i||OR(e,i.node.attrs)?!1:(n.setNodeMarkup(i.pos,t,{...i.node.attrs,...e}),o&&o(n),!0)}}function hg(t){const{language:e,fallback:n}=t;if(!e)return n;const r=pw.listLanguages();for(const o of r)if(o.toLowerCase()===e.toLowerCase())return o;return n}function GV(t,e){const{language:n,wrap:r}=Em(t.attrs,e),{style:o,...i}=e.dom(t);let s=i.style;return r&&(s=WF({whiteSpace:"pre-wrap",wordBreak:"break-all"},s)),["pre",{spellcheck:"false",...i,class:Fc(i.class,`language-${n}`)},["code",{[lO]:n,style:s},0]]}function KV(t){return({pos:e}=ye())=>({tr:n,dispatch:r})=>{const{type:o,formatter:i,defaultLanguage:s}=t,{from:l,to:a}=e?{from:e,to:e}:n.selection,u=pi({types:o,selection:n.selection});if(!u)return!1;const{node:{attrs:c,textContent:d},start:h}=u,p=l-h,f=a-h,g=hg({language:c.language,fallback:s}),m=i({source:d,language:g,cursorOffset:p});let v;if(p!==f&&(v=i({source:d,language:g,cursorOffset:f})),!m)return!1;const{cursorOffset:y,formatted:b}=m;if(b===d)return!1;const w=h+d.length;n.insertText(b,h,w);const k=h+y,x=v?h+v.cursorOffset:void 0;return n.setSelection(Me.between(n.doc.resolve(k),n.doc.resolve(x??k))),r&&r(n),!0}}function YV(t){var e;return(e=t.getAttribute(lO)??t.classList[0])==null?void 0:e.replace("language-","")}var{DESCRIPTION:XV,LABEL:qV}=O5,ZV={icon:"bracesLine",description:({t})=>t(XV),label:({t})=>t(qV)},xa,td,nd,JV=class{constructor(t,e){w1(this,xa,void 0),w1(this,td,void 0),w1(this,nd,!1),x1(this,td,t),x1(this,xa,e)}init(t){const e=nB({node:t.doc,type:rs(this,td)});return this.refreshDecorationSet(t.doc,e),this}refreshDecorationSet(t,e){const n=sT({blocks:e,skipLast:rs(this,nd),defaultLanguage:rs(this,xa).options.defaultLanguage,plainTextClassName:rs(this,xa).options.plainTextClassName??void 0});this.decorationSet=He.create(t,n)}apply(t,e){if(!t.docChanged)return this;this.decorationSet=this.decorationSet.map(t.mapping,t.doc);const n=rB(t,{descend:!0,predicate:r=>r.type===rs(this,td),StepTypes:[]});return this.updateDecorationSet(t,n),this}updateDecorationSet(t,e){if(e.length===0)return;let n=this.decorationSet;for(const{node:r,pos:o}of e)n=this.decorationSet.remove(this.decorationSet.find(o,o+r.nodeSize));this.decorationSet=n.add(t.doc,sT({blocks:e,skipLast:rs(this,nd),defaultLanguage:rs(this,xa).options.defaultLanguage,plainTextClassName:rs(this,xa).options.plainTextClassName??void 0}))}setDeleted(t){x1(this,nd,t)}};xa=new WeakMap;td=new WeakMap;nd=new WeakMap;var vo=class extends Dn{get name(){return"codeBlock"}createTags(){return[ke.Block,ke.Code]}init(){this.registerLanguages()}createNodeSpec(t,e){const n=/highlight-(?:text|source)-([\da-z]+)/;return{content:"text*",marks:"",defining:!0,draggable:!1,...e,code:!0,attrs:{...t.defaults(),language:{default:this.options.defaultLanguage},wrap:{default:this.options.defaultWrap}},parseDOM:[{tag:"div.highlight",preserveWhitespace:"full",getAttrs:r=>{var o,i;if(!Vt(r))return!1;const s=r.querySelector("pre.code");if(!Vt(s))return!1;const l=Xo(s,"white-space")==="pre-wrap",a=(i=(o=r.className.match(n))==null?void 0:o[1])==null?void 0:i.replace("language-","");return{...t.parse(r),language:a,wrap:l}}},{tag:"pre",preserveWhitespace:"full",getAttrs:r=>{if(!Vt(r))return!1;const o=r.querySelector("code");if(!Vt(o))return!1;const i=Xo(o,"white-space")==="pre-wrap",s=this.options.getLanguageFromDom(o,r);return{...t.parse(r),language:s,wrap:i}}},...e.parseDOM??[]],toDOM:r=>GV(r,t)}}createAttributes(){return{class:q0[this.options.syntaxTheme.toUpperCase()]}}createInputRules(){const t=/^```([\dA-Za-z]*) $/,e=n=>({language:hg({language:wc(n,1),fallback:this.options.defaultLanguage})});return[gM({regexp:t,type:this.type,beforeDispatch:({tr:n,start:r})=>{const o=n.doc.resolve(r);n.setSelection(Me.near(o))},getAttributes:e})]}onSetOptions(t){const{changes:e}=t;e.supportedLanguages.changed&&this.registerLanguages(),e.syntaxTheme.changed&&this.store.updateAttributes()}createPlugin(){const t=new JV(this.type,this),e=()=>(t.setDeleted(!0),!1);return{state:{init(n,r){return t.init(r)},apply(n,r,o,i){return t.apply(n,i)}},props:{handleKeyDown:Yb({Backspace:e,"Mod-Backspace":e,Delete:e,"Mod-Delete":e,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e}),decorations(){return t.setDeleted(!1),t.decorationSet}}}}toggleCodeBlock(t={}){return Gb({type:this.type,toggleType:this.options.toggleName,attrs:{language:this.options.defaultLanguage,...t}})}createCodeBlock(t){return Zd(this.type,t)}updateCodeBlock(t){return jV(this.type)(t)}formatCodeBlock(t){return KV({type:this.type,formatter:this.options.formatter,defaultLanguage:this.options.defaultLanguage})(t)}tabKey({state:t,dispatch:e}){const{selection:n,tr:r,schema:o}=t,{node:i}=gF(n);if(!bm({node:i,types:this.type}))return!1;if(n.empty)r.insertText(" ");else{const{from:s,to:l}=n;r.replaceWith(s,l,o.text(" "))}return e&&e(r),!0}backspaceKey({dispatch:t,tr:e,state:n}){if(!e.selection.empty)return!1;const r=pi({types:this.type,selection:e.selection});if((r==null?void 0:r.start)!==e.selection.from)return!1;const{pos:o,node:i,start:s}=r,l=Mt(n.schema.nodes,this.options.toggleName);return i.textContent.trim()===""?e.doc.lastChild===i&&e.doc.firstChild===i?pF({pos:o,tr:e,content:l.create()}):hF({pos:o,tr:e}):s>2?e.setSelection(Me.near(e.doc.resolve(s-2))):(e.insert(0,l.create()),e.setSelection(Me.near(e.doc.resolve(1)))),t&&t(e),!0}enterKey({dispatch:t,tr:e}){if(!(ta(e.selection)&&e.selection.empty))return!1;const{nodeBefore:n,parent:r}=e.selection.$anchor;if(!(n!=null&&n.isText)||!r.type.isTextblock)return!1;const o=/^```([A-Za-z]*)?$/,{text:i,nodeSize:s}=n,{textContent:l}=r;if(!i)return!1;const a=i.match(o),u=l.match(o);if(!a||!u)return!1;const[,c]=a,d=hg({language:c,fallback:this.options.defaultLanguage}),h=e.selection.$from.before(),p=h+s+1;return e.replaceWith(h,p,this.type.create({language:d})),e.setSelection(Me.near(e.doc.resolve(h+1))),t&&t(e),!0}formatShortcut({tr:t}){const e=this.store.commands;if(!tM({type:this.type,state:t}))return!1;const n=e.formatCodeBlock.isEnabled();return n&&e.formatCodeBlock(),n}registerLanguages(){for(const t of this.options.supportedLanguages)pw.register(t)}};Yi([le(ZV)],vo.prototype,"toggleCodeBlock",1);Yi([le()],vo.prototype,"createCodeBlock",1);Yi([le()],vo.prototype,"updateCodeBlock",1);Yi([le()],vo.prototype,"formatCodeBlock",1);Yi([en({shortcut:"Tab"})],vo.prototype,"tabKey",1);Yi([en({shortcut:"Backspace"})],vo.prototype,"backspaceKey",1);Yi([en({shortcut:"Enter"})],vo.prototype,"enterKey",1);Yi([en({shortcut:oe.Format})],vo.prototype,"formatShortcut",1);vo=Yi([Ne({defaultOptions:{supportedLanguages:[],toggleName:"paragraph",formatter:({source:t})=>({cursorOffset:0,formatted:t}),syntaxTheme:"a11y_dark",defaultLanguage:"markup",defaultWrap:!1,plainTextClassName:"",getLanguageFromDom:YV},staticKeys:["getLanguageFromDom"]})],vo);var QV=Object.defineProperty,ej=Object.getOwnPropertyDescriptor,ww=(t,e,n,r)=>{for(var o=r>1?void 0:r?ej(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&QV(e,n,o),o},uO=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},rn=(t,e,n)=>(uO(t,e,"read from private field"),n?n.call(t):e.get(t)),ki=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},is=(t,e,n,r)=>(uO(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),rd,od,Jl,id,Sf,sd,ad,ld,cd,Cf=class{constructor(t){ki(this,rd,Cm()),ki(this,od,[]),ki(this,Jl,new Map),ki(this,id,[]),ki(this,Sf,!1),ki(this,sd,void 0),ki(this,ad,void 0),ki(this,ld,void 0),ki(this,cd,void 0),this.addListener=(e,n)=>rn(this,rd).on(e,n),is(this,sd,t),is(this,ad,t.getActive),is(this,cd,t.getPosition),is(this,ld,t.getID),this.hasChanged=t.hasChanged,this.events=t.events??["state","scroll"]}static create(t){return new Cf(t)}static fromPositioner(t,e){return Cf.create({...t.basePositioner,...e})}get basePositioner(){return{getActive:rn(this,ad),getPosition:rn(this,cd),hasChanged:this.hasChanged,events:this.events,getID:rn(this,ld)}}onActiveChanged(t){this.recentUpdate=t;const e=rn(this,ad).call(this,t);is(this,od,e),is(this,Jl,new Map),is(this,Sf,!1),is(this,id,[]);const n=[];for(const[r,o]of e.entries()){const i=this.getID(o,r);rn(this,id).push(i),n.push({setElement:s=>this.addProps({...t,data:o,element:s},r),id:i,data:o})}rn(this,rd).emit("update",n)}getID(t,e){var n;return((n=rn(this,ld))==null?void 0:n.call(this,t,e))??e.toString()}addProps(t,e){if(rn(this,Sf)||(rn(this,Jl).set(e,t),rn(this,Jl).sizet;return this.clone(n=>({getActive:r=>n.getActive(r).filter(e)}))}},Gr=Cf;rd=new WeakMap;od=new WeakMap;Jl=new WeakMap;id=new WeakMap;Sf=new WeakMap;sd=new WeakMap;ad=new WeakMap;ld=new WeakMap;cd=new WeakMap;Gr.EMPTY=[];function tj(t,e=hO){const{key:n}=(t==null?void 0:t.getMeta(dO))??{};return n===e}function xw(t){const{tr:e,state:n,previousState:r}=t;return!r||e&&tj(e)?!0:e?vF(e):!n.doc.eq(r.doc)||!n.selection.eq(r.selection)}function kw(t,e,n={}){const r=e.getBoundingClientRect(),{accountForPadding:o=!1}=n;let i=0,s=0,l=0,a=0;if(Vt(e)&&o){const c=Number.parseFloat(Xo(e,"padding-left").replace("px","")),d=Number.parseFloat(Xo(e,"padding-right").replace("px","")),h=Number.parseFloat(Xo(e,"padding-top").replace("px","")),p=Number.parseFloat(Xo(e,"padding-bottom").replace("px","")),f=Number.parseFloat(Xo(e,"border-left").replace("px","")),g=Number.parseFloat(Xo(e,"border-right").replace("px","")),m=Number.parseFloat(Xo(e,"border-top").replace("px","")),v=Number.parseFloat(Xo(e,"border-bottom").replace("px","")),y=e.offsetWidth-e.clientWidth,b=e.offsetHeight-e.clientHeight;i+=c+f+(e.dir==="rtl"?y:0),s+=d+g+(e.dir==="rtl"?0:y),l+=h+m,a+=p+v+b}const u=new DOMRect(r.left+i,r.top+l,r.width-s,r.height-a);for(const[c,d]of[[t.top,t.left],[t.top,t.right],[t.bottom,t.left],[t.bottom,t.right]])if(ri(c,u.top,u.bottom)&&ri(d,u.left,u.right))return!0;return!1}var nj="remirror-positioner-widget",dO="positionerUpdate",hO="__all_positioners__",pO={y:-999999,x:-999999,width:0,height:0},aT={...pO,left:-999999,top:-999999,bottom:-999999,right:-999999},Im={...pO,rect:{...aT,toJSON:()=>aT},visible:!1},fO=Gr.create({hasChanged:xw,getActive(t){const{state:e}=t;if(!Ub(e)||e.selection.$anchor.depth>2)return Gr.EMPTY;const n=Yh({predicate:r=>r.type.isBlock,selection:e});return n?[n]:Gr.EMPTY},getPosition(t){const{view:e,data:n}=t,r=e.nodeDOM(n.pos);if(!Vt(r))return Im;const o=r.getBoundingClientRect(),i=e.dom.getBoundingClientRect(),s=o.height,l=o.width,a=e.dom.scrollLeft+o.left-i.left,u=e.dom.scrollTop+o.top-i.top,c=kw(o,e.dom);return{y:u,x:a,height:s,width:l,rect:o,visible:c}}}),Ew=fO.clone(({getActive:t})=>({getActive:e=>{const[n]=t(e);return n&&xm(n.node)&&n.node.type===wm(e.state.schema)?[n]:Gr.EMPTY}})),rj=Ew.clone(({getPosition:t})=>({getPosition:e=>({...t(e),width:1})})),oj=Ew.clone(({getPosition:t})=>({getPosition:e=>{const{width:n,x:r,y:o,height:i}=t(e);return{...t(e),width:1,x:n+r,rect:new DOMRect(n+r,o,1,i)}}}));function Sw(t){return Gr.create({hasChanged:xw,getActive:e=>{const{state:n,view:r}=e;if(!t(n)||!ta(n.selection))return Gr.EMPTY;try{const{head:o,anchor:i}=n.selection;return[{from:r.coordsAtPos(i),to:r.coordsAtPos(o)}]}catch{return Gr.EMPTY}},getPosition(e){const{element:n,data:r,view:o}=e,{from:i,to:s}=r,l=n.offsetParent??o.dom,a=l.getBoundingClientRect(),u=Math.abs(s.bottom-i.top),c=u>i.bottom-i.top,d=Math.min(i.left,s.left),h=Math.min(i.top,s.top),p=l.scrollLeft+(c?s.left-a.left:d-a.left),f=l.scrollTop+h-a.top,g=c?1:Math.abs(i.left-s.right),m=new DOMRect(c?s.left:d,h,g,u),v=kw(m,o.dom);return{rect:m,y:f,x:p,height:u,width:g,visible:v}}})}var gO=Sw(t=>!t.selection.empty),ij=Sw(t=>t.selection.empty),sj=Sw(()=>!0),aj=gO.clone(()=>({getActive:t=>{const{state:e,view:n}=t;if(!e.selection.empty)return Gr.EMPTY;const r=aM(e);if(!r)return Gr.EMPTY;try{return[{from:n.coordsAtPos(r.from),to:n.coordsAtPos(r.to)}]}catch{return Gr.EMPTY}}})),lj={selection:gO,cursor:ij,always:sj,block:fO,emptyBlock:Ew,emptyBlockStart:rj,emptyBlockEnd:oj,nearestWord:aj},Hc=class extends ft{constructor(){super(...arguments),this.positioners=[],this.onAddCustomHandler=({positioner:t})=>{if(t)return this.positioners=[...this.positioners,t],this.store.commands.forceUpdate(),()=>{this.positioners=this.positioners.filter(e=>e!==t)}}}get name(){return"positioner"}createAttributes(){return{class:OV.EDITOR}}init(){this.onScroll=AR(this.options.scrollDebounce,this.onScroll.bind(this))}createEventHandlers(){return{scroll:()=>(this.onScroll(),!1),hover:(t,e)=>(this.positioner(this.getBaseProps("hover",{hover:e})),!1),contextmenu:(t,e)=>(this.positioner(this.getBaseProps("contextmenu",{contextmenu:e})),!1)}}onStateUpdate(t){this.positioner({...t,previousState:t.firstUpdate?void 0:t.previousState,event:"state",helpers:this.store.helpers})}createDecorations(t){if(this.element??(this.element=this.createElement()),!this.element.hasChildNodes())return He.empty;const e=vt.widget(0,this.element,{key:"positioner-widget",side:-1,stopEvent:()=>!0});return He.create(t.doc,[e])}forceUpdatePositioners(t=hO){return({tr:e,dispatch:n})=>(n==null||n(e.setMeta(dO,{key:t})),!0)}getPositionerWidget(){return this.element??(this.element=this.createElement())}createElement(){const t=document.createElement("span");return t.dataset.id=nj,t.setAttribute("role","presentation"),t}triggerPositioner(t,e){t.hasChanged(e)&&t.onActiveChanged({...e,view:this.store.view})}positioner(t){for(const e of this.positioners)e.events.includes(t.event)&&this.triggerPositioner(e,t)}getBaseProps(t,e){const n=this.store.getState(),r=this.store.previousState;return{helpers:this.store.helpers,event:t,firstUpdate:!1,previousState:r,state:n,...e}}onScroll(){this.positioner(this.getBaseProps("scroll",{scroll:{scrollTop:this.store.view.dom.scrollTop}}))}};ww([le()],Hc.prototype,"forceUpdatePositioners",1);ww([it()],Hc.prototype,"getPositionerWidget",1);Hc=ww([Ne({defaultOptions:{scrollDebounce:100},customHandlerKeys:["positioner"],staticKeys:["scrollDebounce"]})],Hc);function Z0(t){return Ee(t)?lj[t].clone():Qe(t)?t().clone():t.clone()}function cj(t){const e=D.createContext(null),n=uj(e);return[o=>{const i=t(o);return ee.createElement(e.Provider,{value:i},o.children)},n,e]}function uj(t){return(e,n)=>{const r=D.useContext(t),o=dj(r);if(!r)throw new Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!e)return r;if(typeof e!="function")throw new TypeError("invalid arguments passed to `useContextHook`. This hook must be called with zero arguments, a getter function or a path string.");const i=e(r);if(!o||!n)return i;const s=e(o);return n(s,i)?s:i}}function dj(t){const e=D.useRef();return hj(()=>{e.current=t}),e.current}var hj=typeof document<"u"?D.useLayoutEffect:D.useEffect;function pj(t,e){return cj(n=>{const r=D.useRef(null),o=D.useRef(),i=e==null?void 0:e(n),[s,l]=D.useState(()=>t({get:lT(r),set:cT(o),previousContext:void 0,props:n,state:i})),a=[...Object.values(n),i];return D.useEffect(()=>{a.length!==0&&l(u=>t({get:lT(r),set:cT(o),previousContext:u,props:n,state:i}))},a),r.current=s,o.current=l,s})}function lT(t){return e=>{if(!t.current)throw new Error("`get` called outside of function scope. `get` can only be called within a function.");if(!e)return t.current;if(typeof e!="function")throw new TypeError("Invalid arguments passed to `useContextHook`. The hook must be called with zero arguments, a getter function or a path string.");return e(t.current)}}function cT(t){return e=>{if(!t.current)throw new Error("`set` called outside of function scope. `set` can only be called within a function.");t.current(n=>({...n,...typeof e=="function"?e(n):e}))}}var mO={},vO={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.errorMessages=t.ErrorType=void 0;var e;(function(n){n.MalformedUnicode="MALFORMED_UNICODE",n.MalformedHexadecimal="MALFORMED_HEXADECIMAL",n.CodePointLimit="CODE_POINT_LIMIT",n.OctalDeprecation="OCTAL_DEPRECATION",n.EndOfString="END_OF_STRING"})(e=t.ErrorType||(t.ErrorType={})),t.errorMessages=new Map([[e.MalformedUnicode,"malformed Unicode character escape sequence"],[e.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[e.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[e.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[e.EndOfString,"malformed escape sequence at end of string"]])})(vO);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.unraw=t.errorMessages=t.ErrorType=void 0;const e=vO;Object.defineProperty(t,"ErrorType",{enumerable:!0,get:function(){return e.ErrorType}}),Object.defineProperty(t,"errorMessages",{enumerable:!0,get:function(){return e.errorMessages}});function n(p){return!p.match(/[^a-f0-9]/i)?parseInt(p,16):NaN}function r(p,f,g){const m=n(p);if(Number.isNaN(m)||g!==void 0&&g!==p.length)throw new SyntaxError(e.errorMessages.get(f));return m}function o(p){const f=r(p,e.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(f)}function i(p,f){const g=r(p,e.ErrorType.MalformedUnicode,4);if(f!==void 0){const m=r(f,e.ErrorType.MalformedUnicode,4);return String.fromCharCode(g,m)}return String.fromCharCode(g)}function s(p){return p.charAt(0)==="{"&&p.charAt(p.length-1)==="}"}function l(p){if(!s(p))throw new SyntaxError(e.errorMessages.get(e.ErrorType.MalformedUnicode));const f=p.slice(1,-1),g=r(f,e.ErrorType.MalformedUnicode);try{return String.fromCodePoint(g)}catch(m){throw m instanceof RangeError?new SyntaxError(e.errorMessages.get(e.ErrorType.CodePointLimit)):m}}function a(p,f=!1){if(f)throw new SyntaxError(e.errorMessages.get(e.ErrorType.OctalDeprecation));const g=parseInt(p,8);return String.fromCharCode(g)}const u=new Map([["b","\b"],["f","\f"],["n",` +`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function c(p){return u.get(p)||p}const d=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function h(p,f=!1){return p.replace(d,function(g,m,v,y,b,w,k,x,S){if(m!==void 0)return"\\";if(v!==void 0)return o(v);if(y!==void 0)return l(y);if(b!==void 0)return i(b,w);if(k!==void 0)return i(k);if(x==="0")return"\0";if(x!==void 0)return a(x,!f);if(S!==void 0)return c(S);throw new SyntaxError(e.errorMessages.get(e.ErrorType.EndOfString))})}t.unraw=h,t.default=h})(mO);const fj=ko(mO),$i=t=>typeof t=="string",gj=t=>typeof t=="function",uT=new Map;function Cw(t){return[...Array.isArray(t)?t:[t],"en"]}function yO(t,e,n){const r=Cw(t);return pg(()=>fg("date",r,n),()=>new Intl.DateTimeFormat(r,n)).format($i(e)?new Date(e):e)}function J0(t,e,n){const r=Cw(t);return pg(()=>fg("number",r,n),()=>new Intl.NumberFormat(r,n)).format(e)}function dT(t,e,n,{offset:r=0,...o}){const i=Cw(t),s=e?pg(()=>fg("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):pg(()=>fg("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return o[n]??o[s.select(n-r)]??o.other}function pg(t,e){const n=t();let r=uT.get(n);return r||(r=e(),uT.set(n,r)),r}function fg(t,e,n){const r=e.join("-");return`${t}-${r}-${JSON.stringify(n)}`}const bO=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,mj=(t,e,n={})=>{e=e||t;const r=i=>$i(i)?n[i]||{style:i}:i,o=(i,s)=>{const l=Object.keys(n).length?r("number"):{},a=J0(e,i,l);return s.replace("#",a)};return{plural:(i,s)=>{const{offset:l=0}=s,a=dT(e,!1,i,s);return o(i-l,a)},selectordinal:(i,s)=>{const{offset:l=0}=s,a=dT(e,!0,i,s);return o(i-l,a)},select:(i,s)=>s[i]??s.other,number:(i,s)=>J0(e,i,r(s)),date:(i,s)=>yO(e,i,r(s)),undefined:i=>i}};function vj(t,e,n){return(r,o={})=>{const i=mj(e,n,o),s=a=>Array.isArray(a)?a.reduce((u,c)=>{if($i(c))return u+c;const[d,h,p]=c;let f={};p!=null&&!$i(p)?Object.keys(p).forEach(m=>{f[m]=s(p[m])}):f=p;const g=i[h](r[d],f);return g==null?u:u+g},""):a,l=s(t);return $i(l)&&bO.test(l)?fj(l.trim()):$i(l)?l.trim():l}}var yj=Object.defineProperty,bj=(t,e,n)=>e in t?yj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wj=(t,e,n)=>(bj(t,typeof e!="symbol"?e+"":e,n),n);class xj{constructor(){wj(this,"_events",{})}on(e,n){return this._hasEvent(e)||(this._events[e]=[]),this._events[e].push(n),()=>this.removeListener(e,n)}removeListener(e,n){if(!this._hasEvent(e))return;const r=this._events[e].indexOf(n);~r&&this._events[e].splice(r,1)}emit(e,...n){this._hasEvent(e)&&this._events[e].map(r=>r.apply(this,n))}_hasEvent(e){return Array.isArray(this._events[e])}}var kj=Object.defineProperty,Ej=(t,e,n)=>e in t?kj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zl=(t,e,n)=>(Ej(t,typeof e!="symbol"?e+"":e,n),n);class Sj extends xj{constructor(e){super(),zl(this,"_locale"),zl(this,"_locales"),zl(this,"_localeData"),zl(this,"_messages"),zl(this,"_missing"),zl(this,"t",this._.bind(this)),this._messages={},this._localeData={},e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(e.locale!=null||e.locales!=null)&&this.activate(e.locale,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,n){this._localeData[e]==null?this._localeData[e]=n:Object.assign(this._localeData[e],n)}loadLocaleData(e,n){n!=null?this._loadLocaleData(e,n):Object.keys(e).forEach(r=>this._loadLocaleData(r,e[r])),this.emit("change")}_load(e,n){this._messages[e]==null?this._messages[e]=n:Object.assign(this._messages[e],n)}load(e,n){n!=null?this._load(e,n):Object.keys(e).forEach(r=>this._load(r,e[r])),this.emit("change")}loadAndActivate({locale:e,locales:n,messages:r}){this._locale=e,this._locales=n||void 0,this._messages[this._locale]=r,this.emit("change")}activate(e,n){this._locale=e,this._locales=n,this.emit("change")}_(e,n={},{message:r,formats:o}={}){$i(e)||(n=e.values||n,r=e.message,e=e.id);const i=!this.messages[e],s=this._missing;if(s&&i)return gj(s)?s(this._locale,e):s;i&&this.emit("missing",{id:e,locale:this._locale});let l=this.messages[e]||r||e;return $i(l)&&bO.test(l)?JSON.parse(`"${l}"`):$i(l)?l:vj(l,this._locale,this._locales)(n,o)}date(e,n){return yO(this._locales||this._locale,e,n)}number(e,n){return J0(this._locales||this._locale,e,n)}}function Cj(t={}){return new Sj(t)}const Lm=Cj();function se(t,e){return e?"other":t==1?"one":"other"}function Xi(t,e){return e?"other":t==0||t==1?"one":"other"}function Ir(t,e){var n=String(t).split("."),r=!n[1];return e?"other":t==1&&r?"one":"other"}function st(t,e){return"other"}function oa(t,e){return e?"other":t==1?"one":t==2?"two":"other"}const Tj=st,Aj=se,_j=Xi;function Rj(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const Mj=se;function Oj(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function Ij(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function Lj(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const Nj=se,$j=Ir;function Dj(t,e){var n=String(t).split("."),r=n[0],o=r.slice(-1),i=r.slice(-2),s=r.slice(-3);return e?o==1||o==2||o==5||o==7||o==8||i==20||i==50||i==70||i==80?"one":o==3||o==4||s==100||s==200||s==300||s==400||s==500||s==600||s==700||s==800||s==900?"few":r==0||o==6||i==40||i==60||i==90?"many":"other":t==1?"one":"other"}function Pj(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?(o==2||o==3)&&i!=12&&i!=13?"few":"other":o==1&&i!=11?"one":o>=2&&o<=4&&(i<12||i>14)?"few":r&&o==0||o>=5&&o<=9||i>=11&&i<=14?"many":"other"}const zj=se,Fj=se,Bj=se,Hj=Xi,Uj=st;function Wj(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const Vj=st;function jj(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2),s=r&&n[0].slice(-6);return e?"other":o==1&&i!=11&&i!=71&&i!=91?"one":o==2&&i!=12&&i!=72&&i!=92?"two":(o==3||o==4||o==9)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":t!=0&&r&&s==0?"many":"other"}const Gj=se;function Kj(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}function Yj(t,e){var n=String(t).split("."),r=!n[1];return e?t==1||t==3?"one":t==2?"two":t==4?"few":"other":t==1&&r?"one":"other"}const Xj=se;function qj(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=o.slice(-1);return e?"other":i&&(r==1||r==2||r==3)||i&&s!=4&&s!=6&&s!=9||!i&&l!=4&&l!=6&&l!=9?"one":"other"}const Zj=se,Jj=se,Qj=se;function eG(t,e){var n=String(t).split("."),r=n[0],o=!n[1];return e?"other":t==1&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function tG(t,e){return e?t==0||t==7||t==8||t==9?"zero":t==1?"one":t==2?"two":t==3||t==4?"few":t==5||t==6?"many":"other":t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"}function nG(t,e){var n=String(t).split("."),r=n[0],o=Number(n[0])==t;return e?"other":t==1||!o&&(r==0||r==1)?"one":"other"}const rG=Ir;function oG(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),l=o.slice(-2);return e?"other":i&&s==1||l==1?"one":i&&s==2||l==2?"two":i&&(s==3||s==4)||l==3||l==4?"few":"other"}const iG=se,sG=st,aG=se,lG=se;function cG(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return e?i==1&&s!=11?"one":i==2&&s!=12?"two":i==3&&s!=13?"few":"other":t==1&&r?"one":"other"}const uG=se,dG=se,hG=Ir,pG=se;function fG(t,e){return e?"other":t>=0&&t<=1?"one":"other"}function gG(t,e){return e?"other":t>=0&&t<2?"one":"other"}const mG=Ir;function vG(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=o.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&s!=4&&s!=6&&s!=9||!i&&l!=4&&l!=6&&l!=9?"one":"other"}const yG=se;function bG(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const wG=se,xG=Ir;function kG(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1?"one":"other":t==1?"one":t==2?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"}function EG(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==11?"one":t==2||t==12?"two":t==3||t==13?"few":"other":t==1||t==11?"one":t==2||t==12?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"}const SG=Ir,CG=se;function TG(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const AG=Xi;function _G(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return e?"other":o&&i==1?"one":o&&i==2?"two":o&&(s==0||s==20||s==40||s==60||s==80)?"few":o?"other":"many"}const RG=se,MG=se;function OG(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=Number(n[0])==t,s=i&&n[0].slice(-1);return e?"other":t==1&&o?"one":r==2&&o?"two":o&&(t<0||t>10)&&i&&s==0?"many":"other"}function IG(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}function LG(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}function NG(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),l=o.slice(-2);return e?"other":i&&s==1||l==1?"one":i&&s==2||l==2?"two":i&&(s==3||s==4)||l==3||l==4?"few":"other"}function $G(t,e){return e?t==1||t==5?"one":"other":t==1?"one":"other"}function DG(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const PG=Ir,zG=st,FG=st,BG=st,HG=Ir;function UG(t,e){var n=String(t).split("."),r=n[0],o=Number(n[0])==t,i=r.slice(-1),s=r.slice(-2);return e?"other":o&&i==1&&s!=11||!o?"one":"other"}function WG(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const VG=oa;function jG(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=Number(n[0])==t,s=i&&n[0].slice(-1);return e?"other":t==1&&o?"one":r==2&&o?"two":o&&(t<0||t>10)&&i&&s==0?"many":"other"}const GG=st,KG=st,YG=se,XG=Ir,qG=se,ZG=st,JG=st;function QG(t,e){var n=String(t).split("."),r=n[0],o=r.slice(-2);return e?r==1?"one":r==0||o>=2&&o<=20||o==40||o==60||o==80?"many":"other":t==1?"one":"other"}function eK(t,e){return e?"other":t>=0&&t<2?"one":"other"}const tK=se,nK=se,rK=st,oK=st;function iK(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1);return e?o==6||o==9||r&&o==0&&t!=0?"many":"other":t==1?"one":"other"}const sK=se,aK=se,lK=st;function cK(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const uK=st,dK=se,hK=se;function pK(t,e){return e?"other":t==0?"zero":t==1?"one":"other"}const fK=se;function gK(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2),i=r&&n[0].slice(-3),s=r&&n[0].slice(-5),l=r&&n[0].slice(-6);return e?r&&t>=1&&t<=4||o>=1&&o<=4||o>=21&&o<=24||o>=41&&o<=44||o>=61&&o<=64||o>=81&&o<=84?"one":t==5||o==5?"many":"other":t==0?"zero":t==1?"one":o==2||o==22||o==42||o==62||o==82||r&&i==0&&(s>=1e3&&s<=2e4||s==4e4||s==6e4||s==8e4)||t!=0&&l==1e5?"two":o==3||o==23||o==43||o==63||o==83?"few":t!=1&&(o==1||o==21||o==41||o==61||o==81)?"many":"other"}const mK=se;function vK(t,e){var n=String(t).split("."),r=n[0];return e?"other":t==0?"zero":(r==0||r==1)&&t!=0?"one":"other"}const yK=se,bK=se,wK=st,xK=Xi;function kK(t,e){return e&&t==1?"one":"other"}function EK(t,e){var n=String(t).split("."),r=n[1]||"",o=Number(n[0])==t,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return e?"other":i==1&&(s<11||s>19)?"one":i>=2&&i<=9&&(s<11||s>19)?"few":r!=0?"many":"other"}function SK(t,e){var n=String(t).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==t,s=i&&n[0].slice(-1),l=i&&n[0].slice(-2),a=r.slice(-2),u=r.slice(-1);return e?"other":i&&s==0||l>=11&&l<=19||o==2&&a>=11&&a<=19?"zero":s==1&&l!=11||o==2&&u==1&&a!=11||o!=2&&u==1?"one":"other"}const CK=se,TK=Xi,AK=se;function _K(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?s==1&&l!=11?"one":s==2&&l!=12?"two":(s==7||s==8)&&l!=17&&l!=18?"many":"other":i&&s==1&&l!=11||a==1&&u!=11?"one":"other"}const RK=se,MK=se;function OK(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}function IK(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":"other":t==1?"one":"other"}function LK(t,e){return e&&t==1?"one":"other"}function NK(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2);return e?"other":t==1?"one":t==0||o>=2&&o<=10?"few":o>=11&&o<=19?"many":"other"}const $K=st,DK=se,PK=oa,zK=se,FK=se;function BK(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?r&&t>=1&&t<=4?"one":"other":t==1?"one":"other"}const HK=Ir,UK=se,WK=se,VK=se,jK=st,GK=se,KK=Xi,YK=se,XK=se,qK=se;function ZK(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==5||r&&t>=7&&t<=9?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t==1?"one":"other"}const JK=se,QK=st,eY=Xi,tY=se;function nY(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return e?"other":t==1&&o?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&r!=1&&(i==0||i==1)||o&&i>=5&&i<=9||o&&s>=12&&s<=14?"many":"other"}function rY(t,e){var n=String(t).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==t,s=i&&n[0].slice(-1),l=i&&n[0].slice(-2),a=r.slice(-2),u=r.slice(-1);return e?"other":i&&s==0||l>=11&&l<=19||o==2&&a>=11&&a<=19?"zero":s==1&&l!=11||o==2&&u==1&&a!=11||o!=2&&u==1?"one":"other"}const oY=se;function iY(t,e){var n=String(t).split("."),r=n[0];return e?"other":r==0||r==1?"one":"other"}const sY=Ir,aY=se;function lY(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}const cY=se,uY=st;function dY(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return e?"other":o&&i==1&&s!=11?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&i==0||o&&i>=5&&i<=9||o&&s>=11&&s<=14?"many":"other"}const hY=se,pY=st,fY=se;function gY(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}function mY(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const vY=se,yY=se,bY=oa,wY=se,xY=st,kY=st;function EY(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}function SY(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t>=0&&t<=1?"one":r&&t>=2&&t<=10?"few":"other"}function CY(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"";return e?"other":t==0||t==1||r==0&&o==1?"one":"other"}function TY(t,e){var n=String(t).split("."),r=n[0],o=!n[1];return e?"other":t==1&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function AY(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-2);return e?"other":o&&i==1?"one":o&&i==2?"two":o&&(i==3||i==4)||!o?"few":"other"}const _Y=oa,RY=oa,MY=oa,OY=oa,IY=oa,LY=se,NY=se;function $Y(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?t==1?"one":o==4&&i!=14?"many":"other":t==1?"one":"other"}function DY(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}const PY=se,zY=se,FY=se,BY=st;function HY(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return e?(i==1||i==2)&&s!=11&&s!=12?"one":"other":t==1&&r?"one":"other"}const UY=Ir,WY=se,VY=se,jY=se,GY=se,KY=st,YY=Xi,XY=se;function qY(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1);return e?o==6||o==9||t==10?"few":"other":t==1?"one":"other"}function ZY(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=o.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&s!=4&&s!=6&&s!=9||!i&&l!=4&&l!=6&&l!=9?"one":"other"}const JY=se,QY=st,eX=se,tX=se;function nX(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t==0||t==1||r&&t>=11&&t<=99?"one":"other"}const rX=se;function oX(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=Number(n[0])==t,s=i&&n[0].slice(-1),l=i&&n[0].slice(-2),a=r.slice(-1),u=r.slice(-2);return e?s==3&&l!=13?"few":"other":o&&a==1&&u!=11?"one":o&&a>=2&&a<=4&&(u<12||u>14)?"few":o&&a==0||o&&a>=5&&a<=9||o&&u>=11&&u<=14?"many":"other"}const iX=Ir,sX=se,aX=se;function lX(t,e){return e&&t==1?"one":"other"}const cX=se,uX=se,dX=Xi,hX=se,pX=st,fX=se,gX=se,mX=Ir,vX=st,yX=st,bX=st;function wX(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const xX=Object.freeze(Object.defineProperty({__proto__:null,_in:Tj,af:Aj,ak:_j,am:Rj,an:Mj,ar:Oj,ars:Ij,as:Lj,asa:Nj,ast:$j,az:Dj,be:Pj,bem:zj,bez:Fj,bg:Bj,bho:Hj,bm:Uj,bn:Wj,bo:Vj,br:jj,brx:Gj,bs:Kj,ca:Yj,ce:Xj,ceb:qj,cgg:Zj,chr:Jj,ckb:Qj,cs:eG,cy:tG,da:nG,de:rG,dsb:oG,dv:iG,dz:sG,ee:aG,el:lG,en:cG,eo:uG,es:dG,et:hG,eu:pG,fa:fG,ff:gG,fi:mG,fil:vG,fo:yG,fr:bG,fur:wG,fy:xG,ga:kG,gd:EG,gl:SG,gsw:CG,gu:TG,guw:AG,gv:_G,ha:RG,haw:MG,he:OG,hi:IG,hr:LG,hsb:NG,hu:$G,hy:DG,ia:PG,id:zG,ig:FG,ii:BG,io:HG,is:UG,it:WG,iu:VG,iw:jG,ja:GG,jbo:KG,jgo:YG,ji:XG,jmc:qG,jv:ZG,jw:JG,ka:QG,kab:eK,kaj:tK,kcg:nK,kde:rK,kea:oK,kk:iK,kkj:sK,kl:aK,km:lK,kn:cK,ko:uK,ks:dK,ksb:hK,ksh:pK,ku:fK,kw:gK,ky:mK,lag:vK,lb:yK,lg:bK,lkt:wK,ln:xK,lo:kK,lt:EK,lv:SK,mas:CK,mg:TK,mgo:AK,mk:_K,ml:RK,mn:MK,mo:OK,mr:IK,ms:LK,mt:NK,my:$K,nah:DK,naq:PK,nb:zK,nd:FK,ne:BK,nl:HK,nn:UK,nnh:WK,no:VK,nqo:jK,nr:GK,nso:KK,ny:YK,nyn:XK,om:qK,or:ZK,os:JK,osa:QK,pa:eY,pap:tY,pl:nY,prg:rY,ps:oY,pt:iY,pt_PT:sY,rm:aY,ro:lY,rof:cY,root:uY,ru:dY,rwk:hY,sah:pY,saq:fY,sc:gY,scn:mY,sd:vY,sdh:yY,se:bY,seh:wY,ses:xY,sg:kY,sh:EY,shi:SY,si:CY,sk:TY,sl:AY,sma:_Y,smi:RY,smj:MY,smn:OY,sms:IY,sn:LY,so:NY,sq:$Y,sr:DY,ss:PY,ssy:zY,st:FY,su:BY,sv:HY,sw:UY,syr:WY,ta:VY,te:jY,teo:GY,th:KY,ti:YY,tig:XY,tk:qY,tl:ZY,tn:JY,to:QY,tr:eX,ts:tX,tzm:nX,ug:rX,uk:oX,ur:iX,uz:sX,ve:aX,vi:lX,vo:cX,vun:uX,wa:dX,wae:hX,wo:pX,xh:fX,xog:gX,yi:mX,yo:vX,yue:yX,zh:bX,zu:wX},Symbol.toStringTag,{value:"Module"}));var kX=Object.defineProperty,EX=Object.getOwnPropertyDescriptor,SX=Object.getOwnPropertyNames,CX=Object.prototype.hasOwnProperty,hT=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of SX(e))!CX.call(t,o)&&o!==n&&kX(t,o,{get:()=>e[o],enumerable:!(r=EX(e,o))||r.enumerable});return t},TX=(t,e,n)=>(hT(t,e,"default"),n&&hT(n,e,"default")),AX=JSON.parse('{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all content within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all content within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}'),wO={};TX(wO,xX);Lm.loadLocaleData("en",{plurals:wO.en});Lm.load("en",AX);Lm.activate("en");var _X=Object.defineProperty,RX=Object.getOwnPropertyDescriptor,Tw=(t,e,n,r)=>{for(var o=r>1?void 0:r?RX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&_X(e,n,o),o},Uc=class extends Dn{get name(){return"doc"}createNodeSpec(t,e){const{docAttributes:n,content:r}=this.options,o=ye();if(Qs(n))for(const[i,s]of an(n))o[i]={default:s};else for(const i of n)o[i]={default:null};return{attrs:o,content:r,...e}}setDocAttributes(t){return({tr:e,dispatch:n})=>{if(n){for(const[r,o]of Object.entries(t))e.step(new th(r,o));n(e)}return!0}}isDefaultDocNode({state:t=this.store.getState(),options:e}={}){return jb(t.doc,e)}};Tw([le()],Uc.prototype,"setDocAttributes",1);Tw([it()],Uc.prototype,"isDefaultDocNode",1);Uc=Tw([Ne({defaultOptions:{content:"block+",docAttributes:[]},defaultPriority:ot.Medium,staticKeys:["content","docAttributes"],disableExtraAttributes:!0})],Uc);var xO="SetDocAttribute",kO="RevertSetDocAttribute",th=class extends cn{constructor(t,e,n=xO){super(),this.stepType=n,this.key=t,this.value=e}static fromJSON(t,e){return new th(e.key,e.value,e.stepType)}apply(t){this.previous=t.attrs[this.key];const e={...t.attrs,[this.key]:this.value};return Kt.ok(t.type.create(e,t.content,t.marks))}invert(){return new th(this.key,this.previous,kO)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}};try{cn.jsonID(xO,th),cn.jsonID(kO,th)}catch(t){if(!t.message.startsWith("Duplicate use of step JSON ID"))throw t}var MX=Object.defineProperty,OX=Object.getOwnPropertyDescriptor,EO=(t,e,n,r)=>{for(var o=r>1?void 0:r?OX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&MX(e,n,o),o};function IX(t,e,n,r){const o=t.docView.posFromDOM(e,n,r);return o===null||o<0?null:o}function LX(t,e){const n=e.target;if(n){const r=IX(t,n,0);if(r!==null){const o=t.state.doc.resolve(r),i=o.node().isLeaf?0:1,s=o.start()-i;return{pos:r,inside:s}}}return t.posAtCoords({left:e.clientX,top:e.clientY})??void 0}var gg=class extends ft{constructor(){super(...arguments),this.mousedown=!1,this.mouseover=!1,this.createMouseEventHandler=t=>(e,n)=>{const r=n,o=LX(e,r);if(!o)return!1;const i=[],s=[],{inside:l,pos:a}=o;if(l===-1)return!1;const u=e.state.doc.resolve(a),c=u.depth+1;for(const d of Cb(c,1))i.push({node:d>u.depth&&u.nodeAfter?u.nodeAfter:u.node(d),pos:u.before(d)});for(const{type:d}of u.marksAcross(u)??[]){const h=Hi(u,d);h&&s.push(h)}return t(r,{view:e,nodes:i,marks:s,getMark:d=>{const h=Ee(d)?e.state.schema.marks[d]:d;return we(h,{code:re.EXTENSION,message:`The mark ${d} being checked does not exist within the editor schema.`}),s.find(p=>p.mark.type===h)},getNode:d=>{var h;const p=Ee(d)?e.state.schema.nodes[d]:d;we(p,{code:re.EXTENSION,message:"The node being checked does not exist"});const f=i.find(({node:g})=>g.type===p);if(f)return{...f,isRoot:!!((h=i[0])!=null&&h.node.eq(f.node))}}})}}get name(){return"events"}onView(){var t,e;if(!((t=this.store.managerSettings.exclude)!=null&&t.clickHandler))for(const n of this.store.extensions){if(!n.createEventHandlers||(e=n.options.exclude)!=null&&e.clickHandler)continue;const r=n.createEventHandlers();for(const[o,i]of an(r))this.addHandler(o,i)}}createPlugin(){const t=new WeakMap,e=(n,r,o,i,s,l,a,u)=>{const c=this.store.currentState,{schema:d,doc:h}=c,p=h.resolve(i),f=t.has(a),g=NX({$pos:p,handled:f,view:o,state:c});let m=!1;f||(m=n(a,g)||m);const v={...g,pos:i,direct:u,nodeWithPosition:{node:s,pos:l},getNode:y=>{const b=Ee(y)?d.nodes[y]:y;return we(b,{code:re.EXTENSION,message:"The node being checked does not exist"}),b===s.type?{node:s,pos:l}:void 0}};return t.set(a,!0),r(a,v)||m};return{props:{handleKeyPress:(n,r)=>this.options.keypress(r)||!1,handleKeyDown:(n,r)=>this.options.keydown(r)||!1,handleTextInput:(n,r,o,i)=>this.options.textInput({from:r,to:o,text:i})||!1,handleClickOn:(n,r,o,i,s,l)=>e(this.options.clickMark,this.options.click,n,r,o,i,s,l),handleDoubleClickOn:(n,r,o,i,s,l)=>e(this.options.doubleClickMark,this.options.doubleClick,n,r,o,i,s,l),handleTripleClickOn:(n,r,o,i,s,l)=>e(this.options.tripleClickMark,this.options.tripleClick,n,r,o,i,s,l),handleDOMEvents:{focus:(n,r)=>this.options.focus(r)||!1,blur:(n,r)=>this.options.blur(r)||!1,mousedown:(n,r)=>(this.startMouseover(),this.options.mousedown(r)||!1),mouseup:(n,r)=>(this.endMouseover(),this.options.mouseup(r)||!1),mouseleave:(n,r)=>(this.mouseover=!1,this.options.mouseleave(r)||!1),mouseenter:(n,r)=>(this.mouseover=!0,this.options.mouseenter(r)||!1),keyup:(n,r)=>this.options.keyup(r)||!1,mouseout:this.createMouseEventHandler((n,r)=>{const o={...r,hovering:!1};return this.options.hover(n,o)||!1}),mouseover:this.createMouseEventHandler((n,r)=>{const o={...r,hovering:!0};return this.options.hover(n,o)||!1}),contextmenu:this.createMouseEventHandler((n,r)=>this.options.contextmenu(n,r)||!1),scroll:(n,r)=>this.options.scroll(r)||!1,copy:(n,r)=>this.options.copy(r)||!1,cut:(n,r)=>this.options.cut(r)||!1,paste:(n,r)=>this.options.paste(r)||!1}},view:n=>{let r=n.editable;const o=this.options;return{update(i){const s=i.editable;s!==r&&(o.editable(s),r=s)}}}}}isInteracting(){return this.mousedown&&this.mouseover}startMouseover(){this.mouseover=!0,!this.mousedown&&(this.mousedown=!0,this.store.document.documentElement.addEventListener("mouseup",()=>{this.endMouseover()},{once:!0}))}endMouseover(){this.mousedown&&(this.mousedown=!1,this.store.commands.emptyUpdate())}};EO([it()],gg.prototype,"isInteracting",1);gg=EO([Ne({handlerKeys:["blur","focus","mousedown","mouseup","mouseenter","mouseleave","textInput","keypress","keyup","keydown","click","clickMark","doubleClick","doubleClickMark","tripleClick","tripleClickMark","contextmenu","hover","scroll","copy","cut","paste","editable"],handlerKeyOptions:{blur:{earlyReturnValue:!0},focus:{earlyReturnValue:!0},mousedown:{earlyReturnValue:!0},mouseleave:{earlyReturnValue:!0},mouseup:{earlyReturnValue:!0},click:{earlyReturnValue:!0},doubleClick:{earlyReturnValue:!0},tripleClick:{earlyReturnValue:!0},hover:{earlyReturnValue:!0},contextmenu:{earlyReturnValue:!0},scroll:{earlyReturnValue:!0},copy:{earlyReturnValue:!0},cut:{earlyReturnValue:!0},paste:{earlyReturnValue:!0}},defaultPriority:ot.High})],gg);function NX(t){const{handled:e,view:n,$pos:r,state:o}=t,i={getMark:LR,markRanges:[],view:n,state:o};if(e)return i;for(const{type:s}of r.marksAcross(r)??[]){const l=Hi(r,s);l&&i.markRanges.push(l)}return i.getMark=s=>{const l=Ee(s)?o.schema.marks[s]:s;return we(l,{code:re.EXTENSION,message:`The mark ${s} being checked does not exist within the editor schema.`}),i.markRanges.find(a=>a.mark.type===l)},i}class Wt extends Be{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return Wt.valid(r)?new Wt(r):Be.near(r)}content(){return ae.empty}eq(e){return e instanceof Wt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Wt(e.resolve(n.pos))}getBookmark(){return new Aw(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!$X(e)||!DX(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&Wt.valid(e))return e;let o=e.pos,i=null;for(let s=e.depth;;s--){let l=e.node(s);if(n>0?e.indexAfter(s)0){i=l.child(n>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;o+=n;let a=e.doc.resolve(o);if(Wt.valid(a))return a}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!Oe.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let l=e.doc.resolve(o);if(Wt.valid(l))return l}return null}}}Wt.prototype.visible=!1;Wt.findFrom=Wt.findGapCursorFrom;Be.jsonID("gapcursor",Wt);class Aw{constructor(e){this.pos=e}map(e){return new Aw(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return Wt.valid(n)?new Wt(n):Be.near(n)}}function $X(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function DX(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function PX(){return new mi({props:{decorations:HX,createSelectionBetween(t,e,n){return e.pos==n.pos&&Wt.valid(n)?new Wt(n):null},handleClick:FX,handleKeyDown:zX,handleDOMEvents:{beforeinput:BX}}})}const zX=Yb({ArrowLeft:Pp("horiz",-1),ArrowRight:Pp("horiz",1),ArrowUp:Pp("vert",-1),ArrowDown:Pp("vert",1)});function Pp(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,i){let s=r.selection,l=e>0?s.$to:s.$from,a=s.empty;if(s instanceof Me){if(!i.endOfTextblock(n)||l.depth==0)return!1;a=!1,l=r.doc.resolve(e>0?l.after():l.before())}let u=Wt.findGapCursorFrom(l,e,a);return u?(o&&o(r.tr.setSelection(new Wt(u))),!0):!1}}function FX(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!Wt.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&Oe.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new Wt(r))),!0)}function BX(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof Wt))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=J.empty;for(let s=r.length-1;s>=0;s--)o=J.from(r[s].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new ae(o,0,0));return i.setSelection(Me.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function HX(t){if(!(t.selection instanceof Wt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",He.create(t.doc,[vt.widget(t.selection.head,e,{key:"gapcursor"})])}var UX=Object.defineProperty,WX=Object.getOwnPropertyDescriptor,VX=(t,e,n,r)=>{for(var o=r>1?void 0:r?WX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&UX(e,n,o),o},Q0=class extends ft{get name(){return"gapCursor"}createExternalPlugins(){return[PX()]}};Q0=VX([Ne({})],Q0);var mg=200,bn=function(){};bn.prototype.append=function(e){return e.length?(e=bn.from(e),!this.length&&e||e.length=n?bn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};bn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};bn.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};bn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(e(i,s))},n,r),o};bn.from=function(e){return e instanceof bn?e:e&&e.length?new SO(e):bn.empty};var SO=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,s,l){for(var a=i;a=s;a--)if(o(this.values[a],l+a)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=mg)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=mg)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(bn);bn.empty=new SO([]);var jX=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return rl&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,i)-l,s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,s){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(i,l)-l,s+l)===!1||i=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(bn);const GX=500;class Po{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=e.tr,l,a,u=[],c=[];return this.items.forEach((d,h)=>{if(!d.step){o||(o=this.remapping(r,h+1),i=o.maps.length),i--,c.push(d);return}if(o){c.push(new qo(d.map));let p=d.step.map(o.slice(i)),f;p&&s.maybeStep(p).doc&&(f=s.mapping.maps[s.mapping.maps.length-1],u.push(new qo(f,void 0,void 0,u.length+c.length))),i--,f&&o.appendMap(f,i)}else s.maybeStep(d.step);if(d.selection)return l=o?d.selection.map(o.slice(i)):d.selection,a=new Po(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:s,selection:l}}addTransform(e,n,r,o){let i=[],s=this.eventCount,l=this.items,a=!o&&l.length?l.get(l.length-1):null;for(let c=0;cYX&&(l=KX(l,u),s-=u),new Po(l.append(i),s)}remapping(e,n){let r=new mc;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new Po(this.items.append(e.map(n=>new qo(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,s=e.steps.length,l=this.eventCount;this.items.forEach(h=>{h.selection&&l--},o);let a=n;this.items.forEach(h=>{let p=i.getMirror(--a);if(p==null)return;s=Math.min(s,p);let f=i.maps[p];if(h.step){let g=e.steps[p].invert(e.docs[p]),m=h.selection&&h.selection.map(i.slice(a+1,p));m&&l++,r.push(new qo(f,g,m))}else r.push(new qo(f))},o);let u=[];for(let h=n;hGX&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((s,l)=>{if(l>=e)o.push(s),s.selection&&i++;else if(s.step){let a=s.step.map(n.slice(r)),u=a&&a.getMap();if(r--,u&&n.appendMap(u,r),a){let c=s.selection&&s.selection.map(n.slice(r));c&&i++;let d=new qo(u.invert(),a,c),h,p=o.length-1;(h=o.length&&o[p].merge(d))?o[p]=h:o.push(d)}}else s.map&&r--},this.items.length,0),new Po(bn.from(o.reverse()),i)}}Po.empty=new Po(bn.empty,0);function KX(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class qo{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new qo(n.getMap().invert(),n,this.selection)}}}class gs{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const YX=20;function XX(t,e,n,r){let o=n.getMeta(si),i;if(o)return o.historyState;n.getMeta(ZX)&&(t=new gs(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(si))return s.getMeta(si).redo?new gs(t.done.addTransform(n,void 0,r,Tf(e)),t.undone,pT(n.mapping.maps[n.steps.length-1]),t.prevTime,t.prevComposition):new gs(t.done,t.undone.addTransform(n,void 0,r,Tf(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),a=t.prevTime==0||!s&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-r.newGroupDelay||!qX(n,t.prevRanges)),u=s?k1(t.prevRanges,n.mapping):pT(n.mapping.maps[n.steps.length-1]);return new gs(t.done.addTransform(n,a?e.selection.getBookmark():void 0,r,Tf(e)),Po.empty,u,n.time,l??t.prevComposition)}else return(i=n.getMeta("rebased"))?new gs(t.done.rebased(n,i),t.undone.rebased(n,i),k1(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new gs(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),k1(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function qX(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i=e[i]&&(n=!0)}),n}function pT(t){let e=[];return t.forEach((n,r,o,i)=>e.push(o,i)),e}function k1(t,e){if(!t)return null;let n=[];for(let r=0;r{let n=si.getState(t);return!n||n.done.eventCount==0?!1:(e&&CO(n,t,e,!1),!0)},ud=(t,e)=>{let n=si.getState(t);return!n||n.undone.eventCount==0?!1:(e&&CO(n,t,e,!0),!0)};function ey(t){let e=si.getState(t);return e?e.done.eventCount:0}function QX(t){let e=si.getState(t);return e?e.undone.eventCount:0}var eq=Object.defineProperty,tq=Object.getOwnPropertyDescriptor,xl=(t,e,n,r)=>{for(var o=r>1?void 0:r?tq(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&eq(e,n,o),o},fi=class extends ft{constructor(){super(...arguments),this.wrapMethod=(t,e)=>({state:n,dispatch:r,view:o})=>{const{getState:i,getDispatch:s}=this.options,l=Qe(i)?i():n,a=Qe(s)&&r?s():r,u=t(l,a,o);return e==null||e(u),u}}get name(){return"history"}createKeymap(){return{"Mod-y":yr.isMac?()=>!1:this.wrapMethod(ud,this.options.onRedo),"Mod-z":this.wrapMethod(Af,this.options.onUndo),"Shift-Mod-z":this.wrapMethod(ud,this.options.onRedo)}}undoShortcut(t){return this.wrapMethod(Af,this.options.onUndo)(t)}redoShortcut(t){return this.wrapMethod(ud,this.options.onRedo)(t)}createExternalPlugins(){const{depth:t,newGroupDelay:e}=this.options;return[JX({depth:t,newGroupDelay:e})]}undo(){return AC(this.wrapMethod(Af,this.options.onUndo))}redo(){return AC(this.wrapMethod(ud,this.options.onRedo))}undoDepth(t=this.store.getState()){return ey(t)}redoDepth(t=this.store.getState()){return QX(t)}};xl([en({shortcut:oe.Undo,command:"undo"})],fi.prototype,"undoShortcut",1);xl([en({shortcut:oe.Redo,command:"redo"})],fi.prototype,"redoShortcut",1);xl([le({disableChaining:!0,description:({t})=>t(tg.UNDO_DESCRIPTION),label:({t})=>t(tg.UNDO_LABEL),icon:"arrowGoBackFill"})],fi.prototype,"undo",1);xl([le({disableChaining:!0,description:({t})=>t(tg.REDO_DESCRIPTION),label:({t})=>t(tg.REDO_LABEL),icon:"arrowGoForwardFill"})],fi.prototype,"redo",1);xl([it()],fi.prototype,"undoDepth",1);xl([it()],fi.prototype,"redoDepth",1);fi=xl([Ne({defaultOptions:{depth:100,newGroupDelay:500,getDispatch:void 0,getState:void 0},staticKeys:["depth","newGroupDelay"],handlerKeys:["onUndo","onRedo"]})],fi);var nq=Object.defineProperty,rq=Object.getOwnPropertyDescriptor,Nm=(t,e,n,r)=>{for(var o=r>1?void 0:r?rq(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&nq(e,n,o),o},oq={icon:"paragraph",label:({t})=>t(ng.INSERT_LABEL),description:({t})=>t(ng.INSERT_DESCRIPTION)},iq={icon:"paragraph",label:({t})=>t(ng.CONVERT_LABEL),description:({t})=>t(ng.CONVERT_DESCRIPTION)},tl=class extends Dn{get name(){return"paragraph"}createTags(){return[ke.LastNodeCompatible,ke.TextBlock,ke.Block,ke.FormattingNode]}createNodeSpec(t,e){return{content:"inline*",draggable:!1,...e,attrs:{...t.defaults()},parseDOM:[{tag:"p",getAttrs:n=>({...t.parse(n)})},...e.parseDOM??[]],toDOM:n=>["p",t.dom(n),0]}}convertParagraph(t={}){const{attrs:e,selection:n,preserveAttrs:r}=t;return this.store.commands.setBlockNodeType.original(this.type,e,n,r)}insertParagraph(t,e={}){const{selection:n,attrs:r}=e;return this.store.commands.insertNode.original(this.type,{content:t,selection:n,attrs:r})}shortcut(t){return this.convertParagraph()(t)}};Nm([le(iq)],tl.prototype,"convertParagraph",1);Nm([le(oq)],tl.prototype,"insertParagraph",1);Nm([en({shortcut:oe.Paragraph,command:"convertParagraph"})],tl.prototype,"shortcut",1);tl=Nm([Ne({defaultPriority:ot.Medium})],tl);var sq=Object.defineProperty,aq=Object.getOwnPropertyDescriptor,lq=(t,e,n,r)=>{for(var o=r>1?void 0:r?aq(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&sq(e,n,o),o},ty=class extends Dn{get name(){return"text"}createTags(){return[ke.InlineNode]}createNodeSpec(){return{}}};ty=lq([Ne({disableExtraAttributes:!0,defaultPriority:ot.Medium})],ty);var cq={...Uc.defaultOptions,...tl.defaultOptions,...fi.defaultOptions,excludeExtensions:[]};function uq(t={}){t={...cq,...t};const{content:e,depth:n,getDispatch:r,getState:o,newGroupDelay:i,excludeExtensions:s}=t,l={};for(const u of s??[])l[u]=!0;const a=[];if(!l.history){const u=new fi({depth:n,getDispatch:r,getState:o,newGroupDelay:i});a.push(u)}return l.doc||a.push(new Uc({content:e})),l.text||a.push(new ty),l.paragraph||a.push(new tl),l.positioner||a.push(new Hc),l.gapCursor||a.push(new Q0),l.events||a.push(new gg),a}var dq=Object.defineProperty,hq=Object.getOwnPropertyDescriptor,pq=(t,e,n,r)=>{for(var o=r>1?void 0:r?hq(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&dq(e,n,o),o},nl=class extends ft{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(t,e)=>({...this.options,empty:jb(e.doc,{ignoreAttributes:!0})}),apply:(t,e,n,r)=>fq({pluginState:e,tr:t,extension:this,state:r})},props:{decorations:t=>gq({state:t,extension:this})}}}onSetOptions(t){const{changes:e}=t;e.placeholder.changed&&this.store.phase>=mr.EditorView&&this.store.updateAttributes()}};nl=pq([Ne({defaultOptions:{emptyNodeClass:AV.IS_EMPTY,placeholder:""}})],nl);function fq(t){const{pluginState:e,extension:n,tr:r,state:o}=t;return r.docChanged?{...n.options,empty:jb(o.doc)}:e}function gq(t){const{extension:e,state:n}=t,{empty:r}=e.pluginKey.getState(n),{emptyNodeClass:o,placeholder:i}=e.options;if(!r)return null;const s=[];return n.doc.descendants((l,a)=>{const u=vt.node(a,a+l.nodeSize,{class:o,"data-placeholder":i});s.push(u)}),He.create(n.doc,s)}var TO={exports:{}},Qr={},AO={exports:{}},_O={};/** * @license React * scheduler.production.min.js * @@ -89,7 +89,7 @@ If you are using Node.js, you can install JSDOM and Remirror will try to use it * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function e(L,$){var D=L.length;L.push($);e:for(;0>>1,U=L[F];if(0>>1;Fo(H,D))Go(Y,H)?(L[F]=Y,L[G]=D,F=G):(L[F]=H,L[B]=D,F=B);else if(Go(Y,D))L[F]=Y,L[G]=D,F=G;else break e}}return $}function o(L,$){var D=L.sortIndex-$.sortIndex;return D!==0?D:L.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,d=null,h=3,p=!1,f=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,v=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 b(L){for(var $=n(u);$!==null;){if($.callback===null)r(u);else if($.startTime<=L)r(u),$.sortIndex=$.expirationTime,e(a,$);else break;$=n(u)}}function w(L){if(g=!1,b(L),!f)if(n(a)!==null)f=!0,I(k);else{var $=n(u);$!==null&&N(w,$.startTime-L)}}function k(L,$){f=!1,g&&(g=!1,v(A),A=-1),p=!0;var D=h;try{for(b($),d=n(a);d!==null&&(!(d.expirationTime>$)||L&&!R());){var F=d.callback;if(typeof F=="function"){d.callback=null,h=d.priorityLevel;var U=F(d.expirationTime<=$);$=t.unstable_now(),typeof U=="function"?d.callback=U:d===n(a)&&r(a),b($)}else r(a);d=n(a)}if(d!==null)var W=!0;else{var B=n(u);B!==null&&N(w,B.startTime-$),W=!1}return W}finally{d=null,h=D,p=!1}}var x=!1,S=null,A=-1,C=5,O=-1;function R(){return!(t.unstable_now()-OL||125F?(L.sortIndex=D,e(u,L),n(a)===null&&L===n(u)&&(g?(v(A),A=-1):g=!0,N(w,D-F))):(L.sortIndex=U,e(a,L),f||p||(f=!0,I(k))),L},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(L){var $=h;return function(){var D=h;h=$;try{return L.apply(this,arguments)}finally{h=D}}}})(AO);TO.exports=AO;var fq=TO.exports;/** + */(function(t){function e(L,$){var P=L.length;L.push($);e:for(;0>>1,H=L[F];if(0>>1;Fo(U,P))Go(Y,U)?(L[F]=Y,L[G]=P,F=G):(L[F]=U,L[B]=P,F=B);else if(Go(Y,P))L[F]=Y,L[G]=P,F=G;else break e}}return $}function o(L,$){var P=L.sortIndex-$.sortIndex;return P!==0?P:L.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,d=null,h=3,p=!1,f=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,v=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 b(L){for(var $=n(u);$!==null;){if($.callback===null)r(u);else if($.startTime<=L)r(u),$.sortIndex=$.expirationTime,e(a,$);else break;$=n(u)}}function w(L){if(g=!1,b(L),!f)if(n(a)!==null)f=!0,I(k);else{var $=n(u);$!==null&&N(w,$.startTime-L)}}function k(L,$){f=!1,g&&(g=!1,v(A),A=-1),p=!0;var P=h;try{for(b($),d=n(a);d!==null&&(!(d.expirationTime>$)||L&&!R());){var F=d.callback;if(typeof F=="function"){d.callback=null,h=d.priorityLevel;var H=F(d.expirationTime<=$);$=t.unstable_now(),typeof H=="function"?d.callback=H:d===n(a)&&r(a),b($)}else r(a);d=n(a)}if(d!==null)var W=!0;else{var B=n(u);B!==null&&N(w,B.startTime-$),W=!1}return W}finally{d=null,h=P,p=!1}}var x=!1,S=null,A=-1,C=5,O=-1;function R(){return!(t.unstable_now()-OL||125F?(L.sortIndex=P,e(u,L),n(a)===null&&L===n(u)&&(g?(v(A),A=-1):g=!0,N(w,P-F))):(L.sortIndex=H,e(a,L),f||p||(f=!0,I(k))),L},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(L){var $=h;return function(){var P=h;h=$;try{return L.apply(this,arguments)}finally{h=P}}}})(_O);AO.exports=_O;var mq=AO.exports;/** * @license React * react-dom.production.min.js * @@ -97,14 +97,14 @@ If you are using Node.js, you can install JSDOM and Remirror will try to use it * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var _O=P,Zr=fq;function ne(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ey=Object.prototype.hasOwnProperty,gq=/^[: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]*$/,fT={},gT={};function mq(t){return ey.call(gT,t)?!0:ey.call(fT,t)?!1:gq.test(t)?gT[t]=!0:(fT[t]=!0,!1)}function vq(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function yq(t,e,n,r){if(e===null||typeof e>"u"||vq(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function dr(t,e,n,r,o,i,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=s}var Nn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Nn[t]=new dr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Nn[e]=new dr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Nn[t]=new dr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Nn[t]=new dr(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Nn[t]=new dr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Nn[t]=new dr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Nn[t]=new dr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Nn[t]=new dr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Nn[t]=new dr(t,5,!1,t.toLowerCase(),null,!1,!1)});var Tw=/[\-:]([a-z])/g;function Aw(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Tw,Aw);Nn[e]=new dr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Tw,Aw);Nn[e]=new dr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Tw,Aw);Nn[e]=new dr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Nn[t]=new dr(t,1,!1,t.toLowerCase(),null,!1,!1)});Nn.xlinkHref=new dr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Nn[t]=new dr(t,1,!1,t.toLowerCase(),null,!0,!0)});function _w(t,e,n,r){var o=Nn.hasOwnProperty(e)?Nn[e]:null;(o!==null?o.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ny=Object.prototype.hasOwnProperty,vq=/^[: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]*$/,gT={},mT={};function yq(t){return ny.call(mT,t)?!0:ny.call(gT,t)?!1:vq.test(t)?mT[t]=!0:(gT[t]=!0,!1)}function bq(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function wq(t,e,n,r){if(e===null||typeof e>"u"||bq(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function dr(t,e,n,r,o,i,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=s}var Nn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Nn[t]=new dr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Nn[e]=new dr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Nn[t]=new dr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Nn[t]=new dr(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Nn[t]=new dr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Nn[t]=new dr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Nn[t]=new dr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Nn[t]=new dr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Nn[t]=new dr(t,5,!1,t.toLowerCase(),null,!1,!1)});var _w=/[\-:]([a-z])/g;function Rw(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(_w,Rw);Nn[e]=new dr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(_w,Rw);Nn[e]=new dr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(_w,Rw);Nn[e]=new dr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Nn[t]=new dr(t,1,!1,t.toLowerCase(),null,!1,!1)});Nn.xlinkHref=new dr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Nn[t]=new dr(t,1,!1,t.toLowerCase(),null,!0,!0)});function Mw(t,e,n,r){var o=Nn.hasOwnProperty(e)?Nn[e]:null;(o!==null?o.type!==0:r||!(2l||o[s]!==i[l]){var a=` -`+o[s].replace(" at new "," at ");return t.displayName&&a.includes("")&&(a=a.replace("",t.displayName)),a}while(1<=s&&0<=l);break}}}finally{S1=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?dd(t):""}function bq(t){switch(t.tag){case 5:return dd(t.type);case 16:return dd("Lazy");case 13:return dd("Suspense");case 19:return dd("SuspenseList");case 0:case 2:case 15:return t=C1(t.type,!1),t;case 11:return t=C1(t.type.render,!1),t;case 1:return t=C1(t.type,!0),t;default:return""}}function oy(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ic:return"Fragment";case oc:return"Portal";case ty:return"Profiler";case Rw:return"StrictMode";case ny:return"Suspense";case ry:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case OO:return(t.displayName||"Context")+".Consumer";case MO:return(t._context.displayName||"Context")+".Provider";case Mw:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Ow:return e=t.displayName||null,e!==null?e:oy(t.type)||"Memo";case ms:e=t._payload,t=t._init;try{return oy(t(e))}catch{}}return null}function wq(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return oy(e);case 8:return e===Rw?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Ys(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function LO(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function xq(t){var e=LO(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Fp(t){t._valueTracker||(t._valueTracker=xq(t))}function NO(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=LO(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function vg(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function iy(t,e){var n=e.checked;return zt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function vT(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Ys(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function $O(t,e){e=e.checked,e!=null&&_w(t,"checked",e,!1)}function sy(t,e){$O(t,e);var n=Ys(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?ay(t,e.type,n):e.hasOwnProperty("defaultValue")&&ay(t,e.type,Ys(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function yT(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function ay(t,e,n){(e!=="number"||vg(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var hd=Array.isArray;function kc(t,e,n,r){if(t=t.options,e){e={};for(var o=0;o"+e.valueOf().toString()+"",e=Bp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function rh(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var _d={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},kq=["Webkit","ms","Moz","O"];Object.keys(_d).forEach(function(t){kq.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),_d[e]=_d[t]})});function FO(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||_d.hasOwnProperty(t)&&_d[t]?(""+e).trim():e+"px"}function BO(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=FO(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,o):t[n]=o}}var Eq=zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function uy(t,e){if(e){if(Eq[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ne(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ne(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ne(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ne(62))}}function dy(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hy=null;function Iw(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var py=null,Ec=null,Sc=null;function xT(t){if(t=rp(t)){if(typeof py!="function")throw Error(ne(280));var e=t.stateNode;e&&(e=Fm(e),py(t.stateNode,t.type,e))}}function HO(t){Ec?Sc?Sc.push(t):Sc=[t]:Ec=t}function UO(){if(Ec){var t=Ec,e=Sc;if(Sc=Ec=null,xT(t),e)for(t=0;t>>=0,t===0?32:31-(Nq(t)/$q|0)|0}var Hp=64,Up=4194304;function pd(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function xg(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,o=t.suspendedLanes,i=t.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=pd(l):(i&=s,i!==0&&(r=pd(i)))}else s=n&~o,s!==0?r=pd(s):i!==0&&(r=pd(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&o)&&(o=r&-r,i=e&-e,o>=i||o===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function tp(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Fo(e),t[e]=n}function Fq(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Md),MT=" ",OT=!1;function lI(t,e){switch(t){case"keyup":return pZ.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cI(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var sc=!1;function gZ(t,e){switch(t){case"compositionend":return cI(e);case"keypress":return e.which!==32?null:(OT=!0,MT);case"textInput":return t=e.data,t===MT&&OT?null:t;default:return null}}function mZ(t,e){if(sc)return t==="compositionend"||!Bw&&lI(t,e)?(t=sI(),Rf=Pw=Ss=null,sc=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=$T(n)}}function pI(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?pI(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function fI(){for(var t=window,e=vg();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=vg(t.document)}return e}function Hw(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function CZ(t){var e=fI(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&pI(n.ownerDocument.documentElement,n)){if(r!==null&&Hw(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!t.extend&&i>r&&(o=r,r=i,i=o),o=DT(n,i);var s=DT(n,r);o&&s&&(t.rangeCount!==1||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(o.node,o.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ac=null,by=null,Id=null,wy=!1;function PT(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wy||ac==null||ac!==vg(r)||(r=ac,"selectionStart"in r&&Hw(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Id&&ch(Id,r)||(Id=r,r=Sg(by,"onSelect"),0uc||(t.current=Ty[uc],Ty[uc]=null,uc--)}function xt(t,e){uc++,Ty[uc]=t.current,t.current=e}var Xs={},Kn=sa(Xs),Er=sa(!1),rl=Xs;function Vc(t,e){var n=t.type.contextTypes;if(!n)return Xs;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function Sr(t){return t=t.childContextTypes,t!=null}function Tg(){At(Er),At(Kn)}function VT(t,e,n){if(Kn.current!==Xs)throw Error(ne(168));xt(Kn,e),xt(Er,n)}function EI(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in e))throw Error(ne(108,wq(t)||"Unknown",o));return zt({},n,r)}function Ag(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Xs,rl=Kn.current,xt(Kn,t),xt(Er,Er.current),!0}function jT(t,e,n){var r=t.stateNode;if(!r)throw Error(ne(169));n?(t=EI(t,e,rl),r.__reactInternalMemoizedMergedChildContext=t,At(Er),At(Kn),xt(Kn,t)):At(Er),xt(Er,n)}var Mi=null,Bm=!1,F1=!1;function SI(t){Mi===null?Mi=[t]:Mi.push(t)}function PZ(t){Bm=!0,SI(t)}function aa(){if(!F1&&Mi!==null){F1=!0;var t=0,e=ut;try{var n=Mi;for(ut=1;t>=s,o-=s,Di=1<<32-Fo(e)+o|n<A?(C=S,S=null):C=S.sibling;var O=h(v,S,b[A],w);if(O===null){S===null&&(S=C);break}t&&S&&O.alternate===null&&e(v,S),y=i(O,y,A),x===null?k=O:x.sibling=O,x=O,S=C}if(A===b.length)return n(v,S),Rt&&ka(v,A),k;if(S===null){for(;AA?(C=S,S=null):C=S.sibling;var R=h(v,S,O.value,w);if(R===null){S===null&&(S=C);break}t&&S&&R.alternate===null&&e(v,S),y=i(R,y,A),x===null?k=R:x.sibling=R,x=R,S=C}if(O.done)return n(v,S),Rt&&ka(v,A),k;if(S===null){for(;!O.done;A++,O=b.next())O=d(v,O.value,w),O!==null&&(y=i(O,y,A),x===null?k=O:x.sibling=O,x=O);return Rt&&ka(v,A),k}for(S=r(v,S);!O.done;A++,O=b.next())O=p(S,v,A,O.value,w),O!==null&&(t&&O.alternate!==null&&S.delete(O.key===null?A:O.key),y=i(O,y,A),x===null?k=O:x.sibling=O,x=O);return t&&S.forEach(function(_){return e(v,_)}),Rt&&ka(v,A),k}function m(v,y,b,w){if(typeof b=="object"&&b!==null&&b.type===ic&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case zp:e:{for(var k=b.key,x=y;x!==null;){if(x.key===k){if(k=b.type,k===ic){if(x.tag===7){n(v,x.sibling),y=o(x,b.props.children),y.return=v,v=y;break e}}else if(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ms&&JT(k)===x.type){n(v,x.sibling),y=o(x,b.props),y.ref=Iu(v,x,b),y.return=v,v=y;break e}n(v,x);break}else e(v,x);x=x.sibling}b.type===ic?(y=Ka(b.props.children,v.mode,w,b.key),y.return=v,v=y):(w=Pf(b.type,b.key,b.props,null,v.mode,w),w.ref=Iu(v,y,b),w.return=v,v=w)}return s(v);case oc:e:{for(x=b.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){n(v,y.sibling),y=o(y,b.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else e(v,y);y=y.sibling}y=K1(b,v.mode,w),y.return=v,v=y}return s(v);case ms:return x=b._init,m(v,y,x(b._payload),w)}if(hd(b))return f(v,y,b,w);if(Au(b))return g(v,y,b,w);Xp(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,y!==null&&y.tag===6?(n(v,y.sibling),y=o(y,b),y.return=v,v=y):(n(v,y),y=G1(b,v.mode,w),y.return=v,v=y),s(v)):n(v,y)}return m}var Gc=II(!0),LI=II(!1),op={},li=sa(op),ph=sa(op),fh=sa(op);function Fa(t){if(t===op)throw Error(ne(174));return t}function qw(t,e){switch(xt(fh,e),xt(ph,t),xt(li,op),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:cy(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=cy(e,t)}At(li),xt(li,e)}function Kc(){At(li),At(ph),At(fh)}function NI(t){Fa(fh.current);var e=Fa(li.current),n=cy(e,t.type);e!==n&&(xt(ph,t),xt(li,n))}function Zw(t){ph.current===t&&(At(li),At(ph))}var $t=sa(0);function Lg(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var B1=[];function Jw(){for(var t=0;tn?n:4,t(!0);var r=H1.transition;H1.transition={};try{t(!1),e()}finally{ut=n,H1.transition=r}}function qI(){return bo().memoizedState}function HZ(t,e,n){var r=Ps(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ZI(t))JI(e,n);else if(n=_I(t,e,n,r),n!==null){var o=or();Bo(n,t,r,o),QI(n,e,r)}}function UZ(t,e,n){var r=Ps(t),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ZI(t))JI(e,o);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var s=e.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,Wo(l,s)){var a=e.interleaved;a===null?(o.next=o,Yw(e)):(o.next=a.next,a.next=o),e.interleaved=o;return}}catch{}finally{}n=_I(t,e,o,r),n!==null&&(o=or(),Bo(n,t,r,o),QI(n,e,r))}}function ZI(t){var e=t.alternate;return t===Dt||e!==null&&e===Dt}function JI(t,e){Ld=Ng=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function QI(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Nw(t,n)}}var $g={readContext:yo,useCallback:Fn,useContext:Fn,useEffect:Fn,useImperativeHandle:Fn,useInsertionEffect:Fn,useLayoutEffect:Fn,useMemo:Fn,useReducer:Fn,useRef:Fn,useState:Fn,useDebugValue:Fn,useDeferredValue:Fn,useTransition:Fn,useMutableSource:Fn,useSyncExternalStore:Fn,useId:Fn,unstable_isNewReconciler:!1},WZ={readContext:yo,useCallback:function(t,e){return Zo().memoizedState=[t,e===void 0?null:e],t},useContext:yo,useEffect:eA,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Lf(4194308,4,jI.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Lf(4194308,4,t,e)},useInsertionEffect:function(t,e){return Lf(4,2,t,e)},useMemo:function(t,e){var n=Zo();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Zo();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=HZ.bind(null,Dt,t),[r.memoizedState,t]},useRef:function(t){var e=Zo();return t={current:t},e.memoizedState=t},useState:QT,useDebugValue:rx,useDeferredValue:function(t){return Zo().memoizedState=t},useTransition:function(){var t=QT(!1),e=t[0];return t=BZ.bind(null,t[1]),Zo().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Dt,o=Zo();if(Rt){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=e(),wn===null)throw Error(ne(349));il&30||PI(r,e,n)}o.memoizedState=n;var i={value:n,getSnapshot:e};return o.queue=i,eA(FI.bind(null,r,i,t),[t]),r.flags|=2048,vh(9,zI.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=Zo(),e=wn.identifierPrefix;if(Rt){var n=Pi,r=Di;n=(r&~(1<<32-Fo(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=gh++,0")&&(a=a.replace("",t.displayName)),a}while(1<=s&&0<=l);break}}}finally{C1=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?dd(t):""}function xq(t){switch(t.tag){case 5:return dd(t.type);case 16:return dd("Lazy");case 13:return dd("Suspense");case 19:return dd("SuspenseList");case 0:case 2:case 15:return t=T1(t.type,!1),t;case 11:return t=T1(t.type.render,!1),t;case 1:return t=T1(t.type,!0),t;default:return""}}function sy(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ic:return"Fragment";case oc:return"Portal";case ry:return"Profiler";case Ow:return"StrictMode";case oy:return"Suspense";case iy:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case IO:return(t.displayName||"Context")+".Consumer";case OO:return(t._context.displayName||"Context")+".Provider";case Iw:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Lw:return e=t.displayName||null,e!==null?e:sy(t.type)||"Memo";case ms:e=t._payload,t=t._init;try{return sy(t(e))}catch{}}return null}function kq(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return sy(e);case 8:return e===Ow?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Ys(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function NO(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Eq(t){var e=NO(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Fp(t){t._valueTracker||(t._valueTracker=Eq(t))}function $O(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=NO(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function vg(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function ay(t,e){var n=e.checked;return zt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function yT(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Ys(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function DO(t,e){e=e.checked,e!=null&&Mw(t,"checked",e,!1)}function ly(t,e){DO(t,e);var n=Ys(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?cy(t,e.type,n):e.hasOwnProperty("defaultValue")&&cy(t,e.type,Ys(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function bT(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function cy(t,e,n){(e!=="number"||vg(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var hd=Array.isArray;function kc(t,e,n,r){if(t=t.options,e){e={};for(var o=0;o"+e.valueOf().toString()+"",e=Bp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function rh(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var _d={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Sq=["Webkit","ms","Moz","O"];Object.keys(_d).forEach(function(t){Sq.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),_d[e]=_d[t]})});function BO(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||_d.hasOwnProperty(t)&&_d[t]?(""+e).trim():e+"px"}function HO(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=BO(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,o):t[n]=o}}var Cq=zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function hy(t,e){if(e){if(Cq[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ne(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ne(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ne(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ne(62))}}function py(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var fy=null;function Nw(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var gy=null,Ec=null,Sc=null;function kT(t){if(t=rp(t)){if(typeof gy!="function")throw Error(ne(280));var e=t.stateNode;e&&(e=Fm(e),gy(t.stateNode,t.type,e))}}function UO(t){Ec?Sc?Sc.push(t):Sc=[t]:Ec=t}function WO(){if(Ec){var t=Ec,e=Sc;if(Sc=Ec=null,kT(t),e)for(t=0;t>>=0,t===0?32:31-(Dq(t)/Pq|0)|0}var Hp=64,Up=4194304;function pd(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function xg(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,o=t.suspendedLanes,i=t.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=pd(l):(i&=s,i!==0&&(r=pd(i)))}else s=n&~o,s!==0?r=pd(s):i!==0&&(r=pd(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&o)&&(o=r&-r,i=e&-e,o>=i||o===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function tp(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Bo(e),t[e]=n}function Hq(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Md),OT=" ",IT=!1;function cI(t,e){switch(t){case"keyup":return gZ.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uI(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var sc=!1;function vZ(t,e){switch(t){case"compositionend":return uI(e);case"keypress":return e.which!==32?null:(IT=!0,OT);case"textInput":return t=e.data,t===OT&&IT?null:t;default:return null}}function yZ(t,e){if(sc)return t==="compositionend"||!Uw&&cI(t,e)?(t=aI(),Rf=Fw=Ss=null,sc=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=DT(n)}}function fI(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?fI(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function gI(){for(var t=window,e=vg();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=vg(t.document)}return e}function Ww(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function AZ(t){var e=gI(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&fI(n.ownerDocument.documentElement,n)){if(r!==null&&Ww(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!t.extend&&i>r&&(o=r,r=i,i=o),o=PT(n,i);var s=PT(n,r);o&&s&&(t.rangeCount!==1||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(o.node,o.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ac=null,xy=null,Id=null,ky=!1;function zT(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ky||ac==null||ac!==vg(r)||(r=ac,"selectionStart"in r&&Ww(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Id&&ch(Id,r)||(Id=r,r=Sg(xy,"onSelect"),0uc||(t.current=_y[uc],_y[uc]=null,uc--)}function xt(t,e){uc++,_y[uc]=t.current,t.current=e}var Xs={},Kn=sa(Xs),Er=sa(!1),rl=Xs;function Vc(t,e){var n=t.type.contextTypes;if(!n)return Xs;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function Sr(t){return t=t.childContextTypes,t!=null}function Tg(){At(Er),At(Kn)}function jT(t,e,n){if(Kn.current!==Xs)throw Error(ne(168));xt(Kn,e),xt(Er,n)}function SI(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in e))throw Error(ne(108,kq(t)||"Unknown",o));return zt({},n,r)}function Ag(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Xs,rl=Kn.current,xt(Kn,t),xt(Er,Er.current),!0}function GT(t,e,n){var r=t.stateNode;if(!r)throw Error(ne(169));n?(t=SI(t,e,rl),r.__reactInternalMemoizedMergedChildContext=t,At(Er),At(Kn),xt(Kn,t)):At(Er),xt(Er,n)}var Mi=null,Bm=!1,B1=!1;function CI(t){Mi===null?Mi=[t]:Mi.push(t)}function FZ(t){Bm=!0,CI(t)}function aa(){if(!B1&&Mi!==null){B1=!0;var t=0,e=ut;try{var n=Mi;for(ut=1;t>=s,o-=s,Di=1<<32-Bo(e)+o|n<A?(C=S,S=null):C=S.sibling;var O=h(v,S,b[A],w);if(O===null){S===null&&(S=C);break}t&&S&&O.alternate===null&&e(v,S),y=i(O,y,A),x===null?k=O:x.sibling=O,x=O,S=C}if(A===b.length)return n(v,S),Rt&&ka(v,A),k;if(S===null){for(;AA?(C=S,S=null):C=S.sibling;var R=h(v,S,O.value,w);if(R===null){S===null&&(S=C);break}t&&S&&R.alternate===null&&e(v,S),y=i(R,y,A),x===null?k=R:x.sibling=R,x=R,S=C}if(O.done)return n(v,S),Rt&&ka(v,A),k;if(S===null){for(;!O.done;A++,O=b.next())O=d(v,O.value,w),O!==null&&(y=i(O,y,A),x===null?k=O:x.sibling=O,x=O);return Rt&&ka(v,A),k}for(S=r(v,S);!O.done;A++,O=b.next())O=p(S,v,A,O.value,w),O!==null&&(t&&O.alternate!==null&&S.delete(O.key===null?A:O.key),y=i(O,y,A),x===null?k=O:x.sibling=O,x=O);return t&&S.forEach(function(_){return e(v,_)}),Rt&&ka(v,A),k}function m(v,y,b,w){if(typeof b=="object"&&b!==null&&b.type===ic&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case zp:e:{for(var k=b.key,x=y;x!==null;){if(x.key===k){if(k=b.type,k===ic){if(x.tag===7){n(v,x.sibling),y=o(x,b.props.children),y.return=v,v=y;break e}}else if(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ms&&QT(k)===x.type){n(v,x.sibling),y=o(x,b.props),y.ref=Iu(v,x,b),y.return=v,v=y;break e}n(v,x);break}else e(v,x);x=x.sibling}b.type===ic?(y=Ka(b.props.children,v.mode,w,b.key),y.return=v,v=y):(w=Pf(b.type,b.key,b.props,null,v.mode,w),w.ref=Iu(v,y,b),w.return=v,v=w)}return s(v);case oc:e:{for(x=b.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){n(v,y.sibling),y=o(y,b.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else e(v,y);y=y.sibling}y=Y1(b,v.mode,w),y.return=v,v=y}return s(v);case ms:return x=b._init,m(v,y,x(b._payload),w)}if(hd(b))return f(v,y,b,w);if(Au(b))return g(v,y,b,w);Xp(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,y!==null&&y.tag===6?(n(v,y.sibling),y=o(y,b),y.return=v,v=y):(n(v,y),y=K1(b,v.mode,w),y.return=v,v=y),s(v)):n(v,y)}return m}var Gc=LI(!0),NI=LI(!1),op={},li=sa(op),ph=sa(op),fh=sa(op);function Fa(t){if(t===op)throw Error(ne(174));return t}function Jw(t,e){switch(xt(fh,e),xt(ph,t),xt(li,op),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:dy(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=dy(e,t)}At(li),xt(li,e)}function Kc(){At(li),At(ph),At(fh)}function $I(t){Fa(fh.current);var e=Fa(li.current),n=dy(e,t.type);e!==n&&(xt(ph,t),xt(li,n))}function Qw(t){ph.current===t&&(At(li),At(ph))}var $t=sa(0);function Lg(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var H1=[];function ex(){for(var t=0;tn?n:4,t(!0);var r=U1.transition;U1.transition={};try{t(!1),e()}finally{ut=n,U1.transition=r}}function ZI(){return bo().memoizedState}function WZ(t,e,n){var r=Ps(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},JI(t))QI(e,n);else if(n=RI(t,e,n,r),n!==null){var o=or();Ho(n,t,r,o),eL(n,e,r)}}function VZ(t,e,n){var r=Ps(t),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(JI(t))QI(e,o);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var s=e.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,Vo(l,s)){var a=e.interleaved;a===null?(o.next=o,qw(e)):(o.next=a.next,a.next=o),e.interleaved=o;return}}catch{}finally{}n=RI(t,e,o,r),n!==null&&(o=or(),Ho(n,t,r,o),eL(n,e,r))}}function JI(t){var e=t.alternate;return t===Dt||e!==null&&e===Dt}function QI(t,e){Ld=Ng=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function eL(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Dw(t,n)}}var $g={readContext:yo,useCallback:Fn,useContext:Fn,useEffect:Fn,useImperativeHandle:Fn,useInsertionEffect:Fn,useLayoutEffect:Fn,useMemo:Fn,useReducer:Fn,useRef:Fn,useState:Fn,useDebugValue:Fn,useDeferredValue:Fn,useTransition:Fn,useMutableSource:Fn,useSyncExternalStore:Fn,useId:Fn,unstable_isNewReconciler:!1},jZ={readContext:yo,useCallback:function(t,e){return Zo().memoizedState=[t,e===void 0?null:e],t},useContext:yo,useEffect:tA,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Lf(4194308,4,GI.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Lf(4194308,4,t,e)},useInsertionEffect:function(t,e){return Lf(4,2,t,e)},useMemo:function(t,e){var n=Zo();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Zo();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=WZ.bind(null,Dt,t),[r.memoizedState,t]},useRef:function(t){var e=Zo();return t={current:t},e.memoizedState=t},useState:eA,useDebugValue:ix,useDeferredValue:function(t){return Zo().memoizedState=t},useTransition:function(){var t=eA(!1),e=t[0];return t=UZ.bind(null,t[1]),Zo().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Dt,o=Zo();if(Rt){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=e(),wn===null)throw Error(ne(349));il&30||zI(r,e,n)}o.memoizedState=n;var i={value:n,getSnapshot:e};return o.queue=i,tA(BI.bind(null,r,i,t),[t]),r.flags|=2048,vh(9,FI.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=Zo(),e=wn.identifierPrefix;if(Rt){var n=Pi,r=Di;n=(r&~(1<<32-Bo(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=gh++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[ti]=e,t[hh]=r,lL(t,e,!1,!1),e.stateNode=t;e:{switch(s=dy(n,r),n){case"dialog":Tt("cancel",t),Tt("close",t),o=r;break;case"iframe":case"object":case"embed":Tt("load",t),o=r;break;case"video":case"audio":for(o=0;oXc&&(e.flags|=128,r=!0,Lu(i,!1),e.lanes=4194304)}else{if(!r)if(t=Lg(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Lu(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Rt)return Bn(e),null}else 2*Gt()-i.renderingStartTime>Xc&&n!==1073741824&&(e.flags|=128,r=!0,Lu(i,!1),e.lanes=4194304);i.isBackwards?(s.sibling=e.child,e.child=s):(n=i.last,n!==null?n.sibling=s:e.child=s,i.last=s)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Gt(),e.sibling=null,n=$t.current,xt($t,r?n&1|2:n&1),e):(Bn(e),null);case 22:case 23:return cx(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?zr&1073741824&&(Bn(e),e.subtreeFlags&6&&(e.flags|=8192)):Bn(e),null;case 24:return null;case 25:return null}throw Error(ne(156,e.tag))}function ZZ(t,e){switch(Ww(e),e.tag){case 1:return Sr(e.type)&&Tg(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Kc(),At(Er),At(Kn),Jw(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Zw(e),null;case 13:if(At($t),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ne(340));jc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return At($t),null;case 4:return Kc(),null;case 10:return Kw(e.type._context),null;case 22:case 23:return cx(),null;case 24:return null;default:return null}}var Zp=!1,jn=!1,JZ=typeof WeakSet=="function"?WeakSet:Set,pe=null;function fc(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ut(t,e,r)}else n.current=null}function zy(t,e,n){try{n()}catch(r){Ut(t,e,r)}}var cA=!1;function QZ(t,e){if(xy=kg,t=fI(),Hw(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=t,h=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(l=s+o),d!==i||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===t)break t;if(h===n&&++u===o&&(l=s),h===i&&++c===r&&(a=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(ky={focusedElem:t,selectionRange:n},kg=!1,pe=e;pe!==null;)if(e=pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,pe=t;else for(;pe!==null;){e=pe;try{var f=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(f!==null){var g=f.memoizedProps,m=f.memoizedState,v=e.stateNode,y=v.getSnapshotBeforeUpdate(e.elementType===e.type?g:Oo(e.type,g),m);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(w){Ut(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,pe=t;break}pe=e.return}return f=cA,cA=!1,f}function Nd(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&t)===t){var i=o.destroy;o.destroy=void 0,i!==void 0&&zy(e,n,i)}o=o.next}while(o!==r)}}function Wm(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Fy(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function dL(t){var e=t.alternate;e!==null&&(t.alternate=null,dL(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ti],delete e[hh],delete e[Cy],delete e[$Z],delete e[DZ])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function hL(t){return t.tag===5||t.tag===3||t.tag===4}function uA(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||hL(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function By(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Cg));else if(r!==4&&(t=t.child,t!==null))for(By(t,e,n),t=t.sibling;t!==null;)By(t,e,n),t=t.sibling}function Hy(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Hy(t,e,n),t=t.sibling;t!==null;)Hy(t,e,n),t=t.sibling}var Rn=null,Io=!1;function ss(t,e,n){for(n=n.child;n!==null;)pL(t,e,n),n=n.sibling}function pL(t,e,n){if(ai&&typeof ai.onCommitFiberUnmount=="function")try{ai.onCommitFiberUnmount($m,n)}catch{}switch(n.tag){case 5:jn||fc(n,e);case 6:var r=Rn,o=Io;Rn=null,ss(t,e,n),Rn=r,Io=o,Rn!==null&&(Io?(t=Rn,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Rn.removeChild(n.stateNode));break;case 18:Rn!==null&&(Io?(t=Rn,n=n.stateNode,t.nodeType===8?z1(t.parentNode,n):t.nodeType===1&&z1(t,n),ah(t)):z1(Rn,n.stateNode));break;case 4:r=Rn,o=Io,Rn=n.stateNode.containerInfo,Io=!0,ss(t,e,n),Rn=r,Io=o;break;case 0:case 11:case 14:case 15:if(!jn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&zy(n,e,s),o=o.next}while(o!==r)}ss(t,e,n);break;case 1:if(!jn&&(fc(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ut(n,e,l)}ss(t,e,n);break;case 21:ss(t,e,n);break;case 22:n.mode&1?(jn=(r=jn)||n.memoizedState!==null,ss(t,e,n),jn=r):ss(t,e,n);break;default:ss(t,e,n)}}function dA(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new JZ),e.forEach(function(r){var o=lJ.bind(null,t,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ao(t,e){var n=e.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Gt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*tJ(r/1960))-r,10t?16:t,Cs===null)var r=!1;else{if(t=Cs,Cs=null,zg=0,Ge&6)throw Error(ne(331));var o=Ge;for(Ge|=4,pe=t.current;pe!==null;){var i=pe,s=i.child;if(pe.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aGt()-ax?Ga(t,0):sx|=n),Cr(t,e)}function xL(t,e){e===0&&(t.mode&1?(e=Up,Up<<=1,!(Up&130023424)&&(Up=4194304)):e=1);var n=or();t=Vi(t,e),t!==null&&(tp(t,e,n),Cr(t,n))}function aJ(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),xL(t,n)}function lJ(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,o=t.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(e),xL(t,n)}var kL;kL=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Er.current)wr=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return wr=!1,XZ(t,e,n);wr=!!(t.flags&131072)}else wr=!1,Rt&&e.flags&1048576&&CI(e,Rg,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Nf(t,e),t=e.pendingProps;var o=Vc(e,Kn.current);Tc(e,n),o=ex(null,e,r,t,o,n);var i=tx();return e.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Sr(r)?(i=!0,Ag(e)):i=!1,e.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Xw(e),o.updater=Hm,e.stateNode=o,o._reactInternals=e,Oy(e,r,t,n),e=Ny(null,e,r,!0,i,n)):(e.tag=0,Rt&&i&&Uw(e),er(null,e,o,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Nf(t,e),t=e.pendingProps,o=r._init,r=o(r._payload),e.type=r,o=e.tag=uJ(r),t=Oo(r,t),o){case 0:e=Ly(null,e,r,t,n);break e;case 1:e=sA(null,e,r,t,n);break e;case 11:e=oA(null,e,r,t,n);break e;case 14:e=iA(null,e,r,Oo(r.type,t),n);break e}throw Error(ne(306,r,""))}return e;case 0:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Oo(r,o),Ly(t,e,r,o,n);case 1:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Oo(r,o),sA(t,e,r,o,n);case 3:e:{if(iL(e),t===null)throw Error(ne(387));r=e.pendingProps,i=e.memoizedState,o=i.element,RI(t,e),Ig(e,r,null,n);var s=e.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){o=Yc(Error(ne(423)),e),e=aA(t,e,r,n,o);break e}else if(r!==o){o=Yc(Error(ne(424)),e),e=aA(t,e,r,n,o);break e}else for(jr=Ns(e.stateNode.containerInfo.firstChild),Kr=e,Rt=!0,No=null,n=LI(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(jc(),r===o){e=ji(t,e,n);break e}er(t,e,r,n)}e=e.child}return e;case 5:return NI(e),t===null&&_y(e),r=e.type,o=e.pendingProps,i=t!==null?t.memoizedProps:null,s=o.children,Ey(r,o)?s=null:i!==null&&Ey(r,i)&&(e.flags|=32),oL(t,e),er(t,e,s,n),e.child;case 6:return t===null&&_y(e),null;case 13:return sL(t,e,n);case 4:return qw(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Gc(e,null,r,n):er(t,e,r,n),e.child;case 11:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Oo(r,o),oA(t,e,r,o,n);case 7:return er(t,e,e.pendingProps,n),e.child;case 8:return er(t,e,e.pendingProps.children,n),e.child;case 12:return er(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,o=e.pendingProps,i=e.memoizedProps,s=o.value,xt(Mg,r._currentValue),r._currentValue=s,i!==null)if(Wo(i.value,s)){if(i.children===o.children&&!Er.current){e=ji(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Fi(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Ry(i.return,n,e),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===e.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(ne(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Ry(s,n,e),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}er(t,e,o.children,n),e=e.child}return e;case 9:return o=e.type,r=e.pendingProps.children,Tc(e,n),o=yo(o),r=r(o),e.flags|=1,er(t,e,r,n),e.child;case 14:return r=e.type,o=Oo(r,e.pendingProps),o=Oo(r.type,o),iA(t,e,r,o,n);case 15:return nL(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Oo(r,o),Nf(t,e),e.tag=1,Sr(r)?(t=!0,Ag(e)):t=!1,Tc(e,n),OI(e,r,o),Oy(e,r,o,n),Ny(null,e,r,!0,t,n);case 19:return aL(t,e,n);case 22:return rL(t,e,n)}throw Error(ne(156,e.tag))};function EL(t,e){return XO(t,e)}function cJ(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ho(t,e,n,r){return new cJ(t,e,n,r)}function dx(t){return t=t.prototype,!(!t||!t.isReactComponent)}function uJ(t){if(typeof t=="function")return dx(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Mw)return 11;if(t===Ow)return 14}return 2}function zs(t,e){var n=t.alternate;return n===null?(n=ho(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Pf(t,e,n,r,o,i){var s=2;if(r=t,typeof t=="function")dx(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case ic:return Ka(n.children,o,i,e);case Rw:s=8,o|=8;break;case ty:return t=ho(12,n,e,o|2),t.elementType=ty,t.lanes=i,t;case ny:return t=ho(13,n,e,o),t.elementType=ny,t.lanes=i,t;case ry:return t=ho(19,n,e,o),t.elementType=ry,t.lanes=i,t;case IO:return jm(n,o,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case MO:s=10;break e;case OO:s=9;break e;case Mw:s=11;break e;case Ow:s=14;break e;case ms:s=16,r=null;break e}throw Error(ne(130,t==null?t:typeof t,""))}return e=ho(s,n,e,o),e.elementType=t,e.type=r,e.lanes=i,e}function Ka(t,e,n,r){return t=ho(7,t,r,e),t.lanes=n,t}function jm(t,e,n,r){return t=ho(22,t,r,e),t.elementType=IO,t.lanes=n,t.stateNode={isHidden:!1},t}function G1(t,e,n){return t=ho(6,t,null,e),t.lanes=n,t}function K1(t,e,n){return e=ho(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function dJ(t,e,n,r,o){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=A1(0),this.expirationTimes=A1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=A1(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function hx(t,e,n,r,o,i,s,l,a){return t=new dJ(t,e,n,l,a),e===1?(e=1,i===!0&&(e|=8)):e=0,i=ho(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xw(i),t}function hJ(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(AL)}catch(t){console.error(t)}}AL(),CO.exports=Qr;var ip=CO.exports;const ef=jo(ip);var vJ=Object.defineProperty,yJ=Object.getOwnPropertyDescriptor,bJ=(t,e,n,r)=>{for(var o=r>1?void 0:r?yJ(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&vJ(e,n,o),o},_L=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},be=(t,e,n)=>(_L(t,e,"read from private field"),n?n.call(t):e.get(t)),Pr=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},$r=(t,e,n,r)=>(_L(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),gd,wJ=class{constructor(){this.portals=new Map,Pr(this,gd,Cm()),this.on=t=>be(this,gd).on("update",t),this.once=t=>{const e=be(this,gd).on("update",n=>{e(),t(n)});return e}}update(){be(this,gd).emit("update",this.portals)}render({Component:t,container:e}){const n=this.portals.get(e);this.portals.set(e,{Component:t,key:(n==null?void 0:n.key)??Oc()}),this.update()}forceUpdate(){for(const[t,{Component:e}]of this.portals)this.portals.set(t,{Component:e,key:Oc()})}remove(t){this.portals.delete(t),this.update()}};gd=new WeakMap;var xJ=t=>{const{portals:e}=t;return ee.createElement(ee.Fragment,null,e.map(([n,{Component:r,key:o}])=>ip.createPortal(ee.createElement(r,null),n,o)))};function kJ(t){const[e,n]=P.useState(()=>Array.from(t.portals.entries()));return P.useEffect(()=>(n(Array.from(t.portals.entries())),t.on(r=>{n(Array.from(r.entries()))})),[t]),P.useMemo(()=>e,[e])}var Nt,md,Sa,vd,zf,yd,Ql,bd,Ff,Ci,Qn,Gy,RL=class{constructor({getPosition:t,node:e,portalContainer:n,view:r,ReactComponent:o,options:i}){Pr(this,Nt,void 0),Pr(this,md,[]),Pr(this,Sa,void 0),Pr(this,vd,void 0),Pr(this,zf,void 0),Pr(this,yd,void 0),Pr(this,Ql,void 0),Pr(this,bd,!1),Pr(this,Ff,void 0),Pr(this,Ci,void 0),Pr(this,Qn,void 0),Pr(this,Gy,a=>{a&&(we(be(this,Ci),{code:re.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${be(this,Nt).type.name}' which doesn't support content.`}),a.append(be(this,Ci)))}),this.Component=()=>{const a=be(this,zf);return we(a,{code:re.REACT_NODE_VIEW,message:`The custom react node view provided for ${be(this,Nt).type.name} doesn't have a valid ReactComponent`}),ee.createElement(a,{updateAttributes:this.updateAttributes,selected:this.selected,view:be(this,Sa),getPosition:be(this,yd),node:be(this,Nt),forwardRef:be(this,Gy),decorations:be(this,md)})},this.updateAttributes=a=>{if(!be(this,Sa).editable)return;const u=be(this,yd).call(this);if(u==null)return;const c=be(this,Sa).state.tr.setNodeMarkup(u,void 0,{...be(this,Nt).attrs,...a});be(this,Sa).dispatch(c)},we(Qe(t),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),$r(this,Nt,e),$r(this,Sa,r),$r(this,vd,n),$r(this,zf,o),$r(this,yd,t),$r(this,Ql,i),$r(this,Qn,this.createDom());const{contentDOM:s,wrapper:l}=this.createContentDom()??{};$r(this,Ff,s??void 0),$r(this,Ci,l),be(this,Ci)&&be(this,Qn).append(be(this,Ci)),this.setDomAttributes(be(this,Nt),be(this,Qn)),this.Component.displayName=CR(`${be(this,Nt).type.name}NodeView`),this.renderComponent()}static create(t){const{portalContainer:e,ReactComponent:n,options:r}=t;return(o,i,s)=>new RL({options:r,node:o,view:i,getPosition:s,portalContainer:e,ReactComponent:n})}get selected(){return be(this,bd)}get contentDOM(){return be(this,Ff)}get dom(){return be(this,Qn)}renderComponent(){be(this,vd).render({Component:this.Component,container:be(this,Qn)})}createDom(){const{defaultBlockNode:t,defaultInlineNode:e}=be(this,Ql),n=be(this,Nt).isInline?document.createElement(e):document.createElement(t);return n.classList.add(`${vS(be(this,Nt).type.name)}-node-view-wrapper`),n}createContentDom(){var t,e;if(be(this,Nt).isLeaf)return;const n=(e=(t=be(this,Nt).type.spec).toDOM)==null?void 0:e.call(t,be(this,Nt));if(!n)return;const{contentDOM:r,dom:o}=Vr.renderSpec(document,n);let i;if(Vt(o))return i=o,o===r&&(i=document.createElement("span"),i.classList.add(`${vS(be(this,Nt).type.name)}-node-view-content-wrapper`),i.append(r)),Vt(r),{wrapper:i,contentDOM:r}}update(t,e){return bm({types:be(this,Nt).type,node:t})?(be(this,Nt)===t&&be(this,md)===e||(be(this,Nt).sameMarkup(t)||this.setDomAttributes(t,be(this,Qn)),$r(this,Nt,t),$r(this,md,e),this.renderComponent()),!0):!1}setDomAttributes(t,e){const{toDOM:n}=be(this,Nt).type.spec;let r=t.attrs;if(n){const o=n(t);if(Ee(o)||EJ(o))return;Qs(o[1])&&(r=o[1])}for(const[o,i]of an(r))e.setAttribute(o,i)}selectNode(){$r(this,bd,!0),be(this,Qn)&&be(this,Qn).classList.add(pS),this.renderComponent()}deselectNode(){$r(this,bd,!1),be(this,Qn)&&be(this,Qn).classList.remove(pS),this.renderComponent()}destroy(){be(this,vd).remove(be(this,Qn))}ignoreMutation(t){return t.type==="selection"?!be(this,Nt).type.spec.selectable:be(this,Ci)?!be(this,Ci).contains(t.target):!0}stopEvent(t){var e;if(!be(this,Qn))return!1;if(Qe(be(this,Ql).stopEvent))return be(this,Ql).stopEvent({event:t});const n=t.target;if(!(be(this,Qn).contains(n)&&!((e=this.contentDOM)!=null&&e.contains(n))))return!1;const o=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o)return!0;const s=!!be(this,Nt).type.spec.draggable,l=Oe.isSelectable(be(this,Nt)),a=t.type==="copy",u=t.type==="paste",c=t.type==="cut",d=t.type==="mousedown",h=t.type.startsWith("drag");return!s&&l&&h&&t.preventDefault(),!(h||o||a||u||c||d&&l)}},bA=RL;Nt=new WeakMap;md=new WeakMap;Sa=new WeakMap;vd=new WeakMap;zf=new WeakMap;yd=new WeakMap;Ql=new WeakMap;bd=new WeakMap;Ff=new WeakMap;Ci=new WeakMap;Qn=new WeakMap;Gy=new WeakMap;function EJ(t){return z0(t)||Qs(t)&&z0(t.dom)}var bh=class extends ft{constructor(){super(...arguments),this.portalContainer=new wJ}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){const t=ye(),e=this.store.managerSettings.nodeViewComponents??{};for(const r of this.store.extensions)!r.ReactComponent||!Zh(r)||r.reactComponentEnvironment==="ssr"||(t[r.name]=bA.create({options:this.options,ReactComponent:r.ReactComponent,portalContainer:this.portalContainer}));const n=an({...this.options.nodeViewComponents,...e});for(const[r,o]of n)t[r]=bA.create({options:this.options,ReactComponent:o,portalContainer:this.portalContainer});return t}};bh=bJ([Ne({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],bh);var SJ=Object.defineProperty,CJ=Object.getOwnPropertyDescriptor,TJ=(t,e,n,r)=>{for(var o=r>1?void 0:r?CJ(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&SJ(e,n,o),o},AJ={...nl.defaultOptions,...bh.defaultOptions},_J=[...nl.staticKeys,...bh.staticKeys],wh=class extends ft{get name(){return"react"}onSetOptions(t){const{pickChanged:e}=t;this.getExtension(nl).setOptions(e(["placeholder"]))}createExtensions(){const{emptyNodeClass:t,placeholder:e,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s}=this.options;return[new nl({emptyNodeClass:t,placeholder:e,priority:ot.Low}),new bh({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s})]}};wh=TJ([Ne({defaultOptions:AJ,staticKeys:_J})],wh);var ML={};Object.defineProperty(ML,"__esModule",{value:!0});function RJ(){for(var t=[],e=0;e{if(!e.has(t))throw TypeError("Cannot "+n)},Y1=(t,e,n)=>(OL(t,e,"read from private field"),n?n.call(t):e.get(t)),MJ=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},OJ=(t,e,n,r)=>(OL(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function IJ(){const[,t]=P.useState(ye());return P.useCallback(()=>{t(ye())},[])}var IL=P.createContext(null);function to(t){const e=P.useContext(IL),n=P.useRef(IJ());we(e,{code:re.REACT_PROVIDER_CONTEXT});const{addHandler:r}=e;return P.useEffect(()=>{let o=t;if(o){if(Qs(o)){const{autoUpdate:i}=o;o=i?()=>n.current():void 0}if(Qe(o))return r("updated",o)}},[r,t]),e}function hr(t=!0){return to({autoUpdate:t}).active}function LJ(t=!1){return to(t?{autoUpdate:!0}:void 0).attrs}function vu(){return to().chain.new()}function un(){return to().commands}function mx(){return to({autoUpdate:!0}).getState().selection}function sp(t,e=void 0,n){const{getExtension:r}=to(),o=P.useMemo(()=>r(t),[t,r]);let i;if(Qe(e)?i=n?[o,...n]:[o,e]:i=e?[o,...Object.values(e)]:[],P.useEffect(()=>{Qe(e)||!e||o.setOptions(e)},i),P.useEffect(()=>{if(Qe(e))return e({addHandler:o.addHandler.bind(o),addCustomHandler:o.addCustomHandler.bind(o),extension:o})},i),!e)return o}function NJ(t,e,n){const r=P.useCallback(({addHandler:o})=>o(e,n),[n,e]);return sp(t,r)}function $J(){return to({autoUpdate:!0}).getState()}function ap(t=!1){return to(t?{autoUpdate:!0}:void 0).helpers}var[DJ,PJ]=dj(({props:t})=>{const e=t.locale??"en",n=t.i18n??Lm,r=t.supportedLocales??[e],o=n._.bind(n);return{locale:e,i18n:n,supportedLocales:r,t:o}});function EA(t,e={}){const{core:n,react:r,...o}=e;return _H(t)?t:AH.create(()=>[...NR(t),new wh(r),...lq(n)],o)}function zJ(t,e={}){const n=P.useRef(t),r=P.useRef(e),[o,i]=P.useState(()=>EA(t,e));return n.current=t,r.current=e,P.useEffect(()=>o.addHandler("destroy",()=>{i(()=>EA(n.current,r.current))}),[o]),o}var FJ=typeof nr=="object"&&nr.__esModule&&nr.default?nr.default:nr,ec,BJ=class extends kH{constructor(t){if(super(t),MJ(this,ec,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,n)=>{this.rootPropsConfig.called=!0;const{refKey:r="ref",ref:o,...i}=e??ye();return{[r]:FJ(o,this.onRef),key:this.uid,...i,children:n}},this.onRef=e=>{e&&(this.rootPropsConfig.count+=1,we(this.rootPropsConfig.count<=1,{code:re.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),OJ(this,ec,e),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(nl).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(t){return super.update(t),this}createView(t){return new Lz(null,{state:t,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:t,...e}){const{triggerChange:n=!0,tr:r,transactions:o}=e;if(this.props.state){const{onChange:i}=this.props;we(i,{code:re.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),we(n,{code:re.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:t,tr:r,transactions:o});return}!r&&!o&&(t=t.apply(t.tr.setMeta(fS,{}))),this.view.updateState(t),n&&(o==null?void 0:o.length)!==0&&this.onChange({state:t,tr:r,transactions:o}),this.manager.onStateUpdate({previousState:this.previousState,state:t,tr:r,transactions:o})}updateControlledState(t,e){this.previousStateOverride=e,t=t.apply(t.tr.setMeta(fS,{})),this.view.updateState(t),this.manager.onStateUpdate({previousState:this.previousState,state:t}),this.previousStateOverride=void 0}addProsemirrorViewToDom(t,e){this.props.insertPosition==="start"?t.insertBefore(e,t.firstChild):t.append(e)}onRefLoad(){we(Y1(this,ec),{code:re.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:t}=this.props;this.addProsemirrorViewToDom(Y1(this,ec),this.view.dom),t&&this.focus(t),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&Y1(this,ec)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};ec=new WeakMap;var LL=typeof document<"u"?P.useLayoutEffect:P.useEffect;function HJ(t){const e=P.useRef();return LL(()=>{e.current=t}),e.current}function UJ(t){const{manager:e,state:n}=t,{placeholder:r,editable:o}=t;P.useRef(!0).current&&!Bs(r)&&e.getExtension(wh).setOptions({placeholder:r}),P.useEffect(()=>{r!=null&&e.getExtension(wh).setOptions({placeholder:r})},[r,e]);const[s]=P.useState(()=>{if(n)return n;const a=e.createEmptyDoc(),[u,c]=Pt(t.initialContent)?t.initialContent:[t.initialContent??a];return e.createState({content:u,selection:c})}),l=WJ({initialEditorState:s,getProps:()=>t});return P.useEffect(()=>()=>{l.destroy()},[l]),P.useEffect(()=>{l.onUpdate()},[o,l]),VJ(l),l.frameworkOutput}function WJ(t){const e=P.useRef(t);e.current=t;const n=P.useMemo(()=>new BJ(e.current),[]);return n.update(t),n}function VJ(t){const{state:e}=t.props,n=P.useRef(!!e),r=HJ(e);LL(()=>{const o=e?n.current===!0:n.current===!1;we(o,{code:re.REACT_CONTROLLED,message:n.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!e||e===r)&&t.updateControlledState(e,r??void 0)},[e,r,t])}function jJ(t={}){const{content:e,document:n,selection:r,extensions:o,...i}=t,s=zJ(o??(()=>[]),i),[l,a]=P.useState(()=>s.createState({selection:r,content:e??s.createEmptyDoc()})),u=P.useCallback(({state:d})=>{a(d)},[]),c=P.useCallback(()=>s.output,[s]);return P.useMemo(()=>({state:l,setState:a,manager:s,onChange:u,getContext:c}),[c,s,u,l])}var SA={doc:!1,selection:!1,storedMark:!1};function GJ(){const[t,e]=P.useState(SA);return NJ(ug,"applyState",P.useCallback(({tr:n})=>{const r={...SA};n.docChanged&&(r.doc=!0),n.selectionSet&&(r.selection=!0),n.storedMarksSet&&(r.storedMark=!0),e(r)},[])),t}var Ky=()=>ee.createElement("div",{className:KW.EDITOR_WRAPPER,...to().getRootProps()}),KJ=t=>(t.hook(),null);function YJ(t){const{children:e,autoRender:n,i18n:r,locale:o,supportedLocales:i,hooks:s=[],...l}=t,a=UJ(l),u=kJ(a.portalContainer),c=n==="start"||n===!0||!e&&Bs(n),d=n==="end";return ee.createElement(DJ,{i18n:r,locale:o,supportedLocales:i},ee.createElement(IL.Provider,{value:a},ee.createElement(xJ,{portals:u}),s.map((h,p)=>ee.createElement(KJ,{hook:h,key:p})),c&&ee.createElement(Ky,null),e,d&&ee.createElement(Ky,null)))}const XJ={black:"#000",white:"#fff"},xh=XJ,qJ={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Bl=qJ,ZJ={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Hl=ZJ,JJ={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Ul=JJ,QJ={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Wl=QJ,eQ={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Vl=eQ,tQ={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},$u=tQ,nQ={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},rQ=nQ;function K(){return K=Object.assign?Object.assign.bind():function(t){for(var e=1;e{e[n]=NL(t[n])}),e}function Yr(t,e,n={clone:!0}){const r=n.clone?K({},t):t;return Oi(t)&&Oi(e)&&Object.keys(e).forEach(o=>{o!=="__proto__"&&(Oi(e[o])&&o in t&&Oi(t[o])?r[o]=Yr(t[o],e[o],n):n.clone?r[o]=Oi(e[o])?NL(e[o]):e[o]:r[o]=e[o])}),r}var $L={exports:{}},oQ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",iQ=oQ,sQ=iQ;function DL(){}function PL(){}PL.resetWarningCache=DL;var aQ=function(){function t(r,o,i,s,l,a){if(a!==sQ){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:PL,resetWarningCache:DL};return n.PropTypes=n,n};$L.exports=aQ();var vx=$L.exports;function qc(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[ti]=e,t[hh]=r,cL(t,e,!1,!1),e.stateNode=t;e:{switch(s=py(n,r),n){case"dialog":Tt("cancel",t),Tt("close",t),o=r;break;case"iframe":case"object":case"embed":Tt("load",t),o=r;break;case"video":case"audio":for(o=0;oXc&&(e.flags|=128,r=!0,Lu(i,!1),e.lanes=4194304)}else{if(!r)if(t=Lg(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Lu(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Rt)return Bn(e),null}else 2*Gt()-i.renderingStartTime>Xc&&n!==1073741824&&(e.flags|=128,r=!0,Lu(i,!1),e.lanes=4194304);i.isBackwards?(s.sibling=e.child,e.child=s):(n=i.last,n!==null?n.sibling=s:e.child=s,i.last=s)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Gt(),e.sibling=null,n=$t.current,xt($t,r?n&1|2:n&1),e):(Bn(e),null);case 22:case 23:return dx(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?zr&1073741824&&(Bn(e),e.subtreeFlags&6&&(e.flags|=8192)):Bn(e),null;case 24:return null;case 25:return null}throw Error(ne(156,e.tag))}function QZ(t,e){switch(jw(e),e.tag){case 1:return Sr(e.type)&&Tg(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Kc(),At(Er),At(Kn),ex(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Qw(e),null;case 13:if(At($t),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ne(340));jc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return At($t),null;case 4:return Kc(),null;case 10:return Xw(e.type._context),null;case 22:case 23:return dx(),null;case 24:return null;default:return null}}var Zp=!1,jn=!1,eJ=typeof WeakSet=="function"?WeakSet:Set,pe=null;function fc(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ut(t,e,r)}else n.current=null}function By(t,e,n){try{n()}catch(r){Ut(t,e,r)}}var uA=!1;function tJ(t,e){if(Ey=kg,t=gI(),Ww(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=t,h=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(l=s+o),d!==i||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===t)break t;if(h===n&&++u===o&&(l=s),h===i&&++c===r&&(a=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Sy={focusedElem:t,selectionRange:n},kg=!1,pe=e;pe!==null;)if(e=pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,pe=t;else for(;pe!==null;){e=pe;try{var f=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(f!==null){var g=f.memoizedProps,m=f.memoizedState,v=e.stateNode,y=v.getSnapshotBeforeUpdate(e.elementType===e.type?g:Io(e.type,g),m);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(w){Ut(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,pe=t;break}pe=e.return}return f=uA,uA=!1,f}function Nd(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&t)===t){var i=o.destroy;o.destroy=void 0,i!==void 0&&By(e,n,i)}o=o.next}while(o!==r)}}function Wm(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Hy(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function hL(t){var e=t.alternate;e!==null&&(t.alternate=null,hL(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ti],delete e[hh],delete e[Ay],delete e[PZ],delete e[zZ])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function pL(t){return t.tag===5||t.tag===3||t.tag===4}function dA(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||pL(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Uy(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Cg));else if(r!==4&&(t=t.child,t!==null))for(Uy(t,e,n),t=t.sibling;t!==null;)Uy(t,e,n),t=t.sibling}function Wy(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Wy(t,e,n),t=t.sibling;t!==null;)Wy(t,e,n),t=t.sibling}var Rn=null,Lo=!1;function ss(t,e,n){for(n=n.child;n!==null;)fL(t,e,n),n=n.sibling}function fL(t,e,n){if(ai&&typeof ai.onCommitFiberUnmount=="function")try{ai.onCommitFiberUnmount($m,n)}catch{}switch(n.tag){case 5:jn||fc(n,e);case 6:var r=Rn,o=Lo;Rn=null,ss(t,e,n),Rn=r,Lo=o,Rn!==null&&(Lo?(t=Rn,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Rn.removeChild(n.stateNode));break;case 18:Rn!==null&&(Lo?(t=Rn,n=n.stateNode,t.nodeType===8?F1(t.parentNode,n):t.nodeType===1&&F1(t,n),ah(t)):F1(Rn,n.stateNode));break;case 4:r=Rn,o=Lo,Rn=n.stateNode.containerInfo,Lo=!0,ss(t,e,n),Rn=r,Lo=o;break;case 0:case 11:case 14:case 15:if(!jn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&By(n,e,s),o=o.next}while(o!==r)}ss(t,e,n);break;case 1:if(!jn&&(fc(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ut(n,e,l)}ss(t,e,n);break;case 21:ss(t,e,n);break;case 22:n.mode&1?(jn=(r=jn)||n.memoizedState!==null,ss(t,e,n),jn=r):ss(t,e,n);break;default:ss(t,e,n)}}function hA(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new eJ),e.forEach(function(r){var o=uJ.bind(null,t,r);n.has(r)||(n.add(r),r.then(o,o))})}}function _o(t,e){var n=e.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Gt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*rJ(r/1960))-r,10t?16:t,Cs===null)var r=!1;else{if(t=Cs,Cs=null,zg=0,Ge&6)throw Error(ne(331));var o=Ge;for(Ge|=4,pe=t.current;pe!==null;){var i=pe,s=i.child;if(pe.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aGt()-cx?Ga(t,0):lx|=n),Cr(t,e)}function kL(t,e){e===0&&(t.mode&1?(e=Up,Up<<=1,!(Up&130023424)&&(Up=4194304)):e=1);var n=or();t=Vi(t,e),t!==null&&(tp(t,e,n),Cr(t,n))}function cJ(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),kL(t,n)}function uJ(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,o=t.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(e),kL(t,n)}var EL;EL=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Er.current)wr=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return wr=!1,ZZ(t,e,n);wr=!!(t.flags&131072)}else wr=!1,Rt&&e.flags&1048576&&TI(e,Rg,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Nf(t,e),t=e.pendingProps;var o=Vc(e,Kn.current);Tc(e,n),o=nx(null,e,r,t,o,n);var i=rx();return e.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Sr(r)?(i=!0,Ag(e)):i=!1,e.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Zw(e),o.updater=Hm,e.stateNode=o,o._reactInternals=e,Ly(e,r,t,n),e=Dy(null,e,r,!0,i,n)):(e.tag=0,Rt&&i&&Vw(e),er(null,e,o,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Nf(t,e),t=e.pendingProps,o=r._init,r=o(r._payload),e.type=r,o=e.tag=hJ(r),t=Io(r,t),o){case 0:e=$y(null,e,r,t,n);break e;case 1:e=aA(null,e,r,t,n);break e;case 11:e=iA(null,e,r,t,n);break e;case 14:e=sA(null,e,r,Io(r.type,t),n);break e}throw Error(ne(306,r,""))}return e;case 0:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Io(r,o),$y(t,e,r,o,n);case 1:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Io(r,o),aA(t,e,r,o,n);case 3:e:{if(sL(e),t===null)throw Error(ne(387));r=e.pendingProps,i=e.memoizedState,o=i.element,MI(t,e),Ig(e,r,null,n);var s=e.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){o=Yc(Error(ne(423)),e),e=lA(t,e,r,n,o);break e}else if(r!==o){o=Yc(Error(ne(424)),e),e=lA(t,e,r,n,o);break e}else for(jr=Ns(e.stateNode.containerInfo.firstChild),Kr=e,Rt=!0,$o=null,n=NI(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(jc(),r===o){e=ji(t,e,n);break e}er(t,e,r,n)}e=e.child}return e;case 5:return $I(e),t===null&&My(e),r=e.type,o=e.pendingProps,i=t!==null?t.memoizedProps:null,s=o.children,Cy(r,o)?s=null:i!==null&&Cy(r,i)&&(e.flags|=32),iL(t,e),er(t,e,s,n),e.child;case 6:return t===null&&My(e),null;case 13:return aL(t,e,n);case 4:return Jw(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Gc(e,null,r,n):er(t,e,r,n),e.child;case 11:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Io(r,o),iA(t,e,r,o,n);case 7:return er(t,e,e.pendingProps,n),e.child;case 8:return er(t,e,e.pendingProps.children,n),e.child;case 12:return er(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,o=e.pendingProps,i=e.memoizedProps,s=o.value,xt(Mg,r._currentValue),r._currentValue=s,i!==null)if(Vo(i.value,s)){if(i.children===o.children&&!Er.current){e=ji(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Fi(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Oy(i.return,n,e),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===e.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(ne(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Oy(s,n,e),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}er(t,e,o.children,n),e=e.child}return e;case 9:return o=e.type,r=e.pendingProps.children,Tc(e,n),o=yo(o),r=r(o),e.flags|=1,er(t,e,r,n),e.child;case 14:return r=e.type,o=Io(r,e.pendingProps),o=Io(r.type,o),sA(t,e,r,o,n);case 15:return rL(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Io(r,o),Nf(t,e),e.tag=1,Sr(r)?(t=!0,Ag(e)):t=!1,Tc(e,n),II(e,r,o),Ly(e,r,o,n),Dy(null,e,r,!0,t,n);case 19:return lL(t,e,n);case 22:return oL(t,e,n)}throw Error(ne(156,e.tag))};function SL(t,e){return qO(t,e)}function dJ(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ho(t,e,n,r){return new dJ(t,e,n,r)}function px(t){return t=t.prototype,!(!t||!t.isReactComponent)}function hJ(t){if(typeof t=="function")return px(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Iw)return 11;if(t===Lw)return 14}return 2}function zs(t,e){var n=t.alternate;return n===null?(n=ho(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Pf(t,e,n,r,o,i){var s=2;if(r=t,typeof t=="function")px(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case ic:return Ka(n.children,o,i,e);case Ow:s=8,o|=8;break;case ry:return t=ho(12,n,e,o|2),t.elementType=ry,t.lanes=i,t;case oy:return t=ho(13,n,e,o),t.elementType=oy,t.lanes=i,t;case iy:return t=ho(19,n,e,o),t.elementType=iy,t.lanes=i,t;case LO:return jm(n,o,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case OO:s=10;break e;case IO:s=9;break e;case Iw:s=11;break e;case Lw:s=14;break e;case ms:s=16,r=null;break e}throw Error(ne(130,t==null?t:typeof t,""))}return e=ho(s,n,e,o),e.elementType=t,e.type=r,e.lanes=i,e}function Ka(t,e,n,r){return t=ho(7,t,r,e),t.lanes=n,t}function jm(t,e,n,r){return t=ho(22,t,r,e),t.elementType=LO,t.lanes=n,t.stateNode={isHidden:!1},t}function K1(t,e,n){return t=ho(6,t,null,e),t.lanes=n,t}function Y1(t,e,n){return e=ho(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function pJ(t,e,n,r,o){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_1(0),this.expirationTimes=_1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_1(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function fx(t,e,n,r,o,i,s,l,a){return t=new pJ(t,e,n,l,a),e===1?(e=1,i===!0&&(e|=8)):e=0,i=ho(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zw(i),t}function fJ(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_L)}catch(t){console.error(t)}}_L(),TO.exports=Qr;var ip=TO.exports;const ef=ko(ip);var bJ=Object.defineProperty,wJ=Object.getOwnPropertyDescriptor,xJ=(t,e,n,r)=>{for(var o=r>1?void 0:r?wJ(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&bJ(e,n,o),o},RL=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},be=(t,e,n)=>(RL(t,e,"read from private field"),n?n.call(t):e.get(t)),Pr=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},$r=(t,e,n,r)=>(RL(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),gd,kJ=class{constructor(){this.portals=new Map,Pr(this,gd,Cm()),this.on=t=>be(this,gd).on("update",t),this.once=t=>{const e=be(this,gd).on("update",n=>{e(),t(n)});return e}}update(){be(this,gd).emit("update",this.portals)}render({Component:t,container:e}){const n=this.portals.get(e);this.portals.set(e,{Component:t,key:(n==null?void 0:n.key)??Oc()}),this.update()}forceUpdate(){for(const[t,{Component:e}]of this.portals)this.portals.set(t,{Component:e,key:Oc()})}remove(t){this.portals.delete(t),this.update()}};gd=new WeakMap;var EJ=t=>{const{portals:e}=t;return ee.createElement(ee.Fragment,null,e.map(([n,{Component:r,key:o}])=>ip.createPortal(ee.createElement(r,null),n,o)))};function SJ(t){const[e,n]=D.useState(()=>Array.from(t.portals.entries()));return D.useEffect(()=>(n(Array.from(t.portals.entries())),t.on(r=>{n(Array.from(r.entries()))})),[t]),D.useMemo(()=>e,[e])}var Nt,md,Sa,vd,zf,yd,Ql,bd,Ff,Ci,Qn,Yy,ML=class{constructor({getPosition:t,node:e,portalContainer:n,view:r,ReactComponent:o,options:i}){Pr(this,Nt,void 0),Pr(this,md,[]),Pr(this,Sa,void 0),Pr(this,vd,void 0),Pr(this,zf,void 0),Pr(this,yd,void 0),Pr(this,Ql,void 0),Pr(this,bd,!1),Pr(this,Ff,void 0),Pr(this,Ci,void 0),Pr(this,Qn,void 0),Pr(this,Yy,a=>{a&&(we(be(this,Ci),{code:re.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${be(this,Nt).type.name}' which doesn't support content.`}),a.append(be(this,Ci)))}),this.Component=()=>{const a=be(this,zf);return we(a,{code:re.REACT_NODE_VIEW,message:`The custom react node view provided for ${be(this,Nt).type.name} doesn't have a valid ReactComponent`}),ee.createElement(a,{updateAttributes:this.updateAttributes,selected:this.selected,view:be(this,Sa),getPosition:be(this,yd),node:be(this,Nt),forwardRef:be(this,Yy),decorations:be(this,md)})},this.updateAttributes=a=>{if(!be(this,Sa).editable)return;const u=be(this,yd).call(this);if(u==null)return;const c=be(this,Sa).state.tr.setNodeMarkup(u,void 0,{...be(this,Nt).attrs,...a});be(this,Sa).dispatch(c)},we(Qe(t),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),$r(this,Nt,e),$r(this,Sa,r),$r(this,vd,n),$r(this,zf,o),$r(this,yd,t),$r(this,Ql,i),$r(this,Qn,this.createDom());const{contentDOM:s,wrapper:l}=this.createContentDom()??{};$r(this,Ff,s??void 0),$r(this,Ci,l),be(this,Ci)&&be(this,Qn).append(be(this,Ci)),this.setDomAttributes(be(this,Nt),be(this,Qn)),this.Component.displayName=TR(`${be(this,Nt).type.name}NodeView`),this.renderComponent()}static create(t){const{portalContainer:e,ReactComponent:n,options:r}=t;return(o,i,s)=>new ML({options:r,node:o,view:i,getPosition:s,portalContainer:e,ReactComponent:n})}get selected(){return be(this,bd)}get contentDOM(){return be(this,Ff)}get dom(){return be(this,Qn)}renderComponent(){be(this,vd).render({Component:this.Component,container:be(this,Qn)})}createDom(){const{defaultBlockNode:t,defaultInlineNode:e}=be(this,Ql),n=be(this,Nt).isInline?document.createElement(e):document.createElement(t);return n.classList.add(`${yS(be(this,Nt).type.name)}-node-view-wrapper`),n}createContentDom(){var t,e;if(be(this,Nt).isLeaf)return;const n=(e=(t=be(this,Nt).type.spec).toDOM)==null?void 0:e.call(t,be(this,Nt));if(!n)return;const{contentDOM:r,dom:o}=Vr.renderSpec(document,n);let i;if(Vt(o))return i=o,o===r&&(i=document.createElement("span"),i.classList.add(`${yS(be(this,Nt).type.name)}-node-view-content-wrapper`),i.append(r)),Vt(r),{wrapper:i,contentDOM:r}}update(t,e){return bm({types:be(this,Nt).type,node:t})?(be(this,Nt)===t&&be(this,md)===e||(be(this,Nt).sameMarkup(t)||this.setDomAttributes(t,be(this,Qn)),$r(this,Nt,t),$r(this,md,e),this.renderComponent()),!0):!1}setDomAttributes(t,e){const{toDOM:n}=be(this,Nt).type.spec;let r=t.attrs;if(n){const o=n(t);if(Ee(o)||CJ(o))return;Qs(o[1])&&(r=o[1])}for(const[o,i]of an(r))e.setAttribute(o,i)}selectNode(){$r(this,bd,!0),be(this,Qn)&&be(this,Qn).classList.add(fS),this.renderComponent()}deselectNode(){$r(this,bd,!1),be(this,Qn)&&be(this,Qn).classList.remove(fS),this.renderComponent()}destroy(){be(this,vd).remove(be(this,Qn))}ignoreMutation(t){return t.type==="selection"?!be(this,Nt).type.spec.selectable:be(this,Ci)?!be(this,Ci).contains(t.target):!0}stopEvent(t){var e;if(!be(this,Qn))return!1;if(Qe(be(this,Ql).stopEvent))return be(this,Ql).stopEvent({event:t});const n=t.target;if(!(be(this,Qn).contains(n)&&!((e=this.contentDOM)!=null&&e.contains(n))))return!1;const o=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o)return!0;const s=!!be(this,Nt).type.spec.draggable,l=Oe.isSelectable(be(this,Nt)),a=t.type==="copy",u=t.type==="paste",c=t.type==="cut",d=t.type==="mousedown",h=t.type.startsWith("drag");return!s&&l&&h&&t.preventDefault(),!(h||o||a||u||c||d&&l)}},wA=ML;Nt=new WeakMap;md=new WeakMap;Sa=new WeakMap;vd=new WeakMap;zf=new WeakMap;yd=new WeakMap;Ql=new WeakMap;bd=new WeakMap;Ff=new WeakMap;Ci=new WeakMap;Qn=new WeakMap;Yy=new WeakMap;function CJ(t){return B0(t)||Qs(t)&&B0(t.dom)}var bh=class extends ft{constructor(){super(...arguments),this.portalContainer=new kJ}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){const t=ye(),e=this.store.managerSettings.nodeViewComponents??{};for(const r of this.store.extensions)!r.ReactComponent||!Zh(r)||r.reactComponentEnvironment==="ssr"||(t[r.name]=wA.create({options:this.options,ReactComponent:r.ReactComponent,portalContainer:this.portalContainer}));const n=an({...this.options.nodeViewComponents,...e});for(const[r,o]of n)t[r]=wA.create({options:this.options,ReactComponent:o,portalContainer:this.portalContainer});return t}};bh=xJ([Ne({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],bh);var TJ=Object.defineProperty,AJ=Object.getOwnPropertyDescriptor,_J=(t,e,n,r)=>{for(var o=r>1?void 0:r?AJ(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&TJ(e,n,o),o},RJ={...nl.defaultOptions,...bh.defaultOptions},MJ=[...nl.staticKeys,...bh.staticKeys],wh=class extends ft{get name(){return"react"}onSetOptions(t){const{pickChanged:e}=t;this.getExtension(nl).setOptions(e(["placeholder"]))}createExtensions(){const{emptyNodeClass:t,placeholder:e,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s}=this.options;return[new nl({emptyNodeClass:t,placeholder:e,priority:ot.Low}),new bh({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s})]}};wh=_J([Ne({defaultOptions:RJ,staticKeys:MJ})],wh);var OL={};Object.defineProperty(OL,"__esModule",{value:!0});function OJ(){for(var t=[],e=0;e{if(!e.has(t))throw TypeError("Cannot "+n)},X1=(t,e,n)=>(IL(t,e,"read from private field"),n?n.call(t):e.get(t)),IJ=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},LJ=(t,e,n,r)=>(IL(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function NJ(){const[,t]=D.useState(ye());return D.useCallback(()=>{t(ye())},[])}var LL=D.createContext(null);function to(t){const e=D.useContext(LL),n=D.useRef(NJ());we(e,{code:re.REACT_PROVIDER_CONTEXT});const{addHandler:r}=e;return D.useEffect(()=>{let o=t;if(o){if(Qs(o)){const{autoUpdate:i}=o;o=i?()=>n.current():void 0}if(Qe(o))return r("updated",o)}},[r,t]),e}function hr(t=!0){return to({autoUpdate:t}).active}function $J(t=!1){return to(t?{autoUpdate:!0}:void 0).attrs}function vu(){return to().chain.new()}function un(){return to().commands}function qm(){return to({autoUpdate:!0}).getState().selection}function sp(t,e=void 0,n){const{getExtension:r}=to(),o=D.useMemo(()=>r(t),[t,r]);let i;if(Qe(e)?i=n?[o,...n]:[o,e]:i=e?[o,...Object.values(e)]:[],D.useEffect(()=>{Qe(e)||!e||o.setOptions(e)},i),D.useEffect(()=>{if(Qe(e))return e({addHandler:o.addHandler.bind(o),addCustomHandler:o.addCustomHandler.bind(o),extension:o})},i),!e)return o}function DJ(t,e,n){const r=D.useCallback(({addHandler:o})=>o(e,n),[n,e]);return sp(t,r)}function PJ(){return to({autoUpdate:!0}).getState()}function ap(t=!1){return to(t?{autoUpdate:!0}:void 0).helpers}var[zJ,FJ]=pj(({props:t})=>{const e=t.locale??"en",n=t.i18n??Lm,r=t.supportedLocales??[e],o=n._.bind(n);return{locale:e,i18n:n,supportedLocales:r,t:o}});function SA(t,e={}){const{core:n,react:r,...o}=e;return MH(t)?t:RH.create(()=>[...$R(t),new wh(r),...uq(n)],o)}function BJ(t,e={}){const n=D.useRef(t),r=D.useRef(e),[o,i]=D.useState(()=>SA(t,e));return n.current=t,r.current=e,D.useEffect(()=>o.addHandler("destroy",()=>{i(()=>SA(n.current,r.current))}),[o]),o}var HJ=typeof nr=="object"&&nr.__esModule&&nr.default?nr.default:nr,ec,UJ=class extends SH{constructor(t){if(super(t),IJ(this,ec,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,n)=>{this.rootPropsConfig.called=!0;const{refKey:r="ref",ref:o,...i}=e??ye();return{[r]:HJ(o,this.onRef),key:this.uid,...i,children:n}},this.onRef=e=>{e&&(this.rootPropsConfig.count+=1,we(this.rootPropsConfig.count<=1,{code:re.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),LJ(this,ec,e),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(nl).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(t){return super.update(t),this}createView(t){return new $z(null,{state:t,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:t,...e}){const{triggerChange:n=!0,tr:r,transactions:o}=e;if(this.props.state){const{onChange:i}=this.props;we(i,{code:re.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),we(n,{code:re.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:t,tr:r,transactions:o});return}!r&&!o&&(t=t.apply(t.tr.setMeta(gS,{}))),this.view.updateState(t),n&&(o==null?void 0:o.length)!==0&&this.onChange({state:t,tr:r,transactions:o}),this.manager.onStateUpdate({previousState:this.previousState,state:t,tr:r,transactions:o})}updateControlledState(t,e){this.previousStateOverride=e,t=t.apply(t.tr.setMeta(gS,{})),this.view.updateState(t),this.manager.onStateUpdate({previousState:this.previousState,state:t}),this.previousStateOverride=void 0}addProsemirrorViewToDom(t,e){this.props.insertPosition==="start"?t.insertBefore(e,t.firstChild):t.append(e)}onRefLoad(){we(X1(this,ec),{code:re.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:t}=this.props;this.addProsemirrorViewToDom(X1(this,ec),this.view.dom),t&&this.focus(t),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&X1(this,ec)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};ec=new WeakMap;var NL=typeof document<"u"?D.useLayoutEffect:D.useEffect;function WJ(t){const e=D.useRef();return NL(()=>{e.current=t}),e.current}function VJ(t){const{manager:e,state:n}=t,{placeholder:r,editable:o}=t;D.useRef(!0).current&&!Bs(r)&&e.getExtension(wh).setOptions({placeholder:r}),D.useEffect(()=>{r!=null&&e.getExtension(wh).setOptions({placeholder:r})},[r,e]);const[s]=D.useState(()=>{if(n)return n;const a=e.createEmptyDoc(),[u,c]=Pt(t.initialContent)?t.initialContent:[t.initialContent??a];return e.createState({content:u,selection:c})}),l=jJ({initialEditorState:s,getProps:()=>t});return D.useEffect(()=>()=>{l.destroy()},[l]),D.useEffect(()=>{l.onUpdate()},[o,l]),GJ(l),l.frameworkOutput}function jJ(t){const e=D.useRef(t);e.current=t;const n=D.useMemo(()=>new UJ(e.current),[]);return n.update(t),n}function GJ(t){const{state:e}=t.props,n=D.useRef(!!e),r=WJ(e);NL(()=>{const o=e?n.current===!0:n.current===!1;we(o,{code:re.REACT_CONTROLLED,message:n.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!e||e===r)&&t.updateControlledState(e,r??void 0)},[e,r,t])}function KJ(t={}){const{content:e,document:n,selection:r,extensions:o,...i}=t,s=BJ(o??(()=>[]),i),[l,a]=D.useState(()=>s.createState({selection:r,content:e??s.createEmptyDoc()})),u=D.useCallback(({state:d})=>{a(d)},[]),c=D.useCallback(()=>s.output,[s]);return D.useMemo(()=>({state:l,setState:a,manager:s,onChange:u,getContext:c}),[c,s,u,l])}var CA={doc:!1,selection:!1,storedMark:!1};function YJ(){const[t,e]=D.useState(CA);return DJ(ug,"applyState",D.useCallback(({tr:n})=>{const r={...CA};n.docChanged&&(r.doc=!0),n.selectionSet&&(r.selection=!0),n.storedMarksSet&&(r.storedMark=!0),e(r)},[])),t}var Xy=()=>ee.createElement("div",{className:XW.EDITOR_WRAPPER,...to().getRootProps()}),XJ=t=>(t.hook(),null);function qJ(t){const{children:e,autoRender:n,i18n:r,locale:o,supportedLocales:i,hooks:s=[],...l}=t,a=VJ(l),u=SJ(a.portalContainer),c=n==="start"||n===!0||!e&&Bs(n),d=n==="end";return ee.createElement(zJ,{i18n:r,locale:o,supportedLocales:i},ee.createElement(LL.Provider,{value:a},ee.createElement(EJ,{portals:u}),s.map((h,p)=>ee.createElement(XJ,{hook:h,key:p})),c&&ee.createElement(Xy,null),e,d&&ee.createElement(Xy,null)))}const ZJ={black:"#000",white:"#fff"},xh=ZJ,JJ={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Bl=JJ,QJ={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Hl=QJ,eQ={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Ul=eQ,tQ={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Wl=tQ,nQ={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Vl=nQ,rQ={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},$u=rQ,oQ={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},iQ=oQ;function K(){return K=Object.assign?Object.assign.bind():function(t){for(var e=1;e{e[n]=$L(t[n])}),e}function Yr(t,e,n={clone:!0}){const r=n.clone?K({},t):t;return Oi(t)&&Oi(e)&&Object.keys(e).forEach(o=>{o!=="__proto__"&&(Oi(e[o])&&o in t&&Oi(t[o])?r[o]=Yr(t[o],e[o],n):n.clone?r[o]=Oi(e[o])?$L(e[o]):e[o]:r[o]=e[o])}),r}var DL={exports:{}},sQ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",aQ=sQ,lQ=aQ;function PL(){}function zL(){}zL.resetWarningCache=PL;var cQ=function(){function t(r,o,i,s,l,a){if(a!==lQ){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:zL,resetWarningCache:PL};return n.PropTypes=n,n};DL.exports=cQ();var yx=DL.exports;function qc(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;nn==null?e:function(...o){e.apply(this,o),n.apply(this,o)},()=>{})}function uQ(t,e=166){let n;function r(...o){const i=()=>{t.apply(this,o)};clearTimeout(n),n=setTimeout(i,e)}return r.clear=()=>{clearTimeout(n)},r}function Tr(t){return t&&t.ownerDocument||document}function kh(t){return Tr(t).defaultView||window}function Yy(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const ll=typeof window<"u"?P.useLayoutEffect:P.useEffect;let TA=0;function dQ(t){const[e,n]=P.useState(t),r=t||e;return P.useEffect(()=>{e==null&&(TA+=1,n(`mui-${TA}`))},[e]),r}const AA=m0.useId;function hQ(t){if(AA!==void 0){const e=AA();return t??e}return dQ(t)}function pQ({controlled:t,default:e,name:n,state:r="value"}){const{current:o}=P.useRef(t!==void 0),[i,s]=P.useState(e),l=o?t:i,a=P.useCallback(u=>{o||s(u)},[]);return[l,a]}function Ba(t){const e=P.useRef(t);return ll(()=>{e.current=t}),P.useCallback((...n)=>(0,e.current)(...n),[])}function Rr(...t){return P.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{Yy(n,e)})},t)}let sv=!0,Xy=!1,_A;const fQ={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function gQ(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&fQ[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function mQ(t){t.metaKey||t.altKey||t.ctrlKey||(sv=!0)}function X1(){sv=!1}function vQ(){this.visibilityState==="hidden"&&Xy&&(sv=!0)}function yQ(t){t.addEventListener("keydown",mQ,!0),t.addEventListener("mousedown",X1,!0),t.addEventListener("pointerdown",X1,!0),t.addEventListener("touchstart",X1,!0),t.addEventListener("visibilitychange",vQ,!0)}function bQ(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return sv||gQ(e)}function FL(){const t=P.useCallback(o=>{o!=null&&yQ(o.ownerDocument)},[]),e=P.useRef(!1);function n(){return e.current?(Xy=!0,window.clearTimeout(_A),_A=window.setTimeout(()=>{Xy=!1},100),e.current=!1,!0):!1}function r(o){return bQ(o)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function BL(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}const HL=t=>{const e=P.useRef({});return P.useEffect(()=>{e.current=t}),e.current};function UL(t,e){const n=K({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=K({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=t[r]||{},i=e[r];n[r]={},!i||!Object.keys(i)?n[r]=o:!o||!Object.keys(o)?n[r]=i:(n[r]=K({},i),Object.keys(o).forEach(s=>{n[r][s]=UL(o[s],i[s])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function Pn(t,e,n=void 0){const r={};return Object.keys(t).forEach(o=>{r[o]=t[o].reduce((i,s)=>{if(s){const l=e(s);l!==""&&i.push(l),n&&n[s]&&i.push(n[s])}return i},[]).join(" ")}),r}const RA=t=>t,wQ=()=>{let t=RA;return{configure(e){t=e},generate(e){return t(e)},reset(){t=RA}}},xQ=wQ(),WL=xQ,kQ={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function xn(t,e,n="Mui"){const r=kQ[e];return r?`${n}-${r}`:`${WL.generate(t)}-${e}`}function kn(t,e,n="Mui"){const r={};return e.forEach(o=>{r[o]=xn(t,o,n)}),r}const Zc="$$material";function Pe(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i=0)&&(n[o]=t[o]);return n}function VL(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var EQ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,SQ=VL(function(t){return EQ.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function CQ(t){if(t.sheet)return t.sheet;for(var e=0;e0?Mn(yu,--Mr):0,Jc--,Zt===10&&(Jc=1,lv--),Zt}function Xr(){return Zt=Mr2||Sh(Zt)>3?"":" "}function zQ(t,e){for(;--e&&Xr()&&!(Zt<48||Zt>102||Zt>57&&Zt<65||Zt>70&&Zt<97););return lp(t,Bf()+(e<6&&ci()==32&&Xr()==32))}function Zy(t){for(;Xr();)switch(Zt){case t:return Mr;case 34:case 39:t!==34&&t!==39&&Zy(Zt);break;case 40:t===41&&Zy(t);break;case 92:Xr();break}return Mr}function FQ(t,e){for(;Xr()&&t+Zt!==57;)if(t+Zt===84&&ci()===47)break;return"/*"+lp(e,Mr-1)+"*"+av(t===47?t:Xr())}function BQ(t){for(;!Sh(ci());)Xr();return lp(t,Mr)}function HQ(t){return qL(Uf("",null,null,null,[""],t=XL(t),0,[0],t))}function Uf(t,e,n,r,o,i,s,l,a){for(var u=0,c=0,d=s,h=0,p=0,f=0,g=1,m=1,v=1,y=0,b="",w=o,k=i,x=r,S=b;m;)switch(f=y,y=Xr()){case 40:if(f!=108&&Mn(S,d-1)==58){qy(S+=Ze(Hf(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:S+=Hf(y);break;case 9:case 10:case 13:case 32:S+=PQ(f);break;case 92:S+=zQ(Bf()-1,7);continue;case 47:switch(ci()){case 42:case 47:tf(UQ(FQ(Xr(),Bf()),e,n),a);break;default:S+="/"}break;case 123*g:l[u++]=Jo(S)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+c:v==-1&&(S=Ze(S,/\f/g,"")),p>0&&Jo(S)-d&&tf(p>32?OA(S+";",r,n,d-1):OA(Ze(S," ","")+";",r,n,d-2),a);break;case 59:S+=";";default:if(tf(x=MA(S,e,n,u,c,o,l,b,w=[],k=[],d),i),y===123)if(c===0)Uf(S,e,x,x,w,i,d,l,k);else switch(h===99&&Mn(S,3)===110?100:h){case 100:case 108:case 109:case 115:Uf(t,x,x,r&&tf(MA(t,x,x,0,0,o,l,b,o,w=[],d),k),o,k,d,l,r?w:k);break;default:Uf(S,x,x,x,[""],k,0,l,k)}}u=c=p=0,g=v=1,b=S="",d=s;break;case 58:d=1+Jo(S),p=f;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&DQ()==125)continue}switch(S+=av(y),y*g){case 38:v=c>0?1:(S+="\f",-1);break;case 44:l[u++]=(Jo(S)-1)*v,v=1;break;case 64:ci()===45&&(S+=Hf(Xr())),h=ci(),c=d=Jo(b=S+=BQ(Bf())),y++;break;case 45:f===45&&Jo(S)==2&&(g=0)}}return i}function MA(t,e,n,r,o,i,s,l,a,u,c){for(var d=o-1,h=o===0?i:[""],p=kx(h),f=0,g=0,m=0;f0?h[v]+" "+y:Ze(y,/&\f/g,h[v])))&&(a[m++]=b);return cv(t,e,n,o===0?wx:l,a,u,c)}function UQ(t,e,n){return cv(t,e,n,jL,av($Q()),Eh(t,2,-2),0)}function OA(t,e,n,r){return cv(t,e,n,xx,Eh(t,0,r),Eh(t,r+1,-1),r)}function _c(t,e){for(var n="",r=kx(t),o=0;o6)switch(Mn(t,e+1)){case 109:if(Mn(t,e+4)!==45)break;case 102:return Ze(t,/(.+:)(.+)-([^]+)/,"$1"+qe+"$2-$3$1"+Hg+(Mn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~qy(t,"stretch")?ZL(Ze(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Mn(t,e+1)!==115)break;case 6444:switch(Mn(t,Jo(t)-3-(~qy(t,"!important")&&10))){case 107:return Ze(t,":",":"+qe)+t;case 101:return Ze(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+qe+(Mn(t,14)===45?"inline-":"")+"box$3$1"+qe+"$2$3$1"+Hn+"$2box$3")+t}break;case 5936:switch(Mn(t,e+11)){case 114:return qe+t+Hn+Ze(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return qe+t+Hn+Ze(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return qe+t+Hn+Ze(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return qe+t+Hn+t+t}return t}var ZQ=function(e,n,r,o){if(e.length>-1&&!e.return)switch(e.type){case xx:e.return=ZL(e.value,e.length);break;case GL:return _c([Du(e,{value:Ze(e.value,"@","@"+qe)})],o);case wx:if(e.length)return NQ(e.props,function(i){switch(LQ(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return _c([Du(e,{props:[Ze(i,/:(read-\w+)/,":"+Hg+"$1")]})],o);case"::placeholder":return _c([Du(e,{props:[Ze(i,/:(plac\w+)/,":"+qe+"input-$1")]}),Du(e,{props:[Ze(i,/:(plac\w+)/,":"+Hg+"$1")]}),Du(e,{props:[Ze(i,/:(plac\w+)/,Hn+"input-$1")]})],o)}return""})}},JQ=[ZQ],QQ=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var m=g.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var o=e.stylisPlugins||JQ,i={},s,l=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var m=g.getAttribute("data-emotion").split(" "),v=1;vn==null?e:function(...o){e.apply(this,o),n.apply(this,o)},()=>{})}function hQ(t,e=166){let n;function r(...o){const i=()=>{t.apply(this,o)};clearTimeout(n),n=setTimeout(i,e)}return r.clear=()=>{clearTimeout(n)},r}function Tr(t){return t&&t.ownerDocument||document}function kh(t){return Tr(t).defaultView||window}function qy(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const ll=typeof window<"u"?D.useLayoutEffect:D.useEffect;let AA=0;function pQ(t){const[e,n]=D.useState(t),r=t||e;return D.useEffect(()=>{e==null&&(AA+=1,n(`mui-${AA}`))},[e]),r}const _A=y0.useId;function fQ(t){if(_A!==void 0){const e=_A();return t??e}return pQ(t)}function gQ({controlled:t,default:e,name:n,state:r="value"}){const{current:o}=D.useRef(t!==void 0),[i,s]=D.useState(e),l=o?t:i,a=D.useCallback(u=>{o||s(u)},[]);return[l,a]}function Ba(t){const e=D.useRef(t);return ll(()=>{e.current=t}),D.useCallback((...n)=>(0,e.current)(...n),[])}function Rr(...t){return D.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{qy(n,e)})},t)}let av=!0,Zy=!1,RA;const mQ={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function vQ(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&mQ[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function yQ(t){t.metaKey||t.altKey||t.ctrlKey||(av=!0)}function q1(){av=!1}function bQ(){this.visibilityState==="hidden"&&Zy&&(av=!0)}function wQ(t){t.addEventListener("keydown",yQ,!0),t.addEventListener("mousedown",q1,!0),t.addEventListener("pointerdown",q1,!0),t.addEventListener("touchstart",q1,!0),t.addEventListener("visibilitychange",bQ,!0)}function xQ(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return av||vQ(e)}function BL(){const t=D.useCallback(o=>{o!=null&&wQ(o.ownerDocument)},[]),e=D.useRef(!1);function n(){return e.current?(Zy=!0,window.clearTimeout(RA),RA=window.setTimeout(()=>{Zy=!1},100),e.current=!1,!0):!1}function r(o){return xQ(o)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function HL(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}const UL=t=>{const e=D.useRef({});return D.useEffect(()=>{e.current=t}),e.current};function WL(t,e){const n=K({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=K({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=t[r]||{},i=e[r];n[r]={},!i||!Object.keys(i)?n[r]=o:!o||!Object.keys(o)?n[r]=i:(n[r]=K({},i),Object.keys(o).forEach(s=>{n[r][s]=WL(o[s],i[s])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function Pn(t,e,n=void 0){const r={};return Object.keys(t).forEach(o=>{r[o]=t[o].reduce((i,s)=>{if(s){const l=e(s);l!==""&&i.push(l),n&&n[s]&&i.push(n[s])}return i},[]).join(" ")}),r}const MA=t=>t,kQ=()=>{let t=MA;return{configure(e){t=e},generate(e){return t(e)},reset(){t=MA}}},EQ=kQ(),VL=EQ,SQ={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function xn(t,e,n="Mui"){const r=SQ[e];return r?`${n}-${r}`:`${VL.generate(t)}-${e}`}function kn(t,e,n="Mui"){const r={};return e.forEach(o=>{r[o]=xn(t,o,n)}),r}const Zc="$$material";function Pe(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i=0)&&(n[o]=t[o]);return n}function jL(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var CQ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,TQ=jL(function(t){return CQ.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function AQ(t){if(t.sheet)return t.sheet;for(var e=0;e0?Mn(yu,--Mr):0,Jc--,Zt===10&&(Jc=1,cv--),Zt}function Xr(){return Zt=Mr2||Sh(Zt)>3?"":" "}function BQ(t,e){for(;--e&&Xr()&&!(Zt<48||Zt>102||Zt>57&&Zt<65||Zt>70&&Zt<97););return lp(t,Bf()+(e<6&&ci()==32&&Xr()==32))}function Qy(t){for(;Xr();)switch(Zt){case t:return Mr;case 34:case 39:t!==34&&t!==39&&Qy(Zt);break;case 40:t===41&&Qy(t);break;case 92:Xr();break}return Mr}function HQ(t,e){for(;Xr()&&t+Zt!==57;)if(t+Zt===84&&ci()===47)break;return"/*"+lp(e,Mr-1)+"*"+lv(t===47?t:Xr())}function UQ(t){for(;!Sh(ci());)Xr();return lp(t,Mr)}function WQ(t){return ZL(Uf("",null,null,null,[""],t=qL(t),0,[0],t))}function Uf(t,e,n,r,o,i,s,l,a){for(var u=0,c=0,d=s,h=0,p=0,f=0,g=1,m=1,v=1,y=0,b="",w=o,k=i,x=r,S=b;m;)switch(f=y,y=Xr()){case 40:if(f!=108&&Mn(S,d-1)==58){Jy(S+=Ze(Hf(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:S+=Hf(y);break;case 9:case 10:case 13:case 32:S+=FQ(f);break;case 92:S+=BQ(Bf()-1,7);continue;case 47:switch(ci()){case 42:case 47:tf(VQ(HQ(Xr(),Bf()),e,n),a);break;default:S+="/"}break;case 123*g:l[u++]=Jo(S)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+c:v==-1&&(S=Ze(S,/\f/g,"")),p>0&&Jo(S)-d&&tf(p>32?IA(S+";",r,n,d-1):IA(Ze(S," ","")+";",r,n,d-2),a);break;case 59:S+=";";default:if(tf(x=OA(S,e,n,u,c,o,l,b,w=[],k=[],d),i),y===123)if(c===0)Uf(S,e,x,x,w,i,d,l,k);else switch(h===99&&Mn(S,3)===110?100:h){case 100:case 108:case 109:case 115:Uf(t,x,x,r&&tf(OA(t,x,x,0,0,o,l,b,o,w=[],d),k),o,k,d,l,r?w:k);break;default:Uf(S,x,x,x,[""],k,0,l,k)}}u=c=p=0,g=v=1,b=S="",d=s;break;case 58:d=1+Jo(S),p=f;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&zQ()==125)continue}switch(S+=lv(y),y*g){case 38:v=c>0?1:(S+="\f",-1);break;case 44:l[u++]=(Jo(S)-1)*v,v=1;break;case 64:ci()===45&&(S+=Hf(Xr())),h=ci(),c=d=Jo(b=S+=UQ(Bf())),y++;break;case 45:f===45&&Jo(S)==2&&(g=0)}}return i}function OA(t,e,n,r,o,i,s,l,a,u,c){for(var d=o-1,h=o===0?i:[""],p=Ex(h),f=0,g=0,m=0;f0?h[v]+" "+y:Ze(y,/&\f/g,h[v])))&&(a[m++]=b);return uv(t,e,n,o===0?xx:l,a,u,c)}function VQ(t,e,n){return uv(t,e,n,GL,lv(PQ()),Eh(t,2,-2),0)}function IA(t,e,n,r){return uv(t,e,n,kx,Eh(t,0,r),Eh(t,r+1,-1),r)}function _c(t,e){for(var n="",r=Ex(t),o=0;o6)switch(Mn(t,e+1)){case 109:if(Mn(t,e+4)!==45)break;case 102:return Ze(t,/(.+:)(.+)-([^]+)/,"$1"+qe+"$2-$3$1"+Hg+(Mn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Jy(t,"stretch")?JL(Ze(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Mn(t,e+1)!==115)break;case 6444:switch(Mn(t,Jo(t)-3-(~Jy(t,"!important")&&10))){case 107:return Ze(t,":",":"+qe)+t;case 101:return Ze(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+qe+(Mn(t,14)===45?"inline-":"")+"box$3$1"+qe+"$2$3$1"+Hn+"$2box$3")+t}break;case 5936:switch(Mn(t,e+11)){case 114:return qe+t+Hn+Ze(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return qe+t+Hn+Ze(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return qe+t+Hn+Ze(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return qe+t+Hn+t+t}return t}var QQ=function(e,n,r,o){if(e.length>-1&&!e.return)switch(e.type){case kx:e.return=JL(e.value,e.length);break;case KL:return _c([Du(e,{value:Ze(e.value,"@","@"+qe)})],o);case xx:if(e.length)return DQ(e.props,function(i){switch($Q(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return _c([Du(e,{props:[Ze(i,/:(read-\w+)/,":"+Hg+"$1")]})],o);case"::placeholder":return _c([Du(e,{props:[Ze(i,/:(plac\w+)/,":"+qe+"input-$1")]}),Du(e,{props:[Ze(i,/:(plac\w+)/,":"+Hg+"$1")]}),Du(e,{props:[Ze(i,/:(plac\w+)/,Hn+"input-$1")]})],o)}return""})}},eee=[QQ],tee=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var m=g.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var o=e.stylisPlugins||eee,i={},s,l=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var m=g.getAttribute("data-emotion").split(" "),v=1;v=4;++r,o-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var hee={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},pee=/[A-Z]|^ms/g,fee=/_EMO_([^_]+?)_([^]*?)_EMO_/g,rN=function(e){return e.charCodeAt(1)===45},LA=function(e){return e!=null&&typeof e!="boolean"},q1=VL(function(t){return rN(t)?t:t.replace(pee,"-$&").toLowerCase()}),NA=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(fee,function(r,o,i){return Qo={name:o,styles:i,next:Qo},o})}return hee[e]!==1&&!rN(e)&&typeof n=="number"&&n!==0?n+"px":n};function Ch(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Qo={name:n.name,styles:n.styles,next:Qo},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Qo={name:r.name,styles:r.styles,next:Qo},r=r.next;var o=n.styles+";";return o}return gee(t,e,n)}case"function":{if(t!==void 0){var i=Qo,s=n(t);return Qo=i,Ch(t,e,s)}break}}if(e==null)return n;var l=e[n];return l!==void 0?l:n}function gee(t,e,n){var r="";if(Array.isArray(n))for(var o=0;o96?wee:xee},PA=function(e,n,r){var o;if(n){var i=n.shouldForwardProp;o=e.__emotion_forwardProp&&i?function(s){return e.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&r&&(o=e.__emotion_forwardProp),o},kee=function(e){var n=e.cache,r=e.serialized,o=e.isStringTag;return nN(n,r,o),yee(function(){return uee(n,r,o)}),null},Eee=function t(e,n){var r=e.__emotion_real===e,o=r&&e.__emotion_base||e,i,s;n!==void 0&&(i=n.label,s=n.target);var l=PA(e,n,r),a=l||DA(o),u=!a("as");return function(){var c=arguments,d=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{d.push(c[0][0]);for(var h=c.length,p=1;p{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},Tee=["values","unit","step"],Aee=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>K({},n,{[r.key]:r.val}),{})};function _ee(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,o=Pe(t,Tee),i=Aee(e),s=Object.keys(i);function l(h){return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n})`}function a(h){return`@media (max-width:${(typeof e[h]=="number"?e[h]:h)-r/100}${n})`}function u(h,p){const f=s.indexOf(p);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n}) and (max-width:${(f!==-1&&typeof e[s[f]]=="number"?e[s[f]]:p)-r/100}${n})`}function c(h){return s.indexOf(h)+1`@media (min-width:${_x[t]}px)`};function Vo(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const i=r.breakpoints||zA;return e.reduce((s,l,a)=>(s[i.up(i.keys[a])]=n(e[a]),s),{})}if(typeof e=="object"){const i=r.breakpoints||zA;return Object.keys(e).reduce((s,l)=>{if(Object.keys(i.values||_x).indexOf(l)!==-1){const a=i.up(l);s[a]=n(e[l],l)}else{const a=l;s[a]=e[a]}return s},{})}return n(e)}function aN(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,o)=>{const i=t.up(o);return r[i]={},r},{}))||{}}function lN(t,e){return t.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},e)}function Oee(t,...e){const n=aN(t),r=[n,...e].reduce((o,i)=>Yr(o,i),{});return lN(Object.keys(n),r)}function Iee(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((o,i)=>{i{t[o]!=null&&(n[o]=!0)}),n}function Z1({values:t,breakpoints:e,base:n}){const r=n||Iee(t,e),o=Object.keys(r);if(o.length===0)return t;let i;return o.reduce((s,l,a)=>(Array.isArray(t)?(s[l]=t[a]!=null?t[a]:t[i],i=a):typeof t=="object"?(s[l]=t[l]!=null?t[l]:t[i],i=l):s[l]=t,s),{})}function wv(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,t);if(r!=null)return r}return e.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,t)}function Wg(t,e,n,r=n){let o;return typeof t=="function"?o=t(n):Array.isArray(t)?o=t[n]||r:o=wv(t,n)||r,e&&(o=e(o,r,t)),o}function at(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:o}=t,i=s=>{if(s[e]==null)return null;const l=s[e],a=s.theme,u=wv(a,r)||{};return Vo(s,l,d=>{let h=Wg(u,o,d);return d===h&&typeof d=="string"&&(h=Wg(u,o,`${e}${d==="default"?"":ht(d)}`,d)),n===!1?h:{[n]:h}})};return i.propTypes={},i.filterProps=[e],i}function Lee(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const Nee={m:"margin",p:"padding"},$ee={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},FA={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Dee=Lee(t=>{if(t.length>2)if(FA[t])t=FA[t];else return[t];const[e,n]=t.split(""),r=Nee[e],o=$ee[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),Rx=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Mx=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Rx,...Mx];function cp(t,e,n,r){var o;const i=(o=wv(t,e,!1))!=null?o:n;return typeof i=="number"?s=>typeof s=="string"?s:i*s:Array.isArray(i)?s=>typeof s=="string"?s:i[s]:typeof i=="function"?i:()=>{}}function Ox(t){return cp(t,"spacing",8)}function cl(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function Pee(t,e){return n=>t.reduce((r,o)=>(r[o]=cl(e,n),r),{})}function zee(t,e,n,r){if(e.indexOf(n)===-1)return null;const o=Dee(n),i=Pee(o,r),s=t[n];return Vo(t,s,i)}function cN(t,e){const n=Ox(t.theme);return Object.keys(t).map(r=>zee(t,e,r,n)).reduce(Pd,{})}function Bt(t){return cN(t,Rx)}Bt.propTypes={};Bt.filterProps=Rx;function Ht(t){return cN(t,Mx)}Ht.propTypes={};Ht.filterProps=Mx;function Fee(t=8){if(t.mui)return t;const e=Ox({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(i=>{const s=e(i);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function xv(...t){const e=t.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>e[i]?Pd(o,e[i](r)):o,{});return n.propTypes={},n.filterProps=t.reduce((r,o)=>r.concat(o.filterProps),[]),n}function ni(t){return typeof t!="number"?t:`${t}px solid`}const Bee=at({prop:"border",themeKey:"borders",transform:ni}),Hee=at({prop:"borderTop",themeKey:"borders",transform:ni}),Uee=at({prop:"borderRight",themeKey:"borders",transform:ni}),Wee=at({prop:"borderBottom",themeKey:"borders",transform:ni}),Vee=at({prop:"borderLeft",themeKey:"borders",transform:ni}),jee=at({prop:"borderColor",themeKey:"palette"}),Gee=at({prop:"borderTopColor",themeKey:"palette"}),Kee=at({prop:"borderRightColor",themeKey:"palette"}),Yee=at({prop:"borderBottomColor",themeKey:"palette"}),Xee=at({prop:"borderLeftColor",themeKey:"palette"}),kv=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=cp(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:cl(e,r)});return Vo(t,t.borderRadius,n)}return null};kv.propTypes={};kv.filterProps=["borderRadius"];xv(Bee,Hee,Uee,Wee,Vee,jee,Gee,Kee,Yee,Xee,kv);const Ev=t=>{if(t.gap!==void 0&&t.gap!==null){const e=cp(t.theme,"spacing",8),n=r=>({gap:cl(e,r)});return Vo(t,t.gap,n)}return null};Ev.propTypes={};Ev.filterProps=["gap"];const Sv=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=cp(t.theme,"spacing",8),n=r=>({columnGap:cl(e,r)});return Vo(t,t.columnGap,n)}return null};Sv.propTypes={};Sv.filterProps=["columnGap"];const Cv=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=cp(t.theme,"spacing",8),n=r=>({rowGap:cl(e,r)});return Vo(t,t.rowGap,n)}return null};Cv.propTypes={};Cv.filterProps=["rowGap"];const qee=at({prop:"gridColumn"}),Zee=at({prop:"gridRow"}),Jee=at({prop:"gridAutoFlow"}),Qee=at({prop:"gridAutoColumns"}),ete=at({prop:"gridAutoRows"}),tte=at({prop:"gridTemplateColumns"}),nte=at({prop:"gridTemplateRows"}),rte=at({prop:"gridTemplateAreas"}),ote=at({prop:"gridArea"});xv(Ev,Sv,Cv,qee,Zee,Jee,Qee,ete,tte,nte,rte,ote);function Rc(t,e){return e==="grey"?e:t}const ite=at({prop:"color",themeKey:"palette",transform:Rc}),ste=at({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Rc}),ate=at({prop:"backgroundColor",themeKey:"palette",transform:Rc});xv(ite,ste,ate);function Wr(t){return t<=1&&t!==0?`${t*100}%`:t}const lte=at({prop:"width",transform:Wr}),Ix=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,o;const i=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||_x[n];return i?((o=t.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${t.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Wr(n)}};return Vo(t,t.maxWidth,e)}return null};Ix.filterProps=["maxWidth"];const cte=at({prop:"minWidth",transform:Wr}),ute=at({prop:"height",transform:Wr}),dte=at({prop:"maxHeight",transform:Wr}),hte=at({prop:"minHeight",transform:Wr});at({prop:"size",cssProperty:"width",transform:Wr});at({prop:"size",cssProperty:"height",transform:Wr});const pte=at({prop:"boxSizing"});xv(lte,Ix,cte,ute,dte,hte,pte);const fte={border:{themeKey:"borders",transform:ni},borderTop:{themeKey:"borders",transform:ni},borderRight:{themeKey:"borders",transform:ni},borderBottom:{themeKey:"borders",transform:ni},borderLeft:{themeKey:"borders",transform:ni},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:kv},color:{themeKey:"palette",transform:Rc},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Rc},backgroundColor:{themeKey:"palette",transform:Rc},p:{style:Ht},pt:{style:Ht},pr:{style:Ht},pb:{style:Ht},pl:{style:Ht},px:{style:Ht},py:{style:Ht},padding:{style:Ht},paddingTop:{style:Ht},paddingRight:{style:Ht},paddingBottom:{style:Ht},paddingLeft:{style:Ht},paddingX:{style:Ht},paddingY:{style:Ht},paddingInline:{style:Ht},paddingInlineStart:{style:Ht},paddingInlineEnd:{style:Ht},paddingBlock:{style:Ht},paddingBlockStart:{style:Ht},paddingBlockEnd:{style:Ht},m:{style:Bt},mt:{style:Bt},mr:{style:Bt},mb:{style:Bt},ml:{style:Bt},mx:{style:Bt},my:{style:Bt},margin:{style:Bt},marginTop:{style:Bt},marginRight:{style:Bt},marginBottom:{style:Bt},marginLeft:{style:Bt},marginX:{style:Bt},marginY:{style:Bt},marginInline:{style:Bt},marginInlineStart:{style:Bt},marginInlineEnd:{style:Bt},marginBlock:{style:Bt},marginBlockStart:{style:Bt},marginBlockEnd:{style:Bt},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ev},rowGap:{style:Cv},columnGap:{style:Sv},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Wr},maxWidth:{style:Ix},minWidth:{transform:Wr},height:{transform:Wr},maxHeight:{transform:Wr},minHeight:{transform:Wr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Tv=fte;function gte(...t){const e=t.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function mte(t,e){return typeof t=="function"?t(e):t}function vte(){function t(n,r,o,i){const s={[n]:r,theme:o},l=i[n];if(!l)return{[n]:r};const{cssProperty:a=n,themeKey:u,transform:c,style:d}=l;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=wv(o,u)||{};return d?d(s):Vo(s,r,f=>{let g=Wg(h,c,f);return f===g&&typeof f=="string"&&(g=Wg(h,c,`${n}${f==="default"?"":ht(f)}`,f)),a===!1?g:{[a]:g}})}function e(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const s=(r=i.unstable_sxConfig)!=null?r:Tv;function l(a){let u=a;if(typeof a=="function")u=a(i);else if(typeof a!="object")return a;if(!u)return null;const c=aN(i.breakpoints),d=Object.keys(c);let h=c;return Object.keys(u).forEach(p=>{const f=mte(u[p],i);if(f!=null)if(typeof f=="object")if(s[p])h=Pd(h,t(p,f,i,s));else{const g=Vo({theme:i},f,m=>({[p]:m}));gte(g,f)?h[p]=e({sx:f,theme:i}):h=Pd(h,g)}else h=Pd(h,t(p,f,i,s))}),lN(d,h)}return Array.isArray(o)?o.map(l):l(o)}return e}const up=vte();up.filterProps=["sx"];const yte=["breakpoints","palette","spacing","shape"];function Av(t={},...e){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=t,s=Pe(t,yte),l=_ee(n),a=Fee(o);let u=Yr({breakpoints:l,direction:"ltr",components:{},palette:K({mode:"light"},r),spacing:a,shape:K({},Mee,i)},s);return u=e.reduce((c,d)=>Yr(c,d),u),u.unstable_sxConfig=K({},Tv,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(d){return up({sx:d,theme:this})},u}function bte(t){return Object.keys(t).length===0}function Lx(t=null){const e=P.useContext(Tx);return!e||bte(e)?t:e}const wte=Av();function Nx(t=wte){return Lx(t)}const xte=["sx"],kte=t=>{var e,n;const r={systemProps:{},otherProps:{}},o=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:Tv;return Object.keys(t).forEach(i=>{o[i]?r.systemProps[i]=t[i]:r.otherProps[i]=t[i]}),r};function $x(t){const{sx:e}=t,n=Pe(t,xte),{systemProps:r,otherProps:o}=kte(n);let i;return Array.isArray(e)?i=[r,...e]:typeof e=="function"?i=(...s)=>{const l=e(...s);return Oi(l)?K({},r,l):r}:i=K({},r,e),K({},o,{sx:i})}function uN(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;el!=="theme"&&l!=="sx"&&l!=="as"})(up);return P.forwardRef(function(a,u){const c=Nx(n),d=$x(a),{className:h,component:p="div"}=d,f=Pe(d,Ete);return V.jsx(i,K({as:p,ref:u,className:Ve(h,o?o(r):r),theme:e&&c[e]||c},f))})}const Cte=["variant"];function BA(t){return t.length===0}function dN(t){const{variant:e}=t,n=Pe(t,Cte);let r=e||"";return Object.keys(n).sort().forEach(o=>{o==="color"?r+=BA(r)?t[o]:ht(t[o]):r+=`${BA(r)?o:ht(o)}${ht(t[o].toString())}`}),r}const Tte=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Ate(t){return Object.keys(t).length===0}function _te(t){return typeof t=="string"&&t.charCodeAt(0)>96}const Rte=(t,e)=>e.components&&e.components[t]&&e.components[t].styleOverrides?e.components[t].styleOverrides:null,Vg=t=>{const e={};return t&&t.forEach(n=>{const r=dN(n.props);e[r]=n.style}),e},Mte=(t,e)=>{let n=[];return e&&e.components&&e.components[t]&&e.components[t].variants&&(n=e.components[t].variants),Vg(n)},jg=(t,e,n)=>{const{ownerState:r={}}=t,o=[];return n&&n.forEach(i=>{let s=!0;Object.keys(i.props).forEach(l=>{r[l]!==i.props[l]&&t[l]!==i.props[l]&&(s=!1)}),s&&o.push(e[dN(i.props)])}),o},Ote=(t,e,n,r)=>{var o;const i=n==null||(o=n.components)==null||(o=o[r])==null?void 0:o.variants;return jg(t,e,i)};function Wf(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const Ite=Av(),Lte=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function Vf({defaultTheme:t,theme:e,themeId:n}){return Ate(e)?t:e[n]||e}function Nte(t){return t?(e,n)=>n[t]:null}const HA=({styledArg:t,props:e,defaultTheme:n,themeId:r})=>{const o=t(K({},e,{theme:Vf(K({},e,{defaultTheme:n,themeId:r}))}));let i;if(o&&o.variants&&(i=o.variants,delete o.variants),i){const s=jg(e,Vg(i),i);return[o,...s]}return o};function hN(t={}){const{themeId:e,defaultTheme:n=Ite,rootShouldForwardProp:r=Wf,slotShouldForwardProp:o=Wf}=t,i=s=>up(K({},s,{theme:Vf(K({},s,{defaultTheme:n,themeId:e}))}));return i.__mui_systemSx=!0,(s,l={})=>{Cee(s,w=>w.filter(k=>!(k!=null&&k.__mui_systemSx)));const{name:a,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:h=Nte(Lte(u))}=l,p=Pe(l,Tte),f=c!==void 0?c:u&&u!=="Root"&&u!=="root"||!1,g=d||!1;let m,v=Wf;u==="Root"||u==="root"?v=r:u?v=o:_te(s)&&(v=void 0);const y=sN(s,K({shouldForwardProp:v,label:m},p)),b=(w,...k)=>{const x=k?k.map(O=>{if(typeof O=="function"&&O.__emotion_real!==O)return R=>HA({styledArg:O,props:R,defaultTheme:n,themeId:e});if(Oi(O)){let R=O,_;return O&&O.variants&&(_=O.variants,delete R.variants,R=T=>{let E=O;return jg(T,Vg(_),_).forEach(I=>{E=Yr(E,I)}),E}),R}return O}):[];let S=w;if(Oi(w)){let O;w&&w.variants&&(O=w.variants,delete S.variants,S=R=>{let _=w;return jg(R,Vg(O),O).forEach(E=>{_=Yr(_,E)}),_})}else typeof w=="function"&&w.__emotion_real!==w&&(S=O=>HA({styledArg:w,props:O,defaultTheme:n,themeId:e}));a&&h&&x.push(O=>{const R=Vf(K({},O,{defaultTheme:n,themeId:e})),_=Rte(a,R);if(_){const T={};return Object.entries(_).forEach(([E,M])=>{T[E]=typeof M=="function"?M(K({},O,{theme:R})):M}),h(O,T)}return null}),a&&!f&&x.push(O=>{const R=Vf(K({},O,{defaultTheme:n,themeId:e}));return Ote(O,Mte(a,R),R,a)}),g||x.push(i);const A=x.length-k.length;if(Array.isArray(w)&&A>0){const O=new Array(A).fill("");S=[...w,...O],S.raw=[...w.raw,...O]}const C=y(S,...x);return s.muiName&&(C.muiName=s.muiName),C};return y.withConfig&&(b.withConfig=y.withConfig),b}}const $te=hN();function Dte(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:UL(e.components[n].defaultProps,r)}function pN({props:t,name:e,defaultTheme:n,themeId:r}){let o=Nx(n);return r&&(o=o[r]||o),Dte({theme:o,name:e,props:t})}function Dx(t,e=0,n=1){return Math.min(Math.max(e,t),n)}function Pte(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function ul(t){if(t.type)return t;if(t.charAt(0)==="#")return ul(Pte(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(qc(9,t));let r=t.substring(e+1,t.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(qc(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}function _v(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((o,i)=>i<3?parseInt(o,10):o):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function zte(t){t=ul(t);const{values:e}=t,n=e[0],r=e[1]/100,o=e[2]/100,i=r*Math.min(o,1-o),s=(u,c=(u+n/30)%12)=>o-i*Math.max(Math.min(c-3,9-c,1),-1);let l="rgb";const a=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(l+="a",a.push(e[3])),_v({type:l,values:a})}function UA(t){t=ul(t);let e=t.type==="hsl"||t.type==="hsla"?ul(zte(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function Fte(t,e){const n=UA(t),r=UA(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function xr(t,e){return t=ul(t),e=Dx(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,_v(t)}function Bte(t,e){if(t=ul(t),e=Dx(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return _v(t)}function Hte(t,e){if(t=ul(t),e=Dx(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return _v(t)}const Ute=P.createContext(null),fN=Ute;function gN(){return P.useContext(fN)}const Wte=typeof Symbol=="function"&&Symbol.for,Vte=Wte?Symbol.for("mui.nested"):"__THEME_NESTED__";function jte(t,e){return typeof e=="function"?e(t):K({},t,e)}function Gte(t){const{children:e,theme:n}=t,r=gN(),o=P.useMemo(()=>{const i=r===null?n:jte(r,n);return i!=null&&(i[Vte]=r!==null),i},[n,r]);return V.jsx(fN.Provider,{value:o,children:e})}const WA={};function VA(t,e,n,r=!1){return P.useMemo(()=>{const o=t&&e[t]||e;if(typeof n=="function"){const i=n(o),s=t?K({},e,{[t]:i}):i;return r?()=>s:s}return t?K({},e,{[t]:n}):K({},e,n)},[t,e,n,r])}function Kte(t){const{children:e,theme:n,themeId:r}=t,o=Lx(WA),i=gN()||WA,s=VA(r,o,n),l=VA(r,i,n,!0);return V.jsx(Gte,{theme:l,children:V.jsx(Tx.Provider,{value:s,children:e})})}const Yte=["component","direction","spacing","divider","children","className","useFlexGap"],Xte=Av(),qte=$te("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Zte(t){return pN({props:t,name:"MuiStack",defaultTheme:Xte})}function Jte(t,e){const n=P.Children.toArray(t).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],ene=({ownerState:t,theme:e})=>{let n=K({display:"flex",flexDirection:"column"},Vo({theme:e},Z1({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r})));if(t.spacing){const r=Ox(e),o=Object.keys(e.breakpoints.values).reduce((a,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(a[u]=!0),a),{}),i=Z1({values:t.direction,base:o}),s=Z1({values:t.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((a,u,c)=>{if(!i[a]){const h=u>0?i[c[u-1]]:"column";i[a]=h}}),n=Yr(n,Vo({theme:e},s,(a,u)=>t.useFlexGap?{gap:cl(r,a)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Qte(u?i[u]:t.direction)}`]:cl(r,a)}}))}return n=Oee(e.breakpoints,n),n};function tne(t={}){const{createStyledComponent:e=qte,useThemeProps:n=Zte,componentName:r="MuiStack"}=t,o=()=>Pn({root:["root"]},a=>xn(r,a),{}),i=e(ene);return P.forwardRef(function(a,u){const c=n(a),d=$x(c),{component:h="div",direction:p="column",spacing:f=0,divider:g,children:m,className:v,useFlexGap:y=!1}=d,b=Pe(d,Yte),w={direction:p,spacing:f,useFlexGap:y},k=o();return V.jsx(i,K({as:h,ownerState:w,ref:u,className:Ve(k.root,v)},b,{children:g?Jte(m,g):m}))})}function nne(t,e){return K({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}const rne=["mode","contrastThreshold","tonalOffset"],jA={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:xh.white,default:xh.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},J1={text:{primary:xh.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:xh.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function GA(t,e,n,r){const o=r.light||r,i=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=Hte(t.main,o):e==="dark"&&(t.dark=Bte(t.main,i)))}function one(t="light"){return t==="dark"?{main:Ul[200],light:Ul[50],dark:Ul[400]}:{main:Ul[700],light:Ul[400],dark:Ul[800]}}function ine(t="light"){return t==="dark"?{main:Hl[200],light:Hl[50],dark:Hl[400]}:{main:Hl[500],light:Hl[300],dark:Hl[700]}}function sne(t="light"){return t==="dark"?{main:Bl[500],light:Bl[300],dark:Bl[700]}:{main:Bl[700],light:Bl[400],dark:Bl[800]}}function ane(t="light"){return t==="dark"?{main:Wl[400],light:Wl[300],dark:Wl[700]}:{main:Wl[700],light:Wl[500],dark:Wl[900]}}function lne(t="light"){return t==="dark"?{main:Vl[400],light:Vl[300],dark:Vl[700]}:{main:Vl[800],light:Vl[500],dark:Vl[900]}}function cne(t="light"){return t==="dark"?{main:$u[400],light:$u[300],dark:$u[700]}:{main:"#ed6c02",light:$u[500],dark:$u[900]}}function une(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,o=Pe(t,rne),i=t.primary||one(e),s=t.secondary||ine(e),l=t.error||sne(e),a=t.info||ane(e),u=t.success||lne(e),c=t.warning||cne(e);function d(g){return Fte(g,J1.text.primary)>=n?J1.text.primary:jA.text.primary}const h=({color:g,name:m,mainShade:v=500,lightShade:y=300,darkShade:b=700})=>{if(g=K({},g),!g.main&&g[v]&&(g.main=g[v]),!g.hasOwnProperty("main"))throw new Error(qc(11,m?` (${m})`:"",v));if(typeof g.main!="string")throw new Error(qc(12,m?` (${m})`:"",JSON.stringify(g.main)));return GA(g,"light",y,r),GA(g,"dark",b,r),g.contrastText||(g.contrastText=d(g.main)),g},p={dark:J1,light:jA};return Yr(K({common:K({},xh),mode:e,primary:h({color:i,name:"primary"}),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:l,name:"error"}),warning:h({color:c,name:"warning"}),info:h({color:a,name:"info"}),success:h({color:u,name:"success"}),grey:rQ,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r},p[e]),o)}const dne=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function hne(t){return Math.round(t*1e5)/1e5}const KA={textTransform:"uppercase"},YA='"Roboto", "Helvetica", "Arial", sans-serif';function pne(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=YA,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:a=700,htmlFontSize:u=16,allVariants:c,pxToRem:d}=n,h=Pe(n,dne),p=o/14,f=d||(v=>`${v/u*p}rem`),g=(v,y,b,w,k)=>K({fontFamily:r,fontWeight:v,fontSize:f(y),lineHeight:b},r===YA?{letterSpacing:`${hne(w/y)}em`}:{},k,c),m={h1:g(i,96,1.167,-1.5),h2:g(i,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(l,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(l,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(l,14,1.75,.4,KA),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,KA),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Yr(K({htmlFontSize:u,pxToRem:f,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:a},m),h,{clone:!1})}const fne=.2,gne=.14,mne=.12;function _t(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${fne})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${gne})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${mne})`].join(",")}const vne=["none",_t(0,2,1,-1,0,1,1,0,0,1,3,0),_t(0,3,1,-2,0,2,2,0,0,1,5,0),_t(0,3,3,-2,0,3,4,0,0,1,8,0),_t(0,2,4,-1,0,4,5,0,0,1,10,0),_t(0,3,5,-1,0,5,8,0,0,1,14,0),_t(0,3,5,-1,0,6,10,0,0,1,18,0),_t(0,4,5,-2,0,7,10,1,0,2,16,1),_t(0,5,5,-3,0,8,10,1,0,3,14,2),_t(0,5,6,-3,0,9,12,1,0,3,16,2),_t(0,6,6,-3,0,10,14,1,0,4,18,3),_t(0,6,7,-4,0,11,15,1,0,4,20,3),_t(0,7,8,-4,0,12,17,2,0,5,22,4),_t(0,7,8,-4,0,13,19,2,0,5,24,4),_t(0,7,9,-4,0,14,21,2,0,5,26,4),_t(0,8,9,-5,0,15,22,2,0,6,28,5),_t(0,8,10,-5,0,16,24,2,0,6,30,5),_t(0,8,11,-5,0,17,26,2,0,6,32,5),_t(0,9,11,-5,0,18,28,2,0,7,34,6),_t(0,9,12,-6,0,19,29,2,0,7,36,6),_t(0,10,13,-6,0,20,31,3,0,8,38,7),_t(0,10,13,-6,0,21,33,3,0,8,40,7),_t(0,10,14,-6,0,22,35,3,0,8,42,7),_t(0,11,14,-7,0,23,36,3,0,9,44,8),_t(0,11,15,-7,0,24,38,3,0,9,46,8)],yne=["duration","easing","delay"],bne={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},wne={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function XA(t){return`${Math.round(t)}ms`}function xne(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function kne(t){const e=K({},bne,t.easing),n=K({},wne,t.duration);return K({getAutoHeightDuration:xne,create:(o=["all"],i={})=>{const{duration:s=n.standard,easing:l=e.easeInOut,delay:a=0}=i;return Pe(i,yne),(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof s=="string"?s:XA(s)} ${l} ${typeof a=="string"?a:XA(a)}`).join(",")}},t,{easing:e,duration:n})}const Ene={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Sne=Ene,Cne=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Px(t={},...e){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=t,s=Pe(t,Cne);if(t.vars)throw new Error(qc(18));const l=une(r),a=Av(t);let u=Yr(a,{mixins:nne(a.breakpoints,n),palette:l,shadows:vne.slice(),typography:pne(l,i),transitions:kne(o),zIndex:K({},Sne)});return u=Yr(u,s),u=e.reduce((c,d)=>Yr(c,d),u),u.unstable_sxConfig=K({},Tv,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(d){return up({sx:d,theme:this})},u}const Tne=Px(),zx=Tne;function Rv(){const t=Nx(zx);return t[Zc]||t}function Sn({props:t,name:e}){return pN({props:t,name:e,defaultTheme:zx,themeId:Zc})}const Fx=t=>Wf(t)&&t!=="classes",Et=hN({themeId:Zc,defaultTheme:zx,rootShouldForwardProp:Fx}),Ane=["theme"];function _ne(t){let{theme:e}=t,n=Pe(t,Ane);const r=e[Zc];return V.jsx(Kte,K({},n,{themeId:r?Zc:void 0,theme:r||e}))}const qA=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)};function Jy(t,e){return Jy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Jy(t,e)}function mN(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Jy(t,e)}const ZA={disabled:!1},Gg=ee.createContext(null);var Rne=function(e){return e.scrollTop},wd="unmounted",Ca="exited",Ta="entering",tc="entered",Qy="exiting",Zi=function(t){mN(e,t);function e(r,o){var i;i=t.call(this,r,o)||this;var s=o,l=s&&!s.isMounting?r.enter:r.appear,a;return i.appearStatus=null,r.in?l?(a=Ca,i.appearStatus=Ta):a=tc:r.unmountOnExit||r.mountOnEnter?a=wd:a=Ca,i.state={status:a},i.nextCallback=null,i}e.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===wd?{status:Ca}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==Ta&&s!==tc&&(i=Ta):(s===Ta||s===tc)&&(i=Qy)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,s,l;return i=s=l=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,l=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:l}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Ta){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:ef.findDOMNode(this);s&&Rne(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ca&&this.setState({status:wd})},n.performEnter=function(o){var i=this,s=this.props.enter,l=this.context?this.context.isMounting:o,a=this.props.nodeRef?[l]:[ef.findDOMNode(this),l],u=a[0],c=a[1],d=this.getTimeouts(),h=l?d.appear:d.enter;if(!o&&!s||ZA.disabled){this.safeSetState({status:tc},function(){i.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:Ta},function(){i.props.onEntering(u,c),i.onTransitionEnd(h,function(){i.safeSetState({status:tc},function(){i.props.onEntered(u,c)})})})},n.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:ef.findDOMNode(this);if(!i||ZA.disabled){this.safeSetState({status:Ca},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Qy},function(){o.props.onExiting(l),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:Ca},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,i.nextCallback=null,o(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:ef.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=a[0],c=a[1];this.props.addEndListener(u,c)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===wd)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var l=Pe(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ee.createElement(Gg.Provider,{value:null},typeof s=="function"?s(o,l):ee.cloneElement(ee.Children.only(s),l))},e}(ee.Component);Zi.contextType=Gg;Zi.propTypes={};function jl(){}Zi.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:jl,onEntering:jl,onEntered:jl,onExit:jl,onExiting:jl,onExited:jl};Zi.UNMOUNTED=wd;Zi.EXITED=Ca;Zi.ENTERING=Ta;Zi.ENTERED=tc;Zi.EXITING=Qy;const vN=Zi;function Mne(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Bx(t,e){var n=function(i){return e&&P.isValidElement(i)?e(i):i},r=Object.create(null);return t&&P.Children.map(t,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function One(t,e){t=t||{},e=e||{};function n(c){return c in e?e[c]:t[c]}var r=Object.create(null),o=[];for(var i in t)i in e?o.length&&(r[i]=o,o=[]):o.push(i);var s,l={};for(var a in e){if(r[a])for(s=0;st.scrollTop;function Kg(t,e){var n,r;const{timeout:o,easing:i,style:s={}}=t;return{duration:(n=s.transitionDuration)!=null?n:typeof o=="number"?o:o[e.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof i=="object"?i[e.mode]:i,delay:s.transitionDelay}}function Pne(t){return xn("MuiPaper",t)}kn("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const zne=["className","component","elevation","square","variant"],Fne=t=>{const{square:e,elevation:n,variant:r,classes:o}=t,i={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return Pn(i,Pne,o)},Bne=Et("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(({theme:t,ownerState:e})=>{var n;return K({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&K({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${xr("#fff",qA(e.elevation))}, ${xr("#fff",qA(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),Hne=P.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiPaper"}),{className:o,component:i="div",elevation:s=1,square:l=!1,variant:a="elevation"}=r,u=Pe(r,zne),c=K({},r,{component:i,elevation:s,square:l,variant:a}),d=Fne(c);return V.jsx(Bne,K({as:i,ownerState:c,className:Ve(d.root,o),ref:n},u))}),Une=Hne;function Wne(t){const{className:e,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:s,in:l,onExited:a,timeout:u}=t,[c,d]=P.useState(!1),h=Ve(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},f=Ve(n.child,c&&n.childLeaving,r&&n.childPulsate);return!l&&!c&&d(!0),P.useEffect(()=>{if(!l&&a!=null){const g=setTimeout(a,u);return()=>{clearTimeout(g)}}},[a,l,u]),V.jsx("span",{className:h,style:p,children:V.jsx("span",{className:f})})}const lo=kn("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Vne=["center","classes","className"];let Mv=t=>t,JA,QA,e_,t_;const eb=550,jne=80,Gne=Ax(JA||(JA=Mv` + */var En=typeof Symbol=="function"&&Symbol.for,Sx=En?Symbol.for("react.element"):60103,Cx=En?Symbol.for("react.portal"):60106,dv=En?Symbol.for("react.fragment"):60107,hv=En?Symbol.for("react.strict_mode"):60108,pv=En?Symbol.for("react.profiler"):60114,fv=En?Symbol.for("react.provider"):60109,gv=En?Symbol.for("react.context"):60110,Tx=En?Symbol.for("react.async_mode"):60111,mv=En?Symbol.for("react.concurrent_mode"):60111,vv=En?Symbol.for("react.forward_ref"):60112,yv=En?Symbol.for("react.suspense"):60113,nee=En?Symbol.for("react.suspense_list"):60120,bv=En?Symbol.for("react.memo"):60115,wv=En?Symbol.for("react.lazy"):60116,ree=En?Symbol.for("react.block"):60121,oee=En?Symbol.for("react.fundamental"):60117,iee=En?Symbol.for("react.responder"):60118,see=En?Symbol.for("react.scope"):60119;function no(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Sx:switch(t=t.type,t){case Tx:case mv:case dv:case pv:case hv:case yv:return t;default:switch(t=t&&t.$$typeof,t){case gv:case vv:case wv:case bv:case fv:return t;default:return e}}case Cx:return e}}}function eN(t){return no(t)===mv}dt.AsyncMode=Tx;dt.ConcurrentMode=mv;dt.ContextConsumer=gv;dt.ContextProvider=fv;dt.Element=Sx;dt.ForwardRef=vv;dt.Fragment=dv;dt.Lazy=wv;dt.Memo=bv;dt.Portal=Cx;dt.Profiler=pv;dt.StrictMode=hv;dt.Suspense=yv;dt.isAsyncMode=function(t){return eN(t)||no(t)===Tx};dt.isConcurrentMode=eN;dt.isContextConsumer=function(t){return no(t)===gv};dt.isContextProvider=function(t){return no(t)===fv};dt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Sx};dt.isForwardRef=function(t){return no(t)===vv};dt.isFragment=function(t){return no(t)===dv};dt.isLazy=function(t){return no(t)===wv};dt.isMemo=function(t){return no(t)===bv};dt.isPortal=function(t){return no(t)===Cx};dt.isProfiler=function(t){return no(t)===pv};dt.isStrictMode=function(t){return no(t)===hv};dt.isSuspense=function(t){return no(t)===yv};dt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===dv||t===mv||t===pv||t===hv||t===yv||t===nee||typeof t=="object"&&t!==null&&(t.$$typeof===wv||t.$$typeof===bv||t.$$typeof===fv||t.$$typeof===gv||t.$$typeof===vv||t.$$typeof===oee||t.$$typeof===iee||t.$$typeof===see||t.$$typeof===ree)};dt.typeOf=no;QL.exports=dt;var aee=QL.exports,tN=aee,lee={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},cee={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},nN={};nN[tN.ForwardRef]=lee;nN[tN.Memo]=cee;var uee=!0;function dee(t,e,n){var r="";return n.split(" ").forEach(function(o){t[o]!==void 0?e.push(t[o]+";"):r+=o+" "}),r}var rN=function(e,n,r){var o=e.key+"-"+n.name;(r===!1||uee===!1)&&e.registered[o]===void 0&&(e.registered[o]=n.styles)},hee=function(e,n,r){rN(e,n,r);var o=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var i=n;do e.insert(n===i?"."+o:"",i,e.sheet,!0),i=i.next;while(i!==void 0)}};function pee(t){for(var e=0,n,r=0,o=t.length;o>=4;++r,o-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var fee={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},gee=/[A-Z]|^ms/g,mee=/_EMO_([^_]+?)_([^]*?)_EMO_/g,oN=function(e){return e.charCodeAt(1)===45},NA=function(e){return e!=null&&typeof e!="boolean"},Z1=jL(function(t){return oN(t)?t:t.replace(gee,"-$&").toLowerCase()}),$A=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(mee,function(r,o,i){return Qo={name:o,styles:i,next:Qo},o})}return fee[e]!==1&&!oN(e)&&typeof n=="number"&&n!==0?n+"px":n};function Ch(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Qo={name:n.name,styles:n.styles,next:Qo},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Qo={name:r.name,styles:r.styles,next:Qo},r=r.next;var o=n.styles+";";return o}return vee(t,e,n)}case"function":{if(t!==void 0){var i=Qo,s=n(t);return Qo=i,Ch(t,e,s)}break}}if(e==null)return n;var l=e[n];return l!==void 0?l:n}function vee(t,e,n){var r="";if(Array.isArray(n))for(var o=0;o96?kee:Eee},zA=function(e,n,r){var o;if(n){var i=n.shouldForwardProp;o=e.__emotion_forwardProp&&i?function(s){return e.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&r&&(o=e.__emotion_forwardProp),o},See=function(e){var n=e.cache,r=e.serialized,o=e.isStringTag;return rN(n,r,o),wee(function(){return hee(n,r,o)}),null},Cee=function t(e,n){var r=e.__emotion_real===e,o=r&&e.__emotion_base||e,i,s;n!==void 0&&(i=n.label,s=n.target);var l=zA(e,n,r),a=l||PA(o),u=!a("as");return function(){var c=arguments,d=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{d.push(c[0][0]);for(var h=c.length,p=1;p{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},_ee=["values","unit","step"],Ree=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>K({},n,{[r.key]:r.val}),{})};function Mee(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,o=Pe(t,_ee),i=Ree(e),s=Object.keys(i);function l(h){return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n})`}function a(h){return`@media (max-width:${(typeof e[h]=="number"?e[h]:h)-r/100}${n})`}function u(h,p){const f=s.indexOf(p);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n}) and (max-width:${(f!==-1&&typeof e[s[f]]=="number"?e[s[f]]:p)-r/100}${n})`}function c(h){return s.indexOf(h)+1`@media (min-width:${Rx[t]}px)`};function jo(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const i=r.breakpoints||FA;return e.reduce((s,l,a)=>(s[i.up(i.keys[a])]=n(e[a]),s),{})}if(typeof e=="object"){const i=r.breakpoints||FA;return Object.keys(e).reduce((s,l)=>{if(Object.keys(i.values||Rx).indexOf(l)!==-1){const a=i.up(l);s[a]=n(e[l],l)}else{const a=l;s[a]=e[a]}return s},{})}return n(e)}function lN(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,o)=>{const i=t.up(o);return r[i]={},r},{}))||{}}function cN(t,e){return t.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},e)}function Lee(t,...e){const n=lN(t),r=[n,...e].reduce((o,i)=>Yr(o,i),{});return cN(Object.keys(n),r)}function Nee(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((o,i)=>{i{t[o]!=null&&(n[o]=!0)}),n}function J1({values:t,breakpoints:e,base:n}){const r=n||Nee(t,e),o=Object.keys(r);if(o.length===0)return t;let i;return o.reduce((s,l,a)=>(Array.isArray(t)?(s[l]=t[a]!=null?t[a]:t[i],i=a):typeof t=="object"?(s[l]=t[l]!=null?t[l]:t[i],i=l):s[l]=t,s),{})}function xv(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,t);if(r!=null)return r}return e.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,t)}function Wg(t,e,n,r=n){let o;return typeof t=="function"?o=t(n):Array.isArray(t)?o=t[n]||r:o=xv(t,n)||r,e&&(o=e(o,r,t)),o}function at(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:o}=t,i=s=>{if(s[e]==null)return null;const l=s[e],a=s.theme,u=xv(a,r)||{};return jo(s,l,d=>{let h=Wg(u,o,d);return d===h&&typeof d=="string"&&(h=Wg(u,o,`${e}${d==="default"?"":ht(d)}`,d)),n===!1?h:{[n]:h}})};return i.propTypes={},i.filterProps=[e],i}function $ee(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const Dee={m:"margin",p:"padding"},Pee={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},BA={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},zee=$ee(t=>{if(t.length>2)if(BA[t])t=BA[t];else return[t];const[e,n]=t.split(""),r=Dee[e],o=Pee[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),Mx=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ox=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Mx,...Ox];function cp(t,e,n,r){var o;const i=(o=xv(t,e,!1))!=null?o:n;return typeof i=="number"?s=>typeof s=="string"?s:i*s:Array.isArray(i)?s=>typeof s=="string"?s:i[s]:typeof i=="function"?i:()=>{}}function Ix(t){return cp(t,"spacing",8)}function cl(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function Fee(t,e){return n=>t.reduce((r,o)=>(r[o]=cl(e,n),r),{})}function Bee(t,e,n,r){if(e.indexOf(n)===-1)return null;const o=zee(n),i=Fee(o,r),s=t[n];return jo(t,s,i)}function uN(t,e){const n=Ix(t.theme);return Object.keys(t).map(r=>Bee(t,e,r,n)).reduce(Pd,{})}function Bt(t){return uN(t,Mx)}Bt.propTypes={};Bt.filterProps=Mx;function Ht(t){return uN(t,Ox)}Ht.propTypes={};Ht.filterProps=Ox;function Hee(t=8){if(t.mui)return t;const e=Ix({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(i=>{const s=e(i);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function kv(...t){const e=t.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>e[i]?Pd(o,e[i](r)):o,{});return n.propTypes={},n.filterProps=t.reduce((r,o)=>r.concat(o.filterProps),[]),n}function ni(t){return typeof t!="number"?t:`${t}px solid`}const Uee=at({prop:"border",themeKey:"borders",transform:ni}),Wee=at({prop:"borderTop",themeKey:"borders",transform:ni}),Vee=at({prop:"borderRight",themeKey:"borders",transform:ni}),jee=at({prop:"borderBottom",themeKey:"borders",transform:ni}),Gee=at({prop:"borderLeft",themeKey:"borders",transform:ni}),Kee=at({prop:"borderColor",themeKey:"palette"}),Yee=at({prop:"borderTopColor",themeKey:"palette"}),Xee=at({prop:"borderRightColor",themeKey:"palette"}),qee=at({prop:"borderBottomColor",themeKey:"palette"}),Zee=at({prop:"borderLeftColor",themeKey:"palette"}),Ev=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=cp(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:cl(e,r)});return jo(t,t.borderRadius,n)}return null};Ev.propTypes={};Ev.filterProps=["borderRadius"];kv(Uee,Wee,Vee,jee,Gee,Kee,Yee,Xee,qee,Zee,Ev);const Sv=t=>{if(t.gap!==void 0&&t.gap!==null){const e=cp(t.theme,"spacing",8),n=r=>({gap:cl(e,r)});return jo(t,t.gap,n)}return null};Sv.propTypes={};Sv.filterProps=["gap"];const Cv=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=cp(t.theme,"spacing",8),n=r=>({columnGap:cl(e,r)});return jo(t,t.columnGap,n)}return null};Cv.propTypes={};Cv.filterProps=["columnGap"];const Tv=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=cp(t.theme,"spacing",8),n=r=>({rowGap:cl(e,r)});return jo(t,t.rowGap,n)}return null};Tv.propTypes={};Tv.filterProps=["rowGap"];const Jee=at({prop:"gridColumn"}),Qee=at({prop:"gridRow"}),ete=at({prop:"gridAutoFlow"}),tte=at({prop:"gridAutoColumns"}),nte=at({prop:"gridAutoRows"}),rte=at({prop:"gridTemplateColumns"}),ote=at({prop:"gridTemplateRows"}),ite=at({prop:"gridTemplateAreas"}),ste=at({prop:"gridArea"});kv(Sv,Cv,Tv,Jee,Qee,ete,tte,nte,rte,ote,ite,ste);function Rc(t,e){return e==="grey"?e:t}const ate=at({prop:"color",themeKey:"palette",transform:Rc}),lte=at({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Rc}),cte=at({prop:"backgroundColor",themeKey:"palette",transform:Rc});kv(ate,lte,cte);function Wr(t){return t<=1&&t!==0?`${t*100}%`:t}const ute=at({prop:"width",transform:Wr}),Lx=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,o;const i=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||Rx[n];return i?((o=t.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${t.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Wr(n)}};return jo(t,t.maxWidth,e)}return null};Lx.filterProps=["maxWidth"];const dte=at({prop:"minWidth",transform:Wr}),hte=at({prop:"height",transform:Wr}),pte=at({prop:"maxHeight",transform:Wr}),fte=at({prop:"minHeight",transform:Wr});at({prop:"size",cssProperty:"width",transform:Wr});at({prop:"size",cssProperty:"height",transform:Wr});const gte=at({prop:"boxSizing"});kv(ute,Lx,dte,hte,pte,fte,gte);const mte={border:{themeKey:"borders",transform:ni},borderTop:{themeKey:"borders",transform:ni},borderRight:{themeKey:"borders",transform:ni},borderBottom:{themeKey:"borders",transform:ni},borderLeft:{themeKey:"borders",transform:ni},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ev},color:{themeKey:"palette",transform:Rc},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Rc},backgroundColor:{themeKey:"palette",transform:Rc},p:{style:Ht},pt:{style:Ht},pr:{style:Ht},pb:{style:Ht},pl:{style:Ht},px:{style:Ht},py:{style:Ht},padding:{style:Ht},paddingTop:{style:Ht},paddingRight:{style:Ht},paddingBottom:{style:Ht},paddingLeft:{style:Ht},paddingX:{style:Ht},paddingY:{style:Ht},paddingInline:{style:Ht},paddingInlineStart:{style:Ht},paddingInlineEnd:{style:Ht},paddingBlock:{style:Ht},paddingBlockStart:{style:Ht},paddingBlockEnd:{style:Ht},m:{style:Bt},mt:{style:Bt},mr:{style:Bt},mb:{style:Bt},ml:{style:Bt},mx:{style:Bt},my:{style:Bt},margin:{style:Bt},marginTop:{style:Bt},marginRight:{style:Bt},marginBottom:{style:Bt},marginLeft:{style:Bt},marginX:{style:Bt},marginY:{style:Bt},marginInline:{style:Bt},marginInlineStart:{style:Bt},marginInlineEnd:{style:Bt},marginBlock:{style:Bt},marginBlockStart:{style:Bt},marginBlockEnd:{style:Bt},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Sv},rowGap:{style:Tv},columnGap:{style:Cv},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Wr},maxWidth:{style:Lx},minWidth:{transform:Wr},height:{transform:Wr},maxHeight:{transform:Wr},minHeight:{transform:Wr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Av=mte;function vte(...t){const e=t.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function yte(t,e){return typeof t=="function"?t(e):t}function bte(){function t(n,r,o,i){const s={[n]:r,theme:o},l=i[n];if(!l)return{[n]:r};const{cssProperty:a=n,themeKey:u,transform:c,style:d}=l;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=xv(o,u)||{};return d?d(s):jo(s,r,f=>{let g=Wg(h,c,f);return f===g&&typeof f=="string"&&(g=Wg(h,c,`${n}${f==="default"?"":ht(f)}`,f)),a===!1?g:{[a]:g}})}function e(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const s=(r=i.unstable_sxConfig)!=null?r:Av;function l(a){let u=a;if(typeof a=="function")u=a(i);else if(typeof a!="object")return a;if(!u)return null;const c=lN(i.breakpoints),d=Object.keys(c);let h=c;return Object.keys(u).forEach(p=>{const f=yte(u[p],i);if(f!=null)if(typeof f=="object")if(s[p])h=Pd(h,t(p,f,i,s));else{const g=jo({theme:i},f,m=>({[p]:m}));vte(g,f)?h[p]=e({sx:f,theme:i}):h=Pd(h,g)}else h=Pd(h,t(p,f,i,s))}),cN(d,h)}return Array.isArray(o)?o.map(l):l(o)}return e}const up=bte();up.filterProps=["sx"];const wte=["breakpoints","palette","spacing","shape"];function _v(t={},...e){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=t,s=Pe(t,wte),l=Mee(n),a=Hee(o);let u=Yr({breakpoints:l,direction:"ltr",components:{},palette:K({mode:"light"},r),spacing:a,shape:K({},Iee,i)},s);return u=e.reduce((c,d)=>Yr(c,d),u),u.unstable_sxConfig=K({},Av,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(d){return up({sx:d,theme:this})},u}function xte(t){return Object.keys(t).length===0}function Nx(t=null){const e=D.useContext(Ax);return!e||xte(e)?t:e}const kte=_v();function $x(t=kte){return Nx(t)}const Ete=["sx"],Ste=t=>{var e,n;const r={systemProps:{},otherProps:{}},o=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:Av;return Object.keys(t).forEach(i=>{o[i]?r.systemProps[i]=t[i]:r.otherProps[i]=t[i]}),r};function Dx(t){const{sx:e}=t,n=Pe(t,Ete),{systemProps:r,otherProps:o}=Ste(n);let i;return Array.isArray(e)?i=[r,...e]:typeof e=="function"?i=(...s)=>{const l=e(...s);return Oi(l)?K({},r,l):r}:i=K({},r,e),K({},o,{sx:i})}function dN(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;el!=="theme"&&l!=="sx"&&l!=="as"})(up);return D.forwardRef(function(a,u){const c=$x(n),d=Dx(a),{className:h,component:p="div"}=d,f=Pe(d,Cte);return V.jsx(i,K({as:p,ref:u,className:Ve(h,o?o(r):r),theme:e&&c[e]||c},f))})}const Ate=["variant"];function HA(t){return t.length===0}function hN(t){const{variant:e}=t,n=Pe(t,Ate);let r=e||"";return Object.keys(n).sort().forEach(o=>{o==="color"?r+=HA(r)?t[o]:ht(t[o]):r+=`${HA(r)?o:ht(o)}${ht(t[o].toString())}`}),r}const _te=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Rte(t){return Object.keys(t).length===0}function Mte(t){return typeof t=="string"&&t.charCodeAt(0)>96}const Ote=(t,e)=>e.components&&e.components[t]&&e.components[t].styleOverrides?e.components[t].styleOverrides:null,Vg=t=>{const e={};return t&&t.forEach(n=>{const r=hN(n.props);e[r]=n.style}),e},Ite=(t,e)=>{let n=[];return e&&e.components&&e.components[t]&&e.components[t].variants&&(n=e.components[t].variants),Vg(n)},jg=(t,e,n)=>{const{ownerState:r={}}=t,o=[];return n&&n.forEach(i=>{let s=!0;Object.keys(i.props).forEach(l=>{r[l]!==i.props[l]&&t[l]!==i.props[l]&&(s=!1)}),s&&o.push(e[hN(i.props)])}),o},Lte=(t,e,n,r)=>{var o;const i=n==null||(o=n.components)==null||(o=o[r])==null?void 0:o.variants;return jg(t,e,i)};function Wf(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const Nte=_v(),$te=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function Vf({defaultTheme:t,theme:e,themeId:n}){return Rte(e)?t:e[n]||e}function Dte(t){return t?(e,n)=>n[t]:null}const UA=({styledArg:t,props:e,defaultTheme:n,themeId:r})=>{const o=t(K({},e,{theme:Vf(K({},e,{defaultTheme:n,themeId:r}))}));let i;if(o&&o.variants&&(i=o.variants,delete o.variants),i){const s=jg(e,Vg(i),i);return[o,...s]}return o};function pN(t={}){const{themeId:e,defaultTheme:n=Nte,rootShouldForwardProp:r=Wf,slotShouldForwardProp:o=Wf}=t,i=s=>up(K({},s,{theme:Vf(K({},s,{defaultTheme:n,themeId:e}))}));return i.__mui_systemSx=!0,(s,l={})=>{Aee(s,w=>w.filter(k=>!(k!=null&&k.__mui_systemSx)));const{name:a,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:h=Dte($te(u))}=l,p=Pe(l,_te),f=c!==void 0?c:u&&u!=="Root"&&u!=="root"||!1,g=d||!1;let m,v=Wf;u==="Root"||u==="root"?v=r:u?v=o:Mte(s)&&(v=void 0);const y=aN(s,K({shouldForwardProp:v,label:m},p)),b=(w,...k)=>{const x=k?k.map(O=>{if(typeof O=="function"&&O.__emotion_real!==O)return R=>UA({styledArg:O,props:R,defaultTheme:n,themeId:e});if(Oi(O)){let R=O,_;return O&&O.variants&&(_=O.variants,delete R.variants,R=T=>{let E=O;return jg(T,Vg(_),_).forEach(I=>{E=Yr(E,I)}),E}),R}return O}):[];let S=w;if(Oi(w)){let O;w&&w.variants&&(O=w.variants,delete S.variants,S=R=>{let _=w;return jg(R,Vg(O),O).forEach(E=>{_=Yr(_,E)}),_})}else typeof w=="function"&&w.__emotion_real!==w&&(S=O=>UA({styledArg:w,props:O,defaultTheme:n,themeId:e}));a&&h&&x.push(O=>{const R=Vf(K({},O,{defaultTheme:n,themeId:e})),_=Ote(a,R);if(_){const T={};return Object.entries(_).forEach(([E,M])=>{T[E]=typeof M=="function"?M(K({},O,{theme:R})):M}),h(O,T)}return null}),a&&!f&&x.push(O=>{const R=Vf(K({},O,{defaultTheme:n,themeId:e}));return Lte(O,Ite(a,R),R,a)}),g||x.push(i);const A=x.length-k.length;if(Array.isArray(w)&&A>0){const O=new Array(A).fill("");S=[...w,...O],S.raw=[...w.raw,...O]}const C=y(S,...x);return s.muiName&&(C.muiName=s.muiName),C};return y.withConfig&&(b.withConfig=y.withConfig),b}}const Pte=pN();function zte(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:WL(e.components[n].defaultProps,r)}function fN({props:t,name:e,defaultTheme:n,themeId:r}){let o=$x(n);return r&&(o=o[r]||o),zte({theme:o,name:e,props:t})}function Px(t,e=0,n=1){return Math.min(Math.max(e,t),n)}function Fte(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function ul(t){if(t.type)return t;if(t.charAt(0)==="#")return ul(Fte(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(qc(9,t));let r=t.substring(e+1,t.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(qc(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}function Rv(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((o,i)=>i<3?parseInt(o,10):o):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function Bte(t){t=ul(t);const{values:e}=t,n=e[0],r=e[1]/100,o=e[2]/100,i=r*Math.min(o,1-o),s=(u,c=(u+n/30)%12)=>o-i*Math.max(Math.min(c-3,9-c,1),-1);let l="rgb";const a=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(l+="a",a.push(e[3])),Rv({type:l,values:a})}function WA(t){t=ul(t);let e=t.type==="hsl"||t.type==="hsla"?ul(Bte(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function Hte(t,e){const n=WA(t),r=WA(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function xr(t,e){return t=ul(t),e=Px(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,Rv(t)}function Ute(t,e){if(t=ul(t),e=Px(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return Rv(t)}function Wte(t,e){if(t=ul(t),e=Px(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return Rv(t)}const Vte=D.createContext(null),gN=Vte;function mN(){return D.useContext(gN)}const jte=typeof Symbol=="function"&&Symbol.for,Gte=jte?Symbol.for("mui.nested"):"__THEME_NESTED__";function Kte(t,e){return typeof e=="function"?e(t):K({},t,e)}function Yte(t){const{children:e,theme:n}=t,r=mN(),o=D.useMemo(()=>{const i=r===null?n:Kte(r,n);return i!=null&&(i[Gte]=r!==null),i},[n,r]);return V.jsx(gN.Provider,{value:o,children:e})}const VA={};function jA(t,e,n,r=!1){return D.useMemo(()=>{const o=t&&e[t]||e;if(typeof n=="function"){const i=n(o),s=t?K({},e,{[t]:i}):i;return r?()=>s:s}return t?K({},e,{[t]:n}):K({},e,n)},[t,e,n,r])}function Xte(t){const{children:e,theme:n,themeId:r}=t,o=Nx(VA),i=mN()||VA,s=jA(r,o,n),l=jA(r,i,n,!0);return V.jsx(Yte,{theme:l,children:V.jsx(Ax.Provider,{value:s,children:e})})}const qte=["component","direction","spacing","divider","children","className","useFlexGap"],Zte=_v(),Jte=Pte("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Qte(t){return fN({props:t,name:"MuiStack",defaultTheme:Zte})}function ene(t,e){const n=D.Children.toArray(t).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],nne=({ownerState:t,theme:e})=>{let n=K({display:"flex",flexDirection:"column"},jo({theme:e},J1({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r})));if(t.spacing){const r=Ix(e),o=Object.keys(e.breakpoints.values).reduce((a,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(a[u]=!0),a),{}),i=J1({values:t.direction,base:o}),s=J1({values:t.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((a,u,c)=>{if(!i[a]){const h=u>0?i[c[u-1]]:"column";i[a]=h}}),n=Yr(n,jo({theme:e},s,(a,u)=>t.useFlexGap?{gap:cl(r,a)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${tne(u?i[u]:t.direction)}`]:cl(r,a)}}))}return n=Lee(e.breakpoints,n),n};function rne(t={}){const{createStyledComponent:e=Jte,useThemeProps:n=Qte,componentName:r="MuiStack"}=t,o=()=>Pn({root:["root"]},a=>xn(r,a),{}),i=e(nne);return D.forwardRef(function(a,u){const c=n(a),d=Dx(c),{component:h="div",direction:p="column",spacing:f=0,divider:g,children:m,className:v,useFlexGap:y=!1}=d,b=Pe(d,qte),w={direction:p,spacing:f,useFlexGap:y},k=o();return V.jsx(i,K({as:h,ownerState:w,ref:u,className:Ve(k.root,v)},b,{children:g?ene(m,g):m}))})}function one(t,e){return K({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}const ine=["mode","contrastThreshold","tonalOffset"],GA={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:xh.white,default:xh.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Q1={text:{primary:xh.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:xh.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function KA(t,e,n,r){const o=r.light||r,i=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=Wte(t.main,o):e==="dark"&&(t.dark=Ute(t.main,i)))}function sne(t="light"){return t==="dark"?{main:Ul[200],light:Ul[50],dark:Ul[400]}:{main:Ul[700],light:Ul[400],dark:Ul[800]}}function ane(t="light"){return t==="dark"?{main:Hl[200],light:Hl[50],dark:Hl[400]}:{main:Hl[500],light:Hl[300],dark:Hl[700]}}function lne(t="light"){return t==="dark"?{main:Bl[500],light:Bl[300],dark:Bl[700]}:{main:Bl[700],light:Bl[400],dark:Bl[800]}}function cne(t="light"){return t==="dark"?{main:Wl[400],light:Wl[300],dark:Wl[700]}:{main:Wl[700],light:Wl[500],dark:Wl[900]}}function une(t="light"){return t==="dark"?{main:Vl[400],light:Vl[300],dark:Vl[700]}:{main:Vl[800],light:Vl[500],dark:Vl[900]}}function dne(t="light"){return t==="dark"?{main:$u[400],light:$u[300],dark:$u[700]}:{main:"#ed6c02",light:$u[500],dark:$u[900]}}function hne(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,o=Pe(t,ine),i=t.primary||sne(e),s=t.secondary||ane(e),l=t.error||lne(e),a=t.info||cne(e),u=t.success||une(e),c=t.warning||dne(e);function d(g){return Hte(g,Q1.text.primary)>=n?Q1.text.primary:GA.text.primary}const h=({color:g,name:m,mainShade:v=500,lightShade:y=300,darkShade:b=700})=>{if(g=K({},g),!g.main&&g[v]&&(g.main=g[v]),!g.hasOwnProperty("main"))throw new Error(qc(11,m?` (${m})`:"",v));if(typeof g.main!="string")throw new Error(qc(12,m?` (${m})`:"",JSON.stringify(g.main)));return KA(g,"light",y,r),KA(g,"dark",b,r),g.contrastText||(g.contrastText=d(g.main)),g},p={dark:Q1,light:GA};return Yr(K({common:K({},xh),mode:e,primary:h({color:i,name:"primary"}),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:l,name:"error"}),warning:h({color:c,name:"warning"}),info:h({color:a,name:"info"}),success:h({color:u,name:"success"}),grey:iQ,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r},p[e]),o)}const pne=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function fne(t){return Math.round(t*1e5)/1e5}const YA={textTransform:"uppercase"},XA='"Roboto", "Helvetica", "Arial", sans-serif';function gne(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=XA,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:a=700,htmlFontSize:u=16,allVariants:c,pxToRem:d}=n,h=Pe(n,pne),p=o/14,f=d||(v=>`${v/u*p}rem`),g=(v,y,b,w,k)=>K({fontFamily:r,fontWeight:v,fontSize:f(y),lineHeight:b},r===XA?{letterSpacing:`${fne(w/y)}em`}:{},k,c),m={h1:g(i,96,1.167,-1.5),h2:g(i,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(l,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(l,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(l,14,1.75,.4,YA),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,YA),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Yr(K({htmlFontSize:u,pxToRem:f,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:a},m),h,{clone:!1})}const mne=.2,vne=.14,yne=.12;function _t(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${mne})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${vne})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${yne})`].join(",")}const bne=["none",_t(0,2,1,-1,0,1,1,0,0,1,3,0),_t(0,3,1,-2,0,2,2,0,0,1,5,0),_t(0,3,3,-2,0,3,4,0,0,1,8,0),_t(0,2,4,-1,0,4,5,0,0,1,10,0),_t(0,3,5,-1,0,5,8,0,0,1,14,0),_t(0,3,5,-1,0,6,10,0,0,1,18,0),_t(0,4,5,-2,0,7,10,1,0,2,16,1),_t(0,5,5,-3,0,8,10,1,0,3,14,2),_t(0,5,6,-3,0,9,12,1,0,3,16,2),_t(0,6,6,-3,0,10,14,1,0,4,18,3),_t(0,6,7,-4,0,11,15,1,0,4,20,3),_t(0,7,8,-4,0,12,17,2,0,5,22,4),_t(0,7,8,-4,0,13,19,2,0,5,24,4),_t(0,7,9,-4,0,14,21,2,0,5,26,4),_t(0,8,9,-5,0,15,22,2,0,6,28,5),_t(0,8,10,-5,0,16,24,2,0,6,30,5),_t(0,8,11,-5,0,17,26,2,0,6,32,5),_t(0,9,11,-5,0,18,28,2,0,7,34,6),_t(0,9,12,-6,0,19,29,2,0,7,36,6),_t(0,10,13,-6,0,20,31,3,0,8,38,7),_t(0,10,13,-6,0,21,33,3,0,8,40,7),_t(0,10,14,-6,0,22,35,3,0,8,42,7),_t(0,11,14,-7,0,23,36,3,0,9,44,8),_t(0,11,15,-7,0,24,38,3,0,9,46,8)],wne=["duration","easing","delay"],xne={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},kne={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function qA(t){return`${Math.round(t)}ms`}function Ene(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function Sne(t){const e=K({},xne,t.easing),n=K({},kne,t.duration);return K({getAutoHeightDuration:Ene,create:(o=["all"],i={})=>{const{duration:s=n.standard,easing:l=e.easeInOut,delay:a=0}=i;return Pe(i,wne),(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof s=="string"?s:qA(s)} ${l} ${typeof a=="string"?a:qA(a)}`).join(",")}},t,{easing:e,duration:n})}const Cne={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Tne=Cne,Ane=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function zx(t={},...e){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=t,s=Pe(t,Ane);if(t.vars)throw new Error(qc(18));const l=hne(r),a=_v(t);let u=Yr(a,{mixins:one(a.breakpoints,n),palette:l,shadows:bne.slice(),typography:gne(l,i),transitions:Sne(o),zIndex:K({},Tne)});return u=Yr(u,s),u=e.reduce((c,d)=>Yr(c,d),u),u.unstable_sxConfig=K({},Av,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(d){return up({sx:d,theme:this})},u}const _ne=zx(),Fx=_ne;function Mv(){const t=$x(Fx);return t[Zc]||t}function Sn({props:t,name:e}){return fN({props:t,name:e,defaultTheme:Fx,themeId:Zc})}const Bx=t=>Wf(t)&&t!=="classes",Et=pN({themeId:Zc,defaultTheme:Fx,rootShouldForwardProp:Bx}),Rne=["theme"];function Mne(t){let{theme:e}=t,n=Pe(t,Rne);const r=e[Zc];return V.jsx(Xte,K({},n,{themeId:r?Zc:void 0,theme:r||e}))}const ZA=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)};function eb(t,e){return eb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},eb(t,e)}function vN(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,eb(t,e)}const JA={disabled:!1},Gg=ee.createContext(null);var One=function(e){return e.scrollTop},wd="unmounted",Ca="exited",Ta="entering",tc="entered",tb="exiting",Zi=function(t){vN(e,t);function e(r,o){var i;i=t.call(this,r,o)||this;var s=o,l=s&&!s.isMounting?r.enter:r.appear,a;return i.appearStatus=null,r.in?l?(a=Ca,i.appearStatus=Ta):a=tc:r.unmountOnExit||r.mountOnEnter?a=wd:a=Ca,i.state={status:a},i.nextCallback=null,i}e.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===wd?{status:Ca}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==Ta&&s!==tc&&(i=Ta):(s===Ta||s===tc)&&(i=tb)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,s,l;return i=s=l=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,l=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:l}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Ta){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:ef.findDOMNode(this);s&&One(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ca&&this.setState({status:wd})},n.performEnter=function(o){var i=this,s=this.props.enter,l=this.context?this.context.isMounting:o,a=this.props.nodeRef?[l]:[ef.findDOMNode(this),l],u=a[0],c=a[1],d=this.getTimeouts(),h=l?d.appear:d.enter;if(!o&&!s||JA.disabled){this.safeSetState({status:tc},function(){i.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:Ta},function(){i.props.onEntering(u,c),i.onTransitionEnd(h,function(){i.safeSetState({status:tc},function(){i.props.onEntered(u,c)})})})},n.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:ef.findDOMNode(this);if(!i||JA.disabled){this.safeSetState({status:Ca},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:tb},function(){o.props.onExiting(l),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:Ca},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,i.nextCallback=null,o(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:ef.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=a[0],c=a[1];this.props.addEndListener(u,c)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===wd)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var l=Pe(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ee.createElement(Gg.Provider,{value:null},typeof s=="function"?s(o,l):ee.cloneElement(ee.Children.only(s),l))},e}(ee.Component);Zi.contextType=Gg;Zi.propTypes={};function jl(){}Zi.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:jl,onEntering:jl,onEntered:jl,onExit:jl,onExiting:jl,onExited:jl};Zi.UNMOUNTED=wd;Zi.EXITED=Ca;Zi.ENTERING=Ta;Zi.ENTERED=tc;Zi.EXITING=tb;const yN=Zi;function Ine(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hx(t,e){var n=function(i){return e&&D.isValidElement(i)?e(i):i},r=Object.create(null);return t&&D.Children.map(t,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function Lne(t,e){t=t||{},e=e||{};function n(c){return c in e?e[c]:t[c]}var r=Object.create(null),o=[];for(var i in t)i in e?o.length&&(r[i]=o,o=[]):o.push(i);var s,l={};for(var a in e){if(r[a])for(s=0;st.scrollTop;function Kg(t,e){var n,r;const{timeout:o,easing:i,style:s={}}=t;return{duration:(n=s.transitionDuration)!=null?n:typeof o=="number"?o:o[e.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof i=="object"?i[e.mode]:i,delay:s.transitionDelay}}function Fne(t){return xn("MuiPaper",t)}kn("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Bne=["className","component","elevation","square","variant"],Hne=t=>{const{square:e,elevation:n,variant:r,classes:o}=t,i={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return Pn(i,Fne,o)},Une=Et("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(({theme:t,ownerState:e})=>{var n;return K({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&K({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${xr("#fff",ZA(e.elevation))}, ${xr("#fff",ZA(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),Wne=D.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiPaper"}),{className:o,component:i="div",elevation:s=1,square:l=!1,variant:a="elevation"}=r,u=Pe(r,Bne),c=K({},r,{component:i,elevation:s,square:l,variant:a}),d=Hne(c);return V.jsx(Une,K({as:i,ownerState:c,className:Ve(d.root,o),ref:n},u))}),Vne=Wne;function jne(t){const{className:e,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:s,in:l,onExited:a,timeout:u}=t,[c,d]=D.useState(!1),h=Ve(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},f=Ve(n.child,c&&n.childLeaving,r&&n.childPulsate);return!l&&!c&&d(!0),D.useEffect(()=>{if(!l&&a!=null){const g=setTimeout(a,u);return()=>{clearTimeout(g)}}},[a,l,u]),V.jsx("span",{className:h,style:p,children:V.jsx("span",{className:f})})}const lo=kn("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Gne=["center","classes","className"];let Ov=t=>t,QA,e_,t_,n_;const nb=550,Kne=80,Yne=_x(QA||(QA=Ov` 0% { transform: scale(0); opacity: 0.1; @@ -129,7 +129,7 @@ Error generating stack: `+i.message+` transform: scale(1); opacity: 0.3; } -`)),Kne=Ax(QA||(QA=Mv` +`)),Xne=_x(e_||(e_=Ov` 0% { opacity: 1; } @@ -137,7 +137,7 @@ Error generating stack: `+i.message+` 100% { opacity: 0; } -`)),Yne=Ax(e_||(e_=Mv` +`)),qne=_x(t_||(t_=Ov` 0% { transform: scale(1); } @@ -149,7 +149,7 @@ Error generating stack: `+i.message+` 100% { transform: scale(1); } -`)),Xne=Et("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),qne=Et(Wne,{name:"MuiTouchRipple",slot:"Ripple"})(t_||(t_=Mv` +`)),Zne=Et("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Jne=Et(jne,{name:"MuiTouchRipple",slot:"Ripple"})(n_||(n_=Ov` opacity: 0; position: absolute; @@ -192,7 +192,7 @@ Error generating stack: `+i.message+` animation-iteration-count: infinite; animation-delay: 200ms; } -`),lo.rippleVisible,Gne,eb,({theme:t})=>t.transitions.easing.easeInOut,lo.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,lo.child,lo.childLeaving,Kne,eb,({theme:t})=>t.transitions.easing.easeInOut,lo.childPulsate,Yne,({theme:t})=>t.transitions.easing.easeInOut),Zne=P.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s}=r,l=Pe(r,Vne),[a,u]=P.useState([]),c=P.useRef(0),d=P.useRef(null);P.useEffect(()=>{d.current&&(d.current(),d.current=null)},[a]);const h=P.useRef(!1),p=P.useRef(0),f=P.useRef(null),g=P.useRef(null);P.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const m=P.useCallback(w=>{const{pulsate:k,rippleX:x,rippleY:S,rippleSize:A,cb:C}=w;u(O=>[...O,V.jsx(qne,{classes:{ripple:Ve(i.ripple,lo.ripple),rippleVisible:Ve(i.rippleVisible,lo.rippleVisible),ripplePulsate:Ve(i.ripplePulsate,lo.ripplePulsate),child:Ve(i.child,lo.child),childLeaving:Ve(i.childLeaving,lo.childLeaving),childPulsate:Ve(i.childPulsate,lo.childPulsate)},timeout:eb,pulsate:k,rippleX:x,rippleY:S,rippleSize:A},c.current)]),c.current+=1,d.current=C},[i]),v=P.useCallback((w={},k={},x=()=>{})=>{const{pulsate:S=!1,center:A=o||k.pulsate,fakeElement:C=!1}=k;if((w==null?void 0:w.type)==="mousedown"&&h.current){h.current=!1;return}(w==null?void 0:w.type)==="touchstart"&&(h.current=!0);const O=C?null:g.current,R=O?O.getBoundingClientRect():{width:0,height:0,left:0,top:0};let _,T,E;if(A||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)_=Math.round(R.width/2),T=Math.round(R.height/2);else{const{clientX:M,clientY:I}=w.touches&&w.touches.length>0?w.touches[0]:w;_=Math.round(M-R.left),T=Math.round(I-R.top)}if(A)E=Math.sqrt((2*R.width**2+R.height**2)/3),E%2===0&&(E+=1);else{const M=Math.max(Math.abs((O?O.clientWidth:0)-_),_)*2+2,I=Math.max(Math.abs((O?O.clientHeight:0)-T),T)*2+2;E=Math.sqrt(M**2+I**2)}w!=null&&w.touches?f.current===null&&(f.current=()=>{m({pulsate:S,rippleX:_,rippleY:T,rippleSize:E,cb:x})},p.current=setTimeout(()=>{f.current&&(f.current(),f.current=null)},jne)):m({pulsate:S,rippleX:_,rippleY:T,rippleSize:E,cb:x})},[o,m]),y=P.useCallback(()=>{v({},{pulsate:!0})},[v]),b=P.useCallback((w,k)=>{if(clearTimeout(p.current),(w==null?void 0:w.type)==="touchend"&&f.current){f.current(),f.current=null,p.current=setTimeout(()=>{b(w,k)});return}f.current=null,u(x=>x.length>0?x.slice(1):x),d.current=k},[]);return P.useImperativeHandle(n,()=>({pulsate:y,start:v,stop:b}),[y,v,b]),V.jsx(Xne,K({className:Ve(lo.root,i.root,s),ref:g},l,{children:V.jsx(Dne,{component:null,exit:!0,children:a})}))}),Jne=Zne;function Qne(t){return xn("MuiButtonBase",t)}const ere=kn("MuiButtonBase",["root","disabled","focusVisible"]),tre=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],nre=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:o}=t,s=Pn({root:["root",e&&"disabled",n&&"focusVisible"]},Qne,o);return n&&r&&(s.root+=` ${r}`),s},rre=Et("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${ere.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ore=P.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:l,component:a="button",disabled:u=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:h=!1,LinkComponent:p="a",onBlur:f,onClick:g,onContextMenu:m,onDragLeave:v,onFocus:y,onFocusVisible:b,onKeyDown:w,onKeyUp:k,onMouseDown:x,onMouseLeave:S,onMouseUp:A,onTouchEnd:C,onTouchMove:O,onTouchStart:R,tabIndex:_=0,TouchRippleProps:T,touchRippleRef:E,type:M}=r,I=Pe(r,tre),N=P.useRef(null),L=P.useRef(null),$=Rr(L,E),{isFocusVisibleRef:D,onFocus:F,onBlur:U,ref:W}=FL(),[B,H]=P.useState(!1);u&&B&&H(!1),P.useImperativeHandle(o,()=>({focusVisible:()=>{H(!0),N.current.focus()}}),[]);const[G,Y]=P.useState(!1);P.useEffect(()=>{Y(!0)},[]);const X=G&&!c&&!u;P.useEffect(()=>{B&&h&&!c&&G&&L.current.pulsate()},[c,h,B,G]);function Z(ie,Ce,Xe=d){return Ba(Ke=>(Ce&&Ce(Ke),!Xe&&L.current&&L.current[ie](Ke),!0))}const te=Z("start",x),de=Z("stop",m),Ie=Z("stop",v),ve=Z("stop",A),_e=Z("stop",ie=>{B&&ie.preventDefault(),S&&S(ie)}),Se=Z("start",R),mt=Z("stop",C),Ot=Z("stop",O),bt=Z("stop",ie=>{U(ie),D.current===!1&&H(!1),f&&f(ie)},!1),Xn=Ba(ie=>{N.current||(N.current=ie.currentTarget),F(ie),D.current===!0&&(H(!0),b&&b(ie)),y&&y(ie)}),It=()=>{const ie=N.current;return a&&a!=="button"&&!(ie.tagName==="A"&&ie.href)},Cn=P.useRef(!1),dn=Ba(ie=>{h&&!Cn.current&&B&&L.current&&ie.key===" "&&(Cn.current=!0,L.current.stop(ie,()=>{L.current.start(ie)})),ie.target===ie.currentTarget&&It()&&ie.key===" "&&ie.preventDefault(),w&&w(ie),ie.target===ie.currentTarget&&It()&&ie.key==="Enter"&&!u&&(ie.preventDefault(),g&&g(ie))}),hn=Ba(ie=>{h&&ie.key===" "&&L.current&&B&&!ie.defaultPrevented&&(Cn.current=!1,L.current.stop(ie,()=>{L.current.pulsate(ie)})),k&&k(ie),g&&ie.target===ie.currentTarget&&It()&&ie.key===" "&&!ie.defaultPrevented&&g(ie)});let Ye=a;Ye==="button"&&(I.href||I.to)&&(Ye=p);const Tn={};Ye==="button"?(Tn.type=M===void 0?"button":M,Tn.disabled=u):(!I.href&&!I.to&&(Tn.role="button"),u&&(Tn["aria-disabled"]=u));const q=Rr(n,W,N),ue=K({},r,{centerRipple:i,component:a,disabled:u,disableRipple:c,disableTouchRipple:d,focusRipple:h,tabIndex:_,focusVisible:B}),me=nre(ue);return V.jsxs(rre,K({as:Ye,className:Ve(me.root,l),ownerState:ue,onBlur:bt,onClick:g,onContextMenu:de,onFocus:Xn,onKeyDown:dn,onKeyUp:hn,onMouseDown:te,onMouseLeave:_e,onMouseUp:ve,onDragLeave:Ie,onTouchEnd:mt,onTouchMove:Ot,onTouchStart:Se,ref:q,tabIndex:u?-1:_,type:M},Tn,I,{children:[s,X?V.jsx(Jne,K({ref:$,center:i},T)):null]}))}),Ux=ore;function ire(t){return xn("MuiIconButton",t)}const sre=kn("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),are=["edge","children","className","color","disabled","disableFocusRipple","size"],lre=t=>{const{classes:e,disabled:n,color:r,edge:o,size:i}=t,s={root:["root",n&&"disabled",r!=="default"&&`color${ht(r)}`,o&&`edge${ht(o)}`,`size${ht(i)}`]};return Pn(s,ire,e)},cre=Et(Ux,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="default"&&e[`color${ht(n.color)}`],n.edge&&e[`edge${ht(n.edge)}`],e[`size${ht(n.size)}`]]}})(({theme:t,ownerState:e})=>K({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:xr(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12}),({theme:t,ownerState:e})=>{var n;const r=(n=(t.vars||t).palette)==null?void 0:n[e.color];return K({},e.color==="inherit"&&{color:"inherit"},e.color!=="inherit"&&e.color!=="default"&&K({color:r==null?void 0:r.main},!e.disableRipple&&{"&:hover":K({},r&&{backgroundColor:t.vars?`rgba(${r.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:xr(r.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),e.size==="small"&&{padding:5,fontSize:t.typography.pxToRem(18)},e.size==="large"&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${sre.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),ure=P.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:l="default",disabled:a=!1,disableFocusRipple:u=!1,size:c="medium"}=r,d=Pe(r,are),h=K({},r,{edge:o,color:l,disabled:a,disableFocusRipple:u,size:c}),p=lre(h);return V.jsx(cre,K({className:Ve(p.root,s),centerRipple:!0,focusRipple:!u,disabled:a,ref:n,ownerState:h},d,{children:i}))}),dre=ure;function hre(t){return xn("MuiTypography",t)}kn("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const pre=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],fre=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=t,l={root:["root",i,t.align!=="inherit"&&`align${ht(e)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Pn(l,hre,s)},gre=Et("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${ht(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>K({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),n_={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},mre={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},vre=t=>mre[t]||t,yre=P.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiTypography"}),o=vre(r.color),i=$x(K({},r,{color:o})),{align:s="inherit",className:l,component:a,gutterBottom:u=!1,noWrap:c=!1,paragraph:d=!1,variant:h="body1",variantMapping:p=n_}=i,f=Pe(i,pre),g=K({},i,{align:s,color:o,className:l,component:a,gutterBottom:u,noWrap:c,paragraph:d,variant:h,variantMapping:p}),m=a||(d?"p":p[h]||n_[h])||"span",v=fre(g);return V.jsx(gre,K({as:m,ref:n,ownerState:g,className:Ve(v.root,l)},f))}),xd=yre;function bN(t){return typeof t=="string"}function kd(t,e,n){return t===void 0||bN(t)?e:K({},e,{ownerState:K({},e.ownerState,n)})}const bre={disableDefaultClasses:!1},wre=P.createContext(bre);function xre(t){const{disableDefaultClasses:e}=P.useContext(wre);return n=>e?"":t(n)}function wN(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function kre(t,e,n){return typeof t=="function"?t(e,n):t}function r_(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function Ere(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=t;if(!e){const p=Ve(o==null?void 0:o.className,r==null?void 0:r.className,i,n==null?void 0:n.className),f=K({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),g=K({},n,o,r);return p.length>0&&(g.className=p),Object.keys(f).length>0&&(g.style=f),{props:g,internalRef:void 0}}const s=wN(K({},o,r)),l=r_(r),a=r_(o),u=e(s),c=Ve(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d=K({},u==null?void 0:u.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),h=K({},u,n,a,l);return c.length>0&&(h.className=c),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:u.ref}}const Sre=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Gi(t){var e;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1}=t,s=Pe(t,Sre),l=i?{}:kre(r,o),{props:a,internalRef:u}=Ere(K({},s,{externalSlotProps:l})),c=Rr(u,l==null?void 0:l.ref,(e=t.additionalProps)==null?void 0:e.ref);return kd(n,K({},a,{ref:c}),o)}function Cre(t){const{badgeContent:e,invisible:n=!1,max:r=99,showZero:o=!1}=t,i=HL({badgeContent:e,max:r});let s=n;n===!1&&e===0&&!o&&(s=!0);const{badgeContent:l,max:a=r}=s?i:t,u=l&&Number(l)>a?`${a}+`:l;return{badgeContent:l,invisible:s,max:a,displayValue:u}}const Tre=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Are(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function _re(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function Rre(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||_re(t))}function Mre(t){const e=[],n=[];return Array.from(t.querySelectorAll(Tre)).forEach((r,o)=>{const i=Are(r);i===-1||!Rre(r)||(i===0?e.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(e)}function Ore(){return!0}function Ire(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Mre,isEnabled:s=Ore,open:l}=t,a=P.useRef(!1),u=P.useRef(null),c=P.useRef(null),d=P.useRef(null),h=P.useRef(null),p=P.useRef(!1),f=P.useRef(null),g=Rr(e.ref,f),m=P.useRef(null);P.useEffect(()=>{!l||!f.current||(p.current=!n)},[n,l]),P.useEffect(()=>{if(!l||!f.current)return;const b=Tr(f.current);return f.current.contains(b.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),p.current&&f.current.focus()),()=>{o||(d.current&&d.current.focus&&(a.current=!0,d.current.focus()),d.current=null)}},[l]),P.useEffect(()=>{if(!l||!f.current)return;const b=Tr(f.current),w=S=>{m.current=S,!(r||!s()||S.key!=="Tab")&&b.activeElement===f.current&&S.shiftKey&&(a.current=!0,c.current&&c.current.focus())},k=()=>{const S=f.current;if(S===null)return;if(!b.hasFocus()||!s()||a.current){a.current=!1;return}if(S.contains(b.activeElement)||r&&b.activeElement!==u.current&&b.activeElement!==c.current)return;if(b.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!p.current)return;let A=[];if((b.activeElement===u.current||b.activeElement===c.current)&&(A=i(f.current)),A.length>0){var C,O;const R=!!((C=m.current)!=null&&C.shiftKey&&((O=m.current)==null?void 0:O.key)==="Tab"),_=A[0],T=A[A.length-1];typeof _!="string"&&typeof T!="string"&&(R?T.focus():_.focus())}else S.focus()};b.addEventListener("focusin",k),b.addEventListener("keydown",w,!0);const x=setInterval(()=>{b.activeElement&&b.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(x),b.removeEventListener("focusin",k),b.removeEventListener("keydown",w,!0)}},[n,r,o,s,l,i]);const v=b=>{d.current===null&&(d.current=b.relatedTarget),p.current=!0,h.current=b.target;const w=e.props.onFocus;w&&w(b)},y=b=>{d.current===null&&(d.current=b.relatedTarget),p.current=!0};return V.jsxs(P.Fragment,{children:[V.jsx("div",{tabIndex:l?0:-1,onFocus:y,ref:u,"data-testid":"sentinelStart"}),P.cloneElement(e,{ref:g,onFocus:v}),V.jsx("div",{tabIndex:l?0:-1,onFocus:y,ref:c,"data-testid":"sentinelEnd"})]})}var Ar="top",wo="bottom",xo="right",_r="left",Wx="auto",dp=[Ar,wo,xo,_r],Qc="start",Th="end",Lre="clippingParents",xN="viewport",Pu="popper",Nre="reference",o_=dp.reduce(function(t,e){return t.concat([e+"-"+Qc,e+"-"+Th])},[]),kN=[].concat(dp,[Wx]).reduce(function(t,e){return t.concat([e,e+"-"+Qc,e+"-"+Th])},[]),$re="beforeRead",Dre="read",Pre="afterRead",zre="beforeMain",Fre="main",Bre="afterMain",Hre="beforeWrite",Ure="write",Wre="afterWrite",Vre=[$re,Dre,Pre,zre,Fre,Bre,Hre,Ure,Wre];function gi(t){return t?(t.nodeName||"").toLowerCase():null}function Jr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function dl(t){var e=Jr(t).Element;return t instanceof e||t instanceof Element}function go(t){var e=Jr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Vx(t){if(typeof ShadowRoot>"u")return!1;var e=Jr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function jre(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!go(i)||!gi(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var l=o[s];l===!1?i.removeAttribute(s):i.setAttribute(s,l===!0?"":l)}))})}function Gre(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),l=s.reduce(function(a,u){return a[u]="",a},{});!go(o)||!gi(o)||(Object.assign(o.style,l),Object.keys(i).forEach(function(a){o.removeAttribute(a)}))})}}const Kre={name:"applyStyles",enabled:!0,phase:"write",fn:jre,effect:Gre,requires:["computeStyles"]};function ui(t){return t.split("-")[0]}var Ya=Math.max,Yg=Math.min,eu=Math.round;function tb(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function EN(){return!/^((?!chrome|android).)*safari/i.test(tb())}function tu(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),o=1,i=1;e&&go(t)&&(o=t.offsetWidth>0&&eu(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&eu(r.height)/t.offsetHeight||1);var s=dl(t)?Jr(t):window,l=s.visualViewport,a=!EN()&&n,u=(r.left+(a&&l?l.offsetLeft:0))/o,c=(r.top+(a&&l?l.offsetTop:0))/i,d=r.width/o,h=r.height/i;return{width:d,height:h,top:c,right:u+d,bottom:c+h,left:u,x:u,y:c}}function jx(t){var e=tu(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function SN(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Vx(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ki(t){return Jr(t).getComputedStyle(t)}function Yre(t){return["table","td","th"].indexOf(gi(t))>=0}function la(t){return((dl(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ov(t){return gi(t)==="html"?t:t.assignedSlot||t.parentNode||(Vx(t)?t.host:null)||la(t)}function i_(t){return!go(t)||Ki(t).position==="fixed"?null:t.offsetParent}function Xre(t){var e=/firefox/i.test(tb()),n=/Trident/i.test(tb());if(n&&go(t)){var r=Ki(t);if(r.position==="fixed")return null}var o=Ov(t);for(Vx(o)&&(o=o.host);go(o)&&["html","body"].indexOf(gi(o))<0;){var i=Ki(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function hp(t){for(var e=Jr(t),n=i_(t);n&&Yre(n)&&Ki(n).position==="static";)n=i_(n);return n&&(gi(n)==="html"||gi(n)==="body"&&Ki(n).position==="static")?e:n||Xre(t)||e}function Gx(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function zd(t,e,n){return Ya(t,Yg(e,n))}function qre(t,e,n){var r=zd(t,e,n);return r>n?n:r}function CN(){return{top:0,right:0,bottom:0,left:0}}function TN(t){return Object.assign({},CN(),t)}function AN(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Zre=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,TN(typeof e!="number"?e:AN(e,dp))};function Jre(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,l=ui(n.placement),a=Gx(l),u=[_r,xo].indexOf(l)>=0,c=u?"height":"width";if(!(!i||!s)){var d=Zre(o.padding,n),h=jx(i),p=a==="y"?Ar:_r,f=a==="y"?wo:xo,g=n.rects.reference[c]+n.rects.reference[a]-s[a]-n.rects.popper[c],m=s[a]-n.rects.reference[a],v=hp(i),y=v?a==="y"?v.clientHeight||0:v.clientWidth||0:0,b=g/2-m/2,w=d[p],k=y-h[c]-d[f],x=y/2-h[c]/2+b,S=zd(w,x,k),A=a;n.modifiersData[r]=(e={},e[A]=S,e.centerOffset=S-x,e)}}function Qre(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||SN(e.elements.popper,o)&&(e.elements.arrow=o))}const eoe={name:"arrow",enabled:!0,phase:"main",fn:Jre,effect:Qre,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function nu(t){return t.split("-")[1]}var toe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function noe(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:eu(n*o)/o||0,y:eu(r*o)/o||0}}function s_(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,s=t.offsets,l=t.position,a=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,h=s.x,p=h===void 0?0:h,f=s.y,g=f===void 0?0:f,m=typeof c=="function"?c({x:p,y:g}):{x:p,y:g};p=m.x,g=m.y;var v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),b=_r,w=Ar,k=window;if(u){var x=hp(n),S="clientHeight",A="clientWidth";if(x===Jr(n)&&(x=la(n),Ki(x).position!=="static"&&l==="absolute"&&(S="scrollHeight",A="scrollWidth")),x=x,o===Ar||(o===_r||o===xo)&&i===Th){w=wo;var C=d&&x===k&&k.visualViewport?k.visualViewport.height:x[S];g-=C-r.height,g*=a?1:-1}if(o===_r||(o===Ar||o===wo)&&i===Th){b=xo;var O=d&&x===k&&k.visualViewport?k.visualViewport.width:x[A];p-=O-r.width,p*=a?1:-1}}var R=Object.assign({position:l},u&&toe),_=c===!0?noe({x:p,y:g},Jr(n)):{x:p,y:g};if(p=_.x,g=_.y,a){var T;return Object.assign({},R,(T={},T[w]=y?"0":"",T[b]=v?"0":"",T.transform=(k.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",T))}return Object.assign({},R,(e={},e[w]=y?g+"px":"",e[b]=v?p+"px":"",e.transform="",e))}function roe(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,l=n.roundOffsets,a=l===void 0?!0:l,u={placement:ui(e.placement),variation:nu(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,s_(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,s_(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const ooe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:roe,data:{}};var nf={passive:!0};function ioe(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,l=s===void 0?!0:s,a=Jr(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,nf)}),l&&a.addEventListener("resize",n.update,nf),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,nf)}),l&&a.removeEventListener("resize",n.update,nf)}}const soe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ioe,data:{}};var aoe={left:"right",right:"left",bottom:"top",top:"bottom"};function jf(t){return t.replace(/left|right|bottom|top/g,function(e){return aoe[e]})}var loe={start:"end",end:"start"};function a_(t){return t.replace(/start|end/g,function(e){return loe[e]})}function Kx(t){var e=Jr(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Yx(t){return tu(la(t)).left+Kx(t).scrollLeft}function coe(t,e){var n=Jr(t),r=la(t),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;var u=EN();(u||!u&&e==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:i,height:s,x:l+Yx(t),y:a}}function uoe(t){var e,n=la(t),r=Kx(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=Ya(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Ya(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+Yx(t),a=-r.scrollTop;return Ki(o||n).direction==="rtl"&&(l+=Ya(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:l,y:a}}function Xx(t){var e=Ki(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function _N(t){return["html","body","#document"].indexOf(gi(t))>=0?t.ownerDocument.body:go(t)&&Xx(t)?t:_N(Ov(t))}function Fd(t,e){var n;e===void 0&&(e=[]);var r=_N(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=Jr(r),s=o?[i].concat(i.visualViewport||[],Xx(r)?r:[]):r,l=e.concat(s);return o?l:l.concat(Fd(Ov(s)))}function nb(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function doe(t,e){var n=tu(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function l_(t,e,n){return e===xN?nb(coe(t,n)):dl(e)?doe(e,n):nb(uoe(la(t)))}function hoe(t){var e=Fd(Ov(t)),n=["absolute","fixed"].indexOf(Ki(t).position)>=0,r=n&&go(t)?hp(t):t;return dl(r)?e.filter(function(o){return dl(o)&&SN(o,r)&&gi(o)!=="body"}):[]}function poe(t,e,n,r){var o=e==="clippingParents"?hoe(t):[].concat(e),i=[].concat(o,[n]),s=i[0],l=i.reduce(function(a,u){var c=l_(t,u,r);return a.top=Ya(c.top,a.top),a.right=Yg(c.right,a.right),a.bottom=Yg(c.bottom,a.bottom),a.left=Ya(c.left,a.left),a},l_(t,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function RN(t){var e=t.reference,n=t.element,r=t.placement,o=r?ui(r):null,i=r?nu(r):null,s=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,a;switch(o){case Ar:a={x:s,y:e.y-n.height};break;case wo:a={x:s,y:e.y+e.height};break;case xo:a={x:e.x+e.width,y:l};break;case _r:a={x:e.x-n.width,y:l};break;default:a={x:e.x,y:e.y}}var u=o?Gx(o):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case Qc:a[u]=a[u]-(e[c]/2-n[c]/2);break;case Th:a[u]=a[u]+(e[c]/2-n[c]/2);break}}return a}function Ah(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.strategy,s=i===void 0?t.strategy:i,l=n.boundary,a=l===void 0?Lre:l,u=n.rootBoundary,c=u===void 0?xN:u,d=n.elementContext,h=d===void 0?Pu:d,p=n.altBoundary,f=p===void 0?!1:p,g=n.padding,m=g===void 0?0:g,v=TN(typeof m!="number"?m:AN(m,dp)),y=h===Pu?Nre:Pu,b=t.rects.popper,w=t.elements[f?y:h],k=poe(dl(w)?w:w.contextElement||la(t.elements.popper),a,c,s),x=tu(t.elements.reference),S=RN({reference:x,element:b,strategy:"absolute",placement:o}),A=nb(Object.assign({},b,S)),C=h===Pu?A:x,O={top:k.top-C.top+v.top,bottom:C.bottom-k.bottom+v.bottom,left:k.left-C.left+v.left,right:C.right-k.right+v.right},R=t.modifiersData.offset;if(h===Pu&&R){var _=R[o];Object.keys(O).forEach(function(T){var E=[xo,wo].indexOf(T)>=0?1:-1,M=[Ar,wo].indexOf(T)>=0?"y":"x";O[T]+=_[M]*E})}return O}function foe(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,l=n.flipVariations,a=n.allowedAutoPlacements,u=a===void 0?kN:a,c=nu(r),d=c?l?o_:o_.filter(function(f){return nu(f)===c}):dp,h=d.filter(function(f){return u.indexOf(f)>=0});h.length===0&&(h=d);var p=h.reduce(function(f,g){return f[g]=Ah(t,{placement:g,boundary:o,rootBoundary:i,padding:s})[ui(g)],f},{});return Object.keys(p).sort(function(f,g){return p[f]-p[g]})}function goe(t){if(ui(t)===Wx)return[];var e=jf(t);return[a_(t),e,a_(e)]}function moe(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,l=s===void 0?!0:s,a=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=p===void 0?!0:p,g=n.allowedAutoPlacements,m=e.options.placement,v=ui(m),y=v===m,b=a||(y||!f?[jf(m)]:goe(m)),w=[m].concat(b).reduce(function(B,H){return B.concat(ui(H)===Wx?foe(e,{placement:H,boundary:c,rootBoundary:d,padding:u,flipVariations:f,allowedAutoPlacements:g}):H)},[]),k=e.rects.reference,x=e.rects.popper,S=new Map,A=!0,C=w[0],O=0;O=0,M=E?"width":"height",I=Ah(e,{placement:R,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),N=E?T?xo:_r:T?wo:Ar;k[M]>x[M]&&(N=jf(N));var L=jf(N),$=[];if(i&&$.push(I[_]<=0),l&&$.push(I[N]<=0,I[L]<=0),$.every(function(B){return B})){C=R,A=!1;break}S.set(R,$)}if(A)for(var D=f?3:1,F=function(H){var G=w.find(function(Y){var X=S.get(Y);if(X)return X.slice(0,H).every(function(Z){return Z})});if(G)return C=G,"break"},U=D;U>0;U--){var W=F(U);if(W==="break")break}e.placement!==C&&(e.modifiersData[r]._skip=!0,e.placement=C,e.reset=!0)}}const voe={name:"flip",enabled:!0,phase:"main",fn:moe,requiresIfExists:["offset"],data:{_skip:!1}};function c_(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function u_(t){return[Ar,xo,wo,_r].some(function(e){return t[e]>=0})}function yoe(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=Ah(e,{elementContext:"reference"}),l=Ah(e,{altBoundary:!0}),a=c_(s,r),u=c_(l,o,i),c=u_(a),d=u_(u);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const boe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:yoe};function woe(t,e,n){var r=ui(t),o=[_r,Ar].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=i[0],l=i[1];return s=s||0,l=(l||0)*o,[_r,xo].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function xoe(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,s=kN.reduce(function(c,d){return c[d]=woe(d,e.rects,i),c},{}),l=s[e.placement],a=l.x,u=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=s}const koe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:xoe};function Eoe(t){var e=t.state,n=t.name;e.modifiersData[n]=RN({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const Soe={name:"popperOffsets",enabled:!0,phase:"read",fn:Eoe,data:{}};function Coe(t){return t==="x"?"y":"x"}function Toe(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,l=s===void 0?!1:s,a=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,h=n.tether,p=h===void 0?!0:h,f=n.tetherOffset,g=f===void 0?0:f,m=Ah(e,{boundary:a,rootBoundary:u,padding:d,altBoundary:c}),v=ui(e.placement),y=nu(e.placement),b=!y,w=Gx(v),k=Coe(w),x=e.modifiersData.popperOffsets,S=e.rects.reference,A=e.rects.popper,C=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,O=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),R=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,_={x:0,y:0};if(x){if(i){var T,E=w==="y"?Ar:_r,M=w==="y"?wo:xo,I=w==="y"?"height":"width",N=x[w],L=N+m[E],$=N-m[M],D=p?-A[I]/2:0,F=y===Qc?S[I]:A[I],U=y===Qc?-A[I]:-S[I],W=e.elements.arrow,B=p&&W?jx(W):{width:0,height:0},H=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:CN(),G=H[E],Y=H[M],X=zd(0,S[I],B[I]),Z=b?S[I]/2-D-X-G-O.mainAxis:F-X-G-O.mainAxis,te=b?-S[I]/2+D+X+Y+O.mainAxis:U+X+Y+O.mainAxis,de=e.elements.arrow&&hp(e.elements.arrow),Ie=de?w==="y"?de.clientTop||0:de.clientLeft||0:0,ve=(T=R==null?void 0:R[w])!=null?T:0,_e=N+Z-ve-Ie,Se=N+te-ve,mt=zd(p?Yg(L,_e):L,N,p?Ya($,Se):$);x[w]=mt,_[w]=mt-N}if(l){var Ot,bt=w==="x"?Ar:_r,Xn=w==="x"?wo:xo,It=x[k],Cn=k==="y"?"height":"width",dn=It+m[bt],hn=It-m[Xn],Ye=[Ar,_r].indexOf(v)!==-1,Tn=(Ot=R==null?void 0:R[k])!=null?Ot:0,q=Ye?dn:It-S[Cn]-A[Cn]-Tn+O.altAxis,ue=Ye?It+S[Cn]+A[Cn]-Tn-O.altAxis:hn,me=p&&Ye?qre(q,It,ue):zd(p?q:dn,It,p?ue:hn);x[k]=me,_[k]=me-It}e.modifiersData[r]=_}}const Aoe={name:"preventOverflow",enabled:!0,phase:"main",fn:Toe,requiresIfExists:["offset"]};function _oe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Roe(t){return t===Jr(t)||!go(t)?Kx(t):_oe(t)}function Moe(t){var e=t.getBoundingClientRect(),n=eu(e.width)/t.offsetWidth||1,r=eu(e.height)/t.offsetHeight||1;return n!==1||r!==1}function Ooe(t,e,n){n===void 0&&(n=!1);var r=go(e),o=go(e)&&Moe(e),i=la(e),s=tu(t,o,n),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!n)&&((gi(e)!=="body"||Xx(i))&&(l=Roe(e)),go(e)?(a=tu(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):i&&(a.x=Yx(i))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function Ioe(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var a=e.get(l);a&&o(a)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||o(i)}),r}function Loe(t){var e=Ioe(t);return Vre.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function Noe(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function $oe(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var d_={placement:"bottom",modifiers:[],strategy:"absolute"};function h_(){for(var t=arguments.length,e=new Array(t),n=0;n{i||l(Foe(o)||document.body)},[o,i]),ll(()=>{if(s&&!i)return Yy(n,s),()=>{Yy(n,null)}},[n,s,i]),i){if(P.isValidElement(r)){const u={ref:a};return P.cloneElement(r,u)}return V.jsx(P.Fragment,{children:r})}return V.jsx(P.Fragment,{children:s&&ip.createPortal(r,s)})});function Boe(t){return xn("MuiPopper",t)}kn("MuiPopper",["root"]);const Hoe=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Uoe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Woe(t,e){if(e==="ltr")return t;switch(t){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return t}}function rb(t){return typeof t=="function"?t():t}function Voe(t){return t.nodeType!==void 0}const joe=()=>Pn({root:["root"]},xre(Boe)),Goe={},Koe=P.forwardRef(function(e,n){var r;const{anchorEl:o,children:i,direction:s,disablePortal:l,modifiers:a,open:u,placement:c,popperOptions:d,popperRef:h,slotProps:p={},slots:f={},TransitionProps:g}=e,m=Pe(e,Hoe),v=P.useRef(null),y=Rr(v,n),b=P.useRef(null),w=Rr(b,h),k=P.useRef(w);ll(()=>{k.current=w},[w]),P.useImperativeHandle(h,()=>b.current,[]);const x=Woe(c,s),[S,A]=P.useState(x),[C,O]=P.useState(rb(o));P.useEffect(()=>{b.current&&b.current.forceUpdate()}),P.useEffect(()=>{o&&O(rb(o))},[o]),ll(()=>{if(!C||!u)return;const M=L=>{A(L.placement)};let I=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:L})=>{M(L)}}];a!=null&&(I=I.concat(a)),d&&d.modifiers!=null&&(I=I.concat(d.modifiers));const N=zoe(C,v.current,K({placement:x},d,{modifiers:I}));return k.current(N),()=>{N.destroy(),k.current(null)}},[C,l,a,u,d,x]);const R={placement:S};g!==null&&(R.TransitionProps=g);const _=joe(),T=(r=f.root)!=null?r:"div",E=Gi({elementType:T,externalSlotProps:p.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:y},ownerState:e,className:_.root});return V.jsx(T,K({},E,{children:typeof i=="function"?i(R):i}))}),Yoe=P.forwardRef(function(e,n){const{anchorEl:r,children:o,container:i,direction:s="ltr",disablePortal:l=!1,keepMounted:a=!1,modifiers:u,open:c,placement:d="bottom",popperOptions:h=Goe,popperRef:p,style:f,transition:g=!1,slotProps:m={},slots:v={}}=e,y=Pe(e,Uoe),[b,w]=P.useState(!0),k=()=>{w(!1)},x=()=>{w(!0)};if(!a&&!c&&(!g||b))return null;let S;if(i)S=i;else if(r){const O=rb(r);S=O&&Voe(O)?Tr(O).body:Tr(null).body}const A=!c&&a&&(!g||b)?"none":void 0,C=g?{in:c,onEnter:k,onExited:x}:void 0;return V.jsx(MN,{disablePortal:l,container:S,children:V.jsx(Koe,K({anchorEl:r,direction:s,disablePortal:l,modifiers:u,ref:n,open:g?!b:c,placement:d,popperOptions:h,popperRef:p,slotProps:m,slots:v},y,{style:K({position:"fixed",top:0,left:0,display:A},f),TransitionProps:C,children:o}))})});function Xoe(t){const e=Tr(t);return e.body===t?kh(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Bd(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function p_(t){return parseInt(kh(t).getComputedStyle(t).paddingRight,10)||0}function qoe(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function f_(t,e,n,r,o){const i=[e,n,...r];[].forEach.call(t.children,s=>{const l=i.indexOf(s)===-1,a=!qoe(s);l&&a&&Bd(s,o)})}function Q1(t,e){let n=-1;return t.some((r,o)=>e(r)?(n=o,!0):!1),n}function Zoe(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(Xoe(r)){const s=BL(Tr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${p_(r)+s}px`;const l=Tr(r).querySelectorAll(".mui-fixed");[].forEach.call(l,a=>{n.push({value:a.style.paddingRight,property:"padding-right",el:a}),a.style.paddingRight=`${p_(a)+s}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=Tr(r).body;else{const s=r.parentElement,l=kh(r);i=(s==null?void 0:s.nodeName)==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:s,property:l})=>{i?s.style.setProperty(l,i):s.style.removeProperty(l)})}}function Joe(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class Qoe{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Bd(e.modalRef,!1);const o=Joe(n);f_(n,e.mount,e.modalRef,o,!0);const i=Q1(this.containers,s=>s.container===n);return i!==-1?(this.containers[i].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:o}),r)}mount(e,n){const r=Q1(this.containers,i=>i.modals.indexOf(e)!==-1),o=this.containers[r];o.restore||(o.restore=Zoe(o,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const o=Q1(this.containers,s=>s.modals.indexOf(e)!==-1),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&Bd(e.modalRef,n),f_(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&Bd(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}function eie(t){return typeof t=="function"?t():t}function tie(t){return t?t.props.hasOwnProperty("in"):!1}const nie=new Qoe;function rie(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=nie,closeAfterTransition:i=!1,onTransitionEnter:s,onTransitionExited:l,children:a,onClose:u,open:c,rootRef:d}=t,h=P.useRef({}),p=P.useRef(null),f=P.useRef(null),g=Rr(f,d),[m,v]=P.useState(!c),y=tie(a);let b=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(b=!1);const w=()=>Tr(p.current),k=()=>(h.current.modalRef=f.current,h.current.mount=p.current,h.current),x=()=>{o.mount(k(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},S=Ba(()=>{const I=eie(e)||w().body;o.add(k(),I),f.current&&x()}),A=P.useCallback(()=>o.isTopModal(k()),[o]),C=Ba(I=>{p.current=I,I&&(c&&A()?x():f.current&&Bd(f.current,b))}),O=P.useCallback(()=>{o.remove(k(),b)},[b,o]);P.useEffect(()=>()=>{O()},[O]),P.useEffect(()=>{c?S():(!y||!i)&&O()},[c,O,y,i,S]);const R=I=>N=>{var L;(L=I.onKeyDown)==null||L.call(I,N),!(N.key!=="Escape"||!A())&&(n||(N.stopPropagation(),u&&u(N,"escapeKeyDown")))},_=I=>N=>{var L;(L=I.onClick)==null||L.call(I,N),N.target===N.currentTarget&&u&&u(N,"backdropClick")};return{getRootProps:(I={})=>{const N=wN(t);delete N.onTransitionEnter,delete N.onTransitionExited;const L=K({},N,I);return K({role:"presentation"},L,{onKeyDown:R(L),ref:g})},getBackdropProps:(I={})=>{const N=I;return K({"aria-hidden":!0},N,{onClick:_(N),open:c})},getTransitionProps:()=>{const I=()=>{v(!1),s&&s()},N=()=>{v(!0),l&&l(),i&&O()};return{onEnter:CA(I,a==null?void 0:a.props.onEnter),onExited:CA(N,a==null?void 0:a.props.onExited)}},rootRef:g,portalRef:C,isTopModal:A,exited:m,hasTransition:y}}const oie=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],iie=Et(Yoe,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),sie=P.forwardRef(function(e,n){var r;const o=Lx(),i=Sn({props:e,name:"MuiPopper"}),{anchorEl:s,component:l,components:a,componentsProps:u,container:c,disablePortal:d,keepMounted:h,modifiers:p,open:f,placement:g,popperOptions:m,popperRef:v,transition:y,slots:b,slotProps:w}=i,k=Pe(i,oie),x=(r=b==null?void 0:b.root)!=null?r:a==null?void 0:a.Root,S=K({anchorEl:s,container:c,disablePortal:d,keepMounted:h,modifiers:p,open:f,placement:g,popperOptions:m,popperRef:v,transition:y},k);return V.jsx(iie,K({as:l,direction:o==null?void 0:o.direction,slots:{root:x},slotProps:w??u},S,{ref:n}))}),qx=sie,aie=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],lie={entering:{opacity:1},entered:{opacity:1}},cie=P.forwardRef(function(e,n){const r=Rv(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:l,easing:a,in:u,onEnter:c,onEntered:d,onEntering:h,onExit:p,onExited:f,onExiting:g,style:m,timeout:v=o,TransitionComponent:y=vN}=e,b=Pe(e,aie),w=P.useRef(null),k=Rr(w,l.ref,n),x=E=>M=>{if(E){const I=w.current;M===void 0?E(I):E(I,M)}},S=x(h),A=x((E,M)=>{yN(E);const I=Kg({style:m,timeout:v,easing:a},{mode:"enter"});E.style.webkitTransition=r.transitions.create("opacity",I),E.style.transition=r.transitions.create("opacity",I),c&&c(E,M)}),C=x(d),O=x(g),R=x(E=>{const M=Kg({style:m,timeout:v,easing:a},{mode:"exit"});E.style.webkitTransition=r.transitions.create("opacity",M),E.style.transition=r.transitions.create("opacity",M),p&&p(E)}),_=x(f),T=E=>{i&&i(w.current,E)};return V.jsx(y,K({appear:s,in:u,nodeRef:w,onEnter:A,onEntered:C,onEntering:S,onExit:R,onExited:_,onExiting:O,addEndListener:T,timeout:v},b,{children:(E,M)=>P.cloneElement(l,K({style:K({opacity:0,visibility:E==="exited"&&!u?"hidden":void 0},lie[E],m,l.props.style),ref:k},M))}))}),uie=cie;function die(t){return xn("MuiBackdrop",t)}kn("MuiBackdrop",["root","invisible"]);const hie=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],pie=t=>{const{classes:e,invisible:n}=t;return Pn({root:["root",n&&"invisible"]},die,e)},fie=Et("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})(({ownerState:t})=>K({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),gie=P.forwardRef(function(e,n){var r,o,i;const s=Sn({props:e,name:"MuiBackdrop"}),{children:l,className:a,component:u="div",components:c={},componentsProps:d={},invisible:h=!1,open:p,slotProps:f={},slots:g={},TransitionComponent:m=uie,transitionDuration:v}=s,y=Pe(s,hie),b=K({},s,{component:u,invisible:h}),w=pie(b),k=(r=f.root)!=null?r:d.root;return V.jsx(m,K({in:p,timeout:v},y,{children:V.jsx(fie,K({"aria-hidden":!0},k,{as:(o=(i=g.root)!=null?i:c.Root)!=null?o:u,className:Ve(w.root,a,k==null?void 0:k.className),ownerState:K({},b,k==null?void 0:k.ownerState),classes:w,ref:n,children:l}))}))}),mie=gie;function vie(t){return xn("MuiBadge",t)}const yie=kn("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),as=yie,bie=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],e0=10,t0=4,wie=t=>{const{color:e,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:s={}}=t,l={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${ht(n.vertical)}${ht(n.horizontal)}`,`anchorOrigin${ht(n.vertical)}${ht(n.horizontal)}${ht(o)}`,`overlap${ht(o)}`,e!=="default"&&`color${ht(e)}`]};return Pn(l,vie,s)},xie=Et("span",{name:"MuiBadge",slot:"Root",overridesResolver:(t,e)=>e.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),kie=Et("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.badge,e[n.variant],e[`anchorOrigin${ht(n.anchorOrigin.vertical)}${ht(n.anchorOrigin.horizontal)}${ht(n.overlap)}`],n.color!=="default"&&e[`color${ht(n.color)}`],n.invisible&&e.invisible]}})(({theme:t,ownerState:e})=>K({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:e0*2,lineHeight:1,padding:"0 6px",height:e0*2,borderRadius:e0,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen})},e.color!=="default"&&{backgroundColor:(t.vars||t).palette[e.color].main,color:(t.vars||t).palette[e.color].contrastText},e.variant==="dot"&&{borderRadius:t0,height:t0*2,minWidth:t0*2,padding:0},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="rectangular"&&{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${as.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="rectangular"&&{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${as.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="rectangular"&&{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${as.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="rectangular"&&{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${as.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="circular"&&{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${as.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="circular"&&{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${as.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="circular"&&{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${as.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="circular"&&{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${as.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},e.invisible&&{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})})),Eie=P.forwardRef(function(e,n){var r,o,i,s,l,a;const u=Sn({props:e,name:"MuiBadge"}),{anchorOrigin:c={vertical:"top",horizontal:"right"},className:d,component:h,components:p={},componentsProps:f={},children:g,overlap:m="rectangular",color:v="default",invisible:y=!1,max:b=99,badgeContent:w,slots:k,slotProps:x,showZero:S=!1,variant:A="standard"}=u,C=Pe(u,bie),{badgeContent:O,invisible:R,max:_,displayValue:T}=Cre({max:b,invisible:y,badgeContent:w,showZero:S}),E=HL({anchorOrigin:c,color:v,overlap:m,variant:A,badgeContent:w}),M=R||O==null&&A!=="dot",{color:I=v,overlap:N=m,anchorOrigin:L=c,variant:$=A}=M?E:u,D=$!=="dot"?T:void 0,F=K({},u,{badgeContent:O,invisible:M,max:_,displayValue:D,showZero:S,anchorOrigin:L,color:I,overlap:N,variant:$}),U=wie(F),W=(r=(o=k==null?void 0:k.root)!=null?o:p.Root)!=null?r:xie,B=(i=(s=k==null?void 0:k.badge)!=null?s:p.Badge)!=null?i:kie,H=(l=x==null?void 0:x.root)!=null?l:f.root,G=(a=x==null?void 0:x.badge)!=null?a:f.badge,Y=Gi({elementType:W,externalSlotProps:H,externalForwardedProps:C,additionalProps:{ref:n,as:h},ownerState:F,className:Ve(H==null?void 0:H.className,U.root,d)}),X=Gi({elementType:B,externalSlotProps:G,ownerState:F,className:Ve(U.badge,G==null?void 0:G.className)});return V.jsxs(W,K({},Y,{children:[g,V.jsx(B,K({},X,{children:D}))]}))}),Sie=Eie,Cie=Px(),Tie=Ste({themeId:Zc,defaultTheme:Cie,defaultClassName:"MuiBox-root",generateClassName:WL.generate}),ON=Tie;function Aie(t){return xn("MuiModal",t)}kn("MuiModal",["root","hidden","backdrop"]);const _ie=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Rie=t=>{const{open:e,exited:n,classes:r}=t;return Pn({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},Aie,r)},Mie=Et("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>K({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),Oie=Et(mie,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),Iie=P.forwardRef(function(e,n){var r,o,i,s,l,a;const u=Sn({name:"MuiModal",props:e}),{BackdropComponent:c=Oie,BackdropProps:d,className:h,closeAfterTransition:p=!1,children:f,container:g,component:m,components:v={},componentsProps:y={},disableAutoFocus:b=!1,disableEnforceFocus:w=!1,disableEscapeKeyDown:k=!1,disablePortal:x=!1,disableRestoreFocus:S=!1,disableScrollLock:A=!1,hideBackdrop:C=!1,keepMounted:O=!1,onBackdropClick:R,open:_,slotProps:T,slots:E}=u,M=Pe(u,_ie),I=K({},u,{closeAfterTransition:p,disableAutoFocus:b,disableEnforceFocus:w,disableEscapeKeyDown:k,disablePortal:x,disableRestoreFocus:S,disableScrollLock:A,hideBackdrop:C,keepMounted:O}),{getRootProps:N,getBackdropProps:L,getTransitionProps:$,portalRef:D,isTopModal:F,exited:U,hasTransition:W}=rie(K({},I,{rootRef:n})),B=K({},I,{exited:U}),H=Rie(B),G={};if(f.props.tabIndex===void 0&&(G.tabIndex="-1"),W){const{onEnter:ve,onExited:_e}=$();G.onEnter=ve,G.onExited=_e}const Y=(r=(o=E==null?void 0:E.root)!=null?o:v.Root)!=null?r:Mie,X=(i=(s=E==null?void 0:E.backdrop)!=null?s:v.Backdrop)!=null?i:c,Z=(l=T==null?void 0:T.root)!=null?l:y.root,te=(a=T==null?void 0:T.backdrop)!=null?a:y.backdrop,de=Gi({elementType:Y,externalSlotProps:Z,externalForwardedProps:M,getSlotProps:N,additionalProps:{ref:n,as:m},ownerState:B,className:Ve(h,Z==null?void 0:Z.className,H==null?void 0:H.root,!B.open&&B.exited&&(H==null?void 0:H.hidden))}),Ie=Gi({elementType:X,externalSlotProps:te,additionalProps:d,getSlotProps:ve=>L(K({},ve,{onClick:_e=>{R&&R(_e),ve!=null&&ve.onClick&&ve.onClick(_e)}})),className:Ve(te==null?void 0:te.className,d==null?void 0:d.className,H==null?void 0:H.backdrop),ownerState:B});return!O&&!_&&(!W||U)?null:V.jsx(MN,{ref:D,container:g,disablePortal:x,children:V.jsxs(Y,K({},de,{children:[!C&&c?V.jsx(X,K({},Ie)):null,V.jsx(Ire,{disableEnforceFocus:w,disableAutoFocus:b,disableRestoreFocus:S,isEnabled:F,open:_,children:P.cloneElement(f,G)})]}))})}),Lie=Iie,Nie=kn("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),g_=Nie,$ie=tne({createStyledComponent:Et("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>Sn({props:t,name:"MuiStack"})}),Die=$ie,Pie=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function ob(t){return`scale(${t}, ${t**2})`}const zie={entering:{opacity:1,transform:ob(1)},entered:{opacity:1,transform:"none"}},n0=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),IN=P.forwardRef(function(e,n){const{addEndListener:r,appear:o=!0,children:i,easing:s,in:l,onEnter:a,onEntered:u,onEntering:c,onExit:d,onExited:h,onExiting:p,style:f,timeout:g="auto",TransitionComponent:m=vN}=e,v=Pe(e,Pie),y=P.useRef(),b=P.useRef(),w=Rv(),k=P.useRef(null),x=Rr(k,i.ref,n),S=M=>I=>{if(M){const N=k.current;I===void 0?M(N):M(N,I)}},A=S(c),C=S((M,I)=>{yN(M);const{duration:N,delay:L,easing:$}=Kg({style:f,timeout:g,easing:s},{mode:"enter"});let D;g==="auto"?(D=w.transitions.getAutoHeightDuration(M.clientHeight),b.current=D):D=N,M.style.transition=[w.transitions.create("opacity",{duration:D,delay:L}),w.transitions.create("transform",{duration:n0?D:D*.666,delay:L,easing:$})].join(","),a&&a(M,I)}),O=S(u),R=S(p),_=S(M=>{const{duration:I,delay:N,easing:L}=Kg({style:f,timeout:g,easing:s},{mode:"exit"});let $;g==="auto"?($=w.transitions.getAutoHeightDuration(M.clientHeight),b.current=$):$=I,M.style.transition=[w.transitions.create("opacity",{duration:$,delay:N}),w.transitions.create("transform",{duration:n0?$:$*.666,delay:n0?N:N||$*.333,easing:L})].join(","),M.style.opacity=0,M.style.transform=ob(.75),d&&d(M)}),T=S(h),E=M=>{g==="auto"&&(y.current=setTimeout(M,b.current||0)),r&&r(k.current,M)};return P.useEffect(()=>()=>{clearTimeout(y.current)},[]),V.jsx(m,K({appear:o,in:l,nodeRef:k,onEnter:C,onEntered:O,onEntering:A,onExit:_,onExited:T,onExiting:R,addEndListener:E,timeout:g==="auto"?null:g},v,{children:(M,I)=>P.cloneElement(i,K({style:K({opacity:0,transform:ob(.75),visibility:M==="exited"&&!l?"hidden":void 0},zie[M],f,i.props.style),ref:x},I))}))});IN.muiSupportAuto=!0;const ib=IN,Fie=P.createContext({}),_h=Fie;function Bie(t){return xn("MuiList",t)}kn("MuiList",["root","padding","dense","subheader"]);const Hie=["children","className","component","dense","disablePadding","subheader"],Uie=t=>{const{classes:e,disablePadding:n,dense:r,subheader:o}=t;return Pn({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Bie,e)},Wie=Et("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>K({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),Vie=P.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:l=!1,disablePadding:a=!1,subheader:u}=r,c=Pe(r,Hie),d=P.useMemo(()=>({dense:l}),[l]),h=K({},r,{component:s,dense:l,disablePadding:a}),p=Uie(h);return V.jsx(_h.Provider,{value:d,children:V.jsxs(Wie,K({as:s,className:Ve(p.root,i),ref:n,ownerState:h},c,{children:[u,o]}))})}),jie=Vie;function Gie(t){return xn("MuiListItemIcon",t)}const Kie=kn("MuiListItemIcon",["root","alignItemsFlexStart"]),m_=Kie,Yie=["className"],Xie=t=>{const{alignItems:e,classes:n}=t;return Pn({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},Gie,n)},qie=Et("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.alignItems==="flex-start"&&e.alignItemsFlexStart]}})(({theme:t,ownerState:e})=>K({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},e.alignItems==="flex-start"&&{marginTop:8})),Zie=P.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiListItemIcon"}),{className:o}=r,i=Pe(r,Yie),s=P.useContext(_h),l=K({},r,{alignItems:s.alignItems}),a=Xie(l);return V.jsx(qie,K({className:Ve(a.root,o),ownerState:l,ref:n},i))}),Jie=Zie;function Qie(t){return xn("MuiListItemText",t)}const ese=kn("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Xg=ese,tse=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],nse=t=>{const{classes:e,inset:n,primary:r,secondary:o,dense:i}=t;return Pn({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},Qie,e)},rse=Et("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Xg.primary}`]:e.primary},{[`& .${Xg.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})(({ownerState:t})=>K({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),ose=P.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiListItemText"}),{children:o,className:i,disableTypography:s=!1,inset:l=!1,primary:a,primaryTypographyProps:u,secondary:c,secondaryTypographyProps:d}=r,h=Pe(r,tse),{dense:p}=P.useContext(_h);let f=a??o,g=c;const m=K({},r,{disableTypography:s,inset:l,primary:!!f,secondary:!!g,dense:p}),v=nse(m);return f!=null&&f.type!==xd&&!s&&(f=V.jsx(xd,K({variant:p?"body2":"body1",className:v.primary,component:u!=null&&u.variant?void 0:"span",display:"block"},u,{children:f}))),g!=null&&g.type!==xd&&!s&&(g=V.jsx(xd,K({variant:"body2",className:v.secondary,color:"text.secondary",display:"block"},d,{children:g}))),V.jsxs(rse,K({className:Ve(v.root,i),ownerState:m,ref:n},h,{children:[f,g]}))}),ise=ose,sse=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function r0(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function v_(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function LN(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function zu(t,e,n,r,o,i){let s=!1,l=o(t,e,e?n:!1);for(;l;){if(l===t.firstChild){if(s)return!1;s=!0}const a=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!LN(l,i)||a)l=o(t,l,n);else return l.focus(),!0}return!1}const ase=P.forwardRef(function(e,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:l,disabledItemsFocusable:a=!1,disableListWrap:u=!1,onKeyDown:c,variant:d="selectedMenu"}=e,h=Pe(e,sse),p=P.useRef(null),f=P.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ll(()=>{o&&p.current.focus()},[o]),P.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(b,w)=>{const k=!p.current.style.width;if(b.clientHeight{const w=p.current,k=b.key,x=Tr(w).activeElement;if(k==="ArrowDown")b.preventDefault(),zu(w,x,u,a,r0);else if(k==="ArrowUp")b.preventDefault(),zu(w,x,u,a,v_);else if(k==="Home")b.preventDefault(),zu(w,null,u,a,r0);else if(k==="End")b.preventDefault(),zu(w,null,u,a,v_);else if(k.length===1){const S=f.current,A=k.toLowerCase(),C=performance.now();S.keys.length>0&&(C-S.lastTime>500?(S.keys=[],S.repeating=!0,S.previousKeyMatched=!0):S.repeating&&A!==S.keys[0]&&(S.repeating=!1)),S.lastTime=C,S.keys.push(A);const O=x&&!S.repeating&&LN(x,S);S.previousKeyMatched&&(O||zu(w,x,!1,a,r0,S))?b.preventDefault():S.previousKeyMatched=!1}c&&c(b)},m=Rr(p,n);let v=-1;P.Children.forEach(s,(b,w)=>{if(!P.isValidElement(b)){v===w&&(v+=1,v>=s.length&&(v=-1));return}b.props.disabled||(d==="selectedMenu"&&b.props.selected||v===-1)&&(v=w),v===w&&(b.props.disabled||b.props.muiSkipListHighlight||b.type.muiSkipListHighlight)&&(v+=1,v>=s.length&&(v=-1))});const y=P.Children.map(s,(b,w)=>{if(w===v){const k={};return i&&(k.autoFocus=!0),b.props.tabIndex===void 0&&d==="selectedMenu"&&(k.tabIndex=0),P.cloneElement(b,k)}return b});return V.jsx(jie,K({role:"menu",ref:m,className:l,onKeyDown:g,tabIndex:o?0:-1},h,{children:y}))}),lse=ase;function cse(t){return xn("MuiPopover",t)}kn("MuiPopover",["root","paper"]);const use=["onEntering"],dse=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],hse=["slotProps"];function y_(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function b_(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function w_(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function o0(t){return typeof t=="function"?t():t}const pse=t=>{const{classes:e}=t;return Pn({root:["root"],paper:["paper"]},cse,e)},fse=Et(Lie,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),NN=Et(Une,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),gse=P.forwardRef(function(e,n){var r,o,i;const s=Sn({props:e,name:"MuiPopover"}),{action:l,anchorEl:a,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:d="anchorEl",children:h,className:p,container:f,elevation:g=8,marginThreshold:m=16,open:v,PaperProps:y={},slots:b,slotProps:w,transformOrigin:k={vertical:"top",horizontal:"left"},TransitionComponent:x=ib,transitionDuration:S="auto",TransitionProps:{onEntering:A}={},disableScrollLock:C=!1}=s,O=Pe(s.TransitionProps,use),R=Pe(s,dse),_=(r=w==null?void 0:w.paper)!=null?r:y,T=P.useRef(),E=Rr(T,_.ref),M=K({},s,{anchorOrigin:u,anchorReference:d,elevation:g,marginThreshold:m,externalPaperSlotProps:_,transformOrigin:k,TransitionComponent:x,transitionDuration:S,TransitionProps:O}),I=pse(M),N=P.useCallback(()=>{if(d==="anchorPosition")return c;const ve=o0(a),Se=(ve&&ve.nodeType===1?ve:Tr(T.current).body).getBoundingClientRect();return{top:Se.top+y_(Se,u.vertical),left:Se.left+b_(Se,u.horizontal)}},[a,u.horizontal,u.vertical,c,d]),L=P.useCallback(ve=>({vertical:y_(ve,k.vertical),horizontal:b_(ve,k.horizontal)}),[k.horizontal,k.vertical]),$=P.useCallback(ve=>{const _e={width:ve.offsetWidth,height:ve.offsetHeight},Se=L(_e);if(d==="none")return{top:null,left:null,transformOrigin:w_(Se)};const mt=N();let Ot=mt.top-Se.vertical,bt=mt.left-Se.horizontal;const Xn=Ot+_e.height,It=bt+_e.width,Cn=kh(o0(a)),dn=Cn.innerHeight-m,hn=Cn.innerWidth-m;if(m!==null&&Otdn){const Ye=Xn-dn;Ot-=Ye,Se.vertical+=Ye}if(m!==null&&bthn){const Ye=It-hn;bt-=Ye,Se.horizontal+=Ye}return{top:`${Math.round(Ot)}px`,left:`${Math.round(bt)}px`,transformOrigin:w_(Se)}},[a,d,N,L,m]),[D,F]=P.useState(v),U=P.useCallback(()=>{const ve=T.current;if(!ve)return;const _e=$(ve);_e.top!==null&&(ve.style.top=_e.top),_e.left!==null&&(ve.style.left=_e.left),ve.style.transformOrigin=_e.transformOrigin,F(!0)},[$]);P.useEffect(()=>(C&&window.addEventListener("scroll",U),()=>window.removeEventListener("scroll",U)),[a,C,U]);const W=(ve,_e)=>{A&&A(ve,_e),U()},B=()=>{F(!1)};P.useEffect(()=>{v&&U()}),P.useImperativeHandle(l,()=>v?{updatePosition:()=>{U()}}:null,[v,U]),P.useEffect(()=>{if(!v)return;const ve=uQ(()=>{U()}),_e=kh(a);return _e.addEventListener("resize",ve),()=>{ve.clear(),_e.removeEventListener("resize",ve)}},[a,v,U]);let H=S;S==="auto"&&!x.muiSupportAuto&&(H=void 0);const G=f||(a?Tr(o0(a)).body:void 0),Y=(o=b==null?void 0:b.root)!=null?o:fse,X=(i=b==null?void 0:b.paper)!=null?i:NN,Z=Gi({elementType:X,externalSlotProps:K({},_,{style:D?_.style:K({},_.style,{opacity:0})}),additionalProps:{elevation:g,ref:E},ownerState:M,className:Ve(I.paper,_==null?void 0:_.className)}),te=Gi({elementType:Y,externalSlotProps:(w==null?void 0:w.root)||{},externalForwardedProps:R,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:G,open:v},ownerState:M,className:Ve(I.root,p)}),{slotProps:de}=te,Ie=Pe(te,hse);return V.jsx(Y,K({},Ie,!bN(Y)&&{slotProps:de,disableScrollLock:C},{children:V.jsx(x,K({appear:!0,in:v,onEntering:W,onExited:B,timeout:H},O,{children:V.jsx(X,K({},Z,{children:h}))}))}))}),mse=gse;function vse(t){return xn("MuiMenu",t)}kn("MuiMenu",["root","paper","list"]);const yse=["onEntering"],bse=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],wse={vertical:"top",horizontal:"right"},xse={vertical:"top",horizontal:"left"},kse=t=>{const{classes:e}=t;return Pn({root:["root"],paper:["paper"],list:["list"]},vse,e)},Ese=Et(mse,{shouldForwardProp:t=>Fx(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Sse=Et(NN,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Cse=Et(lse,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),Tse=P.forwardRef(function(e,n){var r,o;const i=Sn({props:e,name:"MuiMenu"}),{autoFocus:s=!0,children:l,className:a,disableAutoFocusItem:u=!1,MenuListProps:c={},onClose:d,open:h,PaperProps:p={},PopoverClasses:f,transitionDuration:g="auto",TransitionProps:{onEntering:m}={},variant:v="selectedMenu",slots:y={},slotProps:b={}}=i,w=Pe(i.TransitionProps,yse),k=Pe(i,bse),x=Rv(),S=x.direction==="rtl",A=K({},i,{autoFocus:s,disableAutoFocusItem:u,MenuListProps:c,onEntering:m,PaperProps:p,transitionDuration:g,TransitionProps:w,variant:v}),C=kse(A),O=s&&!u&&h,R=P.useRef(null),_=($,D)=>{R.current&&R.current.adjustStyleForScrollbar($,x),m&&m($,D)},T=$=>{$.key==="Tab"&&($.preventDefault(),d&&d($,"tabKeyDown"))};let E=-1;P.Children.map(l,($,D)=>{P.isValidElement($)&&($.props.disabled||(v==="selectedMenu"&&$.props.selected||E===-1)&&(E=D))});const M=(r=y.paper)!=null?r:Sse,I=(o=b.paper)!=null?o:p,N=Gi({elementType:y.root,externalSlotProps:b.root,ownerState:A,className:[C.root,a]}),L=Gi({elementType:M,externalSlotProps:I,ownerState:A,className:C.paper});return V.jsx(Ese,K({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?wse:xse,slots:{paper:M,root:y.root},slotProps:{root:N,paper:L},open:h,ref:n,transitionDuration:g,TransitionProps:K({onEntering:_},w),ownerState:A},k,{classes:f,children:V.jsx(Cse,K({onKeyDown:T,actions:R,autoFocus:s&&(E===-1||u),autoFocusItem:O,variant:v},c,{className:Ve(C.list,c.className),children:l}))}))}),Ase=Tse;function _se(t){return xn("MuiMenuItem",t)}const Rse=kn("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Fu=Rse,Mse=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Ose=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},Ise=t=>{const{disabled:e,dense:n,divider:r,disableGutters:o,selected:i,classes:s}=t,a=Pn({root:["root",n&&"dense",e&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},_se,s);return K({},s,a)},Lse=Et(Ux,{shouldForwardProp:t=>Fx(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Ose})(({theme:t,ownerState:e})=>K({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Fu.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:xr(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Fu.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:xr(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Fu.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:xr(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:xr(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Fu.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Fu.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${g_.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${g_.inset}`]:{marginLeft:52},[`& .${Xg.root}`]:{marginTop:0,marginBottom:0},[`& .${Xg.inset}`]:{paddingLeft:36},[`& .${m_.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&K({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${m_.root} svg`]:{fontSize:"1.25rem"}}))),Nse=P.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:s=!1,divider:l=!1,disableGutters:a=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:d,className:h}=r,p=Pe(r,Mse),f=P.useContext(_h),g=P.useMemo(()=>({dense:s||f.dense||!1,disableGutters:a}),[f.dense,s,a]),m=P.useRef(null);ll(()=>{o&&m.current&&m.current.focus()},[o]);const v=K({},r,{dense:g.dense,divider:l,disableGutters:a}),y=Ise(r),b=Rr(m,n);let w;return r.disabled||(w=d!==void 0?d:-1),V.jsx(_h.Provider,{value:g,children:V.jsx(Lse,K({ref:b,role:c,tabIndex:w,component:i,focusVisibleClassName:Ve(y.focusVisible,u),className:Ve(y.root,h)},p,{ownerState:v,classes:y}))})}),$se=Nse;function Dse(t){return xn("MuiTooltip",t)}const Pse=kn("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Ts=Pse,zse=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function Fse(t){return Math.round(t*1e5)/1e5}const Bse=t=>{const{classes:e,disableInteractive:n,arrow:r,touch:o,placement:i}=t,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${ht(i.split("-")[0])}`],arrow:["arrow"]};return Pn(s,Dse,e)},Hse=Et(qx,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.popper,!n.disableInteractive&&e.popperInteractive,n.arrow&&e.popperArrow,!n.open&&e.popperClose]}})(({theme:t,ownerState:e,open:n})=>K({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!e.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},e.arrow&&{[`&[data-popper-placement*="bottom"] .${Ts.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Ts.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Ts.arrow}`]:K({},e.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Ts.arrow}`]:K({},e.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),Use=Et("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.tooltip,n.touch&&e.touch,n.arrow&&e.tooltipArrow,e[`tooltipPlacement${ht(n.placement.split("-")[0])}`]]}})(({theme:t,ownerState:e})=>K({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:xr(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},e.arrow&&{position:"relative",margin:0},e.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${Fse(16/14)}em`,fontWeight:t.typography.fontWeightRegular},{[`.${Ts.popper}[data-popper-placement*="left"] &`]:K({transformOrigin:"right center"},e.isRtl?K({marginLeft:"14px"},e.touch&&{marginLeft:"24px"}):K({marginRight:"14px"},e.touch&&{marginRight:"24px"})),[`.${Ts.popper}[data-popper-placement*="right"] &`]:K({transformOrigin:"left center"},e.isRtl?K({marginRight:"14px"},e.touch&&{marginRight:"24px"}):K({marginLeft:"14px"},e.touch&&{marginLeft:"24px"})),[`.${Ts.popper}[data-popper-placement*="top"] &`]:K({transformOrigin:"center bottom",marginBottom:"14px"},e.touch&&{marginBottom:"24px"}),[`.${Ts.popper}[data-popper-placement*="bottom"] &`]:K({transformOrigin:"center top",marginTop:"14px"},e.touch&&{marginTop:"24px"})})),Wse=Et("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(t,e)=>e.arrow})(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:xr(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let rf=!1,i0=null,Bu={x:0,y:0};function of(t,e){return n=>{e&&e(n),t(n)}}const Vse=P.forwardRef(function(e,n){var r,o,i,s,l,a,u,c,d,h,p,f,g,m,v,y,b,w,k;const x=Sn({props:e,name:"MuiTooltip"}),{arrow:S=!1,children:A,components:C={},componentsProps:O={},describeChild:R=!1,disableFocusListener:_=!1,disableHoverListener:T=!1,disableInteractive:E=!1,disableTouchListener:M=!1,enterDelay:I=100,enterNextDelay:N=0,enterTouchDelay:L=700,followCursor:$=!1,id:D,leaveDelay:F=0,leaveTouchDelay:U=1500,onClose:W,onOpen:B,open:H,placement:G="bottom",PopperComponent:Y,PopperProps:X={},slotProps:Z={},slots:te={},title:de,TransitionComponent:Ie=ib,TransitionProps:ve}=x,_e=Pe(x,zse),Se=P.isValidElement(A)?A:V.jsx("span",{children:A}),mt=Rv(),Ot=mt.direction==="rtl",[bt,Xn]=P.useState(),[It,Cn]=P.useState(null),dn=P.useRef(!1),hn=E||$,Ye=P.useRef(),Tn=P.useRef(),q=P.useRef(),ue=P.useRef(),[me,ie]=pQ({controlled:H,default:!1,name:"Tooltip",state:"open"});let Ce=me;const Xe=hQ(D),Ke=P.useRef(),et=P.useCallback(()=>{Ke.current!==void 0&&(document.body.style.WebkitUserSelect=Ke.current,Ke.current=void 0),clearTimeout(ue.current)},[]);P.useEffect(()=>()=>{clearTimeout(Ye.current),clearTimeout(Tn.current),clearTimeout(q.current),et()},[et]);const tt=Le=>{clearTimeout(i0),rf=!0,ie(!0),B&&!Ce&&B(Le)},ze=Ba(Le=>{clearTimeout(i0),i0=setTimeout(()=>{rf=!1},800+F),ie(!1),W&&Ce&&W(Le),clearTimeout(Ye.current),Ye.current=setTimeout(()=>{dn.current=!1},mt.transitions.duration.shortest)}),jt=Le=>{dn.current&&Le.type!=="touchstart"||(bt&&bt.removeAttribute("title"),clearTimeout(Tn.current),clearTimeout(q.current),I||rf&&N?Tn.current=setTimeout(()=>{tt(Le)},rf?N:I):tt(Le))},Co=Le=>{clearTimeout(Tn.current),clearTimeout(q.current),q.current=setTimeout(()=>{ze(Le)},F)},{isFocusVisibleRef:ua,onBlur:yi,onFocus:bp,ref:Bv}=FL(),[,wp]=P.useState(!1),_l=Le=>{yi(Le),ua.current===!1&&(wp(!1),Co(Le))},Qi=Le=>{bt||Xn(Le.currentTarget),bp(Le),ua.current===!0&&(wp(!0),jt(Le))},Rl=Le=>{dn.current=!0;const Zn=Se.props;Zn.onTouchStart&&Zn.onTouchStart(Le)},Ml=jt,Ol=Co,da=Le=>{Rl(Le),clearTimeout(q.current),clearTimeout(Ye.current),et(),Ke.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ue.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Ke.current,jt(Le)},L)},Hv=Le=>{Se.props.onTouchEnd&&Se.props.onTouchEnd(Le),et(),clearTimeout(q.current),q.current=setTimeout(()=>{ze(Le)},U)};P.useEffect(()=>{if(!Ce)return;function Le(Zn){(Zn.key==="Escape"||Zn.key==="Esc")&&ze(Zn)}return document.addEventListener("keydown",Le),()=>{document.removeEventListener("keydown",Le)}},[ze,Ce]);const Uv=Rr(Se.ref,Bv,Xn,n);!de&&de!==0&&(Ce=!1);const xu=P.useRef(),Wv=Le=>{const Zn=Se.props;Zn.onMouseMove&&Zn.onMouseMove(Le),Bu={x:Le.clientX,y:Le.clientY},xu.current&&xu.current.update()},ha={},Il=typeof de=="string";R?(ha.title=!Ce&&Il&&!T?de:null,ha["aria-describedby"]=Ce?Xe:null):(ha["aria-label"]=Il?de:null,ha["aria-labelledby"]=Ce&&!Il?Xe:null);const qn=K({},ha,_e,Se.props,{className:Ve(_e.className,Se.props.className),onTouchStart:Rl,ref:Uv},$?{onMouseMove:Wv}:{}),Lr={};M||(qn.onTouchStart=da,qn.onTouchEnd=Hv),T||(qn.onMouseOver=of(Ml,qn.onMouseOver),qn.onMouseLeave=of(Ol,qn.onMouseLeave),hn||(Lr.onMouseOver=Ml,Lr.onMouseLeave=Ol)),_||(qn.onFocus=of(Qi,qn.onFocus),qn.onBlur=of(_l,qn.onBlur),hn||(Lr.onFocus=Qi,Lr.onBlur=_l));const Vv=P.useMemo(()=>{var Le;let Zn=[{name:"arrow",enabled:!!It,options:{element:It,padding:4}}];return(Le=X.popperOptions)!=null&&Le.modifiers&&(Zn=Zn.concat(X.popperOptions.modifiers)),K({},X.popperOptions,{modifiers:Zn})},[It,X]),pa=K({},x,{isRtl:Ot,arrow:S,disableInteractive:hn,placement:G,PopperComponentProp:Y,touch:dn.current}),ku=Bse(pa),xp=(r=(o=te.popper)!=null?o:C.Popper)!=null?r:Hse,kp=(i=(s=(l=te.transition)!=null?l:C.Transition)!=null?s:Ie)!=null?i:ib,ro=(a=(u=te.tooltip)!=null?u:C.Tooltip)!=null?a:Use,Ep=(c=(d=te.arrow)!=null?d:C.Arrow)!=null?c:Wse,jv=kd(xp,K({},X,(h=Z.popper)!=null?h:O.popper,{className:Ve(ku.popper,X==null?void 0:X.className,(p=(f=Z.popper)!=null?f:O.popper)==null?void 0:p.className)}),pa),Gv=kd(kp,K({},ve,(g=Z.transition)!=null?g:O.transition),pa),Kv=kd(ro,K({},(m=Z.tooltip)!=null?m:O.tooltip,{className:Ve(ku.tooltip,(v=(y=Z.tooltip)!=null?y:O.tooltip)==null?void 0:v.className)}),pa),Yv=kd(Ep,K({},(b=Z.arrow)!=null?b:O.arrow,{className:Ve(ku.arrow,(w=(k=Z.arrow)!=null?k:O.arrow)==null?void 0:w.className)}),pa);return V.jsxs(P.Fragment,{children:[P.cloneElement(Se,qn),V.jsx(xp,K({as:Y??qx,placement:G,anchorEl:$?{getBoundingClientRect:()=>({top:Bu.y,left:Bu.x,right:Bu.x,bottom:Bu.y,width:0,height:0})}:bt,popperRef:xu,open:bt?Ce:!1,id:Xe,transition:!0},Lr,jv,{popperOptions:Vv,children:({TransitionProps:Le})=>V.jsx(kp,K({timeout:mt.transitions.duration.shorter},Le,Gv,{children:V.jsxs(ro,K({},Kv,{children:[de,S?V.jsx(Ep,K({},Yv,{ref:Cn})):null]}))}))}))]})}),$N=Vse;function jse(t){return xn("MuiToggleButton",t)}const Gse=kn("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge"]),x_=Gse,Kse=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],Yse=t=>{const{classes:e,fullWidth:n,selected:r,disabled:o,size:i,color:s}=t,l={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${ht(i)}`,s]};return Pn(l,jse,e)},Xse=Et(Ux,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`size${ht(n.size)}`]]}})(({theme:t,ownerState:e})=>{let n=e.color==="standard"?t.palette.text.primary:t.palette[e.color].main,r;return t.vars&&(n=e.color==="standard"?t.vars.palette.text.primary:t.vars.palette[e.color].main,r=e.color==="standard"?t.vars.palette.text.primaryChannel:t.vars.palette[e.color].mainChannel),K({},t.typography.button,{borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active},e.fullWidth&&{width:"100%"},{[`&.${x_.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:xr(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${x_.selected}`]:{color:n,backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:xr(n,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${r} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:xr(n,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:xr(n,t.palette.action.selectedOpacity)}}}},e.size==="small"&&{padding:7,fontSize:t.typography.pxToRem(13)},e.size==="large"&&{padding:15,fontSize:t.typography.pxToRem(15)})}),qse=P.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiToggleButton"}),{children:o,className:i,color:s="standard",disabled:l=!1,disableFocusRipple:a=!1,fullWidth:u=!1,onChange:c,onClick:d,selected:h,size:p="medium",value:f}=r,g=Pe(r,Kse),m=K({},r,{color:s,disabled:l,disableFocusRipple:a,fullWidth:u,size:p}),v=Yse(m),y=b=>{d&&(d(b,f),b.defaultPrevented)||c&&c(b,f)};return V.jsx(Xse,K({className:Ve(v.root,i),disabled:l,focusRipple:!a,ref:n,onClick:y,onChange:c,value:f,ownerState:m,"aria-pressed":h},g,{children:o}))}),Zse=qse;var Jse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 15v2c0 1.054.95 2 2 2h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM3 3h6a3 3 0 0 1 2.235 5A3 3 0 0 1 9 13H3V3zm6 6H5v2h4a1 1 0 0 0 0-2zm8-6a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM9 5H5v2h4a1 1 0 1 0 0-2z"}}],Qse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],eae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],tae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0zm-8.66 16h15.588L12 5.5 4.206 19zM11 16h2v2h-2v-2zm0-7h2v5h-2V9z"}}],nae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 19h18v2H3v-2zm5-6h3l-4 4-4-4h3V3h2v10zm10 0h3l-4 4-4-4h3V3h2v10z"}}],rae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm2 15h14v2H5v-2zm-2-5h18v2H3v-2zm2-5h14v2H5V9z"}}],oae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm0-5h18v2H3v-2zm0-5h18v2H3V9z"}}],iae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h14v2H3v-2zm0-5h18v2H3v-2zm0-5h14v2H3V9z"}}],sae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm4 15h14v2H7v-2zm-4-5h18v2H3v-2zm4-5h14v2H7V9z"}}],aae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3h18v2H3V3zm5 8v10H6V11H3l4-4 4 4H8zm10 0v10h-2V11h-3l4-4 4 4h-3z"}}],lae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 11h18v2H3v-2zm15 7v3h-2v-3h-3l4-4 4 4h-3zM8 18v3H6v-3H3l4-4 4 4H8zM18 6h3l-4 4-4-4h3V3h2v3zM8 6h3l-4 4-4-4h3V3h2v3z"}}],cae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.75 2.5A4.25 4.25 0 0 1 11 6.75V11H6.75a4.25 4.25 0 1 1 0-8.5zM9 9V6.75A2.25 2.25 0 1 0 6.75 9H9zm-2.25 4H11v4.25A4.25 4.25 0 1 1 6.75 13zm0 2A2.25 2.25 0 1 0 9 17.25V15H6.75zm10.5-12.5a4.25 4.25 0 1 1 0 8.5H13V6.75a4.25 4.25 0 0 1 4.25-4.25zm0 6.5A2.25 2.25 0 1 0 15 6.75V9h2.25zM13 13h4.25A4.25 4.25 0 1 1 13 17.25V13zm2 2v2.25A2.25 2.25 0 1 0 17.25 15H15z"}}],uae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 16l-6-6h12z"}}],dae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 7v4L2 6l6-5v4h5a8 8 0 1 1 0 16H4v-2h9a6 6 0 1 0 0-12H8z"}}],hae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 7h-5a6 6 0 1 0 0 12h9v2h-9a8 8 0 1 1 0-16h5V1l6 5-6 5V7z"}}],pae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 12l6-6v12z"}}],fae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 12l-6 6V6z"}}],gae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8l6 6H6z"}}],mae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 3v7.267l6.294-3.633 1 1.732-6.293 3.633 6.293 3.635-1 1.732L13 13.732V21h-2v-7.268l-6.294 3.634-1-1.732L9.999 12 3.706 8.366l1-1.732L11 10.267V3z"}}],vae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.828 7.757l-5.656 5.657a1 1 0 1 0 1.414 1.414l5.657-5.656A3 3 0 1 0 12 4.929l-5.657 5.657a5 5 0 1 0 7.071 7.07L19.071 12l1.414 1.414-5.657 5.657a7 7 0 1 1-9.9-9.9l5.658-5.656a5 5 0 0 1 7.07 7.07L12 16.244A3 3 0 1 1 7.757 12l5.657-5.657 1.414 1.414z"}}],yae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 11h4.5a2.5 2.5 0 1 0 0-5H8v5zm10 4.5a4.5 4.5 0 0 1-4.5 4.5H6V4h6.5a4.5 4.5 0 0 1 3.256 7.606A4.498 4.498 0 0 1 18 15.5zM8 13v5h5.5a2.5 2.5 0 1 0 0-5H8z"}}],bae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 18v-3.7a1.5 1.5 0 0 0-1.5-1.5H2v-1.6h.5A1.5 1.5 0 0 0 4 9.7V6a3 3 0 0 1 3-3h1v2H7a1 1 0 0 0-1 1v4.1A2 2 0 0 1 4.626 12 2 2 0 0 1 6 13.9V18a1 1 0 0 0 1 1h1v2H7a3 3 0 0 1-3-3zm16-3.7V18a3 3 0 0 1-3 3h-1v-2h1a1 1 0 0 0 1-1v-4.1a2 2 0 0 1 1.374-1.9A2 2 0 0 1 18 10.1V6a1 1 0 0 0-1-1h-1V3h1a3 3 0 0 1 3 3v3.7a1.5 1.5 0 0 0 1.5 1.5h.5v1.6h-.5a1.5 1.5 0 0 0-1.5 1.5z"}}],wae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M14 3c.552 0 1 .448 1 1v5h5c.552 0 1 .448 1 1v10c0 .552-.448 1-1 1H10c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h10zm-1 2H5v8h8V5z"}}],xae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M11 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v5h2c.552 0 1 .448 1 1v7c0 .552-.448 1-1 1h-7c-.552 0-1-.448-1-1v-2H7c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h7zm5 5H8v8h8V8z"}}],kae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 3v2H4v13.385L5.763 17H20v-7h2v8a1 1 0 0 1-1 1H6.455L2 22.5V4a1 1 0 0 1 1-1h11zm5 0V0h2v3h3v2h-3v3h-2V5h-3V3h3z"}}],Eae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-.997-4L6.76 11.757l1.414-1.414 2.829 2.829 5.656-5.657 1.415 1.414L11.003 16z"}}],Sae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M7 7V3a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-4v3.993c0 .556-.449 1.007-1.007 1.007H3.007A1.006 1.006 0 0 1 2 20.993l.003-12.986C2.003 7.451 2.452 7 3.01 7H7zm2 0h6.993C16.549 7 17 7.449 17 8.007V15h3V4H9v3zm6 2H4.003L4 20h11V9zm-6.497 9l-3.536-3.536 1.414-1.414 2.122 2.122 4.242-4.243 1.414 1.414L8.503 18z"}}],Cae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6 4v4h12V4h2.007c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 21.007V4.993C3 4.445 3.445 4 3.993 4H6zm2-2h8v4H8V2z"}}],Tae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 4V2h10v2h3.007c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 21.007V4.993C3 4.445 3.445 4 3.993 4H7zm0 2H5v14h14V6h-2v2H7V6zm2-2v2h6V4H9z"}}],Aae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm0-9.414l2.828-2.829 1.415 1.415L13.414 12l2.829 2.828-1.415 1.415L12 13.414l-2.828 2.829-1.415-1.415L10.586 12 7.757 9.172l1.415-1.415L12 10.586z"}}],_ae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"}}],Rae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"}}],Mae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M23 12l-7.071 7.071-1.414-1.414L20.172 12l-5.657-5.657 1.414-1.414L23 12zM3.828 12l5.657 5.657-1.414 1.414L1 12l7.071-7.071 1.414 1.414L3.828 12z"}}],Oae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.95 8.464l1.414-1.414 4.95 4.95-4.95 4.95-1.414-1.414L20.485 12 16.95 8.464zm-9.9 0L3.515 12l3.535 3.536-1.414 1.414L.686 12l4.95-4.95L7.05 8.464z"}}],Iae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3zm-8 5v6h2v-6H9zm4 0v6h2v-6h-2zM9 4v2h6V4H9z"}}],Lae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3zm1 2H6v12h12V8zm-9 3h2v6H9v-6zm4 0h2v6h-2v-6zM9 4v2h6V4H9z"}}],Nae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 3c.552 0 1 .448 1 1v8c.835-.628 1.874-1 3-1 2.761 0 5 2.239 5 5s-2.239 5-5 5c-1.032 0-1.99-.313-2.787-.848L13 20c0 .552-.448 1-1 1H6c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zm-1 2H7v14h4V5zm8 10h-6v2h6v-2z"}}],$ae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 5c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1 .628.835 1 1.874 1 3 0 2.761-2.239 5-5 5s-5-2.239-5-5c0-1.126.372-2.165 1-3H4c-.552 0-1-.448-1-1V6c0-.552.448-1 1-1h16zm-7 10v2h6v-2h-6zm6-8H5v4h14V7z"}}],Dae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4.583 17.321C3.553 16.227 3 15 3 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179zm10 0C13.553 16.227 13 15 13 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179z"}}],Pae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19.417 6.679C20.447 7.773 21 9 21 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311-1.804-.167-3.226-1.648-3.226-3.489a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179zm-10 0C10.447 7.773 11 9 11 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311C4.591 12.322 3.17 10.841 3.17 9a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179z"}}],zae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7zM14 9h5l-7 7-7-7h5V3h4v6z"}}],Fae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M16 13l6.964 4.062-2.973.85 2.125 3.681-1.732 1-2.125-3.68-2.223 2.15L16 13zm-2-7h2v2h5a1 1 0 0 1 1 1v4h-2v-3H10v10h4v2H9a1 1 0 0 1-1-1v-5H6v-2h2V9a1 1 0 0 1 1-1h5V6zM4 14v2H2v-2h2zm0-4v2H2v-2h2zm0-4v2H2V6h2zm0-4v2H2V2h2zm4 0v2H6V2h2zm4 0v2h-2V2h2zm4 0v2h-2V2h2z"}}],Bae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 19a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm-5.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm11 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zM13 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.621 6.302 14.685 14.685 0 0 0 5.327 3.042l-.536 1.93A16.685 16.685 0 0 1 12 13.726a16.696 16.696 0 0 1-6.202 3.547l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042 18.077 18.077 0 0 1-2.822-4.3h2.24A16.031 16.031 0 0 0 12 10.876a16.168 16.168 0 0 0 2.91-4.876L5 6V4h6V2h2z"}}],Hae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 19a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm-5.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm11 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zM18 3v2H8v4h9v2H8v4h10v2H6V3h12z"}}],Uae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 10h2v.757a4.5 4.5 0 0 1 7 3.743V20h-2v-5.5c0-1.43-1.175-2.5-2.5-2.5S16 13.07 16 14.5V20h-2V10zm-2-6v2H4v5h8v2H4v5h8v2H2V4h10z"}}],Wae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z"}}],Vae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm11-3v9l-3.794-3.793-5.999 6-1.414-1.414 5.999-6L12 3h9z"}}],jae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1.001 1.001 0 0 1 3 21l.003-14c0-.552.45-1 1.007-1H7zM5.003 8L5 20h10V8H5.003zM9 6h8v10h2V4H9v2z"}}],Gae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M6 21.5c-1.933 0-3.5-1.567-3.5-3.5s1.567-3.5 3.5-3.5c1.585 0 2.924 1.054 3.355 2.5H15v-2h2V9.242L14.757 7H9V9H3V3h6v2h5.757L18 1.756 22.243 6 19 9.241V15L21 15v6h-6v-2H9.355c-.43 1.446-1.77 2.5-3.355 2.5zm0-5c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm13 .5h-2v2h2v-2zM18 4.586L16.586 6 18 7.414 19.414 6 18 4.586zM7 5H5v2h2V5z"}}],Kae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.246 14H8.754l-1.6 4H5l6-15h2l6 15h-2.154l-1.6-4zm-.8-2L12 5.885 9.554 12h4.892zM3 20h18v2H3v-2z"}}],Yae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v15H8V6H2V4h14v2h-6zm8 8v7h-2v-7h-3v-2h8v2h-3z"}}],Xae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"}}],qae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12.651 14.065L11.605 20H9.574l1.35-7.661-7.41-7.41L4.93 3.515 20.485 19.07l-1.414 1.414-6.42-6.42zm-.878-6.535l.27-1.53h-1.8l-2-2H20v2h-5.927L13.5 9.257 11.773 7.53z"}}],Zae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z"}}],Jae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 3h2v6h-2V5h-4V3h4zM4 3h4v2H4v4H2V3h2zm16 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z"}}],Qae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 18l7.68-6L5 6V4h14v2H8.263L16 12l-7.737 6H19v2H5v-2z"}}],ele=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 1v4H4v14h16V3h1.008c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3H6V1h2zm4 7l4 4h-3v4h-2v-4H8l4-4zm6-7v4h-8V3h6V1h2z"}}],tle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm8-12v12h-2v-9.796l-2 .536V8.67L19.5 8H21z"}}],nle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 4c2.071 0 3.75 1.679 3.75 3.75 0 .857-.288 1.648-.772 2.28l-.148.18L18.034 18H22v2h-7v-1.556l4.82-5.546c.268-.307.43-.709.43-1.148 0-.966-.784-1.75-1.75-1.75-.918 0-1.671.707-1.744 1.606l-.006.144h-2C14.75 9.679 16.429 8 18.5 8z"}}],rle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M22 8l-.002 2-2.505 2.883c1.59.435 2.757 1.89 2.757 3.617 0 2.071-1.679 3.75-3.75 3.75-1.826 0-3.347-1.305-3.682-3.033l1.964-.382c.156.806.866 1.415 1.718 1.415.966 0 1.75-.784 1.75-1.75s-.784-1.75-1.75-1.75c-.286 0-.556.069-.794.19l-1.307-1.547L19.35 10H15V8h7zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"}}],ole=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm9-12v8h1.5v2H22v2h-2v-2h-5.5v-1.34l5-8.66H22zm-2 3.133L17.19 16H20v-4.867z"}}],ile=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M22 8v2h-4.323l-.464 2.636c.33-.089.678-.136 1.037-.136 2.21 0 4 1.79 4 4s-1.79 4-4 4c-1.827 0-3.367-1.224-3.846-2.897l1.923-.551c.24.836 1.01 1.448 1.923 1.448 1.105 0 2-.895 2-2s-.895-2-2-2c-.63 0-1.193.292-1.56.748l-1.81-.904L16 8h6zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"}}],sle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21.097 8l-2.598 4.5c2.21 0 4.001 1.79 4.001 4s-1.79 4-4 4-4-1.79-4-4c0-.736.199-1.426.546-2.019L18.788 8h2.309zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 10.5c-1.105 0-2 .895-2 2s.895 2 2 2 2-.895 2-2-.895-2-2-2z"}}],ale=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7.784 14l.42-4H4V8h4.415l.525-5h2.011l-.525 5h3.989l.525-5h2.011l-.525 5H20v2h-3.784l-.42 4H20v2h-4.415l-.525 5h-2.011l.525-5H9.585l-.525 5H7.049l.525-5H4v-2h3.784zm2.011 0h3.99l.42-4h-3.99l-.42 4z"}}],lle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 11V4h2v17h-2v-8H7v8H5V4h2v7z"}}],cle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 15v3h3v2h-3v3h-2v-3h-3v-2h3v-3h2zm.008-12c.548 0 .992.445.992.993V13h-2V5H4v13.999L14 9l3 3v2.829l-3-3L6.827 19H14v2H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016zM8 7a2 2 0 1 1 0 4 2 2 0 0 1 0-4z"}}],ule=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v1.757l-2 2V5H5v8.1l4-4 4.328 4.329-1.415 1.413L9 11.93l-4 3.999V19h10.533l.708.001 1.329-1.33L18.9 19h.1v-2.758l2-2V20c0 .552-.448 1-1 1H4c-.55 0-1-.45-1-1V4c0-.552.448-1 1-1h16zm1.778 4.808l1.414 1.414L15.414 17l-1.416-.002.002-1.412 7.778-7.778zM15.5 7c.828 0 1.5.672 1.5 1.5s-.672 1.5-1.5 1.5S14 9.328 14 8.5 14.672 7 15.5 7z"}}],dle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4.828 21l-.02.02-.021-.02H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H4.828zM20 15V5H4v14L14 9l6 6zm0 2.828l-6-6L6.828 19H20v-1.172zM8 11a2 2 0 1 1 0-4 2 2 0 0 1 0 4z"}}],hle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-8 3.5L7 9v7l-4-3.5z"}}],ple=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-4 3.5L3 16V9l4 3.5z"}}],fle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM11 7h2v2h-2V7zm0 4h2v6h-2v-6z"}}],gle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 21v-2h3V5H8V3h8v2h-3v14h3v2H8zM18.05 7.05L23 12l-4.95 4.95-1.414-1.414L20.172 12l-3.536-3.536L18.05 7.05zm-12.1 0l1.414 1.414L3.828 12l3.536 3.536L5.95 16.95 1 12l4.95-4.95z"}}],mle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zm-1 2h-4v14h4V5zM6 7c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2H5v1.999L3 11v2l2-.001V15h2v-2.001L9 13v-2l-2-.001V9z"}}],vle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M10 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zM9 5H5v14h4V5zm9 2c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L15 11v2l2-.001V15h2v-2.001L21 13v-2l-2-.001V9z"}}],yle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 13c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L9 17v2l2-.001V21h2v-2.001L15 19v-2l-2-.001V15zm7-12c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zM5 5v4h14V5H5z"}}],ble=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 13c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1v-6c0-.552.448-1 1-1h16zm-1 2H5v4h14v-4zM12 1c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L9 5v2l2-.001V9h2V6.999L15 7V5l-2-.001V3z"}}],wle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 20H7v-2h2.927l2.116-12H9V4h8v2h-2.927l-2.116 12H15z"}}],xle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M11 5H5v14h6V5zm2 0v14h6V5h-6zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],kle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 4h10v2H11V4zM6 7v4H4V7H1l4-4 4 4H6zm0 10h3l-4 4-4-4h3v-4h2v4zm5 1h10v2H11v-2zm-2-7h12v2H9v-2z"}}],Ele=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.657 14.828l-1.414-1.414L17.657 12A4 4 0 1 0 12 6.343l-1.414 1.414-1.414-1.414 1.414-1.414a6 6 0 0 1 8.485 8.485l-1.414 1.414zm-2.829 2.829l-1.414 1.414a6 6 0 1 1-8.485-8.485l1.414-1.414 1.414 1.414L6.343 12A4 4 0 1 0 12 17.657l1.414-1.414 1.414 1.414zm0-9.9l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],Sle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.657 14.828l-1.414-1.414L17.657 12A4 4 0 1 0 12 6.343l-1.414 1.414-1.414-1.414 1.414-1.414a6 6 0 0 1 8.485 8.485l-1.414 1.414zm-2.829 2.829l-1.414 1.414a6 6 0 1 1-8.485-8.485l1.414-1.414 1.414 1.414L6.343 12A4 4 0 1 0 12 17.657l1.414-1.414 1.414 1.414zm0-9.9l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07zM5.775 2.293l1.932-.518L8.742 5.64l-1.931.518-1.036-3.864zm9.483 16.068l1.931-.518 1.036 3.864-1.932.518-1.035-3.864zM2.293 5.775l3.864 1.036-.518 1.931-3.864-1.035.518-1.932zm16.068 9.483l3.864 1.035-.518 1.932-3.864-1.036.518-1.931z"}}],Cle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 17h5v2h-3v3h-2v-5zM7 7H2V5h3V2h2v5zm11.364 8.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],Tle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18.364 15.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],Ale=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 4h10v2H11V4zm0 4h6v2h-6V8zm0 6h10v2H11v-2zm0 4h6v2h-6v-2zM3 4h6v6H3V4zm2 2v2h2V6H5zm-2 8h6v6H3v-6zm2 2v2h2v-2H5z"}}],_le=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zm-5-.5h3v3H3v-3zm0 7h3v3H3v-3zm0 7h3v3H3v-3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],Rle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM5 3v3h1v1H3V6h1V4H3V3h2zM3 14v-2.5h2V11H3v-1h3v2.5H4v.5h2v1H3zm2 5.5H3v-1h2V18H3v-1h3v4H3v-1h2v-.5zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],Mle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM4.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 6.9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],Ole=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.243 4.515l-6.738 6.737-.707 2.121-1.04 1.041 2.828 2.829 1.04-1.041 2.122-.707 6.737-6.738-4.242-4.242zm6.364 3.535a1 1 0 0 1 0 1.414l-7.779 7.779-2.12.707-1.415 1.414a1 1 0 0 1-1.414 0l-4.243-4.243a1 1 0 0 1 0-1.414l1.414-1.414.707-2.121 7.779-7.779a1 1 0 0 1 1.414 0l5.657 5.657zm-6.364-.707l1.414 1.414-4.95 4.95-1.414-1.414 4.95-4.95zM4.283 16.89l2.828 2.829-1.414 1.414-4.243-1.414 2.828-2.829z"}}],Ile=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm4 12.5v-4l2 2 2-2v4h2v-7h-2l-2 2-2-2H5v7h2zm11-3v-4h-2v4h-2l3 3 3-3h-2z"}}],Lle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2v14h16V5H4zm3 10.5H5v-7h2l2 2 2-2h2v7h-2v-4l-2 2-2-2v4zm11-3h2l-3 3-3-3h2v-4h2v4z"}}],Nle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-9 2H5v5.999h2V9l3 3-3 3v-2H5v6h6v-2h2v2h6v-6h-2v2l-3-3 3-3v1.999h2V5h-6v2h-2V5zm2 8v2h-2v-2h2zm0-4v2h-2V9h2z"}}],$le=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21 20c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16c.552 0 1 .448 1 1v16zm-2-9V5h-5.999v2H15l-3 3-3-3h2V5H5v6h2v2H5v6h6v-2H9l3-3 3 3h-1.999v2H19v-6h-2v-2h2zm-8 2H9v-2h2v2zm4 0h-2v-2h2v2z"}}],Dle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M18 3c1.657 0 3 1.343 3 3s-1.343 3-3 3h-3c-1.306 0-2.417-.834-2.829-2H11c-1.1 0-2 .9-2 2v.171c1.166.412 2 1.523 2 2.829 0 1.306-.834 2.417-2 2.829V15c0 1.1.9 2 2 2h1.17c.412-1.165 1.524-2 2.83-2h3c1.657 0 3 1.343 3 3s-1.343 3-3 3h-3c-1.306 0-2.417-.834-2.829-2H11c-2.21 0-4-1.79-4-4H5c-1.657 0-3-1.343-3-3s1.343-3 3-3h2c0-2.21 1.79-4 4-4h1.17c.412-1.165 1.524-2 2.83-2h3zm0 14h-3c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1zM8 11H5c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1zm10-6h-3c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1z"}}],Ple=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm14 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}}],zle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M10 2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1H8v2h5V9c0-.552.448-1 1-1h6c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-1H8v6h5v-1c0-.552.448-1 1-1h6c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-1H7c-.552 0-1-.448-1-1V8H4c-.552 0-1-.448-1-1V3c0-.552.448-1 1-1h6zm9 16h-4v2h4v-2zm0-8h-4v2h4v-2zM9 4H5v2h4V4z"}}],Fle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5c1.321 0 2.484.348 3.447.994.963.645 1.726 1.588 2.249 2.778.522 1.19.804 2.625.804 4.257v4.942c0 1.632-.282 3.068-.804 4.257-.523 1.19-1.286 2.133-2.25 2.778-.962.646-2.125.994-3.446.994-1.321 0-2.484-.348-3.447-.994-.963-.645-1.726-1.588-2.249-2.778-.522-1.19-.804-2.625-.804-4.257V9.529c0-1.632.282-3.068.804-4.257.523-1.19 1.286-2.133 2.25-2.778C9.515 1.848 10.678 1.5 12 1.5zm0 2c-.916 0-1.694.226-2.333.655-.637.427-1.158 1.07-1.532 1.92-.412.94-.635 2.108-.635 3.454v4.942c0 1.346.223 2.514.635 3.453.374.851.895 1.494 1.532 1.921.639.429 1.417.655 2.333.655.916 0 1.694-.226 2.333-.655.637-.427 1.158-1.07 1.532-1.92.412-.94.635-2.108.635-3.454V9.529c0-1.346-.223-2.514-.635-3.453-.374-.851-.895-1.494-1.532-1.921C13.694 3.726 12.916 3.5 12 3.5z"}}],Ble=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 1.5V22h-2V3.704L7.5 4.91V2.839l5-1.339z"}}],Hle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 7.5a4 4 0 1 0-8 0H6a6 6 0 1 1 10.663 3.776l-7.32 8.723L18 20v2H6v-1.127l9.064-10.802A3.982 3.982 0 0 0 16 7.5z"}}],Ule=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 2v1.362L12.809 9.55a6.501 6.501 0 1 1-7.116 8.028l1.94-.486A4.502 4.502 0 0 0 16.5 16a4.5 4.5 0 0 0-6.505-4.03l-.228.122-.69-1.207L14.855 4 6.5 4V2H18z"}}],Wle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 1.5V16h3v2h-3v4h-2v-4H4v-1.102L14 1.5h2zM14 16V5.171L6.968 16H14z"}}],Vle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 2v2H9.3l-.677 6.445a6.5 6.5 0 1 1-2.93 7.133l1.94-.486A4.502 4.502 0 0 0 16.5 16a4.5 4.5 0 0 0-4.5-4.5c-2.022 0-3.278.639-3.96 1.53l-1.575-1.182L7.5 2H18z"}}],jle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.886 2l-4.438 7.686A6.5 6.5 0 1 1 6.4 12.7L12.576 2h2.31zM12 11.5a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z"}}],Gle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 2v1.5L10.763 22H8.574l8.013-18H6V2z"}}],Kle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5a5.5 5.5 0 0 1 3.352 9.86C17.24 12.41 18.5 14.32 18.5 16.5c0 3.314-2.91 6-6.5 6s-6.5-2.686-6.5-6c0-2.181 1.261-4.09 3.147-5.141A5.5 5.5 0 0 1 12 1.5zm0 11c-2.52 0-4.5 1.828-4.5 4 0 2.172 1.98 4 4.5 4s4.5-1.828 4.5-4c0-2.172-1.98-4-4.5-4zm0-9a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7z"}}],Yle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5a6.5 6.5 0 0 1 5.619 9.77l-6.196 10.729H9.114l4.439-7.686A6.5 6.5 0 1 1 12 1.5zm0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z"}}],Xle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M14 20v-2.157c1.863-1.192 3.5-3.875 3.5-6.959 0-3.073-2-6.029-5.5-6.029s-5.5 2.956-5.5 6.03c0 3.083 1.637 5.766 3.5 6.958V20H3v-2h4.76C5.666 16.505 4 13.989 4 10.884 4 6.247 7.5 3 12 3s8 3.247 8 7.884c0 3.105-1.666 5.621-3.76 7.116H21v2h-7z"}}],qle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M15 3c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-2v2h4c.552 0 1 .448 1 1v3h2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1h2v-2H8v2h2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1h2v-3c0-.552.448-1 1-1h4V9H9c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zM9 17H5v2h4v-2zm10 0h-4v2h4v-2zM14 5h-4v2h4V5z"}}],Zle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 21v-4H7v4H5v-5a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v5h-2zM7 3v4h10V3h2v5a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3h2zM2 9l4 3-4 3V9zm20 0v6l-4-3 4-3z"}}],Jle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 6v15h-2v-5a6 6 0 1 1 0-12h10v2h-3v15h-2V6h-3zm-2 0a4 4 0 1 0 0 8V6z"}}],Qle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12.9 6.858l4.242 4.243L7.242 21H3v-4.243l9.9-9.9zm1.414-1.414l2.121-2.122a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414l-2.122 2.121-4.242-4.242z"}}],ece=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"}}],tce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.934 3.036l1.732 1L18.531 6H21v2h-2v4h2v2h-2v7h-2v-7h-3.084c-.325 2.862-1.564 5.394-3.37 7.193l-1.562-1.27c1.52-1.438 2.596-3.522 2.917-5.922L10 14v-2l2-.001V8h-2V6h2.467l-1.133-1.964 1.732-1L14.777 6h1.444l1.713-2.964zM5 13.803l-2 .536v-2.071l2-.536V8H3V6h2V3h2v3h2v2H7v3.197l2-.536v2.07l-2 .536V18.5A2.5 2.5 0 0 1 4.5 21H3v-2h1.5a.5.5 0 0 0 .492-.41L5 18.5v-4.697zM17 8h-3v4h3V8z"}}],nce=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 19c.828 0 1.5.672 1.5 1.5S12.828 22 12 22s-1.5-.672-1.5-1.5.672-1.5 1.5-1.5zm0-17c3.314 0 6 2.686 6 6 0 2.165-.753 3.29-2.674 4.923C13.399 14.56 13 15.297 13 17h-2c0-2.474.787-3.695 3.031-5.601C15.548 10.11 16 9.434 16 8c0-2.21-1.79-4-4-4S8 5.79 8 8v1H6V8c0-3.314 2.686-6 6-6z"}}],rce=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21 19v2h-2v-2h2zm-4 0v2h-2v-2h2zm-4 0v2h-2v-2h2zm-4 0v2H7v-2h2zm-4 0v2H3v-2h2zm16-4v2h-2v-2h2zM5 15v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687 0 4.882 2.124 4.995 4.783L21 8v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16 5h-5V3h5zM5 7v2H3V7h2zm0-4v2H3V3h2zm4 0v2H7V3h2z"}}],oce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.683 7.562L12 9.88l6.374-6.375a2 2 0 0 1 2.829 0l.707.707L9.683 16.438a4 4 0 1 1-2.121-2.121L9.88 12 7.562 9.683a4 4 0 1 1 2.121-2.121zM6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 12a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm9.535-6.587l6.375 6.376-.707.707a2 2 0 0 1-2.829 0l-4.96-4.961 2.12-2.122z"}}],ice=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M14 3c.552 0 1 .448 1 1v5h5c.552 0 1 .448 1 1v10c0 .552-.448 1-1 1H10c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h10zm-1 2H5v8h4v-3c0-.552.448-1 1-1h3V5z"}}],sce=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M11 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v5h2c.552 0 1 .448 1 1v7c0 .552-.448 1-1 1h-7c-.552 0-1-.448-1-1v-2H7c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h7zm5 5h-4v3c0 .552-.448 1-1 1H8v4h4v-3c0-.552.448-1 1-1h3V8z"}}],lce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M2 11h2v2H2v-2zm4 0h12v2H6v-2zm14 0h2v2h-2v-2z"}}],cce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.583 17.321C8.553 16.227 8 15 8 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179z"}}],uce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.417 6.679C15.447 7.773 16 9 16 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311C9.591 12.322 8.17 10.841 8.17 9a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179z"}}],dce=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M19 3l4 5h-3v12h-2V8h-3l4-5zm-5 15v2H3v-2h11zm0-7v2H3v-2h11zm-2-7v2H3V4h9z"}}],hce=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 4v12h3l-4 5-4-5h3V4h2zm-8 14v2H3v-2h9zm2-7v2H3v-2h11zm0-7v2H3V4h11z"}}],pce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 9v4h16V9h2v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V9h2z"}}],fce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M17.5 2.5L23 12l-5.5 9.5h-11L1 12l5.5-9.5h11zm-1.153 2H7.653L3.311 12l4.342 7.5h8.694l4.342-7.5-4.342-7.5zM11 15h2v2h-2v-2zm0-8h2v6h-2V7z"}}],gce=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-9 2H5v14h6v-4h2v4h6V5h-6v4h-2V5zm4 4l3 3-3 3v-2H9v2l-3-3 3-3v2h6V9z"}}],mce=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-1 2H5v5.999L9 11v2H5v6h14v-6h-4v-2l4-.001V5zm-7 1l3 3h-2v6h2l-3 3-3-3h2V9H9l3-3z"}}],vce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 9h-2V6H5V4h14v2h-6v3zm0 6v5h-2v-5h2zM3 11h18v2H3v-2z"}}],yce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.154 14c.23.516.346 1.09.346 1.72 0 1.342-.524 2.392-1.571 3.147C14.88 19.622 13.433 20 11.586 20c-1.64 0-3.263-.381-4.87-1.144V16.6c1.52.877 3.075 1.316 4.666 1.316 2.551 0 3.83-.732 3.839-2.197a2.21 2.21 0 0 0-.648-1.603l-.12-.117H3v-2h18v2h-3.846zm-4.078-3H7.629a4.086 4.086 0 0 1-.481-.522C6.716 9.92 6.5 9.246 6.5 8.452c0-1.236.466-2.287 1.397-3.153C8.83 4.433 10.271 4 12.222 4c1.471 0 2.879.328 4.222.984v2.152c-1.2-.687-2.515-1.03-3.946-1.03-2.48 0-3.719.782-3.719 2.346 0 .42.218.786.654 1.099.436.313.974.562 1.613.75.62.18 1.297.414 2.03.699z"}}],bce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 6v13H9V6H3V4h14v2h-6zm8.55 10.58a.8.8 0 1 0-1.32-.36l-1.154.33A2.001 2.001 0 0 1 19 14a2 2 0 0 1 1.373 3.454L18.744 19H21v1h-4v-1l2.55-2.42z"}}],wce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5.596 4L10.5 9.928 15.404 4H18l-6.202 7.497L18 18.994V19h-2.59l-4.91-5.934L5.59 19H3v-.006l6.202-7.497L3 4h2.596zM21.55 16.58a.8.8 0 1 0-1.32-.36l-1.155.33A2.001 2.001 0 0 1 21 14a2 2 0 0 1 1.373 3.454L20.744 19H23v1h-4v-1l2.55-2.42z"}}],xce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 11h14v2H5z"}}],kce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 7v13H9V7H3V5h12v2h-4zm8.55-.42a.8.8 0 1 0-1.32-.36l-1.154.33A2.001 2.001 0 0 1 19 4a2 2 0 0 1 1.373 3.454L18.744 9H21v1h-4V9l2.55-2.42z"}}],Ece=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5.596 5l4.904 5.928L15.404 5H18l-6.202 7.497L18 19.994V20h-2.59l-4.91-5.934L5.59 20H3v-.006l6.202-7.497L3 5h2.596zM21.55 6.58a.8.8 0 1 0-1.32-.36l-1.155.33A2.001 2.001 0 0 1 21 4a2 2 0 0 1 1.373 3.454L20.744 9H23v1h-4V9l2.55-2.42z"}}],Sce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M13 10v4h6v-4h-6zm-2 0H5v4h6v-4zm2 9h6v-3h-6v3zm-2 0v-3H5v3h6zm2-14v3h6V5h-6zm-2 0H5v3h6V5zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],Cce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 8h16V5H4v3zm10 11v-9h-4v9h4zm2 0h4v-9h-4v9zm-8 0v-9H4v9h4zM3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],Tce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 5v10H9v-4a4 4 0 1 1 0-8h8v2h-2v10h-2V5h-2zM9 5a2 2 0 1 0 0 4V5zm8 12v-2.5l4 3.5-4 3.5V19H5v-2h12z"}}],Ace=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 5v10H9v-4a4 4 0 1 1 0-8h8v2h-2v10h-2V5h-2zM9 5a2 2 0 1 0 0 4V5zM7 17h12v2H7v2.5L3 18l4-3.5V17z"}}],_ce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 17h10v-2.5l3.5 3.5-3.5 3.5V19H7v2.5L3.5 18 7 14.5V17zm6-11v9h-2V6H5V4h14v2h-6z"}}],Rce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 18h1.5a2.5 2.5 0 1 0 0-5H3v-2h13.5a4.5 4.5 0 1 1 0 9H15v2l-4-3 4-3v2zM3 4h18v2H3V4zm6 14v2H3v-2h6z"}}],Mce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 6v15h-2V6H5V4h14v2z"}}],Oce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18.5 10l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301 14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725a16.676 16.676 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"}}],Ice=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z"}}],Lce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 3v9a4 4 0 1 0 8 0V3h2v9a6 6 0 1 1-12 0V3h2zM4 20h16v2H4v-2z"}}],Nce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7zM14 9v6h-4V9H5l7-7 7 7h-5z"}}],$ce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3.993C3 3.445 3.445 3 3.993 3h16.014c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 20.007V3.993zM5 5v14h14V5H5zm5.622 3.415l4.879 3.252a.4.4 0 0 1 0 .666l-4.88 3.252a.4.4 0 0 1-.621-.332V8.747a.4.4 0 0 1 .622-.332z"}}],Dce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 21v-2h3.662l1.234-7H5v-2h3.249l.881-5H4V3h16v2h-8.839l-.882 5H18v9h3v2H3zm13-9H9.927l-1.235 7H16v-7z"}}];const Pce=Object.freeze(Object.defineProperty({__proto__:null,ab:Jse,addFill:Qse,addLine:eae,alertLine:tae,alignBottom:nae,alignCenter:rae,alignJustify:oae,alignLeft:iae,alignRight:sae,alignTop:aae,alignVertically:lae,appsLine:cae,arrowDownSFill:uae,arrowGoBackFill:dae,arrowGoForwardFill:hae,arrowLeftSFill:pae,arrowRightSFill:fae,arrowUpSFill:gae,asterisk:mae,attachment2:vae,bold:yae,bracesLine:bae,bringForward:wae,bringToFront:xae,chatNewLine:kae,checkboxCircleLine:Eae,checkboxMultipleLine:Sae,clipboardFill:Cae,clipboardLine:Tae,closeCircleLine:Aae,closeFill:_ae,closeLine:Rae,codeLine:Mae,codeView:Oae,deleteBinFill:Iae,deleteBinLine:Lae,deleteColumn:Nae,deleteRow:$ae,doubleQuotesL:Dae,doubleQuotesR:Pae,download2Fill:zae,dragDropLine:Fae,emphasis:Hae,emphasisCn:Bae,englishInput:Uae,errorWarningLine:Wae,externalLinkFill:Vae,fileCopyLine:jae,flowChart:Gae,fontColor:Kae,fontSize:Xae,fontSize2:Yae,formatClear:qae,fullscreenExitLine:Zae,fullscreenLine:Jae,functions:Qae,galleryUploadLine:ele,h1:tle,h2:nle,h3:rle,h4:ole,h5:ile,h6:sle,hashtag:ale,heading:lle,imageAddLine:cle,imageEditLine:ule,imageLine:dle,indentDecrease:hle,indentIncrease:ple,informationLine:fle,inputCursorMove:gle,insertColumnLeft:mle,insertColumnRight:vle,insertRowBottom:yle,insertRowTop:ble,italic:wle,layoutColumnLine:xle,lineHeight:kle,link:Tle,linkM:Ele,linkUnlink:Cle,linkUnlinkM:Sle,listCheck:_le,listCheck2:Ale,listOrdered:Rle,listUnordered:Mle,markPenLine:Ole,markdownFill:Ile,markdownLine:Lle,mergeCellsHorizontal:Nle,mergeCellsVertical:$le,mindMap:Dle,moreFill:Ple,nodeTree:zle,number0:Fle,number1:Ble,number2:Hle,number3:Ule,number4:Wle,number5:Vle,number6:jle,number7:Gle,number8:Kle,number9:Yle,omega:Xle,organizationChart:qle,pageSeparator:Zle,paragraph:Jle,pencilFill:Qle,pencilLine:ece,pinyinInput:tce,questionMark:nce,roundedCorner:rce,scissorsFill:oce,sendBackward:ice,sendToBack:sce,separator:lce,singleQuotesL:cce,singleQuotesR:uce,sortAsc:dce,sortDesc:hce,space:pce,spamLine:fce,splitCellsHorizontal:gce,splitCellsVertical:mce,strikethrough:yce,strikethrough2:vce,subscript:wce,subscript2:bce,subtractLine:xce,superscript:Ece,superscript2:kce,table2:Sce,tableLine:Cce,text:Mce,textDirectionL:Tce,textDirectionR:Ace,textSpacing:_ce,textWrap:Rce,translate:Ice,translate2:Oce,underline:Lce,upload2Fill:Nce,videoLine:$ce,wubiInput:Dce},Symbol.toStringTag,{value:"Module"}));function zce(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=!1,a=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(t)&&s.startIndex==0){if(o.index(s.depth-1)==0)return!1;let c=n.doc.resolve(s.start-2);a=new Xa(c,c,s.depth),s.endIndex=0;c--)i=J.from(n[c].type.create(n[c].attrs,i));t.step(new Yt(e.start-(r?2:0),e.end,e.start,e.end,new ae(i,0,0),n.length,!0));let s=0;for(let c=0;cs.childCount>0&&s.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?Hce(e,n,t,i):Uce(e,n,i):!0:!1}}function Hce(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);ig;f--)p-=o.child(f).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,a=n.endIndex==o.childCount,u=i.node(-1),c=i.index(-1);if(!u.canReplace(c+(l?0:1),c+1,s.content.append(a?J.empty:J.from(o))))return!1;let d=i.pos,h=d+s.nodeSize;return r.step(new Yt(d-(l?1:0),h+(a?1:0),d+1,h-1,new ae((l?J.empty:J.from(o.copy(J.empty))).append(a?J.empty:J.from(o.copy(J.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}var Wce=Object.defineProperty,Vce=Object.getOwnPropertyDescriptor,So=(t,e,n,r)=>{for(var o=r>1?void 0:r?Vce(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Wce(e,n,o),o};function sb(t){var e;return!!((e=t.spec.group)!=null&&e.includes(ke.ListContainerNode))}function jce(t){var e;return!!((e=t.spec.group)!=null&&e.includes(ke.ListItemNode))}function qs(t){return sb(t.type)}function Fs(t){return jce(t.type)}function Zx(t,e){return n=>{const{dispatch:r,tr:o}=n,i=Fb(o,n.state),{$from:s,$to:l}=o.selection,a=s.blockRange(l);if(!a)return!1;const u=Yh({predicate:c=>sb(c.type),selection:o.selection});if(u&&a.depth-u.depth<=1&&a.startIndex===0){if(u.node.type===t)return zN(e)(n);if(sb(u.node.type))return t.validContent(u.node.content)?(r==null||r(o.setNodeMarkup(u.pos,t)),!0):Gce(o,u,t,e)?(r==null||r(o.scrollIntoView()),!0):!1}return zce(t)(i,r)}}function DN(t,e=["checked"]){return function({tr:n,dispatch:r,state:o}){var i,s;const l=wF(t,o.schema),{$from:a,$to:u}=n.selection;if(qh(n.selection)&&n.selection.node.isBlock||a.depth<2||!a.sameParent(u))return!1;const c=a.node(-1);if(c.type!==l)return!1;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){const g=a.index(-1)>0;let m=J.empty;for(let b=a.depth-(g?1:2);b>=a.depth-3;b--)m=J.from(a.node(b).copy(m));const v=((i=l.contentMatch.defaultType)==null?void 0:i.createAndFill())||void 0;m=m.append(J.from(l.createAndFill(null,v)||void 0));const y=a.indexAfter(-1)!e.includes(g))),h=u.pos===a.end()?c.contentMatchAt(0).defaultType:null,p={...a.node().attrs};n.delete(a.pos,u.pos);const f=h?[{type:l,attrs:d},{type:h,attrs:p}]:[{type:l,attrs:d}];return vc(n.doc,a.pos,2)?(r&&r(n.split(a.pos,2,f).scrollIntoView()),!0):!1}}function Gce(t,e,n,r){const o=e.node,i=t.doc.resolve(e.start),s=i.node(-1),l=i.index(-1);if(!s||!s.canReplace(l,l+1,J.from(n.create())))return!1;const a=[];for(let p=0;pm;g--)f-=o.child(g).nodeSize,r.delete(f-1,f+1);const s=r.doc.resolve(n.start),l=s.nodeAfter;if(!l||r.mapping.slice(i).map(n.end)!==n.start+l.nodeSize)return!1;const a=n.startIndex===0,u=n.endIndex===o.childCount,c=s.node(-1),d=s.index(-1);if(!c.canReplace(d+(a?0:1),d+1,l.content.append(u?J.empty:J.from(o))))return!1;const h=s.pos,p=h+l.nodeSize;return r.step(new Yt(h-(a?1:0),p+(u?1:0),h+1,p-1,new ae((a?J.empty:J.from(o.copy(J.empty))).append(u?J.empty:J.from(o.copy(J.empty))),a?0:1,u?0:1),a?0:1)),e(r.scrollIntoView()),!0}function PN(t,e){const n=e||t.selection.$from;let r=[],o,i,s,l;for(let u=n.depth;u>=0;u--){if(i=n.node(u),o=n.index(u),s=i.maybeChild(o-1),l=i.maybeChild(o),s&&l&&s.type.name===l.type.name&&qs(s)){const c=n.before(u+1);r.push(c)}if(o=n.indexAfter(u),s=i.maybeChild(o-1),l=i.maybeChild(o),s&&l&&s.type.name===l.type.name&&qs(s)){const c=n.after(u+1);r.push(c)}}r=[...new Set(r)].sort((u,c)=>c-u);let a=!1;for(const u of r)jh(t.doc,u)&&(t.join(u),a=!0);return a}function zN(t){return e=>{const{dispatch:n,tr:r}=e,o=Fb(r,e.state),i=Xce(t,r.selection);return i?(n&&Yce(o,n,i),!0):!1}}function Xce(t,e){const{$from:n,$to:r}=e;return n.blockRange(r,i=>{var s;return((s=i.firstChild)==null?void 0:s.type)===t})}function qg(t){const{$from:e,$to:n}=t;return e.blockRange(n,qs)}function qce(t){const e=t.selection.$from,n=e.blockRange();if(!n||!Fs(n.parent)||n.startIndex!==0)return!1;const r=e.node(n.depth-2),o=e.index(n.depth),i=e.index(n.depth-1),s=e.index(n.depth-2),l=r.maybeChild(s-1),a=l==null?void 0:l.lastChild;if(o!==0||i!==0)return!1;if(l&&qs(l)&&a&&Fs(a))return ru({listType:l.type,itemType:a.type,tr:t});if(Fs(r)){const u=r,c=e.node(n.depth-3);if(qs(c))return ru({listType:c.type,itemType:u.type,tr:t})}return!1}function k_({view:t}){if(!t)return!1;{const e=t.state.selection.$cursor;if(!e||e.parentOffset>0)return!1;const n=e.blockRange();if(!n||!Fs(n.parent)||n.startIndex!==0)return!1}{const e=t.state.tr;qce(e)&&t.dispatch(e)}{const e=t.state.selection.$cursor;if(!e||e.parentOffset>0)return!1;const n=e.blockRange();if(!n||!Fs(n.parent)||n.startIndex!==0)return!1;const r=e.index(n.depth),o=e.index(n.depth-1),i=e.index(n.depth-2),s=n.depth-2>=1&&Fs(e.node(n.depth-2));r===0&&o===0&&i<=1&&s&&Bce(n.parent.type)(t.state,t.dispatch)}return vM(t.state,t.dispatch,t),!0}function FN({node:t,mark:e,updateDOM:n,updateMark:r}){const o=document.createElement("label");o.contentEditable="false",o.classList.add(Ks.LIST_ITEM_MARKER_CONTAINER),o.append(e);const i=document.createElement("div"),s=document.createElement("li");s.classList.add(Ks.LIST_ITEM_WITH_CUSTOM_MARKER),s.append(o),s.append(i);const l=a=>a.type!==t.type?!1:(t=a,n(t,s),r(t,e),!0);return l(t),{dom:s,contentDOM:i,update:l}}function Zce(t,e){const n=t.node(e.depth-1),r=t.node(e.depth-2);return!Fs(n)||!qs(r)?!1:{parentItem:n,parentList:r}}function Jce(t,e){const n=e.parent,r=e.parent.child(e.endIndex-1),o=e.end,i=e.$to.end(e.depth);return otue(t)?(e==null||e(t.scrollIntoView()),!0):!1;function rue(t,e,n){let r,o,i,s;const l=e.doc;if(n.startIndex>=1){r=t.child(n.startIndex-1),o=t,s=l.resolve(n.start).start(n.depth),i=s+1;for(let a=0;a=1){const u=e.node(n.depth-1),c=e.start(n.depth-1);if(o=u.child(a-1),!qs(o))return!1;s=c+1;for(let d=0;d=n.depth+2?e.end(n.depth+2):n.end-1,l=n.end;return s+1>=l?(r=t.slice(i,l),o=null):(r=t.slice(i,s),o=t.slice(s+1,l-1)),{selectedSlice:r,unselectedSlice:o}}function iue(t){const{$from:e,$to:n}=t.selection,r=qg(t.selection);if(!r)return!1;const o=t.doc.resolve(r.start).node();if(!qs(o))return!1;const i=rue(o,e,r);if(!i)return!1;const{previousItem:s,previousList:l,previousItemStart:a}=i,{selectedSlice:u,unselectedSlice:c}=oue(t.doc,n,r),d=s.content.append(J.fromArray([o.copy(u.content)])).append(c?c.content:J.empty);t.deleteRange(r.start,r.end);const h=a+s.nodeSize-2,p=s.copy(d);return p.check(),t.replaceRangeWith(a-1,h+1,p),t.setSelection(l===o?Me.between(t.doc.resolve(e.pos),t.doc.resolve(n.pos)):Me.between(t.doc.resolve(e.pos-2),t.doc.resolve(n.pos-2))),!0}var sue=({tr:t,dispatch:e})=>iue(t)?(e==null||e(t.scrollIntoView()),!0):!1,BN=class extends ft{get name(){return"listItemShared"}createKeymap(){const t={Tab:sue,"Shift-Tab":nue,Backspace:k_,"Mod-Backspace":k_};if(yr.isMac){const e={"Ctrl-h":t.Backspace,"Alt-Backspace":t["Mod-Backspace"]};return{...t,...e}}return t}createPlugin(){return{appendTransaction:(t,e,n)=>{const r=n.tr;return PN(r)?r:null}}}},hl=class extends Dn{get name(){return"listItem"}createTags(){return[ke.ListItemNode]}createNodeSpec(t,e){return{content:"paragraph block*",defining:!0,draggable:!1,...e,attrs:{...t.defaults(),closed:{default:!1},nested:{default:!1}},parseDOM:[{tag:"li",getAttrs:t.parse,priority:ot.Lowest},...e.parseDOM??[]],toDOM:n=>["li",t.dom(n),0]}}createNodeViews(){return this.options.enableCollapsible?(t,e,n)=>{const r=document.createElement("div");return r.classList.add(Ks.COLLAPSIBLE_LIST_ITEM_BUTTON),r.contentEditable="false",r.addEventListener("click",()=>{if(r.classList.contains("disabled"))return;const o=n(),i=Oe.create(e.state.doc,o);return e.dispatch(e.state.tr.setSelection(i)),this.store.commands.toggleListItemClosed(),!0}),FN({mark:r,node:t,updateDOM:aue,updateMark:lue})}:{}}createKeymap(){return{Enter:DN(this.type)}}createExtensions(){return[new BN]}toggleListItemClosed(t){return({state:{tr:e,selection:n},dispatch:r})=>{if(!qh(n)||n.node.type.name!==this.name)return!1;const{node:o,from:i}=n;return t=w0(t)?t:!o.attrs.closed,r==null||r(e.setNodeMarkup(i,void 0,{...o.attrs,closed:t})),!0}}liftListItemOutOfList(t){return zN(t??this.type)}};So([le()],hl.prototype,"toggleListItemClosed",1);So([le()],hl.prototype,"liftListItemOutOfList",1);hl=So([Ne({defaultOptions:{enableCollapsible:!1},staticKeys:["enableCollapsible"]})],hl);function aue(t,e){t.attrs.closed?e.classList.add(Ks.COLLAPSIBLE_LIST_ITEM_CLOSED):e.classList.remove(Ks.COLLAPSIBLE_LIST_ITEM_CLOSED)}function lue(t,e){t.childCount<=1?e.classList.add("disabled"):e.classList.remove("disabled")}var Rh=class extends Dn{get name(){return"bulletList"}createTags(){return[ke.Block,ke.ListContainerNode]}createNodeSpec(t,e){return{content:"listItem+",...e,attrs:t.defaults(),parseDOM:[{tag:"ul",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["ul",t.dom(n),0]}}createNodeViews(){return this.options.enableSpine?(t,e,n)=>{var r;const o=document.createElement("div");o.style.position="relative";const i=n(),s=e.state.doc.resolve(i+1),l=s.node(s.depth-1);if(!(((r=l==null?void 0:l.type)==null?void 0:r.name)!=="listItem")){const c=document.createElement("div");c.contentEditable="false",c.classList.add(Ks.LIST_SPINE),c.addEventListener("click",d=>{const h=n(),p=e.state.doc.resolve(h+1),f=p.start(p.depth-1),g=Oe.create(e.state.doc,f-1);e.dispatch(e.state.tr.setSelection(g)),this.store.commands.toggleListItemClosed(),d.preventDefault(),d.stopPropagation()}),o.append(c)}const u=document.createElement("ul");return u.classList.add(Ks.UL_LIST_CONTENT),o.append(u),{dom:o,contentDOM:u}}:{}}createExtensions(){return[new hl({priority:ot.Low,enableCollapsible:this.options.enableSpine})]}toggleBulletList(){return Zx(this.type,Mt(this.store.schema.nodes,"listItem"))}listShortcut(t){return this.toggleBulletList()(t)}createInputRules(){const t=/^\s*([*+-])\s$/;return[gm(t,this.type),new yl(t,(e,n,r,o)=>{const i=e.tr;return i.deleteRange(r,o),ru({listType:this.type,itemType:Mt(this.store.schema.nodes,"listItem"),tr:i})?i:null})]}};So([le({icon:"listUnordered",label:({t})=>t(_b.BULLET_LIST_LABEL)})],Rh.prototype,"toggleBulletList",1);So([en({shortcut:oe.BulletList,command:"toggleBulletList"})],Rh.prototype,"listShortcut",1);Rh=So([Ne({defaultOptions:{enableSpine:!1},staticKeys:["enableSpine"]})],Rh);var Mh=class extends Dn{get name(){return"orderedList"}createTags(){return[ke.Block,ke.ListContainerNode]}createNodeSpec(t,e){return{content:"listItem+",...e,attrs:{...t.defaults(),order:{default:1}},parseDOM:[{tag:"ol",getAttrs:n=>Vt(n)?{...t.parse(n),order:+(n.getAttribute("start")??1)}:{}},...e.parseDOM??[]],toDOM:n=>{const r=t.dom(n);return n.attrs.order===1?["ol",r,0]:["ol",{...r,start:n.attrs.order},0]}}}createExtensions(){return[new hl({priority:ot.Low})]}toggleOrderedList(){return Zx(this.type,Mt(this.store.schema.nodes,"listItem"))}listShortcut(t){return this.toggleOrderedList()(t)}createInputRules(){const t=/^(\d+)\.\s$/;return[gm(t,this.type,e=>({order:+Mt(e,1)}),(e,n)=>n.childCount+n.attrs.order===+Mt(e,1)),new yl(t,(e,n,r,o)=>{const i=e.tr;if(i.deleteRange(r,o),!ru({listType:this.type,itemType:Mt(this.store.schema.nodes,"listItem"),tr:i}))return null;const l=+Mt(n,1);if(l!==1){const a=pi({selection:i.selection,types:this.type});a&&i.setNodeMarkup(a.pos,void 0,{order:l})}return i})]}};So([le({icon:"listOrdered",label:({t})=>t(_b.ORDERED_LIST_LABEL)})],Mh.prototype,"toggleOrderedList",1);So([en({shortcut:oe.OrderedList,command:"toggleOrderedList"})],Mh.prototype,"listShortcut",1);Mh=So([Ne({})],Mh);var HN=class extends Dn{get name(){return"taskListItem"}createTags(){return[ke.ListItemNode]}createNodeSpec(t,e){return{content:"paragraph block*",defining:!0,draggable:!1,...e,attrs:{...t.defaults(),checked:{default:!1}},parseDOM:[{tag:"li[data-task-list-item]",getAttrs:n=>{let r=!1;return Vt(n)&&n.getAttribute("data-checked")!==null&&(r=!0),{checked:r,...t.parse(n)}},priority:ot.Medium},...e.parseDOM??[]],toDOM:n=>["li",{...t.dom(n),"data-task-list-item":"","data-checked":n.attrs.checked?"":void 0},0]}}createNodeViews(){return(t,e,n)=>{const r=document.createElement("input");return r.type="checkbox",r.classList.add(Ks.LIST_ITEM_CHECKBOX),r.contentEditable="false",r.addEventListener("click",o=>{e.editable||o.preventDefault()}),r.addEventListener("change",()=>{const o=n(),i=e.state.doc.resolve(o+1);this.store.commands.toggleCheckboxChecked({$pos:i})}),r.checked=t.attrs.checked,FN({node:t,mark:r,updateDOM:cue,updateMark:uue})}}createKeymap(){return{Enter:DN(this.type)}}createExtensions(){return[new BN]}toggleCheckboxChecked(t){let e,n;return typeof t=="boolean"?e=t:t&&(e=t.checked,n=t.$pos),({tr:r,dispatch:o})=>{const i=pi({selection:n??r.selection.$from,types:this.type});if(!i)return!1;const{node:s,pos:l}=i,a={...s.attrs,checked:e??!s.attrs.checked};return o==null||o(r.setNodeMarkup(l,void 0,a)),!0}}createInputRules(){const t=/^\s*(\[( ?|x|X)]\s)$/;return[gm(t,this.type,e=>({checked:["x","X"].includes(wc(e,2))})),new yl(t,(e,n,r,o)=>{const i=e.tr;if(i.deleteRange(r,o),!ru({listType:Mt(this.store.schema.nodes,"taskList"),itemType:this.type,tr:i}))return null;const l=["x","X"].includes(wc(n,2));if(l){const a=pi({selection:i.selection,types:this.type});a&&i.setNodeMarkup(a.pos,void 0,{checked:l})}return i})]}};So([le()],HN.prototype,"toggleCheckboxChecked",1);function cue(t,e){t.attrs.checked?e.setAttribute("data-checked",""):e.removeAttribute("data-checked"),e.setAttribute("data-task-list-item","")}function uue(t,e){e.checked=!!t.attrs.checked}var UN=class extends Dn{get name(){return"taskList"}createTags(){return[ke.Block,ke.ListContainerNode]}createNodeSpec(t,e){return{content:"taskListItem+",...e,attrs:t.defaults(),parseDOM:[{tag:"ul[data-task-list]",getAttrs:t.parse,priority:ot.Medium},...e.parseDOM??[]],toDOM:n=>["ul",{...t.dom(n),"data-task-list":""},0]}}createExtensions(){return[new HN({})]}toggleTaskList(){return Zx(this.type,Mt(this.store.schema.nodes,"taskListItem"))}listShortcut(t){return this.toggleTaskList()(t)}};So([le({icon:"checkboxMultipleLine",label:({t})=>t(_b.TASK_LIST_LABEL)})],UN.prototype,"toggleTaskList",1);So([en({shortcut:oe.TaskList,command:"toggleTaskList"})],UN.prototype,"listShortcut",1);var Ko,due=(t=document)=>Ko||(Ko=t.createElement("div"),Ko.setAttribute("id","a11y-status-message"),Ko.setAttribute("role","status"),Ko.setAttribute("aria-live","polite"),Ko.setAttribute("aria-relevant","additions text"),Object.assign(Ko.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),t.body.append(Ko),Ko);TR(500,()=>{due().textContent=""});function E_(t){return typeof t=="object"&&t!=null&&t.nodeType===1}function S_(t,e){return(!e||t!=="hidden")&&t!=="visible"&&t!=="clip"}function s0(t,e){if(t.clientHeighte||i>t&&s=e&&l>=n?i-t-r:s>e&&ln?s-e+o:0}var hue=function(t,e){var n=window,r=e.scrollMode,o=e.block,i=e.inline,s=e.boundary,l=e.skipOverflowHiddenElements,a=typeof s=="function"?s:function(_e){return _e!==s};if(!E_(t))throw new TypeError("Invalid target");for(var u,c,d=document.scrollingElement||document.documentElement,h=[],p=t;E_(p)&&a(p);){if((p=(c=(u=p).parentElement)==null?u.getRootNode().host||null:c)===d){h.push(p);break}p!=null&&p===document.body&&s0(p)&&!s0(document.documentElement)||p!=null&&s0(p,l)&&h.push(p)}for(var f=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=t.getBoundingClientRect(),b=y.height,w=y.width,k=y.top,x=y.right,S=y.bottom,A=y.left,C=o==="start"||o==="nearest"?k:o==="end"?S:k+b/2,O=i==="center"?A+w/2:i==="end"?x:A,R=[],_=0;_=0&&A>=0&&S<=g&&x<=f&&k>=N&&S<=$&&A>=D&&x<=L)return R;var F=getComputedStyle(T),U=parseInt(F.borderLeftWidth,10),W=parseInt(F.borderTopWidth,10),B=parseInt(F.borderRightWidth,10),H=parseInt(F.borderBottomWidth,10),G=0,Y=0,X="offsetWidth"in T?T.offsetWidth-T.clientWidth-U-B:0,Z="offsetHeight"in T?T.offsetHeight-T.clientHeight-W-H:0,te="offsetWidth"in T?T.offsetWidth===0?0:I/T.offsetWidth:0,de="offsetHeight"in T?T.offsetHeight===0?0:M/T.offsetHeight:0;if(d===T)G=o==="start"?C:o==="end"?C-g:o==="nearest"?sf(v,v+g,g,W,H,v+C,v+C+b,b):C-g/2,Y=i==="start"?O:i==="center"?O-f/2:i==="end"?O-f:sf(m,m+f,f,U,B,m+O,m+O+w,w),G=Math.max(0,G+v),Y=Math.max(0,Y+m);else{G=o==="start"?C-N-W:o==="end"?C-$+H+Z:o==="nearest"?sf(N,$,M,W,H+Z,C,C+b,b):C-(N+M/2)+Z/2,Y=i==="start"?O-D-U:i==="center"?O-(D+I/2)+X/2:i==="end"?O-L+B+X:sf(D,L,I,U,B+X,O,O+w,w);var Ie=T.scrollLeft,ve=T.scrollTop;C+=ve-(G=Math.max(0,Math.min(ve+G/de,T.scrollHeight-M/de+Z))),O+=Ie-(Y=Math.max(0,Math.min(Ie+Y/te,T.scrollWidth-I/te+X)))}R.push({el:T,top:G,left:Y})}return R};typeof nr=="object"&&nr.__esModule&&nr.default&&nr.default;pm(hue);var pue=typeof document<"u"?P.useLayoutEffect:P.useEffect;function fue(t){const e=P.useRef();return pue(()=>{e.current=t}),e.current}function gue(t,e){const[n,r]=P.useState([]),[o,i]=P.useState(()=>X0(t)),[s,l]=P.useState([]),a=P.useRef(t),u=fue(o);return a.current=t,sp(Hc,({addCustomHandler:c})=>{const d=X0(a.current),h=c("positioner",d);return i(d),h},e),P.useLayoutEffect(()=>{const c=o.addListener("update",h=>{const p=[];for(const{id:f,data:g,setElement:m}of h){const v=y=>{y&&m(y)};p.push({id:f,data:g,ref:v})}l(p)}),d=o.addListener("done",h=>{r(h)});return u!=null&&u.recentUpdate&&o.onActiveChanged(u==null?void 0:u.recentUpdate),()=>{c(),d()}},[o,u]),P.useMemo(()=>{const c=[];for(const[d,{ref:h,data:p,id:f}]of s.entries()){const g=n[d],{element:m,position:v={}}=g??{},y={...Im,...RR(v)};c.push({ref:h,element:m,data:p,key:f,...y})}return c},[s,n])}function WN(t,e){const n=e==null||w0(e)?[t]:e,r=w0(e)?e:!0,o=P.useRef(Oc()),s=gue(t,n)[0];return P.useMemo(()=>s&&r?{...s,active:!0}:{...Im,ref:void 0,data:{},active:!1,key:o.current},[r,s])}function a0(t,e){return Qe(t)?t(e):t}function mue(t){return Ee(t[0])}function vue(t,e){var n;return Ee(t)?t:Pt(t)?mue(t)?t[0]??"":((n=t.find(r=>MR(r.attrs,e))??t[0])==null?void 0:n.shortcut)??"":t.shortcut}var yue={title:t=>z4(t),upper:t=>t.toLocaleUpperCase(),lower:t=>t.toLocaleLowerCase()};function bue(t,e){const{casing:n="title",namedAsSymbol:r=!1,modifierAsSymbol:o=!0,separator:i=" ",t:s}=e,l=JF(t),a=[],u=yue[n];for(const c of l){if(c.type==="char"){a.push(u(c.key));continue}if(c.type==="named"){const h=r===!0||Pt(r)&&ir(r,c.key)?c.symbol??s(c.i18n):s(c.i18n);a.push(u(h));continue}const d=o===!0||Pt(o)&&ir(o,c.key)?c.symbol:s(c.i18n);a.push(u(d))}return a.join(i)}var VN=({commandName:t,active:e,enabled:n,attrs:r})=>{const{t:o}=PJ(),{getCommandOptions:i}=ap(),s=i(t),{description:l,label:a,icon:u,shortcut:c}=s||{},d=P.useMemo(()=>({active:e,attrs:r,enabled:n,t:o}),[e,r,n,o]),h=P.useMemo(()=>{if(c)return bue(vue(c,r??{}),{t:o,separator:""})},[c,r,o]);return P.useMemo(()=>({description:a0(l,d),label:a0(a,d),icon:a0(u,d),shortcut:h}),[d,l,a,u,h])},wue={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},jN=P.createContext(wue);jN.Provider;function GN(t){return t.map((e,n)=>P.createElement(e.tag,{key:n,...e.attr},GN(e.child??[])))}var Iv=t=>{const{name:e}=t;return ee.createElement(xue,{...t},GN(Pce[e]))},xue=t=>{const e=n=>{const r=t.size??n.size??"1em";let o;n.className&&(o=n.className),t.className&&(o=(o?`${o} `:"")+t.className);const{title:i,...s}=t;return ee.createElement("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",...n.attr,...s,className:o,style:{color:t.color??n.color,...n.style,...t.style},height:r,width:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},i&&ee.createElement("title",null,i),t.children)};return ee.createElement(jN.Consumer,null,e)},kue=t=>Qs(t)?!!t.name:!1,Eue=({icon:t})=>Ee(t)?ee.createElement(Iv,{name:t,size:"1rem"}):t,Sue=({icon:t,children:e})=>{if(!kue(t))return ee.createElement(ee.Fragment,null,e);const{sub:n,sup:r}=t,o=n??r,i=n!==void 0;return o===void 0?ee.createElement(ee.Fragment,null,e):ee.createElement(Sie,{anchorOrigin:{vertical:i?"bottom":"top",horizontal:"right"},badgeContent:o,sx:{"& > .MuiBadge-badge":{bgcolor:"background.paper",color:"text.secondary",minWidth:12,height:12,margin:"2px 0",padding:"1px"}}},e)},kt=({commandName:t,active:e=!1,enabled:n,attrs:r,onSelect:o,onChange:i,icon:s,displayShortcut:l=!0,"aria-label":a,label:u,...c})=>{const d=P.useCallback((y,b)=>{o(),i==null||i(y,b)},[o,i]),h=P.useCallback(y=>{y.preventDefault()},[]),p=VN({commandName:t,active:e,enabled:n,attrs:r});let f=null;p.icon&&(f=Ee(p.icon)?p.icon:p.icon.name);const g=a??p.label??"",m=u??g,v=l&&p.shortcut?` (${p.shortcut})`:"";return ee.createElement($N,{title:`${m}${v}`},ee.createElement(ON,{component:"span",sx:{"&:not(:first-of-type)":{marginLeft:"-1px"}}},ee.createElement(Zse,{"aria-label":g,selected:e,disabled:!n,onMouseDown:h,color:"primary",size:"small",sx:{padding:"6px 12px","&.Mui-selected":{backgroundColor:"primary.main",color:"primary.contrastText"},"&.Mui-selected:hover":{backgroundColor:"primary.dark",color:"primary.contrastText"},"&:not(:first-of-type)":{borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-of-type)":{borderTopRightRadius:0,borderBottomRightRadius:0}},...c,value:t,onChange:d},ee.createElement(Sue,{icon:p.icon},ee.createElement(Eue,{icon:s??f})))))},Cue=({icon:t})=>Ee(t)?ee.createElement(Iv,{name:t,size:"1rem"}):t,KN=({label:t,"aria-label":e,icon:n,children:r,onClose:o,...i})=>{const s=P.useRef(Oc()),[l,a]=P.useState(null),u=!!l,c=P.useCallback(p=>{p.preventDefault()},[]),d=P.useCallback(p=>{a(p.currentTarget)},[]),h=P.useCallback((p,f)=>{a(null),o==null||o(p,f)},[o]);return ee.createElement(ee.Fragment,null,ee.createElement($N,{title:t??e},ee.createElement(dre,{"aria-label":e,"aria-controls":u?s.current:void 0,"aria-haspopup":!0,"aria-expanded":u?"true":void 0,onMouseDown:c,onClick:d,size:"small",sx:p=>({border:`1px solid ${p.palette.divider}`,borderRadius:`${p.shape.borderRadius}px`,padding:"6px 12px","&:not(:first-of-type)":{marginLeft:"-1px",borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-of-type)":{borderTopRightRadius:0,borderBottomRightRadius:0}})},n&&ee.createElement(Cue,{icon:n}),ee.createElement(Iv,{name:"arrowDownSFill",size:"1rem"}))),ee.createElement(Ase,{...i,id:s.current,anchorEl:l,open:u,onClose:h},r))},Tue=t=>{const{insertHorizontalRule:e}=un();mx();const n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=e.enabled();return ee.createElement(kt,{...t,commandName:"insertHorizontalRule",enabled:r,onSelect:n})},Aue=t=>{const{redo:e}=un(),{redoDepth:n}=ap(!0),r=P.useCallback(()=>{e.enabled()&&e()},[e]),o=n()>0;return ee.createElement(kt,{...t,commandName:"redo",active:!1,enabled:o,onSelect:r})},_ue=t=>{const{toggleBlockquote:e}=un(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().blockquote(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleBlockquote",active:r,enabled:o,onSelect:n})},Jx=t=>{const{toggleBold:e}=un(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().bold(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleBold",active:r,enabled:o,onSelect:n})},Rue=t=>{const{toggleBulletList:e}=un(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().bulletList(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleBulletList",active:r,enabled:o,onSelect:n})},Mue=({attrs:t={},...e})=>{const{toggleCodeBlock:n}=un(),r=P.useCallback(()=>{n.enabled(t)&&n(t)},[n,t]),o=hr().codeBlock(),i=n.enabled(t);return ee.createElement(kt,{...e,commandName:"toggleCodeBlock",active:o,enabled:i,attrs:t,onSelect:r})},Qx=t=>{const{toggleCode:e}=un(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().code(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleCode",active:r,enabled:o,onSelect:n})},l0=({attrs:t,...e})=>{const{toggleHeading:n}=un(),r=P.useCallback(()=>{n.enabled(t)&&n(t)},[n,t]),o=hr().heading(t),i=n.enabled(t);return ee.createElement(kt,{...e,commandName:"toggleHeading",active:o,enabled:i,attrs:t,onSelect:r})},ek=t=>{const{toggleItalic:e}=un(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().italic(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleItalic",active:r,enabled:o,onSelect:n})},Oue=t=>{const{toggleOrderedList:e}=un(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().orderedList(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleOrderedList",active:r,enabled:o,onSelect:n})},Iue=t=>{const{toggleStrike:e}=un(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().strike(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleStrike",active:r,enabled:o,onSelect:n})},tk=t=>{const{toggleUnderline:e}=un(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().underline(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleUnderline",active:r,enabled:o,onSelect:n})},Lue=t=>{const{undo:e}=un(),{undoDepth:n}=ap(!0),r=P.useCallback(()=>{e.enabled()&&e()},[e]),o=n()>0;return ee.createElement(kt,{...t,commandName:"undo",active:!1,enabled:o,onSelect:r})},Fr=t=>ee.createElement(ON,{sx:{display:"flex",alignItems:"center",width:"fit-content",bgcolor:"background.paper",color:"text.secondary"},...t}),Nue=({children:t})=>ee.createElement(Fr,null,ee.createElement(Jx,null),ee.createElement(ek,null),ee.createElement(tk,null),ee.createElement(Iue,null),ee.createElement(Qx,null),t),$ue=({icon:t})=>t?ee.createElement(Jie,null,Ee(t)?ee.createElement(Iv,{name:t,size:"1rem"}):ee.createElement(ee.Fragment,null,t)):null,nk=({commandName:t,active:e=!1,enabled:n,attrs:r,onSelect:o,onClick:i,icon:s,displayShortcut:l=!0,label:a,description:u,displayDescription:c=!0,...d})=>{const h=P.useCallback(y=>{o(),i==null||i(y)},[o,i]),p=P.useCallback(y=>{y.preventDefault()},[]),f=VN({commandName:t,active:e,enabled:n,attrs:r});let g=null;f.icon&&(g=Ee(f.icon)?f.icon:f.icon.name);const m=a??f.label??"",v=c&&(u??f.description);return ee.createElement($se,{selected:e,disabled:!n,onMouseDown:p,...d,onClick:h},s!==null&&ee.createElement($ue,{icon:s??g}),ee.createElement(ise,{primary:m,secondary:v}),l&&f.shortcut&&ee.createElement(xd,{variant:"body2",color:"text.secondary",sx:{ml:2}},f.shortcut))},af=({attrs:t,...e})=>{const{toggleHeading:n}=un(),r=P.useCallback(()=>{n.enabled(t)&&n(t)},[n,t]),o=hr().heading(t),i=n.enabled(t);return ee.createElement(nk,{...e,commandName:"toggleHeading",active:o,enabled:i,attrs:t,onSelect:r})},Due={level:1},Pue={level:2},C_={level:3},zue={level:4},Fue={level:5},Bue={level:6},Hue=({showAll:t=!1,children:e})=>ee.createElement(Fr,null,ee.createElement(l0,{attrs:Due}),ee.createElement(l0,{attrs:Pue}),t?ee.createElement(KN,{"aria-label":"More heading options"},ee.createElement(af,{attrs:C_}),ee.createElement(af,{attrs:zue}),ee.createElement(af,{attrs:Fue}),ee.createElement(af,{attrs:Bue})):ee.createElement(l0,{attrs:C_}),e),Uue=({children:t})=>ee.createElement(Fr,null,ee.createElement(Lue,null),ee.createElement(Aue,null),t);typeof nr=="object"&&nr.__esModule&&nr.default&&nr.default;var Wue=t=>{const e=ap().getPositionerWidget();return ip.createPortal(ee.createElement(ee.Fragment,null,t.children),e)},YN=P.createContext({});function Vue(t={}){const e=P.useContext(YN),n=P.useMemo(()=>LR(e,t.theme??{}),[e,t.theme]),r=P.useMemo(()=>OV(n).styles,[n]),o=Fc(MV,t.className);return P.useMemo(()=>({style:r,className:o,theme:n}),[r,o,n])}var jue=t=>{var e,n,r,o,i,s,l,a;const{children:u,as:c="div"}=t,{theme:d,style:h,className:p}=Vue({theme:t.theme??va}),f=Px({palette:{primary:{main:((e=d.color)==null?void 0:e.primary)??va.color.primary,dark:((r=(n=d.color)==null?void 0:n.hover)==null?void 0:r.primary)??va.color.hover.primary,contrastText:((o=d.color)==null?void 0:o.primaryText)??va.color.primaryText},secondary:{main:((i=d.color)==null?void 0:i.secondary)??va.color.secondary,dark:((l=(s=d.color)==null?void 0:s.hover)==null?void 0:l.secondary)??va.color.hover.secondary,contrastText:((a=d.color)==null?void 0:a.secondaryText)??va.color.secondaryText}}});return ee.createElement(_ne,{theme:f},ee.createElement(YN.Provider,{value:d},ee.createElement(c,{style:h,className:p},u)))},XN=t=>ee.createElement(Die,{direction:"row",spacing:1,sx:{backgroundColor:"background.paper",overflowX:"auto"},...t}),Gue=[{name:"offset",options:{offset:[0,8]}}],Kue=({positioner:t="selection",children:e,...n})=>{const{ref:r,x:o,y:i,width:s,height:l,active:a}=WN(()=>X0(t),[t]),[u,c]=P.useState(null),d=P.useMemo(()=>({position:"absolute",pointerEvents:"none",left:o,top:i,width:s,height:l}),[o,i,s,l]),h=P.useCallback(p=>{c(p),r==null||r(p)},[r]);return ee.createElement(ee.Fragment,null,ee.createElement("div",{ref:h,style:d}),ee.createElement(qx,{placement:"top",modifiers:Gue,...n,open:a,anchorEl:u},ee.createElement(XN,null,e?ee.createElement(ee.Fragment,null,e):ee.createElement(Nue,null))))},Yue=({languages:t=[],className:e="",offset:n={x:0,y:0},onLanguageChange:r,onPointerDownSelect:o,onSelectChange:i})=>{var s;const l=WN(que,[]),{getExtension:a,getState:u}=to(),{focus:c,updateCodeBlock:d}=un(),h=a(vo).options,[p]=P.useState(()=>{const w=new Map;return h.supportedLanguages.forEach(k=>{k.aliases.forEach(x=>!t.some(S=>S.displayName===x)&&w.set(x,k.displayName))}),w}),[f]=P.useState([...t,{displayName:h.defaultLanguage},...h.supportedLanguages]),{selection:g}=u(),[m,v]=P.useState("auto"),y=(s=pi({selection:g,types:"codeBlock"}))==null?void 0:s.node.attrs.language,b=P.useMemo(()=>{const w=p.get(y);return w||(h.supportedLanguages.some(k=>y===k.displayName)?y:h.defaultLanguage)},[p,h.defaultLanguage,h.supportedLanguages,y]);return P.useEffect(()=>{var w;const k=l.element;if(r!=null&&r(b,k,v))return;if((S=>S&&S.nodeName==="SELECT"||!1)(k)){const S=(w=k.options[k.selectedIndex])==null?void 0:w.dataset.width;v(S?`${S}px`:"auto")}},[l.element,b,r]),ee.createElement(Wue,null,ee.createElement("select",{ref:l.ref,className:e,onBlur:()=>c(),onChange:w=>{var k;i!=null&&i(w,v)||(v(`${(k=w.target.options[w.target.selectedIndex])==null?void 0:k.dataset.width}px`),d({language:w.target.dataset.value||w.target.value}))},onPointerDown:o,style:{"--w":m,"--x":`${l.x+n.x}px`,"--y":`${l.y+n.y}px`,display:y?"block":"none"},value:b},y?Xue(f):null))},Xue=m6(t=>kb(t.map(({displayName:n,value:r})=>({displayName:n,value:r||n})),"displayName").sort((n,r)=>n.displayName>r.displayName?1:n.displayName{const r=document.createElement("select"),o=document.createElement("option");let i="0px";return r.append(o),document.body.append(r),o.textContent=n.displayName,i=String(r.getBoundingClientRect().width),r.remove(),{...n,width:i}}).map(({displayName:n,value:r,width:o})=>ee.createElement("option",{key:n,"data-value":r,"data-width":o,value:n},n)));function que(){return Gr.create({getActive(t){const{selection:e}=t.state,n=pi({selection:e,types:"codeBlock"});return n?[{codeBlockResult:n}]:Gr.EMPTY},getPosition(t){const{data:e,view:n}=t,{pos:r}=e.codeBlockResult,o=n.nodeDOM(r);if(!o||!Vt(o))return Im;const i=o.getBoundingClientRect(),s=n.dom.getBoundingClientRect(),l=n.dom.scrollLeft+i.left-s.left,a=n.dom.scrollTop+i.top-s.top,u=ww(i,n.dom);return{height:0,rect:i,visible:u,width:0,x:l,y:a}},hasChanged:bw})}var tn=pm(Ug),rk=Xt` +`),lo.rippleVisible,Yne,nb,({theme:t})=>t.transitions.easing.easeInOut,lo.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,lo.child,lo.childLeaving,Xne,nb,({theme:t})=>t.transitions.easing.easeInOut,lo.childPulsate,qne,({theme:t})=>t.transitions.easing.easeInOut),Qne=D.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s}=r,l=Pe(r,Gne),[a,u]=D.useState([]),c=D.useRef(0),d=D.useRef(null);D.useEffect(()=>{d.current&&(d.current(),d.current=null)},[a]);const h=D.useRef(!1),p=D.useRef(0),f=D.useRef(null),g=D.useRef(null);D.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const m=D.useCallback(w=>{const{pulsate:k,rippleX:x,rippleY:S,rippleSize:A,cb:C}=w;u(O=>[...O,V.jsx(Jne,{classes:{ripple:Ve(i.ripple,lo.ripple),rippleVisible:Ve(i.rippleVisible,lo.rippleVisible),ripplePulsate:Ve(i.ripplePulsate,lo.ripplePulsate),child:Ve(i.child,lo.child),childLeaving:Ve(i.childLeaving,lo.childLeaving),childPulsate:Ve(i.childPulsate,lo.childPulsate)},timeout:nb,pulsate:k,rippleX:x,rippleY:S,rippleSize:A},c.current)]),c.current+=1,d.current=C},[i]),v=D.useCallback((w={},k={},x=()=>{})=>{const{pulsate:S=!1,center:A=o||k.pulsate,fakeElement:C=!1}=k;if((w==null?void 0:w.type)==="mousedown"&&h.current){h.current=!1;return}(w==null?void 0:w.type)==="touchstart"&&(h.current=!0);const O=C?null:g.current,R=O?O.getBoundingClientRect():{width:0,height:0,left:0,top:0};let _,T,E;if(A||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)_=Math.round(R.width/2),T=Math.round(R.height/2);else{const{clientX:M,clientY:I}=w.touches&&w.touches.length>0?w.touches[0]:w;_=Math.round(M-R.left),T=Math.round(I-R.top)}if(A)E=Math.sqrt((2*R.width**2+R.height**2)/3),E%2===0&&(E+=1);else{const M=Math.max(Math.abs((O?O.clientWidth:0)-_),_)*2+2,I=Math.max(Math.abs((O?O.clientHeight:0)-T),T)*2+2;E=Math.sqrt(M**2+I**2)}w!=null&&w.touches?f.current===null&&(f.current=()=>{m({pulsate:S,rippleX:_,rippleY:T,rippleSize:E,cb:x})},p.current=setTimeout(()=>{f.current&&(f.current(),f.current=null)},Kne)):m({pulsate:S,rippleX:_,rippleY:T,rippleSize:E,cb:x})},[o,m]),y=D.useCallback(()=>{v({},{pulsate:!0})},[v]),b=D.useCallback((w,k)=>{if(clearTimeout(p.current),(w==null?void 0:w.type)==="touchend"&&f.current){f.current(),f.current=null,p.current=setTimeout(()=>{b(w,k)});return}f.current=null,u(x=>x.length>0?x.slice(1):x),d.current=k},[]);return D.useImperativeHandle(n,()=>({pulsate:y,start:v,stop:b}),[y,v,b]),V.jsx(Zne,K({className:Ve(lo.root,i.root,s),ref:g},l,{children:V.jsx(zne,{component:null,exit:!0,children:a})}))}),ere=Qne;function tre(t){return xn("MuiButtonBase",t)}const nre=kn("MuiButtonBase",["root","disabled","focusVisible"]),rre=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],ore=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:o}=t,s=Pn({root:["root",e&&"disabled",n&&"focusVisible"]},tre,o);return n&&r&&(s.root+=` ${r}`),s},ire=Et("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${nre.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),sre=D.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:l,component:a="button",disabled:u=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:h=!1,LinkComponent:p="a",onBlur:f,onClick:g,onContextMenu:m,onDragLeave:v,onFocus:y,onFocusVisible:b,onKeyDown:w,onKeyUp:k,onMouseDown:x,onMouseLeave:S,onMouseUp:A,onTouchEnd:C,onTouchMove:O,onTouchStart:R,tabIndex:_=0,TouchRippleProps:T,touchRippleRef:E,type:M}=r,I=Pe(r,rre),N=D.useRef(null),L=D.useRef(null),$=Rr(L,E),{isFocusVisibleRef:P,onFocus:F,onBlur:H,ref:W}=BL(),[B,U]=D.useState(!1);u&&B&&U(!1),D.useImperativeHandle(o,()=>({focusVisible:()=>{U(!0),N.current.focus()}}),[]);const[G,Y]=D.useState(!1);D.useEffect(()=>{Y(!0)},[]);const X=G&&!c&&!u;D.useEffect(()=>{B&&h&&!c&&G&&L.current.pulsate()},[c,h,B,G]);function Z(ie,Ce,Xe=d){return Ba(Ke=>(Ce&&Ce(Ke),!Xe&&L.current&&L.current[ie](Ke),!0))}const te=Z("start",x),de=Z("stop",m),Ie=Z("stop",v),ve=Z("stop",A),_e=Z("stop",ie=>{B&&ie.preventDefault(),S&&S(ie)}),Se=Z("start",R),mt=Z("stop",C),Ot=Z("stop",O),bt=Z("stop",ie=>{H(ie),P.current===!1&&U(!1),f&&f(ie)},!1),Xn=Ba(ie=>{N.current||(N.current=ie.currentTarget),F(ie),P.current===!0&&(U(!0),b&&b(ie)),y&&y(ie)}),It=()=>{const ie=N.current;return a&&a!=="button"&&!(ie.tagName==="A"&&ie.href)},Cn=D.useRef(!1),dn=Ba(ie=>{h&&!Cn.current&&B&&L.current&&ie.key===" "&&(Cn.current=!0,L.current.stop(ie,()=>{L.current.start(ie)})),ie.target===ie.currentTarget&&It()&&ie.key===" "&&ie.preventDefault(),w&&w(ie),ie.target===ie.currentTarget&&It()&&ie.key==="Enter"&&!u&&(ie.preventDefault(),g&&g(ie))}),hn=Ba(ie=>{h&&ie.key===" "&&L.current&&B&&!ie.defaultPrevented&&(Cn.current=!1,L.current.stop(ie,()=>{L.current.pulsate(ie)})),k&&k(ie),g&&ie.target===ie.currentTarget&&It()&&ie.key===" "&&!ie.defaultPrevented&&g(ie)});let Ye=a;Ye==="button"&&(I.href||I.to)&&(Ye=p);const Tn={};Ye==="button"?(Tn.type=M===void 0?"button":M,Tn.disabled=u):(!I.href&&!I.to&&(Tn.role="button"),u&&(Tn["aria-disabled"]=u));const q=Rr(n,W,N),ue=K({},r,{centerRipple:i,component:a,disabled:u,disableRipple:c,disableTouchRipple:d,focusRipple:h,tabIndex:_,focusVisible:B}),me=ore(ue);return V.jsxs(ire,K({as:Ye,className:Ve(me.root,l),ownerState:ue,onBlur:bt,onClick:g,onContextMenu:de,onFocus:Xn,onKeyDown:dn,onKeyUp:hn,onMouseDown:te,onMouseLeave:_e,onMouseUp:ve,onDragLeave:Ie,onTouchEnd:mt,onTouchMove:Ot,onTouchStart:Se,ref:q,tabIndex:u?-1:_,type:M},Tn,I,{children:[s,X?V.jsx(ere,K({ref:$,center:i},T)):null]}))}),Wx=sre;function are(t){return xn("MuiIconButton",t)}const lre=kn("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),cre=["edge","children","className","color","disabled","disableFocusRipple","size"],ure=t=>{const{classes:e,disabled:n,color:r,edge:o,size:i}=t,s={root:["root",n&&"disabled",r!=="default"&&`color${ht(r)}`,o&&`edge${ht(o)}`,`size${ht(i)}`]};return Pn(s,are,e)},dre=Et(Wx,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="default"&&e[`color${ht(n.color)}`],n.edge&&e[`edge${ht(n.edge)}`],e[`size${ht(n.size)}`]]}})(({theme:t,ownerState:e})=>K({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:xr(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12}),({theme:t,ownerState:e})=>{var n;const r=(n=(t.vars||t).palette)==null?void 0:n[e.color];return K({},e.color==="inherit"&&{color:"inherit"},e.color!=="inherit"&&e.color!=="default"&&K({color:r==null?void 0:r.main},!e.disableRipple&&{"&:hover":K({},r&&{backgroundColor:t.vars?`rgba(${r.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:xr(r.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),e.size==="small"&&{padding:5,fontSize:t.typography.pxToRem(18)},e.size==="large"&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${lre.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),hre=D.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:l="default",disabled:a=!1,disableFocusRipple:u=!1,size:c="medium"}=r,d=Pe(r,cre),h=K({},r,{edge:o,color:l,disabled:a,disableFocusRipple:u,size:c}),p=ure(h);return V.jsx(dre,K({className:Ve(p.root,s),centerRipple:!0,focusRipple:!u,disabled:a,ref:n,ownerState:h},d,{children:i}))}),pre=hre;function fre(t){return xn("MuiTypography",t)}kn("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const gre=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],mre=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=t,l={root:["root",i,t.align!=="inherit"&&`align${ht(e)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Pn(l,fre,s)},vre=Et("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${ht(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>K({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),r_={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},yre={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},bre=t=>yre[t]||t,wre=D.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiTypography"}),o=bre(r.color),i=Dx(K({},r,{color:o})),{align:s="inherit",className:l,component:a,gutterBottom:u=!1,noWrap:c=!1,paragraph:d=!1,variant:h="body1",variantMapping:p=r_}=i,f=Pe(i,gre),g=K({},i,{align:s,color:o,className:l,component:a,gutterBottom:u,noWrap:c,paragraph:d,variant:h,variantMapping:p}),m=a||(d?"p":p[h]||r_[h])||"span",v=mre(g);return V.jsx(vre,K({as:m,ref:n,ownerState:g,className:Ve(v.root,l)},f))}),xd=wre;function wN(t){return typeof t=="string"}function kd(t,e,n){return t===void 0||wN(t)?e:K({},e,{ownerState:K({},e.ownerState,n)})}const xre={disableDefaultClasses:!1},kre=D.createContext(xre);function Ere(t){const{disableDefaultClasses:e}=D.useContext(kre);return n=>e?"":t(n)}function xN(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function Sre(t,e,n){return typeof t=="function"?t(e,n):t}function o_(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function Cre(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=t;if(!e){const p=Ve(o==null?void 0:o.className,r==null?void 0:r.className,i,n==null?void 0:n.className),f=K({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),g=K({},n,o,r);return p.length>0&&(g.className=p),Object.keys(f).length>0&&(g.style=f),{props:g,internalRef:void 0}}const s=xN(K({},o,r)),l=o_(r),a=o_(o),u=e(s),c=Ve(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d=K({},u==null?void 0:u.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),h=K({},u,n,a,l);return c.length>0&&(h.className=c),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:u.ref}}const Tre=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Gi(t){var e;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1}=t,s=Pe(t,Tre),l=i?{}:Sre(r,o),{props:a,internalRef:u}=Cre(K({},s,{externalSlotProps:l})),c=Rr(u,l==null?void 0:l.ref,(e=t.additionalProps)==null?void 0:e.ref);return kd(n,K({},a,{ref:c}),o)}function Are(t){const{badgeContent:e,invisible:n=!1,max:r=99,showZero:o=!1}=t,i=UL({badgeContent:e,max:r});let s=n;n===!1&&e===0&&!o&&(s=!0);const{badgeContent:l,max:a=r}=s?i:t,u=l&&Number(l)>a?`${a}+`:l;return{badgeContent:l,invisible:s,max:a,displayValue:u}}const _re=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Rre(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function Mre(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function Ore(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||Mre(t))}function Ire(t){const e=[],n=[];return Array.from(t.querySelectorAll(_re)).forEach((r,o)=>{const i=Rre(r);i===-1||!Ore(r)||(i===0?e.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(e)}function Lre(){return!0}function Nre(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Ire,isEnabled:s=Lre,open:l}=t,a=D.useRef(!1),u=D.useRef(null),c=D.useRef(null),d=D.useRef(null),h=D.useRef(null),p=D.useRef(!1),f=D.useRef(null),g=Rr(e.ref,f),m=D.useRef(null);D.useEffect(()=>{!l||!f.current||(p.current=!n)},[n,l]),D.useEffect(()=>{if(!l||!f.current)return;const b=Tr(f.current);return f.current.contains(b.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),p.current&&f.current.focus()),()=>{o||(d.current&&d.current.focus&&(a.current=!0,d.current.focus()),d.current=null)}},[l]),D.useEffect(()=>{if(!l||!f.current)return;const b=Tr(f.current),w=S=>{m.current=S,!(r||!s()||S.key!=="Tab")&&b.activeElement===f.current&&S.shiftKey&&(a.current=!0,c.current&&c.current.focus())},k=()=>{const S=f.current;if(S===null)return;if(!b.hasFocus()||!s()||a.current){a.current=!1;return}if(S.contains(b.activeElement)||r&&b.activeElement!==u.current&&b.activeElement!==c.current)return;if(b.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!p.current)return;let A=[];if((b.activeElement===u.current||b.activeElement===c.current)&&(A=i(f.current)),A.length>0){var C,O;const R=!!((C=m.current)!=null&&C.shiftKey&&((O=m.current)==null?void 0:O.key)==="Tab"),_=A[0],T=A[A.length-1];typeof _!="string"&&typeof T!="string"&&(R?T.focus():_.focus())}else S.focus()};b.addEventListener("focusin",k),b.addEventListener("keydown",w,!0);const x=setInterval(()=>{b.activeElement&&b.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(x),b.removeEventListener("focusin",k),b.removeEventListener("keydown",w,!0)}},[n,r,o,s,l,i]);const v=b=>{d.current===null&&(d.current=b.relatedTarget),p.current=!0,h.current=b.target;const w=e.props.onFocus;w&&w(b)},y=b=>{d.current===null&&(d.current=b.relatedTarget),p.current=!0};return V.jsxs(D.Fragment,{children:[V.jsx("div",{tabIndex:l?0:-1,onFocus:y,ref:u,"data-testid":"sentinelStart"}),D.cloneElement(e,{ref:g,onFocus:v}),V.jsx("div",{tabIndex:l?0:-1,onFocus:y,ref:c,"data-testid":"sentinelEnd"})]})}var Ar="top",wo="bottom",xo="right",_r="left",Vx="auto",dp=[Ar,wo,xo,_r],Qc="start",Th="end",$re="clippingParents",kN="viewport",Pu="popper",Dre="reference",i_=dp.reduce(function(t,e){return t.concat([e+"-"+Qc,e+"-"+Th])},[]),EN=[].concat(dp,[Vx]).reduce(function(t,e){return t.concat([e,e+"-"+Qc,e+"-"+Th])},[]),Pre="beforeRead",zre="read",Fre="afterRead",Bre="beforeMain",Hre="main",Ure="afterMain",Wre="beforeWrite",Vre="write",jre="afterWrite",Gre=[Pre,zre,Fre,Bre,Hre,Ure,Wre,Vre,jre];function gi(t){return t?(t.nodeName||"").toLowerCase():null}function Jr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function dl(t){var e=Jr(t).Element;return t instanceof e||t instanceof Element}function go(t){var e=Jr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function jx(t){if(typeof ShadowRoot>"u")return!1;var e=Jr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Kre(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!go(i)||!gi(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var l=o[s];l===!1?i.removeAttribute(s):i.setAttribute(s,l===!0?"":l)}))})}function Yre(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),l=s.reduce(function(a,u){return a[u]="",a},{});!go(o)||!gi(o)||(Object.assign(o.style,l),Object.keys(i).forEach(function(a){o.removeAttribute(a)}))})}}const Xre={name:"applyStyles",enabled:!0,phase:"write",fn:Kre,effect:Yre,requires:["computeStyles"]};function ui(t){return t.split("-")[0]}var Ya=Math.max,Yg=Math.min,eu=Math.round;function rb(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function SN(){return!/^((?!chrome|android).)*safari/i.test(rb())}function tu(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),o=1,i=1;e&&go(t)&&(o=t.offsetWidth>0&&eu(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&eu(r.height)/t.offsetHeight||1);var s=dl(t)?Jr(t):window,l=s.visualViewport,a=!SN()&&n,u=(r.left+(a&&l?l.offsetLeft:0))/o,c=(r.top+(a&&l?l.offsetTop:0))/i,d=r.width/o,h=r.height/i;return{width:d,height:h,top:c,right:u+d,bottom:c+h,left:u,x:u,y:c}}function Gx(t){var e=tu(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function CN(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&jx(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ki(t){return Jr(t).getComputedStyle(t)}function qre(t){return["table","td","th"].indexOf(gi(t))>=0}function la(t){return((dl(t)?t.ownerDocument:t.document)||window.document).documentElement}function Iv(t){return gi(t)==="html"?t:t.assignedSlot||t.parentNode||(jx(t)?t.host:null)||la(t)}function s_(t){return!go(t)||Ki(t).position==="fixed"?null:t.offsetParent}function Zre(t){var e=/firefox/i.test(rb()),n=/Trident/i.test(rb());if(n&&go(t)){var r=Ki(t);if(r.position==="fixed")return null}var o=Iv(t);for(jx(o)&&(o=o.host);go(o)&&["html","body"].indexOf(gi(o))<0;){var i=Ki(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function hp(t){for(var e=Jr(t),n=s_(t);n&&qre(n)&&Ki(n).position==="static";)n=s_(n);return n&&(gi(n)==="html"||gi(n)==="body"&&Ki(n).position==="static")?e:n||Zre(t)||e}function Kx(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function zd(t,e,n){return Ya(t,Yg(e,n))}function Jre(t,e,n){var r=zd(t,e,n);return r>n?n:r}function TN(){return{top:0,right:0,bottom:0,left:0}}function AN(t){return Object.assign({},TN(),t)}function _N(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Qre=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,AN(typeof e!="number"?e:_N(e,dp))};function eoe(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,l=ui(n.placement),a=Kx(l),u=[_r,xo].indexOf(l)>=0,c=u?"height":"width";if(!(!i||!s)){var d=Qre(o.padding,n),h=Gx(i),p=a==="y"?Ar:_r,f=a==="y"?wo:xo,g=n.rects.reference[c]+n.rects.reference[a]-s[a]-n.rects.popper[c],m=s[a]-n.rects.reference[a],v=hp(i),y=v?a==="y"?v.clientHeight||0:v.clientWidth||0:0,b=g/2-m/2,w=d[p],k=y-h[c]-d[f],x=y/2-h[c]/2+b,S=zd(w,x,k),A=a;n.modifiersData[r]=(e={},e[A]=S,e.centerOffset=S-x,e)}}function toe(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||CN(e.elements.popper,o)&&(e.elements.arrow=o))}const noe={name:"arrow",enabled:!0,phase:"main",fn:eoe,effect:toe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function nu(t){return t.split("-")[1]}var roe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ooe(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:eu(n*o)/o||0,y:eu(r*o)/o||0}}function a_(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,s=t.offsets,l=t.position,a=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,h=s.x,p=h===void 0?0:h,f=s.y,g=f===void 0?0:f,m=typeof c=="function"?c({x:p,y:g}):{x:p,y:g};p=m.x,g=m.y;var v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),b=_r,w=Ar,k=window;if(u){var x=hp(n),S="clientHeight",A="clientWidth";if(x===Jr(n)&&(x=la(n),Ki(x).position!=="static"&&l==="absolute"&&(S="scrollHeight",A="scrollWidth")),x=x,o===Ar||(o===_r||o===xo)&&i===Th){w=wo;var C=d&&x===k&&k.visualViewport?k.visualViewport.height:x[S];g-=C-r.height,g*=a?1:-1}if(o===_r||(o===Ar||o===wo)&&i===Th){b=xo;var O=d&&x===k&&k.visualViewport?k.visualViewport.width:x[A];p-=O-r.width,p*=a?1:-1}}var R=Object.assign({position:l},u&&roe),_=c===!0?ooe({x:p,y:g},Jr(n)):{x:p,y:g};if(p=_.x,g=_.y,a){var T;return Object.assign({},R,(T={},T[w]=y?"0":"",T[b]=v?"0":"",T.transform=(k.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",T))}return Object.assign({},R,(e={},e[w]=y?g+"px":"",e[b]=v?p+"px":"",e.transform="",e))}function ioe(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,l=n.roundOffsets,a=l===void 0?!0:l,u={placement:ui(e.placement),variation:nu(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,a_(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,a_(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const soe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ioe,data:{}};var nf={passive:!0};function aoe(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,l=s===void 0?!0:s,a=Jr(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,nf)}),l&&a.addEventListener("resize",n.update,nf),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,nf)}),l&&a.removeEventListener("resize",n.update,nf)}}const loe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:aoe,data:{}};var coe={left:"right",right:"left",bottom:"top",top:"bottom"};function jf(t){return t.replace(/left|right|bottom|top/g,function(e){return coe[e]})}var uoe={start:"end",end:"start"};function l_(t){return t.replace(/start|end/g,function(e){return uoe[e]})}function Yx(t){var e=Jr(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Xx(t){return tu(la(t)).left+Yx(t).scrollLeft}function doe(t,e){var n=Jr(t),r=la(t),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;var u=SN();(u||!u&&e==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:i,height:s,x:l+Xx(t),y:a}}function hoe(t){var e,n=la(t),r=Yx(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=Ya(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Ya(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+Xx(t),a=-r.scrollTop;return Ki(o||n).direction==="rtl"&&(l+=Ya(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:l,y:a}}function qx(t){var e=Ki(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function RN(t){return["html","body","#document"].indexOf(gi(t))>=0?t.ownerDocument.body:go(t)&&qx(t)?t:RN(Iv(t))}function Fd(t,e){var n;e===void 0&&(e=[]);var r=RN(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=Jr(r),s=o?[i].concat(i.visualViewport||[],qx(r)?r:[]):r,l=e.concat(s);return o?l:l.concat(Fd(Iv(s)))}function ob(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function poe(t,e){var n=tu(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function c_(t,e,n){return e===kN?ob(doe(t,n)):dl(e)?poe(e,n):ob(hoe(la(t)))}function foe(t){var e=Fd(Iv(t)),n=["absolute","fixed"].indexOf(Ki(t).position)>=0,r=n&&go(t)?hp(t):t;return dl(r)?e.filter(function(o){return dl(o)&&CN(o,r)&&gi(o)!=="body"}):[]}function goe(t,e,n,r){var o=e==="clippingParents"?foe(t):[].concat(e),i=[].concat(o,[n]),s=i[0],l=i.reduce(function(a,u){var c=c_(t,u,r);return a.top=Ya(c.top,a.top),a.right=Yg(c.right,a.right),a.bottom=Yg(c.bottom,a.bottom),a.left=Ya(c.left,a.left),a},c_(t,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function MN(t){var e=t.reference,n=t.element,r=t.placement,o=r?ui(r):null,i=r?nu(r):null,s=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,a;switch(o){case Ar:a={x:s,y:e.y-n.height};break;case wo:a={x:s,y:e.y+e.height};break;case xo:a={x:e.x+e.width,y:l};break;case _r:a={x:e.x-n.width,y:l};break;default:a={x:e.x,y:e.y}}var u=o?Kx(o):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case Qc:a[u]=a[u]-(e[c]/2-n[c]/2);break;case Th:a[u]=a[u]+(e[c]/2-n[c]/2);break}}return a}function Ah(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.strategy,s=i===void 0?t.strategy:i,l=n.boundary,a=l===void 0?$re:l,u=n.rootBoundary,c=u===void 0?kN:u,d=n.elementContext,h=d===void 0?Pu:d,p=n.altBoundary,f=p===void 0?!1:p,g=n.padding,m=g===void 0?0:g,v=AN(typeof m!="number"?m:_N(m,dp)),y=h===Pu?Dre:Pu,b=t.rects.popper,w=t.elements[f?y:h],k=goe(dl(w)?w:w.contextElement||la(t.elements.popper),a,c,s),x=tu(t.elements.reference),S=MN({reference:x,element:b,strategy:"absolute",placement:o}),A=ob(Object.assign({},b,S)),C=h===Pu?A:x,O={top:k.top-C.top+v.top,bottom:C.bottom-k.bottom+v.bottom,left:k.left-C.left+v.left,right:C.right-k.right+v.right},R=t.modifiersData.offset;if(h===Pu&&R){var _=R[o];Object.keys(O).forEach(function(T){var E=[xo,wo].indexOf(T)>=0?1:-1,M=[Ar,wo].indexOf(T)>=0?"y":"x";O[T]+=_[M]*E})}return O}function moe(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,l=n.flipVariations,a=n.allowedAutoPlacements,u=a===void 0?EN:a,c=nu(r),d=c?l?i_:i_.filter(function(f){return nu(f)===c}):dp,h=d.filter(function(f){return u.indexOf(f)>=0});h.length===0&&(h=d);var p=h.reduce(function(f,g){return f[g]=Ah(t,{placement:g,boundary:o,rootBoundary:i,padding:s})[ui(g)],f},{});return Object.keys(p).sort(function(f,g){return p[f]-p[g]})}function voe(t){if(ui(t)===Vx)return[];var e=jf(t);return[l_(t),e,l_(e)]}function yoe(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,l=s===void 0?!0:s,a=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=p===void 0?!0:p,g=n.allowedAutoPlacements,m=e.options.placement,v=ui(m),y=v===m,b=a||(y||!f?[jf(m)]:voe(m)),w=[m].concat(b).reduce(function(B,U){return B.concat(ui(U)===Vx?moe(e,{placement:U,boundary:c,rootBoundary:d,padding:u,flipVariations:f,allowedAutoPlacements:g}):U)},[]),k=e.rects.reference,x=e.rects.popper,S=new Map,A=!0,C=w[0],O=0;O=0,M=E?"width":"height",I=Ah(e,{placement:R,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),N=E?T?xo:_r:T?wo:Ar;k[M]>x[M]&&(N=jf(N));var L=jf(N),$=[];if(i&&$.push(I[_]<=0),l&&$.push(I[N]<=0,I[L]<=0),$.every(function(B){return B})){C=R,A=!1;break}S.set(R,$)}if(A)for(var P=f?3:1,F=function(U){var G=w.find(function(Y){var X=S.get(Y);if(X)return X.slice(0,U).every(function(Z){return Z})});if(G)return C=G,"break"},H=P;H>0;H--){var W=F(H);if(W==="break")break}e.placement!==C&&(e.modifiersData[r]._skip=!0,e.placement=C,e.reset=!0)}}const boe={name:"flip",enabled:!0,phase:"main",fn:yoe,requiresIfExists:["offset"],data:{_skip:!1}};function u_(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function d_(t){return[Ar,xo,wo,_r].some(function(e){return t[e]>=0})}function woe(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=Ah(e,{elementContext:"reference"}),l=Ah(e,{altBoundary:!0}),a=u_(s,r),u=u_(l,o,i),c=d_(a),d=d_(u);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const xoe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:woe};function koe(t,e,n){var r=ui(t),o=[_r,Ar].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=i[0],l=i[1];return s=s||0,l=(l||0)*o,[_r,xo].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function Eoe(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,s=EN.reduce(function(c,d){return c[d]=koe(d,e.rects,i),c},{}),l=s[e.placement],a=l.x,u=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=s}const Soe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Eoe};function Coe(t){var e=t.state,n=t.name;e.modifiersData[n]=MN({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const Toe={name:"popperOffsets",enabled:!0,phase:"read",fn:Coe,data:{}};function Aoe(t){return t==="x"?"y":"x"}function _oe(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,l=s===void 0?!1:s,a=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,h=n.tether,p=h===void 0?!0:h,f=n.tetherOffset,g=f===void 0?0:f,m=Ah(e,{boundary:a,rootBoundary:u,padding:d,altBoundary:c}),v=ui(e.placement),y=nu(e.placement),b=!y,w=Kx(v),k=Aoe(w),x=e.modifiersData.popperOffsets,S=e.rects.reference,A=e.rects.popper,C=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,O=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),R=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,_={x:0,y:0};if(x){if(i){var T,E=w==="y"?Ar:_r,M=w==="y"?wo:xo,I=w==="y"?"height":"width",N=x[w],L=N+m[E],$=N-m[M],P=p?-A[I]/2:0,F=y===Qc?S[I]:A[I],H=y===Qc?-A[I]:-S[I],W=e.elements.arrow,B=p&&W?Gx(W):{width:0,height:0},U=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:TN(),G=U[E],Y=U[M],X=zd(0,S[I],B[I]),Z=b?S[I]/2-P-X-G-O.mainAxis:F-X-G-O.mainAxis,te=b?-S[I]/2+P+X+Y+O.mainAxis:H+X+Y+O.mainAxis,de=e.elements.arrow&&hp(e.elements.arrow),Ie=de?w==="y"?de.clientTop||0:de.clientLeft||0:0,ve=(T=R==null?void 0:R[w])!=null?T:0,_e=N+Z-ve-Ie,Se=N+te-ve,mt=zd(p?Yg(L,_e):L,N,p?Ya($,Se):$);x[w]=mt,_[w]=mt-N}if(l){var Ot,bt=w==="x"?Ar:_r,Xn=w==="x"?wo:xo,It=x[k],Cn=k==="y"?"height":"width",dn=It+m[bt],hn=It-m[Xn],Ye=[Ar,_r].indexOf(v)!==-1,Tn=(Ot=R==null?void 0:R[k])!=null?Ot:0,q=Ye?dn:It-S[Cn]-A[Cn]-Tn+O.altAxis,ue=Ye?It+S[Cn]+A[Cn]-Tn-O.altAxis:hn,me=p&&Ye?Jre(q,It,ue):zd(p?q:dn,It,p?ue:hn);x[k]=me,_[k]=me-It}e.modifiersData[r]=_}}const Roe={name:"preventOverflow",enabled:!0,phase:"main",fn:_oe,requiresIfExists:["offset"]};function Moe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Ooe(t){return t===Jr(t)||!go(t)?Yx(t):Moe(t)}function Ioe(t){var e=t.getBoundingClientRect(),n=eu(e.width)/t.offsetWidth||1,r=eu(e.height)/t.offsetHeight||1;return n!==1||r!==1}function Loe(t,e,n){n===void 0&&(n=!1);var r=go(e),o=go(e)&&Ioe(e),i=la(e),s=tu(t,o,n),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!n)&&((gi(e)!=="body"||qx(i))&&(l=Ooe(e)),go(e)?(a=tu(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):i&&(a.x=Xx(i))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function Noe(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var a=e.get(l);a&&o(a)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||o(i)}),r}function $oe(t){var e=Noe(t);return Gre.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function Doe(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Poe(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var h_={placement:"bottom",modifiers:[],strategy:"absolute"};function p_(){for(var t=arguments.length,e=new Array(t),n=0;n{i||l(Hoe(o)||document.body)},[o,i]),ll(()=>{if(s&&!i)return qy(n,s),()=>{qy(n,null)}},[n,s,i]),i){if(D.isValidElement(r)){const u={ref:a};return D.cloneElement(r,u)}return V.jsx(D.Fragment,{children:r})}return V.jsx(D.Fragment,{children:s&&ip.createPortal(r,s)})});function Uoe(t){return xn("MuiPopper",t)}kn("MuiPopper",["root"]);const Woe=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Voe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function joe(t,e){if(e==="ltr")return t;switch(t){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return t}}function ib(t){return typeof t=="function"?t():t}function Goe(t){return t.nodeType!==void 0}const Koe=()=>Pn({root:["root"]},Ere(Uoe)),Yoe={},Xoe=D.forwardRef(function(e,n){var r;const{anchorEl:o,children:i,direction:s,disablePortal:l,modifiers:a,open:u,placement:c,popperOptions:d,popperRef:h,slotProps:p={},slots:f={},TransitionProps:g}=e,m=Pe(e,Woe),v=D.useRef(null),y=Rr(v,n),b=D.useRef(null),w=Rr(b,h),k=D.useRef(w);ll(()=>{k.current=w},[w]),D.useImperativeHandle(h,()=>b.current,[]);const x=joe(c,s),[S,A]=D.useState(x),[C,O]=D.useState(ib(o));D.useEffect(()=>{b.current&&b.current.forceUpdate()}),D.useEffect(()=>{o&&O(ib(o))},[o]),ll(()=>{if(!C||!u)return;const M=L=>{A(L.placement)};let I=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:L})=>{M(L)}}];a!=null&&(I=I.concat(a)),d&&d.modifiers!=null&&(I=I.concat(d.modifiers));const N=Boe(C,v.current,K({placement:x},d,{modifiers:I}));return k.current(N),()=>{N.destroy(),k.current(null)}},[C,l,a,u,d,x]);const R={placement:S};g!==null&&(R.TransitionProps=g);const _=Koe(),T=(r=f.root)!=null?r:"div",E=Gi({elementType:T,externalSlotProps:p.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:y},ownerState:e,className:_.root});return V.jsx(T,K({},E,{children:typeof i=="function"?i(R):i}))}),qoe=D.forwardRef(function(e,n){const{anchorEl:r,children:o,container:i,direction:s="ltr",disablePortal:l=!1,keepMounted:a=!1,modifiers:u,open:c,placement:d="bottom",popperOptions:h=Yoe,popperRef:p,style:f,transition:g=!1,slotProps:m={},slots:v={}}=e,y=Pe(e,Voe),[b,w]=D.useState(!0),k=()=>{w(!1)},x=()=>{w(!0)};if(!a&&!c&&(!g||b))return null;let S;if(i)S=i;else if(r){const O=ib(r);S=O&&Goe(O)?Tr(O).body:Tr(null).body}const A=!c&&a&&(!g||b)?"none":void 0,C=g?{in:c,onEnter:k,onExited:x}:void 0;return V.jsx(ON,{disablePortal:l,container:S,children:V.jsx(Xoe,K({anchorEl:r,direction:s,disablePortal:l,modifiers:u,ref:n,open:g?!b:c,placement:d,popperOptions:h,popperRef:p,slotProps:m,slots:v},y,{style:K({position:"fixed",top:0,left:0,display:A},f),TransitionProps:C,children:o}))})});function Zoe(t){const e=Tr(t);return e.body===t?kh(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Bd(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function f_(t){return parseInt(kh(t).getComputedStyle(t).paddingRight,10)||0}function Joe(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function g_(t,e,n,r,o){const i=[e,n,...r];[].forEach.call(t.children,s=>{const l=i.indexOf(s)===-1,a=!Joe(s);l&&a&&Bd(s,o)})}function e0(t,e){let n=-1;return t.some((r,o)=>e(r)?(n=o,!0):!1),n}function Qoe(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(Zoe(r)){const s=HL(Tr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${f_(r)+s}px`;const l=Tr(r).querySelectorAll(".mui-fixed");[].forEach.call(l,a=>{n.push({value:a.style.paddingRight,property:"padding-right",el:a}),a.style.paddingRight=`${f_(a)+s}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=Tr(r).body;else{const s=r.parentElement,l=kh(r);i=(s==null?void 0:s.nodeName)==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:s,property:l})=>{i?s.style.setProperty(l,i):s.style.removeProperty(l)})}}function eie(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class tie{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Bd(e.modalRef,!1);const o=eie(n);g_(n,e.mount,e.modalRef,o,!0);const i=e0(this.containers,s=>s.container===n);return i!==-1?(this.containers[i].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:o}),r)}mount(e,n){const r=e0(this.containers,i=>i.modals.indexOf(e)!==-1),o=this.containers[r];o.restore||(o.restore=Qoe(o,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const o=e0(this.containers,s=>s.modals.indexOf(e)!==-1),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&Bd(e.modalRef,n),g_(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&Bd(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}function nie(t){return typeof t=="function"?t():t}function rie(t){return t?t.props.hasOwnProperty("in"):!1}const oie=new tie;function iie(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=oie,closeAfterTransition:i=!1,onTransitionEnter:s,onTransitionExited:l,children:a,onClose:u,open:c,rootRef:d}=t,h=D.useRef({}),p=D.useRef(null),f=D.useRef(null),g=Rr(f,d),[m,v]=D.useState(!c),y=rie(a);let b=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(b=!1);const w=()=>Tr(p.current),k=()=>(h.current.modalRef=f.current,h.current.mount=p.current,h.current),x=()=>{o.mount(k(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},S=Ba(()=>{const I=nie(e)||w().body;o.add(k(),I),f.current&&x()}),A=D.useCallback(()=>o.isTopModal(k()),[o]),C=Ba(I=>{p.current=I,I&&(c&&A()?x():f.current&&Bd(f.current,b))}),O=D.useCallback(()=>{o.remove(k(),b)},[b,o]);D.useEffect(()=>()=>{O()},[O]),D.useEffect(()=>{c?S():(!y||!i)&&O()},[c,O,y,i,S]);const R=I=>N=>{var L;(L=I.onKeyDown)==null||L.call(I,N),!(N.key!=="Escape"||!A())&&(n||(N.stopPropagation(),u&&u(N,"escapeKeyDown")))},_=I=>N=>{var L;(L=I.onClick)==null||L.call(I,N),N.target===N.currentTarget&&u&&u(N,"backdropClick")};return{getRootProps:(I={})=>{const N=xN(t);delete N.onTransitionEnter,delete N.onTransitionExited;const L=K({},N,I);return K({role:"presentation"},L,{onKeyDown:R(L),ref:g})},getBackdropProps:(I={})=>{const N=I;return K({"aria-hidden":!0},N,{onClick:_(N),open:c})},getTransitionProps:()=>{const I=()=>{v(!1),s&&s()},N=()=>{v(!0),l&&l(),i&&O()};return{onEnter:TA(I,a==null?void 0:a.props.onEnter),onExited:TA(N,a==null?void 0:a.props.onExited)}},rootRef:g,portalRef:C,isTopModal:A,exited:m,hasTransition:y}}const sie=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],aie=Et(qoe,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),lie=D.forwardRef(function(e,n){var r;const o=Nx(),i=Sn({props:e,name:"MuiPopper"}),{anchorEl:s,component:l,components:a,componentsProps:u,container:c,disablePortal:d,keepMounted:h,modifiers:p,open:f,placement:g,popperOptions:m,popperRef:v,transition:y,slots:b,slotProps:w}=i,k=Pe(i,sie),x=(r=b==null?void 0:b.root)!=null?r:a==null?void 0:a.Root,S=K({anchorEl:s,container:c,disablePortal:d,keepMounted:h,modifiers:p,open:f,placement:g,popperOptions:m,popperRef:v,transition:y},k);return V.jsx(aie,K({as:l,direction:o==null?void 0:o.direction,slots:{root:x},slotProps:w??u},S,{ref:n}))}),Zx=lie,cie=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],uie={entering:{opacity:1},entered:{opacity:1}},die=D.forwardRef(function(e,n){const r=Mv(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:l,easing:a,in:u,onEnter:c,onEntered:d,onEntering:h,onExit:p,onExited:f,onExiting:g,style:m,timeout:v=o,TransitionComponent:y=yN}=e,b=Pe(e,cie),w=D.useRef(null),k=Rr(w,l.ref,n),x=E=>M=>{if(E){const I=w.current;M===void 0?E(I):E(I,M)}},S=x(h),A=x((E,M)=>{bN(E);const I=Kg({style:m,timeout:v,easing:a},{mode:"enter"});E.style.webkitTransition=r.transitions.create("opacity",I),E.style.transition=r.transitions.create("opacity",I),c&&c(E,M)}),C=x(d),O=x(g),R=x(E=>{const M=Kg({style:m,timeout:v,easing:a},{mode:"exit"});E.style.webkitTransition=r.transitions.create("opacity",M),E.style.transition=r.transitions.create("opacity",M),p&&p(E)}),_=x(f),T=E=>{i&&i(w.current,E)};return V.jsx(y,K({appear:s,in:u,nodeRef:w,onEnter:A,onEntered:C,onEntering:S,onExit:R,onExited:_,onExiting:O,addEndListener:T,timeout:v},b,{children:(E,M)=>D.cloneElement(l,K({style:K({opacity:0,visibility:E==="exited"&&!u?"hidden":void 0},uie[E],m,l.props.style),ref:k},M))}))}),hie=die;function pie(t){return xn("MuiBackdrop",t)}kn("MuiBackdrop",["root","invisible"]);const fie=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],gie=t=>{const{classes:e,invisible:n}=t;return Pn({root:["root",n&&"invisible"]},pie,e)},mie=Et("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})(({ownerState:t})=>K({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),vie=D.forwardRef(function(e,n){var r,o,i;const s=Sn({props:e,name:"MuiBackdrop"}),{children:l,className:a,component:u="div",components:c={},componentsProps:d={},invisible:h=!1,open:p,slotProps:f={},slots:g={},TransitionComponent:m=hie,transitionDuration:v}=s,y=Pe(s,fie),b=K({},s,{component:u,invisible:h}),w=gie(b),k=(r=f.root)!=null?r:d.root;return V.jsx(m,K({in:p,timeout:v},y,{children:V.jsx(mie,K({"aria-hidden":!0},k,{as:(o=(i=g.root)!=null?i:c.Root)!=null?o:u,className:Ve(w.root,a,k==null?void 0:k.className),ownerState:K({},b,k==null?void 0:k.ownerState),classes:w,ref:n,children:l}))}))}),yie=vie;function bie(t){return xn("MuiBadge",t)}const wie=kn("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),as=wie,xie=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],t0=10,n0=4,kie=t=>{const{color:e,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:s={}}=t,l={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${ht(n.vertical)}${ht(n.horizontal)}`,`anchorOrigin${ht(n.vertical)}${ht(n.horizontal)}${ht(o)}`,`overlap${ht(o)}`,e!=="default"&&`color${ht(e)}`]};return Pn(l,bie,s)},Eie=Et("span",{name:"MuiBadge",slot:"Root",overridesResolver:(t,e)=>e.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),Sie=Et("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.badge,e[n.variant],e[`anchorOrigin${ht(n.anchorOrigin.vertical)}${ht(n.anchorOrigin.horizontal)}${ht(n.overlap)}`],n.color!=="default"&&e[`color${ht(n.color)}`],n.invisible&&e.invisible]}})(({theme:t,ownerState:e})=>K({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:t0*2,lineHeight:1,padding:"0 6px",height:t0*2,borderRadius:t0,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen})},e.color!=="default"&&{backgroundColor:(t.vars||t).palette[e.color].main,color:(t.vars||t).palette[e.color].contrastText},e.variant==="dot"&&{borderRadius:n0,height:n0*2,minWidth:n0*2,padding:0},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="rectangular"&&{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${as.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="rectangular"&&{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${as.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="rectangular"&&{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${as.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="rectangular"&&{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${as.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="circular"&&{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${as.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="circular"&&{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${as.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="circular"&&{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${as.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="circular"&&{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${as.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},e.invisible&&{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})})),Cie=D.forwardRef(function(e,n){var r,o,i,s,l,a;const u=Sn({props:e,name:"MuiBadge"}),{anchorOrigin:c={vertical:"top",horizontal:"right"},className:d,component:h,components:p={},componentsProps:f={},children:g,overlap:m="rectangular",color:v="default",invisible:y=!1,max:b=99,badgeContent:w,slots:k,slotProps:x,showZero:S=!1,variant:A="standard"}=u,C=Pe(u,xie),{badgeContent:O,invisible:R,max:_,displayValue:T}=Are({max:b,invisible:y,badgeContent:w,showZero:S}),E=UL({anchorOrigin:c,color:v,overlap:m,variant:A,badgeContent:w}),M=R||O==null&&A!=="dot",{color:I=v,overlap:N=m,anchorOrigin:L=c,variant:$=A}=M?E:u,P=$!=="dot"?T:void 0,F=K({},u,{badgeContent:O,invisible:M,max:_,displayValue:P,showZero:S,anchorOrigin:L,color:I,overlap:N,variant:$}),H=kie(F),W=(r=(o=k==null?void 0:k.root)!=null?o:p.Root)!=null?r:Eie,B=(i=(s=k==null?void 0:k.badge)!=null?s:p.Badge)!=null?i:Sie,U=(l=x==null?void 0:x.root)!=null?l:f.root,G=(a=x==null?void 0:x.badge)!=null?a:f.badge,Y=Gi({elementType:W,externalSlotProps:U,externalForwardedProps:C,additionalProps:{ref:n,as:h},ownerState:F,className:Ve(U==null?void 0:U.className,H.root,d)}),X=Gi({elementType:B,externalSlotProps:G,ownerState:F,className:Ve(H.badge,G==null?void 0:G.className)});return V.jsxs(W,K({},Y,{children:[g,V.jsx(B,K({},X,{children:P}))]}))}),Tie=Cie,Aie=zx(),_ie=Tte({themeId:Zc,defaultTheme:Aie,defaultClassName:"MuiBox-root",generateClassName:VL.generate}),IN=_ie;function Rie(t){return xn("MuiModal",t)}kn("MuiModal",["root","hidden","backdrop"]);const Mie=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Oie=t=>{const{open:e,exited:n,classes:r}=t;return Pn({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},Rie,r)},Iie=Et("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>K({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),Lie=Et(yie,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),Nie=D.forwardRef(function(e,n){var r,o,i,s,l,a;const u=Sn({name:"MuiModal",props:e}),{BackdropComponent:c=Lie,BackdropProps:d,className:h,closeAfterTransition:p=!1,children:f,container:g,component:m,components:v={},componentsProps:y={},disableAutoFocus:b=!1,disableEnforceFocus:w=!1,disableEscapeKeyDown:k=!1,disablePortal:x=!1,disableRestoreFocus:S=!1,disableScrollLock:A=!1,hideBackdrop:C=!1,keepMounted:O=!1,onBackdropClick:R,open:_,slotProps:T,slots:E}=u,M=Pe(u,Mie),I=K({},u,{closeAfterTransition:p,disableAutoFocus:b,disableEnforceFocus:w,disableEscapeKeyDown:k,disablePortal:x,disableRestoreFocus:S,disableScrollLock:A,hideBackdrop:C,keepMounted:O}),{getRootProps:N,getBackdropProps:L,getTransitionProps:$,portalRef:P,isTopModal:F,exited:H,hasTransition:W}=iie(K({},I,{rootRef:n})),B=K({},I,{exited:H}),U=Oie(B),G={};if(f.props.tabIndex===void 0&&(G.tabIndex="-1"),W){const{onEnter:ve,onExited:_e}=$();G.onEnter=ve,G.onExited=_e}const Y=(r=(o=E==null?void 0:E.root)!=null?o:v.Root)!=null?r:Iie,X=(i=(s=E==null?void 0:E.backdrop)!=null?s:v.Backdrop)!=null?i:c,Z=(l=T==null?void 0:T.root)!=null?l:y.root,te=(a=T==null?void 0:T.backdrop)!=null?a:y.backdrop,de=Gi({elementType:Y,externalSlotProps:Z,externalForwardedProps:M,getSlotProps:N,additionalProps:{ref:n,as:m},ownerState:B,className:Ve(h,Z==null?void 0:Z.className,U==null?void 0:U.root,!B.open&&B.exited&&(U==null?void 0:U.hidden))}),Ie=Gi({elementType:X,externalSlotProps:te,additionalProps:d,getSlotProps:ve=>L(K({},ve,{onClick:_e=>{R&&R(_e),ve!=null&&ve.onClick&&ve.onClick(_e)}})),className:Ve(te==null?void 0:te.className,d==null?void 0:d.className,U==null?void 0:U.backdrop),ownerState:B});return!O&&!_&&(!W||H)?null:V.jsx(ON,{ref:P,container:g,disablePortal:x,children:V.jsxs(Y,K({},de,{children:[!C&&c?V.jsx(X,K({},Ie)):null,V.jsx(Nre,{disableEnforceFocus:w,disableAutoFocus:b,disableRestoreFocus:S,isEnabled:F,open:_,children:D.cloneElement(f,G)})]}))})}),$ie=Nie,Die=kn("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),m_=Die,Pie=rne({createStyledComponent:Et("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>Sn({props:t,name:"MuiStack"})}),zie=Pie,Fie=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function sb(t){return`scale(${t}, ${t**2})`}const Bie={entering:{opacity:1,transform:sb(1)},entered:{opacity:1,transform:"none"}},r0=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),LN=D.forwardRef(function(e,n){const{addEndListener:r,appear:o=!0,children:i,easing:s,in:l,onEnter:a,onEntered:u,onEntering:c,onExit:d,onExited:h,onExiting:p,style:f,timeout:g="auto",TransitionComponent:m=yN}=e,v=Pe(e,Fie),y=D.useRef(),b=D.useRef(),w=Mv(),k=D.useRef(null),x=Rr(k,i.ref,n),S=M=>I=>{if(M){const N=k.current;I===void 0?M(N):M(N,I)}},A=S(c),C=S((M,I)=>{bN(M);const{duration:N,delay:L,easing:$}=Kg({style:f,timeout:g,easing:s},{mode:"enter"});let P;g==="auto"?(P=w.transitions.getAutoHeightDuration(M.clientHeight),b.current=P):P=N,M.style.transition=[w.transitions.create("opacity",{duration:P,delay:L}),w.transitions.create("transform",{duration:r0?P:P*.666,delay:L,easing:$})].join(","),a&&a(M,I)}),O=S(u),R=S(p),_=S(M=>{const{duration:I,delay:N,easing:L}=Kg({style:f,timeout:g,easing:s},{mode:"exit"});let $;g==="auto"?($=w.transitions.getAutoHeightDuration(M.clientHeight),b.current=$):$=I,M.style.transition=[w.transitions.create("opacity",{duration:$,delay:N}),w.transitions.create("transform",{duration:r0?$:$*.666,delay:r0?N:N||$*.333,easing:L})].join(","),M.style.opacity=0,M.style.transform=sb(.75),d&&d(M)}),T=S(h),E=M=>{g==="auto"&&(y.current=setTimeout(M,b.current||0)),r&&r(k.current,M)};return D.useEffect(()=>()=>{clearTimeout(y.current)},[]),V.jsx(m,K({appear:o,in:l,nodeRef:k,onEnter:C,onEntered:O,onEntering:A,onExit:_,onExited:T,onExiting:R,addEndListener:E,timeout:g==="auto"?null:g},v,{children:(M,I)=>D.cloneElement(i,K({style:K({opacity:0,transform:sb(.75),visibility:M==="exited"&&!l?"hidden":void 0},Bie[M],f,i.props.style),ref:x},I))}))});LN.muiSupportAuto=!0;const ab=LN,Hie=D.createContext({}),_h=Hie;function Uie(t){return xn("MuiList",t)}kn("MuiList",["root","padding","dense","subheader"]);const Wie=["children","className","component","dense","disablePadding","subheader"],Vie=t=>{const{classes:e,disablePadding:n,dense:r,subheader:o}=t;return Pn({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Uie,e)},jie=Et("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>K({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),Gie=D.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:l=!1,disablePadding:a=!1,subheader:u}=r,c=Pe(r,Wie),d=D.useMemo(()=>({dense:l}),[l]),h=K({},r,{component:s,dense:l,disablePadding:a}),p=Vie(h);return V.jsx(_h.Provider,{value:d,children:V.jsxs(jie,K({as:s,className:Ve(p.root,i),ref:n,ownerState:h},c,{children:[u,o]}))})}),Kie=Gie;function Yie(t){return xn("MuiListItemIcon",t)}const Xie=kn("MuiListItemIcon",["root","alignItemsFlexStart"]),v_=Xie,qie=["className"],Zie=t=>{const{alignItems:e,classes:n}=t;return Pn({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},Yie,n)},Jie=Et("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.alignItems==="flex-start"&&e.alignItemsFlexStart]}})(({theme:t,ownerState:e})=>K({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},e.alignItems==="flex-start"&&{marginTop:8})),Qie=D.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiListItemIcon"}),{className:o}=r,i=Pe(r,qie),s=D.useContext(_h),l=K({},r,{alignItems:s.alignItems}),a=Zie(l);return V.jsx(Jie,K({className:Ve(a.root,o),ownerState:l,ref:n},i))}),ese=Qie;function tse(t){return xn("MuiListItemText",t)}const nse=kn("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Xg=nse,rse=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],ose=t=>{const{classes:e,inset:n,primary:r,secondary:o,dense:i}=t;return Pn({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},tse,e)},ise=Et("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Xg.primary}`]:e.primary},{[`& .${Xg.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})(({ownerState:t})=>K({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),sse=D.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiListItemText"}),{children:o,className:i,disableTypography:s=!1,inset:l=!1,primary:a,primaryTypographyProps:u,secondary:c,secondaryTypographyProps:d}=r,h=Pe(r,rse),{dense:p}=D.useContext(_h);let f=a??o,g=c;const m=K({},r,{disableTypography:s,inset:l,primary:!!f,secondary:!!g,dense:p}),v=ose(m);return f!=null&&f.type!==xd&&!s&&(f=V.jsx(xd,K({variant:p?"body2":"body1",className:v.primary,component:u!=null&&u.variant?void 0:"span",display:"block"},u,{children:f}))),g!=null&&g.type!==xd&&!s&&(g=V.jsx(xd,K({variant:"body2",className:v.secondary,color:"text.secondary",display:"block"},d,{children:g}))),V.jsxs(ise,K({className:Ve(v.root,i),ownerState:m,ref:n},h,{children:[f,g]}))}),ase=sse,lse=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function o0(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function y_(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function NN(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function zu(t,e,n,r,o,i){let s=!1,l=o(t,e,e?n:!1);for(;l;){if(l===t.firstChild){if(s)return!1;s=!0}const a=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!NN(l,i)||a)l=o(t,l,n);else return l.focus(),!0}return!1}const cse=D.forwardRef(function(e,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:l,disabledItemsFocusable:a=!1,disableListWrap:u=!1,onKeyDown:c,variant:d="selectedMenu"}=e,h=Pe(e,lse),p=D.useRef(null),f=D.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ll(()=>{o&&p.current.focus()},[o]),D.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(b,w)=>{const k=!p.current.style.width;if(b.clientHeight{const w=p.current,k=b.key,x=Tr(w).activeElement;if(k==="ArrowDown")b.preventDefault(),zu(w,x,u,a,o0);else if(k==="ArrowUp")b.preventDefault(),zu(w,x,u,a,y_);else if(k==="Home")b.preventDefault(),zu(w,null,u,a,o0);else if(k==="End")b.preventDefault(),zu(w,null,u,a,y_);else if(k.length===1){const S=f.current,A=k.toLowerCase(),C=performance.now();S.keys.length>0&&(C-S.lastTime>500?(S.keys=[],S.repeating=!0,S.previousKeyMatched=!0):S.repeating&&A!==S.keys[0]&&(S.repeating=!1)),S.lastTime=C,S.keys.push(A);const O=x&&!S.repeating&&NN(x,S);S.previousKeyMatched&&(O||zu(w,x,!1,a,o0,S))?b.preventDefault():S.previousKeyMatched=!1}c&&c(b)},m=Rr(p,n);let v=-1;D.Children.forEach(s,(b,w)=>{if(!D.isValidElement(b)){v===w&&(v+=1,v>=s.length&&(v=-1));return}b.props.disabled||(d==="selectedMenu"&&b.props.selected||v===-1)&&(v=w),v===w&&(b.props.disabled||b.props.muiSkipListHighlight||b.type.muiSkipListHighlight)&&(v+=1,v>=s.length&&(v=-1))});const y=D.Children.map(s,(b,w)=>{if(w===v){const k={};return i&&(k.autoFocus=!0),b.props.tabIndex===void 0&&d==="selectedMenu"&&(k.tabIndex=0),D.cloneElement(b,k)}return b});return V.jsx(Kie,K({role:"menu",ref:m,className:l,onKeyDown:g,tabIndex:o?0:-1},h,{children:y}))}),use=cse;function dse(t){return xn("MuiPopover",t)}kn("MuiPopover",["root","paper"]);const hse=["onEntering"],pse=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],fse=["slotProps"];function b_(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function w_(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function x_(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function i0(t){return typeof t=="function"?t():t}const gse=t=>{const{classes:e}=t;return Pn({root:["root"],paper:["paper"]},dse,e)},mse=Et($ie,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),$N=Et(Vne,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),vse=D.forwardRef(function(e,n){var r,o,i;const s=Sn({props:e,name:"MuiPopover"}),{action:l,anchorEl:a,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:d="anchorEl",children:h,className:p,container:f,elevation:g=8,marginThreshold:m=16,open:v,PaperProps:y={},slots:b,slotProps:w,transformOrigin:k={vertical:"top",horizontal:"left"},TransitionComponent:x=ab,transitionDuration:S="auto",TransitionProps:{onEntering:A}={},disableScrollLock:C=!1}=s,O=Pe(s.TransitionProps,hse),R=Pe(s,pse),_=(r=w==null?void 0:w.paper)!=null?r:y,T=D.useRef(),E=Rr(T,_.ref),M=K({},s,{anchorOrigin:u,anchorReference:d,elevation:g,marginThreshold:m,externalPaperSlotProps:_,transformOrigin:k,TransitionComponent:x,transitionDuration:S,TransitionProps:O}),I=gse(M),N=D.useCallback(()=>{if(d==="anchorPosition")return c;const ve=i0(a),Se=(ve&&ve.nodeType===1?ve:Tr(T.current).body).getBoundingClientRect();return{top:Se.top+b_(Se,u.vertical),left:Se.left+w_(Se,u.horizontal)}},[a,u.horizontal,u.vertical,c,d]),L=D.useCallback(ve=>({vertical:b_(ve,k.vertical),horizontal:w_(ve,k.horizontal)}),[k.horizontal,k.vertical]),$=D.useCallback(ve=>{const _e={width:ve.offsetWidth,height:ve.offsetHeight},Se=L(_e);if(d==="none")return{top:null,left:null,transformOrigin:x_(Se)};const mt=N();let Ot=mt.top-Se.vertical,bt=mt.left-Se.horizontal;const Xn=Ot+_e.height,It=bt+_e.width,Cn=kh(i0(a)),dn=Cn.innerHeight-m,hn=Cn.innerWidth-m;if(m!==null&&Otdn){const Ye=Xn-dn;Ot-=Ye,Se.vertical+=Ye}if(m!==null&&bthn){const Ye=It-hn;bt-=Ye,Se.horizontal+=Ye}return{top:`${Math.round(Ot)}px`,left:`${Math.round(bt)}px`,transformOrigin:x_(Se)}},[a,d,N,L,m]),[P,F]=D.useState(v),H=D.useCallback(()=>{const ve=T.current;if(!ve)return;const _e=$(ve);_e.top!==null&&(ve.style.top=_e.top),_e.left!==null&&(ve.style.left=_e.left),ve.style.transformOrigin=_e.transformOrigin,F(!0)},[$]);D.useEffect(()=>(C&&window.addEventListener("scroll",H),()=>window.removeEventListener("scroll",H)),[a,C,H]);const W=(ve,_e)=>{A&&A(ve,_e),H()},B=()=>{F(!1)};D.useEffect(()=>{v&&H()}),D.useImperativeHandle(l,()=>v?{updatePosition:()=>{H()}}:null,[v,H]),D.useEffect(()=>{if(!v)return;const ve=hQ(()=>{H()}),_e=kh(a);return _e.addEventListener("resize",ve),()=>{ve.clear(),_e.removeEventListener("resize",ve)}},[a,v,H]);let U=S;S==="auto"&&!x.muiSupportAuto&&(U=void 0);const G=f||(a?Tr(i0(a)).body:void 0),Y=(o=b==null?void 0:b.root)!=null?o:mse,X=(i=b==null?void 0:b.paper)!=null?i:$N,Z=Gi({elementType:X,externalSlotProps:K({},_,{style:P?_.style:K({},_.style,{opacity:0})}),additionalProps:{elevation:g,ref:E},ownerState:M,className:Ve(I.paper,_==null?void 0:_.className)}),te=Gi({elementType:Y,externalSlotProps:(w==null?void 0:w.root)||{},externalForwardedProps:R,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:G,open:v},ownerState:M,className:Ve(I.root,p)}),{slotProps:de}=te,Ie=Pe(te,fse);return V.jsx(Y,K({},Ie,!wN(Y)&&{slotProps:de,disableScrollLock:C},{children:V.jsx(x,K({appear:!0,in:v,onEntering:W,onExited:B,timeout:U},O,{children:V.jsx(X,K({},Z,{children:h}))}))}))}),yse=vse;function bse(t){return xn("MuiMenu",t)}kn("MuiMenu",["root","paper","list"]);const wse=["onEntering"],xse=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],kse={vertical:"top",horizontal:"right"},Ese={vertical:"top",horizontal:"left"},Sse=t=>{const{classes:e}=t;return Pn({root:["root"],paper:["paper"],list:["list"]},bse,e)},Cse=Et(yse,{shouldForwardProp:t=>Bx(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Tse=Et($N,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Ase=Et(use,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),_se=D.forwardRef(function(e,n){var r,o;const i=Sn({props:e,name:"MuiMenu"}),{autoFocus:s=!0,children:l,className:a,disableAutoFocusItem:u=!1,MenuListProps:c={},onClose:d,open:h,PaperProps:p={},PopoverClasses:f,transitionDuration:g="auto",TransitionProps:{onEntering:m}={},variant:v="selectedMenu",slots:y={},slotProps:b={}}=i,w=Pe(i.TransitionProps,wse),k=Pe(i,xse),x=Mv(),S=x.direction==="rtl",A=K({},i,{autoFocus:s,disableAutoFocusItem:u,MenuListProps:c,onEntering:m,PaperProps:p,transitionDuration:g,TransitionProps:w,variant:v}),C=Sse(A),O=s&&!u&&h,R=D.useRef(null),_=($,P)=>{R.current&&R.current.adjustStyleForScrollbar($,x),m&&m($,P)},T=$=>{$.key==="Tab"&&($.preventDefault(),d&&d($,"tabKeyDown"))};let E=-1;D.Children.map(l,($,P)=>{D.isValidElement($)&&($.props.disabled||(v==="selectedMenu"&&$.props.selected||E===-1)&&(E=P))});const M=(r=y.paper)!=null?r:Tse,I=(o=b.paper)!=null?o:p,N=Gi({elementType:y.root,externalSlotProps:b.root,ownerState:A,className:[C.root,a]}),L=Gi({elementType:M,externalSlotProps:I,ownerState:A,className:C.paper});return V.jsx(Cse,K({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?kse:Ese,slots:{paper:M,root:y.root},slotProps:{root:N,paper:L},open:h,ref:n,transitionDuration:g,TransitionProps:K({onEntering:_},w),ownerState:A},k,{classes:f,children:V.jsx(Ase,K({onKeyDown:T,actions:R,autoFocus:s&&(E===-1||u),autoFocusItem:O,variant:v},c,{className:Ve(C.list,c.className),children:l}))}))}),Rse=_se;function Mse(t){return xn("MuiMenuItem",t)}const Ose=kn("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Fu=Ose,Ise=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Lse=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},Nse=t=>{const{disabled:e,dense:n,divider:r,disableGutters:o,selected:i,classes:s}=t,a=Pn({root:["root",n&&"dense",e&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},Mse,s);return K({},s,a)},$se=Et(Wx,{shouldForwardProp:t=>Bx(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Lse})(({theme:t,ownerState:e})=>K({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Fu.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:xr(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Fu.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:xr(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Fu.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:xr(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:xr(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Fu.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Fu.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${m_.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${m_.inset}`]:{marginLeft:52},[`& .${Xg.root}`]:{marginTop:0,marginBottom:0},[`& .${Xg.inset}`]:{paddingLeft:36},[`& .${v_.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&K({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${v_.root} svg`]:{fontSize:"1.25rem"}}))),Dse=D.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:s=!1,divider:l=!1,disableGutters:a=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:d,className:h}=r,p=Pe(r,Ise),f=D.useContext(_h),g=D.useMemo(()=>({dense:s||f.dense||!1,disableGutters:a}),[f.dense,s,a]),m=D.useRef(null);ll(()=>{o&&m.current&&m.current.focus()},[o]);const v=K({},r,{dense:g.dense,divider:l,disableGutters:a}),y=Nse(r),b=Rr(m,n);let w;return r.disabled||(w=d!==void 0?d:-1),V.jsx(_h.Provider,{value:g,children:V.jsx($se,K({ref:b,role:c,tabIndex:w,component:i,focusVisibleClassName:Ve(y.focusVisible,u),className:Ve(y.root,h)},p,{ownerState:v,classes:y}))})}),Pse=Dse;function zse(t){return xn("MuiTooltip",t)}const Fse=kn("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Ts=Fse,Bse=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function Hse(t){return Math.round(t*1e5)/1e5}const Use=t=>{const{classes:e,disableInteractive:n,arrow:r,touch:o,placement:i}=t,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${ht(i.split("-")[0])}`],arrow:["arrow"]};return Pn(s,zse,e)},Wse=Et(Zx,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.popper,!n.disableInteractive&&e.popperInteractive,n.arrow&&e.popperArrow,!n.open&&e.popperClose]}})(({theme:t,ownerState:e,open:n})=>K({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!e.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},e.arrow&&{[`&[data-popper-placement*="bottom"] .${Ts.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Ts.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Ts.arrow}`]:K({},e.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Ts.arrow}`]:K({},e.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),Vse=Et("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.tooltip,n.touch&&e.touch,n.arrow&&e.tooltipArrow,e[`tooltipPlacement${ht(n.placement.split("-")[0])}`]]}})(({theme:t,ownerState:e})=>K({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:xr(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},e.arrow&&{position:"relative",margin:0},e.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${Hse(16/14)}em`,fontWeight:t.typography.fontWeightRegular},{[`.${Ts.popper}[data-popper-placement*="left"] &`]:K({transformOrigin:"right center"},e.isRtl?K({marginLeft:"14px"},e.touch&&{marginLeft:"24px"}):K({marginRight:"14px"},e.touch&&{marginRight:"24px"})),[`.${Ts.popper}[data-popper-placement*="right"] &`]:K({transformOrigin:"left center"},e.isRtl?K({marginRight:"14px"},e.touch&&{marginRight:"24px"}):K({marginLeft:"14px"},e.touch&&{marginLeft:"24px"})),[`.${Ts.popper}[data-popper-placement*="top"] &`]:K({transformOrigin:"center bottom",marginBottom:"14px"},e.touch&&{marginBottom:"24px"}),[`.${Ts.popper}[data-popper-placement*="bottom"] &`]:K({transformOrigin:"center top",marginTop:"14px"},e.touch&&{marginTop:"24px"})})),jse=Et("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(t,e)=>e.arrow})(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:xr(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let rf=!1,s0=null,Bu={x:0,y:0};function of(t,e){return n=>{e&&e(n),t(n)}}const Gse=D.forwardRef(function(e,n){var r,o,i,s,l,a,u,c,d,h,p,f,g,m,v,y,b,w,k;const x=Sn({props:e,name:"MuiTooltip"}),{arrow:S=!1,children:A,components:C={},componentsProps:O={},describeChild:R=!1,disableFocusListener:_=!1,disableHoverListener:T=!1,disableInteractive:E=!1,disableTouchListener:M=!1,enterDelay:I=100,enterNextDelay:N=0,enterTouchDelay:L=700,followCursor:$=!1,id:P,leaveDelay:F=0,leaveTouchDelay:H=1500,onClose:W,onOpen:B,open:U,placement:G="bottom",PopperComponent:Y,PopperProps:X={},slotProps:Z={},slots:te={},title:de,TransitionComponent:Ie=ab,TransitionProps:ve}=x,_e=Pe(x,Bse),Se=D.isValidElement(A)?A:V.jsx("span",{children:A}),mt=Mv(),Ot=mt.direction==="rtl",[bt,Xn]=D.useState(),[It,Cn]=D.useState(null),dn=D.useRef(!1),hn=E||$,Ye=D.useRef(),Tn=D.useRef(),q=D.useRef(),ue=D.useRef(),[me,ie]=gQ({controlled:U,default:!1,name:"Tooltip",state:"open"});let Ce=me;const Xe=fQ(P),Ke=D.useRef(),et=D.useCallback(()=>{Ke.current!==void 0&&(document.body.style.WebkitUserSelect=Ke.current,Ke.current=void 0),clearTimeout(ue.current)},[]);D.useEffect(()=>()=>{clearTimeout(Ye.current),clearTimeout(Tn.current),clearTimeout(q.current),et()},[et]);const tt=Le=>{clearTimeout(s0),rf=!0,ie(!0),B&&!Ce&&B(Le)},ze=Ba(Le=>{clearTimeout(s0),s0=setTimeout(()=>{rf=!1},800+F),ie(!1),W&&Ce&&W(Le),clearTimeout(Ye.current),Ye.current=setTimeout(()=>{dn.current=!1},mt.transitions.duration.shortest)}),jt=Le=>{dn.current&&Le.type!=="touchstart"||(bt&&bt.removeAttribute("title"),clearTimeout(Tn.current),clearTimeout(q.current),I||rf&&N?Tn.current=setTimeout(()=>{tt(Le)},rf?N:I):tt(Le))},To=Le=>{clearTimeout(Tn.current),clearTimeout(q.current),q.current=setTimeout(()=>{ze(Le)},F)},{isFocusVisibleRef:ua,onBlur:yi,onFocus:bp,ref:Hv}=BL(),[,wp]=D.useState(!1),_l=Le=>{yi(Le),ua.current===!1&&(wp(!1),To(Le))},Qi=Le=>{bt||Xn(Le.currentTarget),bp(Le),ua.current===!0&&(wp(!0),jt(Le))},Rl=Le=>{dn.current=!0;const Zn=Se.props;Zn.onTouchStart&&Zn.onTouchStart(Le)},Ml=jt,Ol=To,da=Le=>{Rl(Le),clearTimeout(q.current),clearTimeout(Ye.current),et(),Ke.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ue.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Ke.current,jt(Le)},L)},Uv=Le=>{Se.props.onTouchEnd&&Se.props.onTouchEnd(Le),et(),clearTimeout(q.current),q.current=setTimeout(()=>{ze(Le)},H)};D.useEffect(()=>{if(!Ce)return;function Le(Zn){(Zn.key==="Escape"||Zn.key==="Esc")&&ze(Zn)}return document.addEventListener("keydown",Le),()=>{document.removeEventListener("keydown",Le)}},[ze,Ce]);const Wv=Rr(Se.ref,Hv,Xn,n);!de&&de!==0&&(Ce=!1);const xu=D.useRef(),Vv=Le=>{const Zn=Se.props;Zn.onMouseMove&&Zn.onMouseMove(Le),Bu={x:Le.clientX,y:Le.clientY},xu.current&&xu.current.update()},ha={},Il=typeof de=="string";R?(ha.title=!Ce&&Il&&!T?de:null,ha["aria-describedby"]=Ce?Xe:null):(ha["aria-label"]=Il?de:null,ha["aria-labelledby"]=Ce&&!Il?Xe:null);const qn=K({},ha,_e,Se.props,{className:Ve(_e.className,Se.props.className),onTouchStart:Rl,ref:Wv},$?{onMouseMove:Vv}:{}),Lr={};M||(qn.onTouchStart=da,qn.onTouchEnd=Uv),T||(qn.onMouseOver=of(Ml,qn.onMouseOver),qn.onMouseLeave=of(Ol,qn.onMouseLeave),hn||(Lr.onMouseOver=Ml,Lr.onMouseLeave=Ol)),_||(qn.onFocus=of(Qi,qn.onFocus),qn.onBlur=of(_l,qn.onBlur),hn||(Lr.onFocus=Qi,Lr.onBlur=_l));const jv=D.useMemo(()=>{var Le;let Zn=[{name:"arrow",enabled:!!It,options:{element:It,padding:4}}];return(Le=X.popperOptions)!=null&&Le.modifiers&&(Zn=Zn.concat(X.popperOptions.modifiers)),K({},X.popperOptions,{modifiers:Zn})},[It,X]),pa=K({},x,{isRtl:Ot,arrow:S,disableInteractive:hn,placement:G,PopperComponentProp:Y,touch:dn.current}),ku=Use(pa),xp=(r=(o=te.popper)!=null?o:C.Popper)!=null?r:Wse,kp=(i=(s=(l=te.transition)!=null?l:C.Transition)!=null?s:Ie)!=null?i:ab,ro=(a=(u=te.tooltip)!=null?u:C.Tooltip)!=null?a:Vse,Ep=(c=(d=te.arrow)!=null?d:C.Arrow)!=null?c:jse,Gv=kd(xp,K({},X,(h=Z.popper)!=null?h:O.popper,{className:Ve(ku.popper,X==null?void 0:X.className,(p=(f=Z.popper)!=null?f:O.popper)==null?void 0:p.className)}),pa),Kv=kd(kp,K({},ve,(g=Z.transition)!=null?g:O.transition),pa),Yv=kd(ro,K({},(m=Z.tooltip)!=null?m:O.tooltip,{className:Ve(ku.tooltip,(v=(y=Z.tooltip)!=null?y:O.tooltip)==null?void 0:v.className)}),pa),Xv=kd(Ep,K({},(b=Z.arrow)!=null?b:O.arrow,{className:Ve(ku.arrow,(w=(k=Z.arrow)!=null?k:O.arrow)==null?void 0:w.className)}),pa);return V.jsxs(D.Fragment,{children:[D.cloneElement(Se,qn),V.jsx(xp,K({as:Y??Zx,placement:G,anchorEl:$?{getBoundingClientRect:()=>({top:Bu.y,left:Bu.x,right:Bu.x,bottom:Bu.y,width:0,height:0})}:bt,popperRef:xu,open:bt?Ce:!1,id:Xe,transition:!0},Lr,Gv,{popperOptions:jv,children:({TransitionProps:Le})=>V.jsx(kp,K({timeout:mt.transitions.duration.shorter},Le,Kv,{children:V.jsxs(ro,K({},Yv,{children:[de,S?V.jsx(Ep,K({},Xv,{ref:Cn})):null]}))}))}))]})}),DN=Gse;function Kse(t){return xn("MuiToggleButton",t)}const Yse=kn("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge"]),k_=Yse,Xse=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],qse=t=>{const{classes:e,fullWidth:n,selected:r,disabled:o,size:i,color:s}=t,l={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${ht(i)}`,s]};return Pn(l,Kse,e)},Zse=Et(Wx,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`size${ht(n.size)}`]]}})(({theme:t,ownerState:e})=>{let n=e.color==="standard"?t.palette.text.primary:t.palette[e.color].main,r;return t.vars&&(n=e.color==="standard"?t.vars.palette.text.primary:t.vars.palette[e.color].main,r=e.color==="standard"?t.vars.palette.text.primaryChannel:t.vars.palette[e.color].mainChannel),K({},t.typography.button,{borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active},e.fullWidth&&{width:"100%"},{[`&.${k_.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:xr(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${k_.selected}`]:{color:n,backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:xr(n,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${r} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:xr(n,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:xr(n,t.palette.action.selectedOpacity)}}}},e.size==="small"&&{padding:7,fontSize:t.typography.pxToRem(13)},e.size==="large"&&{padding:15,fontSize:t.typography.pxToRem(15)})}),Jse=D.forwardRef(function(e,n){const r=Sn({props:e,name:"MuiToggleButton"}),{children:o,className:i,color:s="standard",disabled:l=!1,disableFocusRipple:a=!1,fullWidth:u=!1,onChange:c,onClick:d,selected:h,size:p="medium",value:f}=r,g=Pe(r,Xse),m=K({},r,{color:s,disabled:l,disableFocusRipple:a,fullWidth:u,size:p}),v=qse(m),y=b=>{d&&(d(b,f),b.defaultPrevented)||c&&c(b,f)};return V.jsx(Zse,K({className:Ve(v.root,i),disabled:l,focusRipple:!a,ref:n,onClick:y,onChange:c,value:f,ownerState:m,"aria-pressed":h},g,{children:o}))}),Qse=Jse;var eae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 15v2c0 1.054.95 2 2 2h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM3 3h6a3 3 0 0 1 2.235 5A3 3 0 0 1 9 13H3V3zm6 6H5v2h4a1 1 0 0 0 0-2zm8-6a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM9 5H5v2h4a1 1 0 1 0 0-2z"}}],tae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],nae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],rae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0zm-8.66 16h15.588L12 5.5 4.206 19zM11 16h2v2h-2v-2zm0-7h2v5h-2V9z"}}],oae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 19h18v2H3v-2zm5-6h3l-4 4-4-4h3V3h2v10zm10 0h3l-4 4-4-4h3V3h2v10z"}}],iae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm2 15h14v2H5v-2zm-2-5h18v2H3v-2zm2-5h14v2H5V9z"}}],sae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm0-5h18v2H3v-2zm0-5h18v2H3V9z"}}],aae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h14v2H3v-2zm0-5h18v2H3v-2zm0-5h14v2H3V9z"}}],lae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm4 15h14v2H7v-2zm-4-5h18v2H3v-2zm4-5h14v2H7V9z"}}],cae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3h18v2H3V3zm5 8v10H6V11H3l4-4 4 4H8zm10 0v10h-2V11h-3l4-4 4 4h-3z"}}],uae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 11h18v2H3v-2zm15 7v3h-2v-3h-3l4-4 4 4h-3zM8 18v3H6v-3H3l4-4 4 4H8zM18 6h3l-4 4-4-4h3V3h2v3zM8 6h3l-4 4-4-4h3V3h2v3z"}}],dae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.75 2.5A4.25 4.25 0 0 1 11 6.75V11H6.75a4.25 4.25 0 1 1 0-8.5zM9 9V6.75A2.25 2.25 0 1 0 6.75 9H9zm-2.25 4H11v4.25A4.25 4.25 0 1 1 6.75 13zm0 2A2.25 2.25 0 1 0 9 17.25V15H6.75zm10.5-12.5a4.25 4.25 0 1 1 0 8.5H13V6.75a4.25 4.25 0 0 1 4.25-4.25zm0 6.5A2.25 2.25 0 1 0 15 6.75V9h2.25zM13 13h4.25A4.25 4.25 0 1 1 13 17.25V13zm2 2v2.25A2.25 2.25 0 1 0 17.25 15H15z"}}],hae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 16l-6-6h12z"}}],pae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 7v4L2 6l6-5v4h5a8 8 0 1 1 0 16H4v-2h9a6 6 0 1 0 0-12H8z"}}],fae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 7h-5a6 6 0 1 0 0 12h9v2h-9a8 8 0 1 1 0-16h5V1l6 5-6 5V7z"}}],gae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 12l6-6v12z"}}],mae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 12l-6 6V6z"}}],vae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8l6 6H6z"}}],yae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 3v7.267l6.294-3.633 1 1.732-6.293 3.633 6.293 3.635-1 1.732L13 13.732V21h-2v-7.268l-6.294 3.634-1-1.732L9.999 12 3.706 8.366l1-1.732L11 10.267V3z"}}],bae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.828 7.757l-5.656 5.657a1 1 0 1 0 1.414 1.414l5.657-5.656A3 3 0 1 0 12 4.929l-5.657 5.657a5 5 0 1 0 7.071 7.07L19.071 12l1.414 1.414-5.657 5.657a7 7 0 1 1-9.9-9.9l5.658-5.656a5 5 0 0 1 7.07 7.07L12 16.244A3 3 0 1 1 7.757 12l5.657-5.657 1.414 1.414z"}}],wae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 11h4.5a2.5 2.5 0 1 0 0-5H8v5zm10 4.5a4.5 4.5 0 0 1-4.5 4.5H6V4h6.5a4.5 4.5 0 0 1 3.256 7.606A4.498 4.498 0 0 1 18 15.5zM8 13v5h5.5a2.5 2.5 0 1 0 0-5H8z"}}],xae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 18v-3.7a1.5 1.5 0 0 0-1.5-1.5H2v-1.6h.5A1.5 1.5 0 0 0 4 9.7V6a3 3 0 0 1 3-3h1v2H7a1 1 0 0 0-1 1v4.1A2 2 0 0 1 4.626 12 2 2 0 0 1 6 13.9V18a1 1 0 0 0 1 1h1v2H7a3 3 0 0 1-3-3zm16-3.7V18a3 3 0 0 1-3 3h-1v-2h1a1 1 0 0 0 1-1v-4.1a2 2 0 0 1 1.374-1.9A2 2 0 0 1 18 10.1V6a1 1 0 0 0-1-1h-1V3h1a3 3 0 0 1 3 3v3.7a1.5 1.5 0 0 0 1.5 1.5h.5v1.6h-.5a1.5 1.5 0 0 0-1.5 1.5z"}}],kae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M14 3c.552 0 1 .448 1 1v5h5c.552 0 1 .448 1 1v10c0 .552-.448 1-1 1H10c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h10zm-1 2H5v8h8V5z"}}],Eae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M11 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v5h2c.552 0 1 .448 1 1v7c0 .552-.448 1-1 1h-7c-.552 0-1-.448-1-1v-2H7c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h7zm5 5H8v8h8V8z"}}],Sae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 3v2H4v13.385L5.763 17H20v-7h2v8a1 1 0 0 1-1 1H6.455L2 22.5V4a1 1 0 0 1 1-1h11zm5 0V0h2v3h3v2h-3v3h-2V5h-3V3h3z"}}],Cae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-.997-4L6.76 11.757l1.414-1.414 2.829 2.829 5.656-5.657 1.415 1.414L11.003 16z"}}],Tae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M7 7V3a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-4v3.993c0 .556-.449 1.007-1.007 1.007H3.007A1.006 1.006 0 0 1 2 20.993l.003-12.986C2.003 7.451 2.452 7 3.01 7H7zm2 0h6.993C16.549 7 17 7.449 17 8.007V15h3V4H9v3zm6 2H4.003L4 20h11V9zm-6.497 9l-3.536-3.536 1.414-1.414 2.122 2.122 4.242-4.243 1.414 1.414L8.503 18z"}}],Aae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6 4v4h12V4h2.007c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 21.007V4.993C3 4.445 3.445 4 3.993 4H6zm2-2h8v4H8V2z"}}],_ae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 4V2h10v2h3.007c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 21.007V4.993C3 4.445 3.445 4 3.993 4H7zm0 2H5v14h14V6h-2v2H7V6zm2-2v2h6V4H9z"}}],Rae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm0-9.414l2.828-2.829 1.415 1.415L13.414 12l2.829 2.828-1.415 1.415L12 13.414l-2.828 2.829-1.415-1.415L10.586 12 7.757 9.172l1.415-1.415L12 10.586z"}}],Mae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"}}],Oae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"}}],Iae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M23 12l-7.071 7.071-1.414-1.414L20.172 12l-5.657-5.657 1.414-1.414L23 12zM3.828 12l5.657 5.657-1.414 1.414L1 12l7.071-7.071 1.414 1.414L3.828 12z"}}],Lae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.95 8.464l1.414-1.414 4.95 4.95-4.95 4.95-1.414-1.414L20.485 12 16.95 8.464zm-9.9 0L3.515 12l3.535 3.536-1.414 1.414L.686 12l4.95-4.95L7.05 8.464z"}}],Nae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3zm-8 5v6h2v-6H9zm4 0v6h2v-6h-2zM9 4v2h6V4H9z"}}],$ae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3zm1 2H6v12h12V8zm-9 3h2v6H9v-6zm4 0h2v6h-2v-6zM9 4v2h6V4H9z"}}],Dae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 3c.552 0 1 .448 1 1v8c.835-.628 1.874-1 3-1 2.761 0 5 2.239 5 5s-2.239 5-5 5c-1.032 0-1.99-.313-2.787-.848L13 20c0 .552-.448 1-1 1H6c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zm-1 2H7v14h4V5zm8 10h-6v2h6v-2z"}}],Pae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 5c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1 .628.835 1 1.874 1 3 0 2.761-2.239 5-5 5s-5-2.239-5-5c0-1.126.372-2.165 1-3H4c-.552 0-1-.448-1-1V6c0-.552.448-1 1-1h16zm-7 10v2h6v-2h-6zm6-8H5v4h14V7z"}}],zae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4.583 17.321C3.553 16.227 3 15 3 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179zm10 0C13.553 16.227 13 15 13 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179z"}}],Fae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19.417 6.679C20.447 7.773 21 9 21 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311-1.804-.167-3.226-1.648-3.226-3.489a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179zm-10 0C10.447 7.773 11 9 11 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311C4.591 12.322 3.17 10.841 3.17 9a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179z"}}],Bae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7zM14 9h5l-7 7-7-7h5V3h4v6z"}}],Hae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M16 13l6.964 4.062-2.973.85 2.125 3.681-1.732 1-2.125-3.68-2.223 2.15L16 13zm-2-7h2v2h5a1 1 0 0 1 1 1v4h-2v-3H10v10h4v2H9a1 1 0 0 1-1-1v-5H6v-2h2V9a1 1 0 0 1 1-1h5V6zM4 14v2H2v-2h2zm0-4v2H2v-2h2zm0-4v2H2V6h2zm0-4v2H2V2h2zm4 0v2H6V2h2zm4 0v2h-2V2h2zm4 0v2h-2V2h2z"}}],Uae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 19a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm-5.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm11 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zM13 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.621 6.302 14.685 14.685 0 0 0 5.327 3.042l-.536 1.93A16.685 16.685 0 0 1 12 13.726a16.696 16.696 0 0 1-6.202 3.547l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042 18.077 18.077 0 0 1-2.822-4.3h2.24A16.031 16.031 0 0 0 12 10.876a16.168 16.168 0 0 0 2.91-4.876L5 6V4h6V2h2z"}}],Wae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 19a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm-5.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm11 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zM18 3v2H8v4h9v2H8v4h10v2H6V3h12z"}}],Vae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 10h2v.757a4.5 4.5 0 0 1 7 3.743V20h-2v-5.5c0-1.43-1.175-2.5-2.5-2.5S16 13.07 16 14.5V20h-2V10zm-2-6v2H4v5h8v2H4v5h8v2H2V4h10z"}}],jae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z"}}],Gae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm11-3v9l-3.794-3.793-5.999 6-1.414-1.414 5.999-6L12 3h9z"}}],Kae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1.001 1.001 0 0 1 3 21l.003-14c0-.552.45-1 1.007-1H7zM5.003 8L5 20h10V8H5.003zM9 6h8v10h2V4H9v2z"}}],Yae=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M6 21.5c-1.933 0-3.5-1.567-3.5-3.5s1.567-3.5 3.5-3.5c1.585 0 2.924 1.054 3.355 2.5H15v-2h2V9.242L14.757 7H9V9H3V3h6v2h5.757L18 1.756 22.243 6 19 9.241V15L21 15v6h-6v-2H9.355c-.43 1.446-1.77 2.5-3.355 2.5zm0-5c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm13 .5h-2v2h2v-2zM18 4.586L16.586 6 18 7.414 19.414 6 18 4.586zM7 5H5v2h2V5z"}}],Xae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.246 14H8.754l-1.6 4H5l6-15h2l6 15h-2.154l-1.6-4zm-.8-2L12 5.885 9.554 12h4.892zM3 20h18v2H3v-2z"}}],qae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v15H8V6H2V4h14v2h-6zm8 8v7h-2v-7h-3v-2h8v2h-3z"}}],Zae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"}}],Jae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12.651 14.065L11.605 20H9.574l1.35-7.661-7.41-7.41L4.93 3.515 20.485 19.07l-1.414 1.414-6.42-6.42zm-.878-6.535l.27-1.53h-1.8l-2-2H20v2h-5.927L13.5 9.257 11.773 7.53z"}}],Qae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z"}}],ele=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 3h2v6h-2V5h-4V3h4zM4 3h4v2H4v4H2V3h2zm16 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z"}}],tle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 18l7.68-6L5 6V4h14v2H8.263L16 12l-7.737 6H19v2H5v-2z"}}],nle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 1v4H4v14h16V3h1.008c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3H6V1h2zm4 7l4 4h-3v4h-2v-4H8l4-4zm6-7v4h-8V3h6V1h2z"}}],rle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm8-12v12h-2v-9.796l-2 .536V8.67L19.5 8H21z"}}],ole=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 4c2.071 0 3.75 1.679 3.75 3.75 0 .857-.288 1.648-.772 2.28l-.148.18L18.034 18H22v2h-7v-1.556l4.82-5.546c.268-.307.43-.709.43-1.148 0-.966-.784-1.75-1.75-1.75-.918 0-1.671.707-1.744 1.606l-.006.144h-2C14.75 9.679 16.429 8 18.5 8z"}}],ile=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M22 8l-.002 2-2.505 2.883c1.59.435 2.757 1.89 2.757 3.617 0 2.071-1.679 3.75-3.75 3.75-1.826 0-3.347-1.305-3.682-3.033l1.964-.382c.156.806.866 1.415 1.718 1.415.966 0 1.75-.784 1.75-1.75s-.784-1.75-1.75-1.75c-.286 0-.556.069-.794.19l-1.307-1.547L19.35 10H15V8h7zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"}}],sle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm9-12v8h1.5v2H22v2h-2v-2h-5.5v-1.34l5-8.66H22zm-2 3.133L17.19 16H20v-4.867z"}}],ale=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M22 8v2h-4.323l-.464 2.636c.33-.089.678-.136 1.037-.136 2.21 0 4 1.79 4 4s-1.79 4-4 4c-1.827 0-3.367-1.224-3.846-2.897l1.923-.551c.24.836 1.01 1.448 1.923 1.448 1.105 0 2-.895 2-2s-.895-2-2-2c-.63 0-1.193.292-1.56.748l-1.81-.904L16 8h6zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"}}],lle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21.097 8l-2.598 4.5c2.21 0 4.001 1.79 4.001 4s-1.79 4-4 4-4-1.79-4-4c0-.736.199-1.426.546-2.019L18.788 8h2.309zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 10.5c-1.105 0-2 .895-2 2s.895 2 2 2 2-.895 2-2-.895-2-2-2z"}}],cle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7.784 14l.42-4H4V8h4.415l.525-5h2.011l-.525 5h3.989l.525-5h2.011l-.525 5H20v2h-3.784l-.42 4H20v2h-4.415l-.525 5h-2.011l.525-5H9.585l-.525 5H7.049l.525-5H4v-2h3.784zm2.011 0h3.99l.42-4h-3.99l-.42 4z"}}],ule=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 11V4h2v17h-2v-8H7v8H5V4h2v7z"}}],dle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 15v3h3v2h-3v3h-2v-3h-3v-2h3v-3h2zm.008-12c.548 0 .992.445.992.993V13h-2V5H4v13.999L14 9l3 3v2.829l-3-3L6.827 19H14v2H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016zM8 7a2 2 0 1 1 0 4 2 2 0 0 1 0-4z"}}],hle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v1.757l-2 2V5H5v8.1l4-4 4.328 4.329-1.415 1.413L9 11.93l-4 3.999V19h10.533l.708.001 1.329-1.33L18.9 19h.1v-2.758l2-2V20c0 .552-.448 1-1 1H4c-.55 0-1-.45-1-1V4c0-.552.448-1 1-1h16zm1.778 4.808l1.414 1.414L15.414 17l-1.416-.002.002-1.412 7.778-7.778zM15.5 7c.828 0 1.5.672 1.5 1.5s-.672 1.5-1.5 1.5S14 9.328 14 8.5 14.672 7 15.5 7z"}}],ple=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4.828 21l-.02.02-.021-.02H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H4.828zM20 15V5H4v14L14 9l6 6zm0 2.828l-6-6L6.828 19H20v-1.172zM8 11a2 2 0 1 1 0-4 2 2 0 0 1 0 4z"}}],fle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-8 3.5L7 9v7l-4-3.5z"}}],gle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-4 3.5L3 16V9l4 3.5z"}}],mle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM11 7h2v2h-2V7zm0 4h2v6h-2v-6z"}}],vle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 21v-2h3V5H8V3h8v2h-3v14h3v2H8zM18.05 7.05L23 12l-4.95 4.95-1.414-1.414L20.172 12l-3.536-3.536L18.05 7.05zm-12.1 0l1.414 1.414L3.828 12l3.536 3.536L5.95 16.95 1 12l4.95-4.95z"}}],yle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zm-1 2h-4v14h4V5zM6 7c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2H5v1.999L3 11v2l2-.001V15h2v-2.001L9 13v-2l-2-.001V9z"}}],ble=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M10 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zM9 5H5v14h4V5zm9 2c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L15 11v2l2-.001V15h2v-2.001L21 13v-2l-2-.001V9z"}}],wle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 13c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L9 17v2l2-.001V21h2v-2.001L15 19v-2l-2-.001V15zm7-12c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zM5 5v4h14V5H5z"}}],xle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 13c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1v-6c0-.552.448-1 1-1h16zm-1 2H5v4h14v-4zM12 1c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L9 5v2l2-.001V9h2V6.999L15 7V5l-2-.001V3z"}}],kle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 20H7v-2h2.927l2.116-12H9V4h8v2h-2.927l-2.116 12H15z"}}],Ele=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M11 5H5v14h6V5zm2 0v14h6V5h-6zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],Sle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 4h10v2H11V4zM6 7v4H4V7H1l4-4 4 4H6zm0 10h3l-4 4-4-4h3v-4h2v4zm5 1h10v2H11v-2zm-2-7h12v2H9v-2z"}}],Cle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.657 14.828l-1.414-1.414L17.657 12A4 4 0 1 0 12 6.343l-1.414 1.414-1.414-1.414 1.414-1.414a6 6 0 0 1 8.485 8.485l-1.414 1.414zm-2.829 2.829l-1.414 1.414a6 6 0 1 1-8.485-8.485l1.414-1.414 1.414 1.414L6.343 12A4 4 0 1 0 12 17.657l1.414-1.414 1.414 1.414zm0-9.9l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],Tle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.657 14.828l-1.414-1.414L17.657 12A4 4 0 1 0 12 6.343l-1.414 1.414-1.414-1.414 1.414-1.414a6 6 0 0 1 8.485 8.485l-1.414 1.414zm-2.829 2.829l-1.414 1.414a6 6 0 1 1-8.485-8.485l1.414-1.414 1.414 1.414L6.343 12A4 4 0 1 0 12 17.657l1.414-1.414 1.414 1.414zm0-9.9l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07zM5.775 2.293l1.932-.518L8.742 5.64l-1.931.518-1.036-3.864zm9.483 16.068l1.931-.518 1.036 3.864-1.932.518-1.035-3.864zM2.293 5.775l3.864 1.036-.518 1.931-3.864-1.035.518-1.932zm16.068 9.483l3.864 1.035-.518 1.932-3.864-1.036.518-1.931z"}}],Ale=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 17h5v2h-3v3h-2v-5zM7 7H2V5h3V2h2v5zm11.364 8.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],_le=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18.364 15.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],Rle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 4h10v2H11V4zm0 4h6v2h-6V8zm0 6h10v2H11v-2zm0 4h6v2h-6v-2zM3 4h6v6H3V4zm2 2v2h2V6H5zm-2 8h6v6H3v-6zm2 2v2h2v-2H5z"}}],Mle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zm-5-.5h3v3H3v-3zm0 7h3v3H3v-3zm0 7h3v3H3v-3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],Ole=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM5 3v3h1v1H3V6h1V4H3V3h2zM3 14v-2.5h2V11H3v-1h3v2.5H4v.5h2v1H3zm2 5.5H3v-1h2V18H3v-1h3v4H3v-1h2v-.5zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],Ile=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM4.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 6.9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],Lle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.243 4.515l-6.738 6.737-.707 2.121-1.04 1.041 2.828 2.829 1.04-1.041 2.122-.707 6.737-6.738-4.242-4.242zm6.364 3.535a1 1 0 0 1 0 1.414l-7.779 7.779-2.12.707-1.415 1.414a1 1 0 0 1-1.414 0l-4.243-4.243a1 1 0 0 1 0-1.414l1.414-1.414.707-2.121 7.779-7.779a1 1 0 0 1 1.414 0l5.657 5.657zm-6.364-.707l1.414 1.414-4.95 4.95-1.414-1.414 4.95-4.95zM4.283 16.89l2.828 2.829-1.414 1.414-4.243-1.414 2.828-2.829z"}}],Nle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm4 12.5v-4l2 2 2-2v4h2v-7h-2l-2 2-2-2H5v7h2zm11-3v-4h-2v4h-2l3 3 3-3h-2z"}}],$le=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2v14h16V5H4zm3 10.5H5v-7h2l2 2 2-2h2v7h-2v-4l-2 2-2-2v4zm11-3h2l-3 3-3-3h2v-4h2v4z"}}],Dle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-9 2H5v5.999h2V9l3 3-3 3v-2H5v6h6v-2h2v2h6v-6h-2v2l-3-3 3-3v1.999h2V5h-6v2h-2V5zm2 8v2h-2v-2h2zm0-4v2h-2V9h2z"}}],Ple=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21 20c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16c.552 0 1 .448 1 1v16zm-2-9V5h-5.999v2H15l-3 3-3-3h2V5H5v6h2v2H5v6h6v-2H9l3-3 3 3h-1.999v2H19v-6h-2v-2h2zm-8 2H9v-2h2v2zm4 0h-2v-2h2v2z"}}],zle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M18 3c1.657 0 3 1.343 3 3s-1.343 3-3 3h-3c-1.306 0-2.417-.834-2.829-2H11c-1.1 0-2 .9-2 2v.171c1.166.412 2 1.523 2 2.829 0 1.306-.834 2.417-2 2.829V15c0 1.1.9 2 2 2h1.17c.412-1.165 1.524-2 2.83-2h3c1.657 0 3 1.343 3 3s-1.343 3-3 3h-3c-1.306 0-2.417-.834-2.829-2H11c-2.21 0-4-1.79-4-4H5c-1.657 0-3-1.343-3-3s1.343-3 3-3h2c0-2.21 1.79-4 4-4h1.17c.412-1.165 1.524-2 2.83-2h3zm0 14h-3c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1zM8 11H5c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1zm10-6h-3c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1z"}}],Fle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm14 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}}],Ble=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M10 2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1H8v2h5V9c0-.552.448-1 1-1h6c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-1H8v6h5v-1c0-.552.448-1 1-1h6c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-1H7c-.552 0-1-.448-1-1V8H4c-.552 0-1-.448-1-1V3c0-.552.448-1 1-1h6zm9 16h-4v2h4v-2zm0-8h-4v2h4v-2zM9 4H5v2h4V4z"}}],Hle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5c1.321 0 2.484.348 3.447.994.963.645 1.726 1.588 2.249 2.778.522 1.19.804 2.625.804 4.257v4.942c0 1.632-.282 3.068-.804 4.257-.523 1.19-1.286 2.133-2.25 2.778-.962.646-2.125.994-3.446.994-1.321 0-2.484-.348-3.447-.994-.963-.645-1.726-1.588-2.249-2.778-.522-1.19-.804-2.625-.804-4.257V9.529c0-1.632.282-3.068.804-4.257.523-1.19 1.286-2.133 2.25-2.778C9.515 1.848 10.678 1.5 12 1.5zm0 2c-.916 0-1.694.226-2.333.655-.637.427-1.158 1.07-1.532 1.92-.412.94-.635 2.108-.635 3.454v4.942c0 1.346.223 2.514.635 3.453.374.851.895 1.494 1.532 1.921.639.429 1.417.655 2.333.655.916 0 1.694-.226 2.333-.655.637-.427 1.158-1.07 1.532-1.92.412-.94.635-2.108.635-3.454V9.529c0-1.346-.223-2.514-.635-3.453-.374-.851-.895-1.494-1.532-1.921C13.694 3.726 12.916 3.5 12 3.5z"}}],Ule=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 1.5V22h-2V3.704L7.5 4.91V2.839l5-1.339z"}}],Wle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 7.5a4 4 0 1 0-8 0H6a6 6 0 1 1 10.663 3.776l-7.32 8.723L18 20v2H6v-1.127l9.064-10.802A3.982 3.982 0 0 0 16 7.5z"}}],Vle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 2v1.362L12.809 9.55a6.501 6.501 0 1 1-7.116 8.028l1.94-.486A4.502 4.502 0 0 0 16.5 16a4.5 4.5 0 0 0-6.505-4.03l-.228.122-.69-1.207L14.855 4 6.5 4V2H18z"}}],jle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 1.5V16h3v2h-3v4h-2v-4H4v-1.102L14 1.5h2zM14 16V5.171L6.968 16H14z"}}],Gle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 2v2H9.3l-.677 6.445a6.5 6.5 0 1 1-2.93 7.133l1.94-.486A4.502 4.502 0 0 0 16.5 16a4.5 4.5 0 0 0-4.5-4.5c-2.022 0-3.278.639-3.96 1.53l-1.575-1.182L7.5 2H18z"}}],Kle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.886 2l-4.438 7.686A6.5 6.5 0 1 1 6.4 12.7L12.576 2h2.31zM12 11.5a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z"}}],Yle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 2v1.5L10.763 22H8.574l8.013-18H6V2z"}}],Xle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5a5.5 5.5 0 0 1 3.352 9.86C17.24 12.41 18.5 14.32 18.5 16.5c0 3.314-2.91 6-6.5 6s-6.5-2.686-6.5-6c0-2.181 1.261-4.09 3.147-5.141A5.5 5.5 0 0 1 12 1.5zm0 11c-2.52 0-4.5 1.828-4.5 4 0 2.172 1.98 4 4.5 4s4.5-1.828 4.5-4c0-2.172-1.98-4-4.5-4zm0-9a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7z"}}],qle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5a6.5 6.5 0 0 1 5.619 9.77l-6.196 10.729H9.114l4.439-7.686A6.5 6.5 0 1 1 12 1.5zm0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z"}}],Zle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M14 20v-2.157c1.863-1.192 3.5-3.875 3.5-6.959 0-3.073-2-6.029-5.5-6.029s-5.5 2.956-5.5 6.03c0 3.083 1.637 5.766 3.5 6.958V20H3v-2h4.76C5.666 16.505 4 13.989 4 10.884 4 6.247 7.5 3 12 3s8 3.247 8 7.884c0 3.105-1.666 5.621-3.76 7.116H21v2h-7z"}}],Jle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M15 3c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-2v2h4c.552 0 1 .448 1 1v3h2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1h2v-2H8v2h2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1h2v-3c0-.552.448-1 1-1h4V9H9c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zM9 17H5v2h4v-2zm10 0h-4v2h4v-2zM14 5h-4v2h4V5z"}}],Qle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 21v-4H7v4H5v-5a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v5h-2zM7 3v4h10V3h2v5a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3h2zM2 9l4 3-4 3V9zm20 0v6l-4-3 4-3z"}}],ece=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 6v15h-2v-5a6 6 0 1 1 0-12h10v2h-3v15h-2V6h-3zm-2 0a4 4 0 1 0 0 8V6z"}}],tce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12.9 6.858l4.242 4.243L7.242 21H3v-4.243l9.9-9.9zm1.414-1.414l2.121-2.122a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414l-2.122 2.121-4.242-4.242z"}}],nce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"}}],rce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.934 3.036l1.732 1L18.531 6H21v2h-2v4h2v2h-2v7h-2v-7h-3.084c-.325 2.862-1.564 5.394-3.37 7.193l-1.562-1.27c1.52-1.438 2.596-3.522 2.917-5.922L10 14v-2l2-.001V8h-2V6h2.467l-1.133-1.964 1.732-1L14.777 6h1.444l1.713-2.964zM5 13.803l-2 .536v-2.071l2-.536V8H3V6h2V3h2v3h2v2H7v3.197l2-.536v2.07l-2 .536V18.5A2.5 2.5 0 0 1 4.5 21H3v-2h1.5a.5.5 0 0 0 .492-.41L5 18.5v-4.697zM17 8h-3v4h3V8z"}}],oce=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 19c.828 0 1.5.672 1.5 1.5S12.828 22 12 22s-1.5-.672-1.5-1.5.672-1.5 1.5-1.5zm0-17c3.314 0 6 2.686 6 6 0 2.165-.753 3.29-2.674 4.923C13.399 14.56 13 15.297 13 17h-2c0-2.474.787-3.695 3.031-5.601C15.548 10.11 16 9.434 16 8c0-2.21-1.79-4-4-4S8 5.79 8 8v1H6V8c0-3.314 2.686-6 6-6z"}}],ice=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21 19v2h-2v-2h2zm-4 0v2h-2v-2h2zm-4 0v2h-2v-2h2zm-4 0v2H7v-2h2zm-4 0v2H3v-2h2zm16-4v2h-2v-2h2zM5 15v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687 0 4.882 2.124 4.995 4.783L21 8v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16 5h-5V3h5zM5 7v2H3V7h2zm0-4v2H3V3h2zm4 0v2H7V3h2z"}}],sce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.683 7.562L12 9.88l6.374-6.375a2 2 0 0 1 2.829 0l.707.707L9.683 16.438a4 4 0 1 1-2.121-2.121L9.88 12 7.562 9.683a4 4 0 1 1 2.121-2.121zM6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 12a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm9.535-6.587l6.375 6.376-.707.707a2 2 0 0 1-2.829 0l-4.96-4.961 2.12-2.122z"}}],lce=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M14 3c.552 0 1 .448 1 1v5h5c.552 0 1 .448 1 1v10c0 .552-.448 1-1 1H10c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h10zm-1 2H5v8h4v-3c0-.552.448-1 1-1h3V5z"}}],cce=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M11 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v5h2c.552 0 1 .448 1 1v7c0 .552-.448 1-1 1h-7c-.552 0-1-.448-1-1v-2H7c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h7zm5 5h-4v3c0 .552-.448 1-1 1H8v4h4v-3c0-.552.448-1 1-1h3V8z"}}],uce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M2 11h2v2H2v-2zm4 0h12v2H6v-2zm14 0h2v2h-2v-2z"}}],dce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.583 17.321C8.553 16.227 8 15 8 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179z"}}],hce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.417 6.679C15.447 7.773 16 9 16 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311C9.591 12.322 8.17 10.841 8.17 9a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179z"}}],pce=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M19 3l4 5h-3v12h-2V8h-3l4-5zm-5 15v2H3v-2h11zm0-7v2H3v-2h11zm-2-7v2H3V4h9z"}}],fce=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 4v12h3l-4 5-4-5h3V4h2zm-8 14v2H3v-2h9zm2-7v2H3v-2h11zm0-7v2H3V4h11z"}}],gce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 9v4h16V9h2v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V9h2z"}}],mce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M17.5 2.5L23 12l-5.5 9.5h-11L1 12l5.5-9.5h11zm-1.153 2H7.653L3.311 12l4.342 7.5h8.694l4.342-7.5-4.342-7.5zM11 15h2v2h-2v-2zm0-8h2v6h-2V7z"}}],vce=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-9 2H5v14h6v-4h2v4h6V5h-6v4h-2V5zm4 4l3 3-3 3v-2H9v2l-3-3 3-3v2h6V9z"}}],yce=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-1 2H5v5.999L9 11v2H5v6h14v-6h-4v-2l4-.001V5zm-7 1l3 3h-2v6h2l-3 3-3-3h2V9H9l3-3z"}}],bce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 9h-2V6H5V4h14v2h-6v3zm0 6v5h-2v-5h2zM3 11h18v2H3v-2z"}}],wce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.154 14c.23.516.346 1.09.346 1.72 0 1.342-.524 2.392-1.571 3.147C14.88 19.622 13.433 20 11.586 20c-1.64 0-3.263-.381-4.87-1.144V16.6c1.52.877 3.075 1.316 4.666 1.316 2.551 0 3.83-.732 3.839-2.197a2.21 2.21 0 0 0-.648-1.603l-.12-.117H3v-2h18v2h-3.846zm-4.078-3H7.629a4.086 4.086 0 0 1-.481-.522C6.716 9.92 6.5 9.246 6.5 8.452c0-1.236.466-2.287 1.397-3.153C8.83 4.433 10.271 4 12.222 4c1.471 0 2.879.328 4.222.984v2.152c-1.2-.687-2.515-1.03-3.946-1.03-2.48 0-3.719.782-3.719 2.346 0 .42.218.786.654 1.099.436.313.974.562 1.613.75.62.18 1.297.414 2.03.699z"}}],xce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 6v13H9V6H3V4h14v2h-6zm8.55 10.58a.8.8 0 1 0-1.32-.36l-1.154.33A2.001 2.001 0 0 1 19 14a2 2 0 0 1 1.373 3.454L18.744 19H21v1h-4v-1l2.55-2.42z"}}],kce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5.596 4L10.5 9.928 15.404 4H18l-6.202 7.497L18 18.994V19h-2.59l-4.91-5.934L5.59 19H3v-.006l6.202-7.497L3 4h2.596zM21.55 16.58a.8.8 0 1 0-1.32-.36l-1.155.33A2.001 2.001 0 0 1 21 14a2 2 0 0 1 1.373 3.454L20.744 19H23v1h-4v-1l2.55-2.42z"}}],Ece=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 11h14v2H5z"}}],Sce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 7v13H9V7H3V5h12v2h-4zm8.55-.42a.8.8 0 1 0-1.32-.36l-1.154.33A2.001 2.001 0 0 1 19 4a2 2 0 0 1 1.373 3.454L18.744 9H21v1h-4V9l2.55-2.42z"}}],Cce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5.596 5l4.904 5.928L15.404 5H18l-6.202 7.497L18 19.994V20h-2.59l-4.91-5.934L5.59 20H3v-.006l6.202-7.497L3 5h2.596zM21.55 6.58a.8.8 0 1 0-1.32-.36l-1.155.33A2.001 2.001 0 0 1 21 4a2 2 0 0 1 1.373 3.454L20.744 9H23v1h-4V9l2.55-2.42z"}}],Tce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M13 10v4h6v-4h-6zm-2 0H5v4h6v-4zm2 9h6v-3h-6v3zm-2 0v-3H5v3h6zm2-14v3h6V5h-6zm-2 0H5v3h6V5zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],Ace=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 8h16V5H4v3zm10 11v-9h-4v9h4zm2 0h4v-9h-4v9zm-8 0v-9H4v9h4zM3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],_ce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 5v10H9v-4a4 4 0 1 1 0-8h8v2h-2v10h-2V5h-2zM9 5a2 2 0 1 0 0 4V5zm8 12v-2.5l4 3.5-4 3.5V19H5v-2h12z"}}],Rce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 5v10H9v-4a4 4 0 1 1 0-8h8v2h-2v10h-2V5h-2zM9 5a2 2 0 1 0 0 4V5zM7 17h12v2H7v2.5L3 18l4-3.5V17z"}}],Mce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 17h10v-2.5l3.5 3.5-3.5 3.5V19H7v2.5L3.5 18 7 14.5V17zm6-11v9h-2V6H5V4h14v2h-6z"}}],Oce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 18h1.5a2.5 2.5 0 1 0 0-5H3v-2h13.5a4.5 4.5 0 1 1 0 9H15v2l-4-3 4-3v2zM3 4h18v2H3V4zm6 14v2H3v-2h6z"}}],Ice=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 6v15h-2V6H5V4h14v2z"}}],Lce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18.5 10l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301 14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725a16.676 16.676 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"}}],Nce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z"}}],$ce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 3v9a4 4 0 1 0 8 0V3h2v9a6 6 0 1 1-12 0V3h2zM4 20h16v2H4v-2z"}}],Dce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7zM14 9v6h-4V9H5l7-7 7 7h-5z"}}],Pce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3.993C3 3.445 3.445 3 3.993 3h16.014c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 20.007V3.993zM5 5v14h14V5H5zm5.622 3.415l4.879 3.252a.4.4 0 0 1 0 .666l-4.88 3.252a.4.4 0 0 1-.621-.332V8.747a.4.4 0 0 1 .622-.332z"}}],zce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 21v-2h3.662l1.234-7H5v-2h3.249l.881-5H4V3h16v2h-8.839l-.882 5H18v9h3v2H3zm13-9H9.927l-1.235 7H16v-7z"}}];const Fce=Object.freeze(Object.defineProperty({__proto__:null,ab:eae,addFill:tae,addLine:nae,alertLine:rae,alignBottom:oae,alignCenter:iae,alignJustify:sae,alignLeft:aae,alignRight:lae,alignTop:cae,alignVertically:uae,appsLine:dae,arrowDownSFill:hae,arrowGoBackFill:pae,arrowGoForwardFill:fae,arrowLeftSFill:gae,arrowRightSFill:mae,arrowUpSFill:vae,asterisk:yae,attachment2:bae,bold:wae,bracesLine:xae,bringForward:kae,bringToFront:Eae,chatNewLine:Sae,checkboxCircleLine:Cae,checkboxMultipleLine:Tae,clipboardFill:Aae,clipboardLine:_ae,closeCircleLine:Rae,closeFill:Mae,closeLine:Oae,codeLine:Iae,codeView:Lae,deleteBinFill:Nae,deleteBinLine:$ae,deleteColumn:Dae,deleteRow:Pae,doubleQuotesL:zae,doubleQuotesR:Fae,download2Fill:Bae,dragDropLine:Hae,emphasis:Wae,emphasisCn:Uae,englishInput:Vae,errorWarningLine:jae,externalLinkFill:Gae,fileCopyLine:Kae,flowChart:Yae,fontColor:Xae,fontSize:Zae,fontSize2:qae,formatClear:Jae,fullscreenExitLine:Qae,fullscreenLine:ele,functions:tle,galleryUploadLine:nle,h1:rle,h2:ole,h3:ile,h4:sle,h5:ale,h6:lle,hashtag:cle,heading:ule,imageAddLine:dle,imageEditLine:hle,imageLine:ple,indentDecrease:fle,indentIncrease:gle,informationLine:mle,inputCursorMove:vle,insertColumnLeft:yle,insertColumnRight:ble,insertRowBottom:wle,insertRowTop:xle,italic:kle,layoutColumnLine:Ele,lineHeight:Sle,link:_le,linkM:Cle,linkUnlink:Ale,linkUnlinkM:Tle,listCheck:Mle,listCheck2:Rle,listOrdered:Ole,listUnordered:Ile,markPenLine:Lle,markdownFill:Nle,markdownLine:$le,mergeCellsHorizontal:Dle,mergeCellsVertical:Ple,mindMap:zle,moreFill:Fle,nodeTree:Ble,number0:Hle,number1:Ule,number2:Wle,number3:Vle,number4:jle,number5:Gle,number6:Kle,number7:Yle,number8:Xle,number9:qle,omega:Zle,organizationChart:Jle,pageSeparator:Qle,paragraph:ece,pencilFill:tce,pencilLine:nce,pinyinInput:rce,questionMark:oce,roundedCorner:ice,scissorsFill:sce,sendBackward:lce,sendToBack:cce,separator:uce,singleQuotesL:dce,singleQuotesR:hce,sortAsc:pce,sortDesc:fce,space:gce,spamLine:mce,splitCellsHorizontal:vce,splitCellsVertical:yce,strikethrough:wce,strikethrough2:bce,subscript:kce,subscript2:xce,subtractLine:Ece,superscript:Cce,superscript2:Sce,table2:Tce,tableLine:Ace,text:Ice,textDirectionL:_ce,textDirectionR:Rce,textSpacing:Mce,textWrap:Oce,translate:Nce,translate2:Lce,underline:$ce,upload2Fill:Dce,videoLine:Pce,wubiInput:zce},Symbol.toStringTag,{value:"Module"}));function Bce(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=!1,a=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(t)&&s.startIndex==0){if(o.index(s.depth-1)==0)return!1;let c=n.doc.resolve(s.start-2);a=new Xa(c,c,s.depth),s.endIndex=0;c--)i=J.from(n[c].type.create(n[c].attrs,i));t.step(new Yt(e.start-(r?2:0),e.end,e.start,e.end,new ae(i,0,0),n.length,!0));let s=0;for(let c=0;cs.childCount>0&&s.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?Wce(e,n,t,i):Vce(e,n,i):!0:!1}}function Wce(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);ig;f--)p-=o.child(f).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,a=n.endIndex==o.childCount,u=i.node(-1),c=i.index(-1);if(!u.canReplace(c+(l?0:1),c+1,s.content.append(a?J.empty:J.from(o))))return!1;let d=i.pos,h=d+s.nodeSize;return r.step(new Yt(d-(l?1:0),h+(a?1:0),d+1,h-1,new ae((l?J.empty:J.from(o.copy(J.empty))).append(a?J.empty:J.from(o.copy(J.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}var jce=Object.defineProperty,Gce=Object.getOwnPropertyDescriptor,Co=(t,e,n,r)=>{for(var o=r>1?void 0:r?Gce(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&jce(e,n,o),o};function lb(t){var e;return!!((e=t.spec.group)!=null&&e.includes(ke.ListContainerNode))}function Kce(t){var e;return!!((e=t.spec.group)!=null&&e.includes(ke.ListItemNode))}function qs(t){return lb(t.type)}function Fs(t){return Kce(t.type)}function Jx(t,e){return n=>{const{dispatch:r,tr:o}=n,i=Hb(o,n.state),{$from:s,$to:l}=o.selection,a=s.blockRange(l);if(!a)return!1;const u=Yh({predicate:c=>lb(c.type),selection:o.selection});if(u&&a.depth-u.depth<=1&&a.startIndex===0){if(u.node.type===t)return FN(e)(n);if(lb(u.node.type))return t.validContent(u.node.content)?(r==null||r(o.setNodeMarkup(u.pos,t)),!0):Yce(o,u,t,e)?(r==null||r(o.scrollIntoView()),!0):!1}return Bce(t)(i,r)}}function PN(t,e=["checked"]){return function({tr:n,dispatch:r,state:o}){var i,s;const l=kF(t,o.schema),{$from:a,$to:u}=n.selection;if(qh(n.selection)&&n.selection.node.isBlock||a.depth<2||!a.sameParent(u))return!1;const c=a.node(-1);if(c.type!==l)return!1;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){const g=a.index(-1)>0;let m=J.empty;for(let b=a.depth-(g?1:2);b>=a.depth-3;b--)m=J.from(a.node(b).copy(m));const v=((i=l.contentMatch.defaultType)==null?void 0:i.createAndFill())||void 0;m=m.append(J.from(l.createAndFill(null,v)||void 0));const y=a.indexAfter(-1)!e.includes(g))),h=u.pos===a.end()?c.contentMatchAt(0).defaultType:null,p={...a.node().attrs};n.delete(a.pos,u.pos);const f=h?[{type:l,attrs:d},{type:h,attrs:p}]:[{type:l,attrs:d}];return vc(n.doc,a.pos,2)?(r&&r(n.split(a.pos,2,f).scrollIntoView()),!0):!1}}function Yce(t,e,n,r){const o=e.node,i=t.doc.resolve(e.start),s=i.node(-1),l=i.index(-1);if(!s||!s.canReplace(l,l+1,J.from(n.create())))return!1;const a=[];for(let p=0;pm;g--)f-=o.child(g).nodeSize,r.delete(f-1,f+1);const s=r.doc.resolve(n.start),l=s.nodeAfter;if(!l||r.mapping.slice(i).map(n.end)!==n.start+l.nodeSize)return!1;const a=n.startIndex===0,u=n.endIndex===o.childCount,c=s.node(-1),d=s.index(-1);if(!c.canReplace(d+(a?0:1),d+1,l.content.append(u?J.empty:J.from(o))))return!1;const h=s.pos,p=h+l.nodeSize;return r.step(new Yt(h-(a?1:0),p+(u?1:0),h+1,p-1,new ae((a?J.empty:J.from(o.copy(J.empty))).append(u?J.empty:J.from(o.copy(J.empty))),a?0:1,u?0:1),a?0:1)),e(r.scrollIntoView()),!0}function zN(t,e){const n=e||t.selection.$from;let r=[],o,i,s,l;for(let u=n.depth;u>=0;u--){if(i=n.node(u),o=n.index(u),s=i.maybeChild(o-1),l=i.maybeChild(o),s&&l&&s.type.name===l.type.name&&qs(s)){const c=n.before(u+1);r.push(c)}if(o=n.indexAfter(u),s=i.maybeChild(o-1),l=i.maybeChild(o),s&&l&&s.type.name===l.type.name&&qs(s)){const c=n.after(u+1);r.push(c)}}r=[...new Set(r)].sort((u,c)=>c-u);let a=!1;for(const u of r)jh(t.doc,u)&&(t.join(u),a=!0);return a}function FN(t){return e=>{const{dispatch:n,tr:r}=e,o=Hb(r,e.state),i=Zce(t,r.selection);return i?(n&&qce(o,n,i),!0):!1}}function Zce(t,e){const{$from:n,$to:r}=e;return n.blockRange(r,i=>{var s;return((s=i.firstChild)==null?void 0:s.type)===t})}function qg(t){const{$from:e,$to:n}=t;return e.blockRange(n,qs)}function Jce(t){const e=t.selection.$from,n=e.blockRange();if(!n||!Fs(n.parent)||n.startIndex!==0)return!1;const r=e.node(n.depth-2),o=e.index(n.depth),i=e.index(n.depth-1),s=e.index(n.depth-2),l=r.maybeChild(s-1),a=l==null?void 0:l.lastChild;if(o!==0||i!==0)return!1;if(l&&qs(l)&&a&&Fs(a))return ru({listType:l.type,itemType:a.type,tr:t});if(Fs(r)){const u=r,c=e.node(n.depth-3);if(qs(c))return ru({listType:c.type,itemType:u.type,tr:t})}return!1}function E_({view:t}){if(!t)return!1;{const e=t.state.selection.$cursor;if(!e||e.parentOffset>0)return!1;const n=e.blockRange();if(!n||!Fs(n.parent)||n.startIndex!==0)return!1}{const e=t.state.tr;Jce(e)&&t.dispatch(e)}{const e=t.state.selection.$cursor;if(!e||e.parentOffset>0)return!1;const n=e.blockRange();if(!n||!Fs(n.parent)||n.startIndex!==0)return!1;const r=e.index(n.depth),o=e.index(n.depth-1),i=e.index(n.depth-2),s=n.depth-2>=1&&Fs(e.node(n.depth-2));r===0&&o===0&&i<=1&&s&&Uce(n.parent.type)(t.state,t.dispatch)}return yM(t.state,t.dispatch,t),!0}function BN({node:t,mark:e,updateDOM:n,updateMark:r}){const o=document.createElement("label");o.contentEditable="false",o.classList.add(Ks.LIST_ITEM_MARKER_CONTAINER),o.append(e);const i=document.createElement("div"),s=document.createElement("li");s.classList.add(Ks.LIST_ITEM_WITH_CUSTOM_MARKER),s.append(o),s.append(i);const l=a=>a.type!==t.type?!1:(t=a,n(t,s),r(t,e),!0);return l(t),{dom:s,contentDOM:i,update:l}}function Qce(t,e){const n=t.node(e.depth-1),r=t.node(e.depth-2);return!Fs(n)||!qs(r)?!1:{parentItem:n,parentList:r}}function eue(t,e){const n=e.parent,r=e.parent.child(e.endIndex-1),o=e.end,i=e.$to.end(e.depth);return orue(t)?(e==null||e(t.scrollIntoView()),!0):!1;function iue(t,e,n){let r,o,i,s;const l=e.doc;if(n.startIndex>=1){r=t.child(n.startIndex-1),o=t,s=l.resolve(n.start).start(n.depth),i=s+1;for(let a=0;a=1){const u=e.node(n.depth-1),c=e.start(n.depth-1);if(o=u.child(a-1),!qs(o))return!1;s=c+1;for(let d=0;d=n.depth+2?e.end(n.depth+2):n.end-1,l=n.end;return s+1>=l?(r=t.slice(i,l),o=null):(r=t.slice(i,s),o=t.slice(s+1,l-1)),{selectedSlice:r,unselectedSlice:o}}function aue(t){const{$from:e,$to:n}=t.selection,r=qg(t.selection);if(!r)return!1;const o=t.doc.resolve(r.start).node();if(!qs(o))return!1;const i=iue(o,e,r);if(!i)return!1;const{previousItem:s,previousList:l,previousItemStart:a}=i,{selectedSlice:u,unselectedSlice:c}=sue(t.doc,n,r),d=s.content.append(J.fromArray([o.copy(u.content)])).append(c?c.content:J.empty);t.deleteRange(r.start,r.end);const h=a+s.nodeSize-2,p=s.copy(d);return p.check(),t.replaceRangeWith(a-1,h+1,p),t.setSelection(l===o?Me.between(t.doc.resolve(e.pos),t.doc.resolve(n.pos)):Me.between(t.doc.resolve(e.pos-2),t.doc.resolve(n.pos-2))),!0}var lue=({tr:t,dispatch:e})=>aue(t)?(e==null||e(t.scrollIntoView()),!0):!1,HN=class extends ft{get name(){return"listItemShared"}createKeymap(){const t={Tab:lue,"Shift-Tab":oue,Backspace:E_,"Mod-Backspace":E_};if(yr.isMac){const e={"Ctrl-h":t.Backspace,"Alt-Backspace":t["Mod-Backspace"]};return{...t,...e}}return t}createPlugin(){return{appendTransaction:(t,e,n)=>{const r=n.tr;return zN(r)?r:null}}}},hl=class extends Dn{get name(){return"listItem"}createTags(){return[ke.ListItemNode]}createNodeSpec(t,e){return{content:"paragraph block*",defining:!0,draggable:!1,...e,attrs:{...t.defaults(),closed:{default:!1},nested:{default:!1}},parseDOM:[{tag:"li",getAttrs:t.parse,priority:ot.Lowest},...e.parseDOM??[]],toDOM:n=>["li",t.dom(n),0]}}createNodeViews(){return this.options.enableCollapsible?(t,e,n)=>{const r=document.createElement("div");return r.classList.add(Ks.COLLAPSIBLE_LIST_ITEM_BUTTON),r.contentEditable="false",r.addEventListener("click",()=>{if(r.classList.contains("disabled"))return;const o=n(),i=Oe.create(e.state.doc,o);return e.dispatch(e.state.tr.setSelection(i)),this.store.commands.toggleListItemClosed(),!0}),BN({mark:r,node:t,updateDOM:cue,updateMark:uue})}:{}}createKeymap(){return{Enter:PN(this.type)}}createExtensions(){return[new HN]}toggleListItemClosed(t){return({state:{tr:e,selection:n},dispatch:r})=>{if(!qh(n)||n.node.type.name!==this.name)return!1;const{node:o,from:i}=n;return t=k0(t)?t:!o.attrs.closed,r==null||r(e.setNodeMarkup(i,void 0,{...o.attrs,closed:t})),!0}}liftListItemOutOfList(t){return FN(t??this.type)}};Co([le()],hl.prototype,"toggleListItemClosed",1);Co([le()],hl.prototype,"liftListItemOutOfList",1);hl=Co([Ne({defaultOptions:{enableCollapsible:!1},staticKeys:["enableCollapsible"]})],hl);function cue(t,e){t.attrs.closed?e.classList.add(Ks.COLLAPSIBLE_LIST_ITEM_CLOSED):e.classList.remove(Ks.COLLAPSIBLE_LIST_ITEM_CLOSED)}function uue(t,e){t.childCount<=1?e.classList.add("disabled"):e.classList.remove("disabled")}var Rh=class extends Dn{get name(){return"bulletList"}createTags(){return[ke.Block,ke.ListContainerNode]}createNodeSpec(t,e){return{content:"listItem+",...e,attrs:t.defaults(),parseDOM:[{tag:"ul",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["ul",t.dom(n),0]}}createNodeViews(){return this.options.enableSpine?(t,e,n)=>{var r;const o=document.createElement("div");o.style.position="relative";const i=n(),s=e.state.doc.resolve(i+1),l=s.node(s.depth-1);if(!(((r=l==null?void 0:l.type)==null?void 0:r.name)!=="listItem")){const c=document.createElement("div");c.contentEditable="false",c.classList.add(Ks.LIST_SPINE),c.addEventListener("click",d=>{const h=n(),p=e.state.doc.resolve(h+1),f=p.start(p.depth-1),g=Oe.create(e.state.doc,f-1);e.dispatch(e.state.tr.setSelection(g)),this.store.commands.toggleListItemClosed(),d.preventDefault(),d.stopPropagation()}),o.append(c)}const u=document.createElement("ul");return u.classList.add(Ks.UL_LIST_CONTENT),o.append(u),{dom:o,contentDOM:u}}:{}}createExtensions(){return[new hl({priority:ot.Low,enableCollapsible:this.options.enableSpine})]}toggleBulletList(){return Jx(this.type,Mt(this.store.schema.nodes,"listItem"))}listShortcut(t){return this.toggleBulletList()(t)}createInputRules(){const t=/^\s*([*+-])\s$/;return[gm(t,this.type),new yl(t,(e,n,r,o)=>{const i=e.tr;return i.deleteRange(r,o),ru({listType:this.type,itemType:Mt(this.store.schema.nodes,"listItem"),tr:i})?i:null})]}};Co([le({icon:"listUnordered",label:({t})=>t(Mb.BULLET_LIST_LABEL)})],Rh.prototype,"toggleBulletList",1);Co([en({shortcut:oe.BulletList,command:"toggleBulletList"})],Rh.prototype,"listShortcut",1);Rh=Co([Ne({defaultOptions:{enableSpine:!1},staticKeys:["enableSpine"]})],Rh);var Mh=class extends Dn{get name(){return"orderedList"}createTags(){return[ke.Block,ke.ListContainerNode]}createNodeSpec(t,e){return{content:"listItem+",...e,attrs:{...t.defaults(),order:{default:1}},parseDOM:[{tag:"ol",getAttrs:n=>Vt(n)?{...t.parse(n),order:+(n.getAttribute("start")??1)}:{}},...e.parseDOM??[]],toDOM:n=>{const r=t.dom(n);return n.attrs.order===1?["ol",r,0]:["ol",{...r,start:n.attrs.order},0]}}}createExtensions(){return[new hl({priority:ot.Low})]}toggleOrderedList(){return Jx(this.type,Mt(this.store.schema.nodes,"listItem"))}listShortcut(t){return this.toggleOrderedList()(t)}createInputRules(){const t=/^(\d+)\.\s$/;return[gm(t,this.type,e=>({order:+Mt(e,1)}),(e,n)=>n.childCount+n.attrs.order===+Mt(e,1)),new yl(t,(e,n,r,o)=>{const i=e.tr;if(i.deleteRange(r,o),!ru({listType:this.type,itemType:Mt(this.store.schema.nodes,"listItem"),tr:i}))return null;const l=+Mt(n,1);if(l!==1){const a=pi({selection:i.selection,types:this.type});a&&i.setNodeMarkup(a.pos,void 0,{order:l})}return i})]}};Co([le({icon:"listOrdered",label:({t})=>t(Mb.ORDERED_LIST_LABEL)})],Mh.prototype,"toggleOrderedList",1);Co([en({shortcut:oe.OrderedList,command:"toggleOrderedList"})],Mh.prototype,"listShortcut",1);Mh=Co([Ne({})],Mh);var UN=class extends Dn{get name(){return"taskListItem"}createTags(){return[ke.ListItemNode]}createNodeSpec(t,e){return{content:"paragraph block*",defining:!0,draggable:!1,...e,attrs:{...t.defaults(),checked:{default:!1}},parseDOM:[{tag:"li[data-task-list-item]",getAttrs:n=>{let r=!1;return Vt(n)&&n.getAttribute("data-checked")!==null&&(r=!0),{checked:r,...t.parse(n)}},priority:ot.Medium},...e.parseDOM??[]],toDOM:n=>["li",{...t.dom(n),"data-task-list-item":"","data-checked":n.attrs.checked?"":void 0},0]}}createNodeViews(){return(t,e,n)=>{const r=document.createElement("input");return r.type="checkbox",r.classList.add(Ks.LIST_ITEM_CHECKBOX),r.contentEditable="false",r.addEventListener("click",o=>{e.editable||o.preventDefault()}),r.addEventListener("change",()=>{const o=n(),i=e.state.doc.resolve(o+1);this.store.commands.toggleCheckboxChecked({$pos:i})}),r.checked=t.attrs.checked,BN({node:t,mark:r,updateDOM:due,updateMark:hue})}}createKeymap(){return{Enter:PN(this.type)}}createExtensions(){return[new HN]}toggleCheckboxChecked(t){let e,n;return typeof t=="boolean"?e=t:t&&(e=t.checked,n=t.$pos),({tr:r,dispatch:o})=>{const i=pi({selection:n??r.selection.$from,types:this.type});if(!i)return!1;const{node:s,pos:l}=i,a={...s.attrs,checked:e??!s.attrs.checked};return o==null||o(r.setNodeMarkup(l,void 0,a)),!0}}createInputRules(){const t=/^\s*(\[( ?|x|X)]\s)$/;return[gm(t,this.type,e=>({checked:["x","X"].includes(wc(e,2))})),new yl(t,(e,n,r,o)=>{const i=e.tr;if(i.deleteRange(r,o),!ru({listType:Mt(this.store.schema.nodes,"taskList"),itemType:this.type,tr:i}))return null;const l=["x","X"].includes(wc(n,2));if(l){const a=pi({selection:i.selection,types:this.type});a&&i.setNodeMarkup(a.pos,void 0,{checked:l})}return i})]}};Co([le()],UN.prototype,"toggleCheckboxChecked",1);function due(t,e){t.attrs.checked?e.setAttribute("data-checked",""):e.removeAttribute("data-checked"),e.setAttribute("data-task-list-item","")}function hue(t,e){e.checked=!!t.attrs.checked}var WN=class extends Dn{get name(){return"taskList"}createTags(){return[ke.Block,ke.ListContainerNode]}createNodeSpec(t,e){return{content:"taskListItem+",...e,attrs:t.defaults(),parseDOM:[{tag:"ul[data-task-list]",getAttrs:t.parse,priority:ot.Medium},...e.parseDOM??[]],toDOM:n=>["ul",{...t.dom(n),"data-task-list":""},0]}}createExtensions(){return[new UN({})]}toggleTaskList(){return Jx(this.type,Mt(this.store.schema.nodes,"taskListItem"))}listShortcut(t){return this.toggleTaskList()(t)}};Co([le({icon:"checkboxMultipleLine",label:({t})=>t(Mb.TASK_LIST_LABEL)})],WN.prototype,"toggleTaskList",1);Co([en({shortcut:oe.TaskList,command:"toggleTaskList"})],WN.prototype,"listShortcut",1);var Ko,pue=(t=document)=>Ko||(Ko=t.createElement("div"),Ko.setAttribute("id","a11y-status-message"),Ko.setAttribute("role","status"),Ko.setAttribute("aria-live","polite"),Ko.setAttribute("aria-relevant","additions text"),Object.assign(Ko.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),t.body.append(Ko),Ko);AR(500,()=>{pue().textContent=""});function S_(t){return typeof t=="object"&&t!=null&&t.nodeType===1}function C_(t,e){return(!e||t!=="hidden")&&t!=="visible"&&t!=="clip"}function a0(t,e){if(t.clientHeighte||i>t&&s=e&&l>=n?i-t-r:s>e&&ln?s-e+o:0}var fue=function(t,e){var n=window,r=e.scrollMode,o=e.block,i=e.inline,s=e.boundary,l=e.skipOverflowHiddenElements,a=typeof s=="function"?s:function(_e){return _e!==s};if(!S_(t))throw new TypeError("Invalid target");for(var u,c,d=document.scrollingElement||document.documentElement,h=[],p=t;S_(p)&&a(p);){if((p=(c=(u=p).parentElement)==null?u.getRootNode().host||null:c)===d){h.push(p);break}p!=null&&p===document.body&&a0(p)&&!a0(document.documentElement)||p!=null&&a0(p,l)&&h.push(p)}for(var f=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=t.getBoundingClientRect(),b=y.height,w=y.width,k=y.top,x=y.right,S=y.bottom,A=y.left,C=o==="start"||o==="nearest"?k:o==="end"?S:k+b/2,O=i==="center"?A+w/2:i==="end"?x:A,R=[],_=0;_=0&&A>=0&&S<=g&&x<=f&&k>=N&&S<=$&&A>=P&&x<=L)return R;var F=getComputedStyle(T),H=parseInt(F.borderLeftWidth,10),W=parseInt(F.borderTopWidth,10),B=parseInt(F.borderRightWidth,10),U=parseInt(F.borderBottomWidth,10),G=0,Y=0,X="offsetWidth"in T?T.offsetWidth-T.clientWidth-H-B:0,Z="offsetHeight"in T?T.offsetHeight-T.clientHeight-W-U:0,te="offsetWidth"in T?T.offsetWidth===0?0:I/T.offsetWidth:0,de="offsetHeight"in T?T.offsetHeight===0?0:M/T.offsetHeight:0;if(d===T)G=o==="start"?C:o==="end"?C-g:o==="nearest"?sf(v,v+g,g,W,U,v+C,v+C+b,b):C-g/2,Y=i==="start"?O:i==="center"?O-f/2:i==="end"?O-f:sf(m,m+f,f,H,B,m+O,m+O+w,w),G=Math.max(0,G+v),Y=Math.max(0,Y+m);else{G=o==="start"?C-N-W:o==="end"?C-$+U+Z:o==="nearest"?sf(N,$,M,W,U+Z,C,C+b,b):C-(N+M/2)+Z/2,Y=i==="start"?O-P-H:i==="center"?O-(P+I/2)+X/2:i==="end"?O-L+B+X:sf(P,L,I,H,B+X,O,O+w,w);var Ie=T.scrollLeft,ve=T.scrollTop;C+=ve-(G=Math.max(0,Math.min(ve+G/de,T.scrollHeight-M/de+Z))),O+=Ie-(Y=Math.max(0,Math.min(Ie+Y/te,T.scrollWidth-I/te+X)))}R.push({el:T,top:G,left:Y})}return R};typeof nr=="object"&&nr.__esModule&&nr.default&&nr.default;pm(fue);var gue=typeof document<"u"?D.useLayoutEffect:D.useEffect;function mue(t){const e=D.useRef();return gue(()=>{e.current=t}),e.current}function vue(t,e){const[n,r]=D.useState([]),[o,i]=D.useState(()=>Z0(t)),[s,l]=D.useState([]),a=D.useRef(t),u=mue(o);return a.current=t,sp(Hc,({addCustomHandler:c})=>{const d=Z0(a.current),h=c("positioner",d);return i(d),h},e),D.useLayoutEffect(()=>{const c=o.addListener("update",h=>{const p=[];for(const{id:f,data:g,setElement:m}of h){const v=y=>{y&&m(y)};p.push({id:f,data:g,ref:v})}l(p)}),d=o.addListener("done",h=>{r(h)});return u!=null&&u.recentUpdate&&o.onActiveChanged(u==null?void 0:u.recentUpdate),()=>{c(),d()}},[o,u]),D.useMemo(()=>{const c=[];for(const[d,{ref:h,data:p,id:f}]of s.entries()){const g=n[d],{element:m,position:v={}}=g??{},y={...Im,...MR(v)};c.push({ref:h,element:m,data:p,key:f,...y})}return c},[s,n])}function VN(t,e){const n=e==null||k0(e)?[t]:e,r=k0(e)?e:!0,o=D.useRef(Oc()),s=vue(t,n)[0];return D.useMemo(()=>s&&r?{...s,active:!0}:{...Im,ref:void 0,data:{},active:!1,key:o.current},[r,s])}function l0(t,e){return Qe(t)?t(e):t}function yue(t){return Ee(t[0])}function bue(t,e){var n;return Ee(t)?t:Pt(t)?yue(t)?t[0]??"":((n=t.find(r=>OR(r.attrs,e))??t[0])==null?void 0:n.shortcut)??"":t.shortcut}var wue={title:t=>B4(t),upper:t=>t.toLocaleUpperCase(),lower:t=>t.toLocaleLowerCase()};function xue(t,e){const{casing:n="title",namedAsSymbol:r=!1,modifierAsSymbol:o=!0,separator:i=" ",t:s}=e,l=eB(t),a=[],u=wue[n];for(const c of l){if(c.type==="char"){a.push(u(c.key));continue}if(c.type==="named"){const h=r===!0||Pt(r)&&ir(r,c.key)?c.symbol??s(c.i18n):s(c.i18n);a.push(u(h));continue}const d=o===!0||Pt(o)&&ir(o,c.key)?c.symbol:s(c.i18n);a.push(u(d))}return a.join(i)}var jN=({commandName:t,active:e,enabled:n,attrs:r})=>{const{t:o}=FJ(),{getCommandOptions:i}=ap(),s=i(t),{description:l,label:a,icon:u,shortcut:c}=s||{},d=D.useMemo(()=>({active:e,attrs:r,enabled:n,t:o}),[e,r,n,o]),h=D.useMemo(()=>{if(c)return xue(bue(c,r??{}),{t:o,separator:""})},[c,r,o]);return D.useMemo(()=>({description:l0(l,d),label:l0(a,d),icon:l0(u,d),shortcut:h}),[d,l,a,u,h])},kue={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},GN=D.createContext(kue);GN.Provider;function KN(t){return t.map((e,n)=>D.createElement(e.tag,{key:n,...e.attr},KN(e.child??[])))}var Lv=t=>{const{name:e}=t;return ee.createElement(Eue,{...t},KN(Fce[e]))},Eue=t=>{const e=n=>{const r=t.size??n.size??"1em";let o;n.className&&(o=n.className),t.className&&(o=(o?`${o} `:"")+t.className);const{title:i,...s}=t;return ee.createElement("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",...n.attr,...s,className:o,style:{color:t.color??n.color,...n.style,...t.style},height:r,width:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},i&&ee.createElement("title",null,i),t.children)};return ee.createElement(GN.Consumer,null,e)},Sue=t=>Qs(t)?!!t.name:!1,Cue=({icon:t})=>Ee(t)?ee.createElement(Lv,{name:t,size:"1rem"}):t,Tue=({icon:t,children:e})=>{if(!Sue(t))return ee.createElement(ee.Fragment,null,e);const{sub:n,sup:r}=t,o=n??r,i=n!==void 0;return o===void 0?ee.createElement(ee.Fragment,null,e):ee.createElement(Tie,{anchorOrigin:{vertical:i?"bottom":"top",horizontal:"right"},badgeContent:o,sx:{"& > .MuiBadge-badge":{bgcolor:"background.paper",color:"text.secondary",minWidth:12,height:12,margin:"2px 0",padding:"1px"}}},e)},kt=({commandName:t,active:e=!1,enabled:n,attrs:r,onSelect:o,onChange:i,icon:s,displayShortcut:l=!0,"aria-label":a,label:u,...c})=>{const d=D.useCallback((y,b)=>{o(),i==null||i(y,b)},[o,i]),h=D.useCallback(y=>{y.preventDefault()},[]),p=jN({commandName:t,active:e,enabled:n,attrs:r});let f=null;p.icon&&(f=Ee(p.icon)?p.icon:p.icon.name);const g=a??p.label??"",m=u??g,v=l&&p.shortcut?` (${p.shortcut})`:"";return ee.createElement(DN,{title:`${m}${v}`},ee.createElement(IN,{component:"span",sx:{"&:not(:first-of-type)":{marginLeft:"-1px"}}},ee.createElement(Qse,{"aria-label":g,selected:e,disabled:!n,onMouseDown:h,color:"primary",size:"small",sx:{padding:"6px 12px","&.Mui-selected":{backgroundColor:"primary.main",color:"primary.contrastText"},"&.Mui-selected:hover":{backgroundColor:"primary.dark",color:"primary.contrastText"},"&:not(:first-of-type)":{borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-of-type)":{borderTopRightRadius:0,borderBottomRightRadius:0}},...c,value:t,onChange:d},ee.createElement(Tue,{icon:p.icon},ee.createElement(Cue,{icon:s??f})))))},Aue=({icon:t})=>Ee(t)?ee.createElement(Lv,{name:t,size:"1rem"}):t,YN=({label:t,"aria-label":e,icon:n,children:r,onClose:o,...i})=>{const s=D.useRef(Oc()),[l,a]=D.useState(null),u=!!l,c=D.useCallback(p=>{p.preventDefault()},[]),d=D.useCallback(p=>{a(p.currentTarget)},[]),h=D.useCallback((p,f)=>{a(null),o==null||o(p,f)},[o]);return ee.createElement(ee.Fragment,null,ee.createElement(DN,{title:t??e},ee.createElement(pre,{"aria-label":e,"aria-controls":u?s.current:void 0,"aria-haspopup":!0,"aria-expanded":u?"true":void 0,onMouseDown:c,onClick:d,size:"small",sx:p=>({border:`1px solid ${p.palette.divider}`,borderRadius:`${p.shape.borderRadius}px`,padding:"6px 12px","&:not(:first-of-type)":{marginLeft:"-1px",borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-of-type)":{borderTopRightRadius:0,borderBottomRightRadius:0}})},n&&ee.createElement(Aue,{icon:n}),ee.createElement(Lv,{name:"arrowDownSFill",size:"1rem"}))),ee.createElement(Rse,{...i,id:s.current,anchorEl:l,open:u,onClose:h},r))},_ue=t=>{const{insertHorizontalRule:e}=un();qm();const n=D.useCallback(()=>{e.enabled()&&e()},[e]),r=e.enabled();return ee.createElement(kt,{...t,commandName:"insertHorizontalRule",enabled:r,onSelect:n})},Rue=t=>{const{redo:e}=un(),{redoDepth:n}=ap(!0),r=D.useCallback(()=>{e.enabled()&&e()},[e]),o=n()>0;return ee.createElement(kt,{...t,commandName:"redo",active:!1,enabled:o,onSelect:r})},Mue=t=>{const{toggleBlockquote:e}=un(),n=D.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().blockquote(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleBlockquote",active:r,enabled:o,onSelect:n})},Qx=t=>{const{toggleBold:e}=un(),n=D.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().bold(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleBold",active:r,enabled:o,onSelect:n})},Oue=t=>{const{toggleBulletList:e}=un(),n=D.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().bulletList(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleBulletList",active:r,enabled:o,onSelect:n})},Iue=({attrs:t={},...e})=>{const{toggleCodeBlock:n}=un(),r=D.useCallback(()=>{n.enabled(t)&&n(t)},[n,t]),o=hr().codeBlock(),i=n.enabled(t);return ee.createElement(kt,{...e,commandName:"toggleCodeBlock",active:o,enabled:i,attrs:t,onSelect:r})},ek=t=>{const{toggleCode:e}=un(),n=D.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().code(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleCode",active:r,enabled:o,onSelect:n})},c0=({attrs:t,...e})=>{const{toggleHeading:n}=un(),r=D.useCallback(()=>{n.enabled(t)&&n(t)},[n,t]),o=hr().heading(t),i=n.enabled(t);return ee.createElement(kt,{...e,commandName:"toggleHeading",active:o,enabled:i,attrs:t,onSelect:r})},tk=t=>{const{toggleItalic:e}=un(),n=D.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().italic(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleItalic",active:r,enabled:o,onSelect:n})},Lue=t=>{const{toggleOrderedList:e}=un(),n=D.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().orderedList(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleOrderedList",active:r,enabled:o,onSelect:n})},Nue=t=>{const{toggleStrike:e}=un(),n=D.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().strike(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleStrike",active:r,enabled:o,onSelect:n})},nk=t=>{const{toggleUnderline:e}=un(),n=D.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().underline(),o=e.enabled();return ee.createElement(kt,{...t,commandName:"toggleUnderline",active:r,enabled:o,onSelect:n})},$ue=t=>{const{undo:e}=un(),{undoDepth:n}=ap(!0),r=D.useCallback(()=>{e.enabled()&&e()},[e]),o=n()>0;return ee.createElement(kt,{...t,commandName:"undo",active:!1,enabled:o,onSelect:r})},Fr=t=>ee.createElement(IN,{sx:{display:"flex",alignItems:"center",width:"fit-content",bgcolor:"background.paper",color:"text.secondary"},...t}),Due=({children:t})=>ee.createElement(Fr,null,ee.createElement(Qx,null),ee.createElement(tk,null),ee.createElement(nk,null),ee.createElement(Nue,null),ee.createElement(ek,null),t),Pue=({icon:t})=>t?ee.createElement(ese,null,Ee(t)?ee.createElement(Lv,{name:t,size:"1rem"}):ee.createElement(ee.Fragment,null,t)):null,rk=({commandName:t,active:e=!1,enabled:n,attrs:r,onSelect:o,onClick:i,icon:s,displayShortcut:l=!0,label:a,description:u,displayDescription:c=!0,...d})=>{const h=D.useCallback(y=>{o(),i==null||i(y)},[o,i]),p=D.useCallback(y=>{y.preventDefault()},[]),f=jN({commandName:t,active:e,enabled:n,attrs:r});let g=null;f.icon&&(g=Ee(f.icon)?f.icon:f.icon.name);const m=a??f.label??"",v=c&&(u??f.description);return ee.createElement(Pse,{selected:e,disabled:!n,onMouseDown:p,...d,onClick:h},s!==null&&ee.createElement(Pue,{icon:s??g}),ee.createElement(ase,{primary:m,secondary:v}),l&&f.shortcut&&ee.createElement(xd,{variant:"body2",color:"text.secondary",sx:{ml:2}},f.shortcut))},af=({attrs:t,...e})=>{const{toggleHeading:n}=un(),r=D.useCallback(()=>{n.enabled(t)&&n(t)},[n,t]),o=hr().heading(t),i=n.enabled(t);return ee.createElement(rk,{...e,commandName:"toggleHeading",active:o,enabled:i,attrs:t,onSelect:r})},zue={level:1},Fue={level:2},T_={level:3},Bue={level:4},Hue={level:5},Uue={level:6},Wue=({showAll:t=!1,children:e})=>ee.createElement(Fr,null,ee.createElement(c0,{attrs:zue}),ee.createElement(c0,{attrs:Fue}),t?ee.createElement(YN,{"aria-label":"More heading options"},ee.createElement(af,{attrs:T_}),ee.createElement(af,{attrs:Bue}),ee.createElement(af,{attrs:Hue}),ee.createElement(af,{attrs:Uue})):ee.createElement(c0,{attrs:T_}),e),Vue=({children:t})=>ee.createElement(Fr,null,ee.createElement($ue,null),ee.createElement(Rue,null),t);typeof nr=="object"&&nr.__esModule&&nr.default&&nr.default;var jue=t=>{const e=ap().getPositionerWidget();return ip.createPortal(ee.createElement(ee.Fragment,null,t.children),e)},XN=D.createContext({});function Gue(t={}){const e=D.useContext(XN),n=D.useMemo(()=>NR(e,t.theme??{}),[e,t.theme]),r=D.useMemo(()=>LV(n).styles,[n]),o=Fc(IV,t.className);return D.useMemo(()=>({style:r,className:o,theme:n}),[r,o,n])}var Kue=t=>{var e,n,r,o,i,s,l,a;const{children:u,as:c="div"}=t,{theme:d,style:h,className:p}=Gue({theme:t.theme??va}),f=zx({palette:{primary:{main:((e=d.color)==null?void 0:e.primary)??va.color.primary,dark:((r=(n=d.color)==null?void 0:n.hover)==null?void 0:r.primary)??va.color.hover.primary,contrastText:((o=d.color)==null?void 0:o.primaryText)??va.color.primaryText},secondary:{main:((i=d.color)==null?void 0:i.secondary)??va.color.secondary,dark:((l=(s=d.color)==null?void 0:s.hover)==null?void 0:l.secondary)??va.color.hover.secondary,contrastText:((a=d.color)==null?void 0:a.secondaryText)??va.color.secondaryText}}});return ee.createElement(Mne,{theme:f},ee.createElement(XN.Provider,{value:d},ee.createElement(c,{style:h,className:p},u)))},qN=t=>ee.createElement(zie,{direction:"row",spacing:1,sx:{backgroundColor:"background.paper",overflowX:"auto"},...t}),Yue=[{name:"offset",options:{offset:[0,8]}}],Xue=({positioner:t="selection",children:e,...n})=>{const{ref:r,x:o,y:i,width:s,height:l,active:a}=VN(()=>Z0(t),[t]),[u,c]=D.useState(null),d=D.useMemo(()=>({position:"absolute",pointerEvents:"none",left:o,top:i,width:s,height:l}),[o,i,s,l]),h=D.useCallback(p=>{c(p),r==null||r(p)},[r]);return ee.createElement(ee.Fragment,null,ee.createElement("div",{ref:h,style:d}),ee.createElement(Zx,{placement:"top",modifiers:Yue,...n,open:a,anchorEl:u},ee.createElement(qN,null,e?ee.createElement(ee.Fragment,null,e):ee.createElement(Due,null))))},que=({languages:t=[],className:e="",offset:n={x:0,y:0},onLanguageChange:r,onPointerDownSelect:o,onSelectChange:i})=>{var s;const l=VN(Jue,[]),{getExtension:a,getState:u}=to(),{focus:c,updateCodeBlock:d}=un(),h=a(vo).options,[p]=D.useState(()=>{const w=new Map;return h.supportedLanguages.forEach(k=>{k.aliases.forEach(x=>!t.some(S=>S.displayName===x)&&w.set(x,k.displayName))}),w}),[f]=D.useState([...t,{displayName:h.defaultLanguage},...h.supportedLanguages]),{selection:g}=u(),[m,v]=D.useState("auto"),y=(s=pi({selection:g,types:"codeBlock"}))==null?void 0:s.node.attrs.language,b=D.useMemo(()=>{const w=p.get(y);return w||(h.supportedLanguages.some(k=>y===k.displayName)?y:h.defaultLanguage)},[p,h.defaultLanguage,h.supportedLanguages,y]);return D.useEffect(()=>{var w;const k=l.element;if(r!=null&&r(b,k,v))return;if((S=>S&&S.nodeName==="SELECT"||!1)(k)){const S=(w=k.options[k.selectedIndex])==null?void 0:w.dataset.width;v(S?`${S}px`:"auto")}},[l.element,b,r]),ee.createElement(jue,null,ee.createElement("select",{ref:l.ref,className:e,onBlur:()=>c(),onChange:w=>{var k;i!=null&&i(w,v)||(v(`${(k=w.target.options[w.target.selectedIndex])==null?void 0:k.dataset.width}px`),d({language:w.target.dataset.value||w.target.value}))},onPointerDown:o,style:{"--w":m,"--x":`${l.x+n.x}px`,"--y":`${l.y+n.y}px`,display:y?"block":"none"},value:b},y?Zue(f):null))},Zue=y6(t=>Sb(t.map(({displayName:n,value:r})=>({displayName:n,value:r||n})),"displayName").sort((n,r)=>n.displayName>r.displayName?1:n.displayName{const r=document.createElement("select"),o=document.createElement("option");let i="0px";return r.append(o),document.body.append(r),o.textContent=n.displayName,i=String(r.getBoundingClientRect().width),r.remove(),{...n,width:i}}).map(({displayName:n,value:r,width:o})=>ee.createElement("option",{key:n,"data-value":r,"data-width":o,value:n},n)));function Jue(){return Gr.create({getActive(t){const{selection:e}=t.state,n=pi({selection:e,types:"codeBlock"});return n?[{codeBlockResult:n}]:Gr.EMPTY},getPosition(t){const{data:e,view:n}=t,{pos:r}=e.codeBlockResult,o=n.nodeDOM(r);if(!o||!Vt(o))return Im;const i=o.getBoundingClientRect(),s=n.dom.getBoundingClientRect(),l=n.dom.scrollLeft+i.left-s.left,a=n.dom.scrollTop+i.top-s.top,u=kw(i,n.dom);return{height:0,rect:i,visible:u,width:0,x:l,y:a}},hasChanged:xw})}var tn=pm(Ug),ok=Xt` /** * Styles extracted from: packages/remirror__theme/src/components-theme.ts */ @@ -772,8 +772,8 @@ Error generating stack: `+i.message+` .remirror-color-picker-cell-selected { } `;tn.div` - ${rk} -`;var ok=Xt` + ${ok} +`;var ik=Xt` /** * Styles extracted from: packages/remirror__theme/src/core-theme.ts */ @@ -839,8 +839,8 @@ Error generating stack: `+i.message+` pointer-events: none; } `;tn.div` - ${ok} -`;var ik=Xt` + ${ik} +`;var sk=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-blockquote-theme.ts */ @@ -855,8 +855,8 @@ Error generating stack: `+i.message+` color: #888; } `;tn.div` - ${ik} -`;var sk=Xt` + ${sk} +`;var ak=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-callout-theme.ts */ @@ -892,8 +892,8 @@ Error generating stack: `+i.message+` background: #f8f8f8; } `;tn.div` - ${sk} -`;var ak=Xt` + ${ak} +`;var lk=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-code-block-theme.ts */ @@ -3690,8 +3690,8 @@ Error generating stack: `+i.message+` bottom: 0.4em; } `;tn.div` - ${ak} -`;var lk=Xt` + ${lk} +`;var ck=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-count-theme.ts */ @@ -3699,8 +3699,8 @@ Error generating stack: `+i.message+` background-color: var(--rmr-hue-red-4); } `;tn.div` - ${lk} -`;var ck=Xt` + ${ck} +`;var uk=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-emoji-theme.ts */ @@ -3758,8 +3758,8 @@ Error generating stack: `+i.message+` padding-right: 5px; } `;tn.div` - ${ck} -`;var uk=Xt` + ${uk} +`;var dk=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-file-theme.ts */ @@ -3811,8 +3811,8 @@ Error generating stack: `+i.message+` color: #000; } `;tn.div` - ${uk} -`;var dk=Xt` + ${dk} +`;var hk=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-gap-cursor-theme.ts */ @@ -3840,8 +3840,8 @@ Error generating stack: `+i.message+` display: block; } `;tn.div` - ${dk} -`;var hk=Xt` + ${hk} +`;var pk=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-image-theme.ts */ @@ -3863,8 +3863,8 @@ Error generating stack: `+i.message+` } } `;tn.div` - ${hk} -`;var pk=Xt` + ${pk} +`;var fk=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-list-theme.ts */ @@ -3959,8 +3959,8 @@ Error generating stack: `+i.message+` border-left-color: var(--rmr-color-primary); } `;tn.div` - ${pk} -`;var fk=Xt` + ${fk} +`;var gk=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-mention-atom-theme.ts */ @@ -4025,16 +4025,16 @@ Error generating stack: `+i.message+` padding-right: 5px; } `;tn.div` - ${fk} -`;var gk=Xt` + ${gk} +`;var mk=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-node-formatting-theme.ts */ .remirror-editor.ProseMirror { } `;tn.div` - ${gk} -`;var mk=Xt` + ${mk} +`;var vk=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-placeholder-theme.ts */ @@ -4047,8 +4047,8 @@ Error generating stack: `+i.message+` content: attr(data-placeholder); } `;tn.div` - ${mk} -`;var vk=Xt` + ${vk} +`;var yk=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-positioner-theme.ts */ @@ -4075,8 +4075,8 @@ Error generating stack: `+i.message+` position: absolute; } `;tn.div` - ${vk} -`;var yk=Xt` + ${yk} +`;var bk=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-tables-theme.ts */ @@ -4443,8 +4443,8 @@ Error generating stack: `+i.message+` background-color: var(--rmr-color-table-predelete-controller) !important; } `;tn.div` - ${yk} -`;var bk=Xt` + ${bk} +`;var wk=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-whitespace-theme.ts */ @@ -4474,8 +4474,8 @@ Error generating stack: `+i.message+` content: '¶'; } `;tn.div` - ${bk} -`;var wk=Xt` + ${wk} +`;var xk=Xt` /** * Styles extracted from: packages/remirror__theme/src/extension-yjs-theme.ts */ @@ -4519,8 +4519,8 @@ Error generating stack: `+i.message+` display: inline-block; } `;tn.div` - ${wk} -`;var xk=Xt` + ${xk} +`;var kk=Xt` /** * Styles extracted from: packages/remirror__theme/src/theme.ts */ @@ -4822,9 +4822,8 @@ Error generating stack: `+i.message+` /* margin-bottom: var(--rmr-space-2); */ } `;tn.div` - ${xk} + ${kk} `;Xt` - ${rk} ${ok} ${ik} ${sk} @@ -4843,8 +4842,8 @@ Error generating stack: `+i.message+` ${bk} ${wk} ${xk} -`;var Zue=tn.div` - ${rk} + ${kk} +`;var Que=tn.div` ${ok} ${ik} ${sk} @@ -4863,21 +4862,26 @@ Error generating stack: `+i.message+` ${bk} ${wk} ${xk} -`,Jue=Object.defineProperty,Que=Object.getOwnPropertyDescriptor,Ji=(t,e,n,r)=>{for(var o=r>1?void 0:r?Que(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Jue(e,n,o),o};function ede(t){const e=[],n=new Map;for(const s of t){const l=n.get(s.from)??[],a=n.get(s.to)??[];n.set(s.from,[...l,{type:"start",annotation:s}]),n.set(s.to,[...a,{type:"end",annotation:s}])}const r=Us([...n.entries()],([s],[l])=>s-l);let o=[],i=0;for(const[s,l]of r){const a=l.filter(c=>c.type==="start").map(c=>c.annotation),u=new Set(l.filter(c=>c.type==="end").map(c=>c.annotation.id));o.length>0&&e.push({from:i,to:s,annotations:o}),i=s,o=[...o,...a].filter(c=>!u.has(c.id))}return e}var tde=class{constructor(t,e){this.getStyle=t,this.store=e,this.annotations=[],this.decorationSet=He.empty}addAnnotation(t){const e={from:t.from,to:t.to,...t.annotationData};this.store.addAnnotation(e)}updateAnnotation(t){this.store.updateAnnotation(t.annotationId,t.annotationData)}removeAnnotations(t){this.store.removeAnnotations(t.annotationIds)}setAnnotations(t){this.store.setAnnotations(t.annotations)}formatAnnotations(){return this.store.formatAnnotations()}createDecorations(t,e=[]){const n=ede(e).map(r=>{const o=r.annotations.map(s=>s.className).filter(s=>s),i=this.getStyle(r.annotations);return vt.inline(r.from,r.to,{class:o.length>0?o.join(" "):void 0,style:i})});return He.create(t.doc,n)}apply({tr:t,action:e}){const n=e==null?void 0:e.type;return!e&&!t.docChanged?this:(n!==void 0?(n===0&&this.addAnnotation(e),n===4&&this.updateAnnotation(e),n===2&&this.removeAnnotations(e),n===3&&this.setAnnotations(e),this.annotations=this.formatAnnotations(),this.decorationSet=this.createDecorations(t,this.annotations)):(this.annotations=this.annotations.map(r=>({...r,from:t.mapping.map(r.from,1),to:t.mapping.map(r.to,-1)})).filter(r=>r.to!==r.from),this.store.setAnnotations(this.annotations),this.decorationSet=this.decorationSet.map(t.mapping,t.doc)),this)}},qN=class{constructor(t=new Map,e=r=>r,n=r=>r){this.map=t,this.positionToStored=e,this.positionFromStored=n}addAnnotation({from:t,to:e,...n}){const r={from:this.positionToStored(t),to:this.positionToStored(e),...n};this.map.set(n.id,r)}updateAnnotation(t,e){const n=this.map.get(t);n&&this.map.set(t,{...n,...e})}removeAnnotations(t){t.forEach(e=>{this.map.delete(e)})}setAnnotations(t){typeof this.map.clear=="function"?this.map.clear():this.map.forEach(e=>this.map.delete(e.id)),t.forEach(e=>{this.addAnnotation(e)})}formatAnnotations(){const t=[];return this.map.forEach(({from:e,to:n,...r})=>{const o=this.positionFromStored(e),i=this.positionFromStored(n);if(!o||!i)return;const s={from:o,to:i,...r};t.push(s)}),t}};function nde(t){const n=200*(1-Math.min(t.length,5)/5)+55;return`background: rgb(${n}, ${n}, 255);`}var In=class extends ft{constructor(){super(...arguments),this.enrichText=t=>{const{doc:e}=this.store.getState(),n=t.to<=e.content.size?e.textBetween(t.from,t.to,this.options.blockSeparator):void 0;return{...t,text:n}}}get name(){return"annotation"}onSetOptions(t){const{pickChanged:e}=t,n=e(["getStore","getMap","transformPosition","transformPositionBeforeRender"]);jd(n)||this.store.updateExtensionPlugins(this)}createPlugin(){let t;this.options.getMap?(wb(yr.isProduction,'Must not provide both "getMap" and "getStore"'),t=new qN(this.options.getMap(),this.options.transformPosition,this.options.transformPositionBeforeRender)):t=this.options.getStore();const e=new tde(this.options.getStyle,t);return{state:{init(){return e},apply(n){const r=n.getMeta(In.name);return e.apply({tr:n,action:r})}},props:{decorations(n){var r;return(r=this.getState(n))==null?void 0:r.decorationSet}}}}addAnnotation(t){return({tr:e,dispatch:n})=>{const{empty:r,from:o,to:i}=e.selection;return r?!1:(n==null||n(e.setMeta(In.name,{type:0,from:o,to:i,annotationData:t})),!0)}}updateAnnotation(t,e){return({tr:n,dispatch:r})=>{if(r){const o={...e,id:t},i={type:4,annotationId:t,annotationData:o};r(n.setMeta(In.name,i))}return!0}}removeAnnotations(t){return({tr:e,dispatch:n})=>(n==null||n(e.setMeta(In.name,{type:2,annotationIds:t})),!0)}setAnnotations(t){return({tr:e,dispatch:n})=>(n==null||n(e.setMeta(In.name,{type:3,annotations:t})),!0)}redrawAnnotations(){return({tr:t,dispatch:e})=>(e==null||e(t.setMeta(In.name,{type:1})),!0)}getAnnotations(){return this.getPluginState().annotations.map(this.enrichText)}getAnnotationsAt(t,e=!0){const n=[],{doc:r,selection:o}=this.store.getState(),i=this.getPluginState(),{from:s,to:l}=cr(t??o,r);for(const a of i.annotations)(ri(s,a.from,a.to)||ri(l,a.from,a.to)||ri(a.from,s,l)||ri(a.to,s,l))&&(e?n.push(this.enrichText(a)):a.from!==s&&a.to!==l&&n.push(this.enrichText(a)));return n}selectionHasAnnotation(t){return this.getAnnotationsAt(t).length>0}};Ji([le()],In.prototype,"addAnnotation",1);Ji([le()],In.prototype,"updateAnnotation",1);Ji([le()],In.prototype,"removeAnnotations",1);Ji([le()],In.prototype,"setAnnotations",1);Ji([le()],In.prototype,"redrawAnnotations",1);Ji([it()],In.prototype,"getAnnotations",1);Ji([it()],In.prototype,"getAnnotationsAt",1);Ji([it()],In.prototype,"selectionHasAnnotation",1);In=Ji([Ne({defaultOptions:{getStyle:nde,blockSeparator:void 0,getStore:()=>new qN,getMap:void 0,transformPosition:void 0,transformPositionBeforeRender:void 0},defaultPriority:ot.Low})],In);var rde=Object.defineProperty,ode=Object.getOwnPropertyDescriptor,ZN=(t,e,n,r)=>{for(var o=r>1?void 0:r?ode(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&rde(e,n,o),o},kk=class extends Dn{get name(){return"blockquote"}createTags(){return[ke.Block,ke.FormattingNode]}createNodeSpec(t,e){return{content:"block+",defining:!0,draggable:!1,...e,attrs:t.defaults(),parseDOM:[{tag:"blockquote",getAttrs:t.parse,priority:100},...e.parseDOM??[]],toDOM:n=>["blockquote",t.dom(n),0]}}toggleBlockquote(){return dM(this.type)}shortcut(t){return this.toggleBlockquote()(t)}createInputRules(){return[gm(/^\s*>\s$/,this.type)]}createPasteRules(){return{type:"node",nodeType:this.type,regexp:/^\s*>\s$/,startOfTextBlock:!0}}};ZN([le({icon:"doubleQuotesL",description:({t})=>t(NS.DESCRIPTION),label:({t})=>t(NS.LABEL)})],kk.prototype,"toggleBlockquote",1);ZN([en({shortcut:"Ctrl->",command:"toggleBlockquote"})],kk.prototype,"shortcut",1);var ide=Object.defineProperty,sde=Object.getOwnPropertyDescriptor,pp=(t,e,n,r)=>{for(var o=r>1?void 0:r?sde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&ide(e,n,o),o},ade={icon:"bold",label:({t})=>t($S.LABEL),description:({t})=>t($S.DESCRIPTION)},pl=class extends na{get name(){return"bold"}createTags(){return[ke.FormattingMark,ke.FontStyle]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"strong",getAttrs:t.parse},{tag:"b",getAttrs:n=>Vt(n)&&n.style.fontWeight!=="normal"?t.parse(n):!1},{style:"font-weight",getAttrs:n=>Ee(n)&&/^(bold(er)?|[5-9]\d{2,})$/.test(n)?null:!1},...e.parseDOM??[]],toDOM:n=>{const{weight:r}=this.options;return r?["strong",{"font-weight":r.toString()},0]:["strong",t.dom(n),0]}}}createInputRules(){return[Jd({regexp:/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,type:this.type,ignoreWhitespace:!0})]}toggleBold(t){return js({type:this.type,selection:t})}setBold(t){return({tr:e,dispatch:n})=>{const{from:r,to:o}=cr(t??e.selection,e.doc);return n==null||n(e.addMark(r,o,this.type.create())),!0}}removeBold(t){return({tr:e,dispatch:n})=>{const{from:r,to:o}=cr(t??e.selection,e.doc);return e.doc.rangeHasMark(r,o,this.type)?(n==null||n(e.removeMark(r,o,this.type)),!0):!1}}shortcut(t){return this.toggleBold()(t)}};pp([le(ade)],pl.prototype,"toggleBold",1);pp([le()],pl.prototype,"setBold",1);pp([le()],pl.prototype,"removeBold",1);pp([en({shortcut:oe.Bold,command:"toggleBold"})],pl.prototype,"shortcut",1);pl=pp([Ne({defaultOptions:{weight:void 0},staticKeys:["weight"]})],pl);var lde=Object.defineProperty,cde=Object.getOwnPropertyDescriptor,Ek=(t,e,n,r)=>{for(var o=r>1?void 0:r?cde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&lde(e,n,o),o},{DESCRIPTION:ude,LABEL:dde}=I5,hde={icon:"codeLine",description:({t})=>t(ude),label:({t})=>t(dde)},Oh=class extends na{get name(){return"code"}createTags(){return[ke.Code,ke.ExcludeInputRules]}createMarkSpec(t,e){return{excludes:"_",...e,attrs:t.defaults(),parseDOM:[{tag:"code",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["code",{spellcheck:"false",...t.dom(n)},0]}}createKeymap(){return{"Mod-`":js({type:this.type})}}keyboardShortcut(t){return this.toggleCode()(t)}toggleCode(){return js({type:this.type})}createInputRules(){return[Jd({regexp:new RegExp(`(?:\`)([^\`${yb}]+)(?:\`)$`),type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{type:"mark",regexp:/`([^`]+)`/g,markType:this.type}]}};Ek([en({shortcut:oe.Code,command:"toggleCode"})],Oh.prototype,"keyboardShortcut",1);Ek([le(hde)],Oh.prototype,"toggleCode",1);Oh=Ek([Ne({})],Oh);var JN=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Je=(t,e,n)=>(JN(t,e,"read from private field"),n?n.call(t):e.get(t)),nc=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},ps=(t,e,n,r)=>(JN(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),pde='',fde='',gde=encodeURIComponent(pde),mde=encodeURIComponent(fde),gr,vde=class{constructor(t){nc(this,gr,void 0);const e=document.createElement("div"),n=document.createElement("div");this.dom=e,ps(this,gr,n),this.type=t,this.createHandle(t)}createHandle(t){switch(Un(this.dom,{position:"absolute",pointerEvents:"auto",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"100"}),Un(Je(this,gr),{opacity:"0",transition:"opacity 300ms ease-in 0s"}),Je(this,gr).dataset.dragging="",t){case 0:Un(this.dom,{right:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),Un(Je(this,gr),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 1:Un(this.dom,{left:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),Un(Je(this,gr),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 2:Un(this.dom,{bottom:"0px",width:"100%",height:"14px",cursor:"row-resize"}),Un(Je(this,gr),{width:" 42px",height:"4px",boxSizing:"content-box",maxWidth:"50%",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 3:Un(this.dom,{right:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nwse-resize",zIndex:"101"}),Un(Je(this,gr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${mde}") `});break;case 4:Un(this.dom,{left:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nesw-resize",zIndex:"101"}),Un(Je(this,gr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${gde}") `});break}this.dom.append(Je(this,gr))}setHandleVisibility(t){const e=t||!!Je(this,gr).dataset.dragging;Je(this,gr).style.opacity=e?"1":"0"}dataSetDragging(t){Je(this,gr).dataset.dragging=t?"true":""}};gr=new WeakMap;var lf=50,QN=(t=>(t[t.Fixed=0]="Fixed",t[t.Flexible=1]="Flexible",t))(QN||{}),Aa,_a,Ra,Ti,Ma,yde=class{constructor({node:t,view:e,getPos:n,aspectRatio:r=0,options:o,initialSize:i}){nc(this,Aa,void 0),nc(this,_a,void 0),nc(this,Ra,[]),nc(this,Ti,void 0),nc(this,Ma,void 0);const s=this.createWrapper(t,i),l=this.createElement({node:t,view:e,getPos:n,options:o}),u=(r===1?[0,1,2,3,4]:[0,1]).map(h=>new vde(h));for(const h of u){const p=f=>{this.startResizing(f,e,n,h)};h.dom.addEventListener("mousedown",p),Je(this,Ra).push(()=>h.dom.removeEventListener("mousedown",p)),s.append(h.dom)}const c=()=>{u.forEach(h=>h.setHandleVisibility(!0))},d=()=>{u.forEach(h=>h.setHandleVisibility(!1))};s.addEventListener("mouseover",c),s.addEventListener("mouseout",d),Je(this,Ra).push(()=>s.removeEventListener("mouseover",c),()=>s.removeEventListener("mouseout",d)),s.append(l),this.dom=s,ps(this,_a,t),ps(this,Aa,l),this.aspectRatio=r}createWrapper(t,e){const n=document.createElement("div");return n.classList.add("remirror-resizable-view"),n.style.position="relative",e?Un(n,{width:T_(e.width),aspectRatio:`${e.width} / ${e.height}`}):Un(n,{width:T_(t.attrs.width),aspectRatio:`${t.attrs.width} / ${t.attrs.height}`}),Un(n,{maxWidth:"100%",minWidth:`${lf}px`,verticalAlign:"bottom",display:"inline-block",lineHeight:"0",transition:"width 0.15s ease-out, height 0.15s ease-out"}),n}startResizing(t,e,n,r){var o,i;t.preventDefault(),r.dataSetDragging(!0),Je(this,Aa).style.pointerEvents="none";const s=t.pageX,l=t.pageY,a=((o=Je(this,Aa))==null?void 0:o.getBoundingClientRect().width)||0,u=((i=Je(this,Aa))==null?void 0:i.getBoundingClientRect().height)||0,c=b0(100,!1,h=>{const p=h.pageX,f=h.pageY,g=p-s,m=f-l;let v=null,y=null;if(this.aspectRatio===0&&a&&u)switch(r.type){case 0:case 3:v=a+g,y=u/a*v;break;case 1:case 4:v=a-g,y=u/a*v;break;case 2:y=u+m,v=a/u*y;break}else if(this.aspectRatio===1)switch(r.type){case 0:v=a+g;break;case 1:v=a-g;break;case 2:y=u+m;break;case 3:v=a+g,y=u+m;break;case 4:v=a-g,y=u+m;break}typeof v=="number"&&v{h.preventDefault(),r.dataSetDragging(!1),r.setHandleVisibility(!1),Je(this,Aa).style.pointerEvents="auto",document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",d);const p=n(),f=e.state.tr.setNodeMarkup(p,void 0,{...Je(this,_a).attrs,width:Je(this,Ti),height:Je(this,Ma)});e.dispatch(f)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",d),Je(this,Ra).push(()=>document.removeEventListener("mousemove",c)),Je(this,Ra).push(()=>document.removeEventListener("mouseup",d))}update(t){return t.type!==Je(this,_a).type||this.aspectRatio===0&&t.attrs.width&&t.attrs.width!==Je(this,Ti)||this.aspectRatio===1&&t.attrs.width&&t.attrs.height&&t.attrs.width!==Je(this,Ti)&&t.attrs.height!==Je(this,Ma)||!bde(Je(this,_a),t,["width","height"])?!1:(ps(this,_a,t),ps(this,Ti,t.attrs.width),ps(this,Ma,t.attrs.height),!0)}destroy(){Je(this,Ra).forEach(t=>t())}};Aa=new WeakMap;_a=new WeakMap;Ra=new WeakMap;Ti=new WeakMap;Ma=new WeakMap;function bde(t,e,n){return t===e||wde(t,e,n)&&t.content.eq(e.content)}function wde(t,e,n){const r=t.attrs,o=e.attrs,i={};for(const l of n)i[l]=null;t.attrs={...r,...i},e.attrs={...o,...i};const s=t.sameMarkup(e);return t.attrs=r,e.attrs=o,s}function T_(t){return typeof t=="number"?`${t}px`:t||void 0}var xde=Object.defineProperty,kde=Object.getOwnPropertyDescriptor,e$=(t,e,n,r)=>{for(var o=r>1?void 0:r?kde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&xde(e,n,o),o},Zg=class extends Dn{get name(){return"hardBreak"}createTags(){return[ke.InlineNode]}createNodeSpec(t,e){return{inline:!0,selectable:!1,atom:!0,leafText:()=>` -`,...e,attrs:t.defaults(),parseDOM:[{tag:"br",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["br",t.dom(n)]}}createKeymap(){const t=lF(Ad(wM),()=>(this.store.commands.insertHardBreak(),!0));return{"Mod-Enter":t,"Shift-Enter":t}}insertHardBreak(){return t=>{const{tr:e,dispatch:n}=t;return n==null||n(e.replaceSelectionWith(this.type.create()).scrollIntoView()),!0}}};e$([le()],Zg.prototype,"insertHardBreak",1);Zg=e$([Ne({defaultPriority:ot.Low})],Zg);var Ede=Object.defineProperty,Sde=Object.getOwnPropertyDescriptor,t$=(t,e,n,r)=>{for(var o=r>1?void 0:r?Sde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Ede(e,n,o),o},{LABEL:Cde}=N5,Tde={icon:({attrs:t})=>`h${(t==null?void 0:t.level)??"1"}`,label:({t,attrs:e})=>t({...Cde,values:{level:e==null?void 0:e.level}})},Ade=[oe.H1,oe.H2,oe.H3,oe.H4,oe.H5,oe.H6],Jg=class extends Dn{get name(){return"heading"}createTags(){return[ke.Block,ke.TextBlock,ke.FormattingNode]}createNodeSpec(t,e){return{content:"inline*",defining:!0,draggable:!1,...e,attrs:{...t.defaults(),level:{default:this.options.defaultLevel}},parseDOM:[...this.options.levels.map(n=>({tag:`h${n}`,getAttrs:r=>({...t.parse(r),level:n})})),...e.parseDOM??[]],toDOM:n=>this.options.levels.includes(n.attrs.level)?[`h${n.attrs.level}`,t.dom(n),0]:[`h${this.options.defaultLevel}`,t.dom(n),0]}}toggleHeading(t={}){return Vb({type:this.type,toggleType:"paragraph",attrs:t})}createKeymap(t){const e=this.store.getExtension(Ue),n=ye(),r=[];for(const o of this.options.levels){const i=Ade[o-1]??oe.H1;n[i]=Zd(this.type,{level:o}),r.push({attrs:{level:o},shortcut:t(i)[0]})}return e.updateDecorated("toggleHeading",{shortcut:r}),n}createInputRules(){return this.options.levels.map(t=>o3(new RegExp(`^(#{1,${t}})\\s$`),this.type,()=>({level:t})))}createPasteRules(){return this.options.levels.map(t=>({type:"node",nodeType:this.type,regexp:new RegExp(`^#{${t}}\\s([\\s\\w]+)$`),getAttributes:()=>({level:t}),startOfTextBlock:!0}))}};t$([le(Tde)],Jg.prototype,"toggleHeading",1);Jg=t$([Ne({defaultOptions:{levels:[1,2,3,4,5,6],defaultLevel:1},staticKeys:["defaultLevel","levels"]})],Jg);var _de=Object.defineProperty,Rde=Object.getOwnPropertyDescriptor,n$=(t,e,n,r)=>{for(var o=r>1?void 0:r?Rde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&_de(e,n,o),o},Mde={icon:"separator",label:({t})=>t(DS.LABEL),description:({t})=>t(DS.DESCRIPTION)},Qg=class extends Dn{get name(){return"horizontalRule"}createTags(){return[ke.Block]}createNodeSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"hr",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["hr",t.dom(n)]}}insertHorizontalRule(){return t=>{const{tr:e,dispatch:n}=t,r=e.selection.$anchor,o=r.parent;return o.type.name==="doc"||o.isAtom||o.isLeaf?!1:(n&&(e.selection.empty&&xm(o)&&e.insert(r.pos+1,o),e.replaceSelectionWith(this.type.create()),this.updateFromNodeSelection(e),n(e.scrollIntoView())),!0)}}createInputRules(){return[fM({regexp:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type,beforeDispatch:({tr:t})=>{this.updateFromNodeSelection(t)}})]}updateFromNodeSelection(t){if(!qh(t.selection)||t.selection.node.type.name!==this.name)return;const e=t.selection.$from.pos+1,{insertionNode:n}=this.options;if(!n)return;const r=this.store.schema.nodes[n];we(r,{code:re.EXTENSION,message:`'${n}' node provided as the insertionNode to the '${this.constructorName}' does not exist.`});const o=r.create();t.insert(e,o),t.setSelection(Me.near(t.doc.resolve(e+1)))}};n$([le(Mde)],Qg.prototype,"insertHorizontalRule",1);Qg=n$([Ne({defaultOptions:{insertionNode:"paragraph"}})],Qg);var Ode=Object.defineProperty,Ide=Object.getOwnPropertyDescriptor,Sk=(t,e,n,r)=>{for(var o=r>1?void 0:r?Ide(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Ode(e,n,o),o},Lde=class extends yde{constructor(t,e,n){super({node:t,view:e,getPos:n,aspectRatio:QN.Fixed})}createElement({node:t}){const e=document.createElement("img");return e.setAttribute("src",t.attrs.src),Un(e,{width:"100%",minWidth:"50px",objectFit:"contain"}),e}},Ih=class extends Dn{get name(){return"image"}createTags(){return[ke.InlineNode,ke.Media]}createNodeSpec(t,e){const{preferPastedTextContent:n}=this.options;return{inline:!0,draggable:!0,selectable:!1,...e,attrs:{...t.defaults(),alt:{default:""},crop:{default:null},height:{default:null},width:{default:null},rotate:{default:null},src:{default:null},title:{default:""},fileName:{default:null},resizable:{default:!1}},parseDOM:[{tag:"img[src]",getAttrs:r=>{var o;if(Vt(r)){const i=$de({element:r,parse:t.parse});return n&&((o=i.src)!=null&&o.startsWith("file:///"))?!1:i}return{}}},...e.parseDOM??[]],toDOM:r=>{const o=Em(r.attrs,t);return["img",{...t.dom(r),...o}]}}}insertImage(t,e){return({tr:n,dispatch:r})=>{const{from:o,to:i}=cr(e??n.selection,n.doc),s=this.type.create(t);return r==null||r(n.replaceRangeWith(o,i,s)),!0}}uploadImage(t,e){const{updatePlaceholder:n,destroyPlaceholder:r,createPlaceholder:o}=this.options;return i=>{const{tr:s}=i;let l=s.selection.from;return this.store.createPlaceholderCommand({promise:t,placeholder:{type:"widget",get pos(){return l},createElement:(a,u)=>{const c=o(a,u);return e==null||e(c),c},onUpdate:(a,u,c,d)=>{n(a,u,c,d)},onDestroy:(a,u)=>{r(a,u)}},onSuccess:(a,u,c)=>this.insertImage(a,u)(c)}).validate(({tr:a,dispatch:u})=>{const c=o2(a.doc,l,this.type);return c==null?!1:(l=c,a.selection.empty||u==null||u(a.deleteSelection()),!0)},"unshift").generateCommand()(i)}}fileUploadFileHandler(t,e,n){var r;const{preferPastedTextContent:o,uploadHandler:i}=this.options;if(o&&zde(e)&&((r=e.clipboardData)!=null&&r.getData("text/plain")))return!1;const{commands:s,chain:l}=this.store,a=t.map((c,d)=>({file:c,progress:h=>{s.updatePlaceholder(u[d],h)}})),u=i(a);qr(n)&&l.selectText(n);for(const c of u)l.uploadImage(c);return l.run(),!0}createPasteRules(){return[{type:"file",regexp:/image/i,fileHandler:t=>{const e=t.type==="drop"?t.pos:void 0;return this.fileUploadFileHandler(t.files,t.event,e)}}]}createNodeViews(){return this.options.enableResizing?(t,e,n)=>new Lde(t,e,n):{}}};Sk([le()],Ih.prototype,"insertImage",1);Sk([le()],Ih.prototype,"uploadImage",1);Ih=Sk([Ne({defaultOptions:{createPlaceholder:Dde,updatePlaceholder:()=>{},destroyPlaceholder:()=>{},uploadHandler:Pde,enableResizing:!1,preferPastedTextContent:!0}})],Ih);function Nde(t){let{width:e,height:n}=t.style;return e=e||t.getAttribute("width")||"",n=n||t.getAttribute("height")||"",{width:e,height:n}}function $de({element:t,parse:e}){const{width:n,height:r}=Nde(t);return{...e(t),alt:t.getAttribute("alt")??"",height:Number.parseInt(r||"0",10)||null,src:t.getAttribute("src")??null,title:t.getAttribute("title")??"",width:Number.parseInt(n||"0",10)||null,fileName:t.getAttribute("data-file-name")??null}}function Dde(t,e){const n=document.createElement("div");return n.classList.add(gV.IMAGE_LOADER),n}function Pde(t){we(t.length>0,{code:re.EXTENSION,message:"The upload handler was applied for the image extension without any valid files"});let e=0;const n=[];for(const{file:r,progress:o}of t)n.push(()=>new Promise(i=>{const s=new FileReader;s.addEventListener("load",l=>{var a;e+=1,o(e/t.length),i({src:(a=l.target)==null?void 0:a.result,fileName:r.name})},{once:!0}),s.readAsDataURL(r)}));return n}function zde(t){return t.clipboardData!==void 0}var Fde=Object.defineProperty,Bde=Object.getOwnPropertyDescriptor,Ck=(t,e,n,r)=>{for(var o=r>1?void 0:r?Bde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Fde(e,n,o),o},Hde={icon:"italic",label:({t})=>t(PS.LABEL),description:({t})=>t(PS.DESCRIPTION)},Lh=class extends na{get name(){return"italic"}createTags(){return[ke.FontStyle,ke.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"i",getAttrs:t.parse},{tag:"em",getAttrs:t.parse},{style:"font-style=italic"},...e.parseDOM??[]],toDOM:n=>["em",t.dom(n),0]}}createKeymap(){return{"Mod-i":js({type:this.type})}}createInputRules(){return[Jd({regexp:/(?:^|[^*])\*([^*]+)\*$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:t,start:e})=>t.startsWith("*")?{}:{fullMatch:t.slice(1),start:e+1}}),Jd({regexp:/(?:^|\W)_([^_]+)_$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:t,start:e})=>t.startsWith("_")?{}:{fullMatch:t.slice(1),start:e+1}})]}createPasteRules(){return[{type:"mark",markType:this.type,regexp:/(?:^|\W)_([^_]+)_/g},{type:"mark",markType:this.type,regexp:/\*([^*]+)\*/g}]}toggleItalic(t){return js({type:this.type,selection:t})}shortcut(t){return this.toggleItalic()(t)}};Ck([le(Hde)],Lh.prototype,"toggleItalic",1);Ck([en({shortcut:oe.Italic,command:"toggleItalic"})],Lh.prototype,"shortcut",1);Lh=Ck([Ne({})],Lh);var r$={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(typeof self<"u"?self:ct,function(){return function(n){function r(i){if(o[i])return o[i].exports;var s=o[i]={i,l:!1,exports:{}};return n[i].call(s.exports,s,s.exports,r),s.l=!0,s.exports}var o={};return r.m=n,r.c=o,r.d=function(i,s,l){r.o(i,s)||Object.defineProperty(i,s,{configurable:!1,enumerable:!0,get:l})},r.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(s,"a",s),s},r.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},r.p="",r(r.s=0)}([function(n,r,o){function i(){throw new TypeError("The given URL is not a string. Please verify your string|array.")}function s(u){typeof u!="string"&&i();for(var c=0,d=0,h=0,p=u.length,f=0;p--&&++f&&!(c&&-1h?"":u.slice(h,c)}var l=["/",":","?","#"],a=[".","/","@"];n.exports=function(u){if(typeof u=="string")return s(u);if(Array.isArray(u)){var c=[],d,h=0;for(d=u.length;h{for(var o=r>1?void 0:r?jde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Vde(e,n,o),o},Gde=["com","de","net","org","uk","cn","ga","nl","cf","ml","tk","ru","br","gq","xyz","fr","eu","info","co","au","ca","it","in","ch","pl","es","online","us","top","be","jp","biz","se","at","dk","cz","za","me","ir","icu","shop","kr","site","mx","hu","io","cc","club","no","cyou"],A_="updateLink",Kde=/(?:(?:(?:https?|ftp):)?\/\/)?(?:\S+(?::\S*)?@)?(?:(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)*(?:(?:\d(?!\.)|[a-z\u00A1-\uFFFF])(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)+[a-z\u00A1-\uFFFF]{2,}(?::\d{2,5})?(?:[#/?]\S*)?/gi,fl=class extends na{constructor(){super(...arguments),this._autoLinkRegexNonGlobal=void 0}get name(){return"link"}createTags(){return[ke.Link,ke.ExcludeInputRules]}createMarkSpec(t,e){const n="data-link-auto",r=o=>{const{defaultTarget:i,supportedTargets:s}=this.options,l=i?[...s,i]:s;return o&&ir(l,o)?{target:o}:void 0};return{inclusive:!1,excludes:"_",...e,attrs:{...t.defaults(),href:{},target:{default:this.options.defaultTarget},auto:{default:!1}},parseDOM:[{tag:"a[href]",getAttrs:o=>{if(!Vt(o))return!1;const i=o.getAttribute("href"),s=o.textContent,l=this.options.autoLink&&(o.hasAttribute(n)||i===s||(i==null?void 0:i.replace(`${this.options.defaultProtocol}//`,""))===s);return{...t.parse(o),href:i,auto:l,...r(o.getAttribute("target"))}}},...e.parseDOM??[]],toDOM:o=>{const{auto:i,target:s,...l}=Em(o.attrs,t),a=o.attrs.auto?{[n]:""}:{};return["a",{...t.dom(o),...l,rel:"noopener noreferrer nofollow",...a,...r(o.attrs.target)},0]}}}onCreate(){const{autoLinkRegex:t}=this.options;this._autoLinkRegexNonGlobal=new RegExp(`^${t.source}$`,t.flags.replace("g",""))}shortcut({tr:t}){let e="",{from:n,to:r,empty:o,$from:i}=t.selection,s=!1;const l=Hi(i,this.type);if(o){const a=l??sM(t);if(!a)return!1;({text:e,from:n,to:r}=a),s=!0}return n===r?!1:(s||(e=t.doc.textBetween(n,r)),this.options.onActivateLink(e),this.options.onShortcut({activeLink:l?{attrs:l.mark.attrs,from:l.from,to:l.to}:void 0,selectedText:e,from:n,to:r}),!0)}updateLink(t,e){return n=>{const{tr:r}=n;return!(ta(r.selection)&&!Bb(r.selection)||SF(r.selection)||lg({trState:r,type:this.type}))&&!e?!1:(r.setMeta(this.name,{command:A_,attrs:t,range:e}),jF({type:this.type,attrs:t,range:e})(n))}}selectLink(){return this.store.commands.selectMark.original(this.type)}removeLink(t){return e=>{const{tr:n}=e;return lg({trState:n,type:this.type,...t})?pM({type:this.type,expand:!0,range:t})(e):!1}}createPasteRules(){return[{type:"mark",regexp:this.options.autoLinkRegex,markType:this.type,getAttributes:(t,e)=>({href:this.buildHref(wc(t)),auto:!e}),transformMatch:t=>{const e=wc(t);return!e||!this.isValidUrl(e)?!1:e}}]}createEventHandlers(){return{clickMark:(t,e)=>{const n=e.getMark(this.type);if(!n)return;const r=n.mark.attrs,o={...r,...n};if(this.options.onClick(t,o))return!0;if(!this.store.view.editable)return;let i=!1;if(this.options.openLinkOnClick){i=!0;const s=r.href;window.open(s,"_blank")}return this.options.selectTextOnClick&&(i=!0,this.store.commands.selectText(n)),i}}}createPlugin(){return{appendTransaction:(t,e,n)=>{if(t.filter(p=>!!p.getMeta(this.name)).forEach(p=>{const f=p.getMeta(this.name);if(f.command===A_){const{range:g,attrs:m}=f,{selection:v,doc:y}=n,b={range:g,selection:v,doc:y,attrs:m},{from:w,to:k}=g??v;this.options.onUpdateLink(y.textBetween(w,k),b)}}),!this.options.autoLink||J0(e)-J0(n)===1||!t.some(p=>p.docChanged))return;const s=cF(t,e),l=iM(s,[Yt,vn]),{mapping:a}=s,{tr:u,doc:c}=n,{updateLink:d,removeLink:h}=this.store.chain(u);if(l.forEach(({prevFrom:p,prevTo:f,from:g,to:m})=>{const v=[],y=m-g===2,b=this.getLinkMarksInRange(e.doc,p,f,!0).filter(w=>w.mark.type===this.type).map(({from:w,to:k,text:x})=>({mappedFrom:a.map(w),mappedTo:a.map(k),text:x,from:w,to:k}));b.forEach(({mappedFrom:w,mappedTo:k,from:x,to:S},A)=>this.getLinkMarksInRange(c,w,k,!0).filter(C=>C.mark.type===this.type).forEach(C=>{const O=e.doc.textBetween(x,S,void 0," "),R=c.textBetween(C.from,C.to+1,void 0," ").trim(),_=this.isValidUrl(O);this.isValidUrl(R)||(_&&(h({from:C.from,to:C.to}).tr(),b.splice(A,1)),!y&&g===m&&this.findAutoLinks(R).map(E=>this.addLinkProperties({...E,from:w+E.start,to:w+E.end})).forEach(({attrs:E,range:M,text:I})=>{d(E,M).tr(),v.push({attrs:E,range:M,text:I})}))})),this.findTextBlocksInRange(c,{from:g,to:m}).forEach(({text:w,positionStart:k})=>{this.findAutoLinks(w).map(x=>this.addLinkProperties({...x,from:k+x.start+1,to:k+x.end+1})).filter(({range:x})=>{const S=g>=x.from&&g<=x.to,A=m>=x.from&&m<=x.to;return S||A||y}).filter(({range:x})=>this.getLinkMarksInRange(u.doc,x.from,x.to,!1).length===0).filter(({range:{from:x},text:S})=>!b.some(({text:A,mappedFrom:C})=>C===x&&A===S)).forEach(({attrs:x,text:S,range:A})=>{d(x,A).tr(),v.push({attrs:x,range:A,text:S})})}),window.requestAnimationFrame(()=>{v.forEach(({attrs:w,range:k,text:x})=>{const{doc:S,selection:A}=u;this.options.onUpdateLink(x,{attrs:w,doc:S,range:k,selection:A})})})}),u.steps.length!==0)return u}}}buildHref(t){return this.options.extractHref({url:t,defaultProtocol:this.options.defaultProtocol})}getLinkMarksInRange(t,e,n,r){const o=[];if(e===n){const i=Math.max(e-1,0),s=t.resolve(i),l=Hi(s,this.type);(l==null?void 0:l.mark.attrs.auto)===r&&o.push(l)}else t.nodesBetween(e,n,(i,s)=>{const a=(i.marks??[]).find(({type:u,attrs:c})=>u===this.type&&c.auto===r);a&&o.push({from:s,to:s+i.nodeSize,mark:a,text:i.textContent})});return o}findTextBlocksInRange(t,e){const n=[];return t.nodesBetween(e.from,e.to,(r,o)=>{!r.isTextblock||!r.type.allowsMarkType(this.type)||n.push({node:r,pos:o})}),n.map(r=>({text:t.textBetween(r.pos,r.pos+r.node.nodeSize,void 0," "),positionStart:r.pos}))}addLinkProperties({from:t,to:e,href:n,...r}){return{...r,range:{from:t,to:e},attrs:{href:n,auto:!0}}}findAutoLinks(t){if(this.options.findAutoLinks)return this.options.findAutoLinks(t,this.options.defaultProtocol);const e=[];for(const n of lu(t,this.options.autoLinkRegex)){const r=wc(n);if(!r)continue;const o=this.buildHref(r);!this.isValidTLD(o)&&!o.startsWith("tel:")||e.push({text:r,href:o,start:n.index,end:n.index+r.length})}return e}isValidUrl(t){var e;return this.options.isValidUrl?this.options.isValidUrl(t,this.options.defaultProtocol):this.isValidTLD(this.buildHref(t))&&!!((e=this._autoLinkRegexNonGlobal)!=null&&e.test(t))}isValidTLD(t){const{autoLinkAllowedTLDs:e}=this.options;if(e.length===0)return!0;const n=Wde(t);if(n==="")return!0;const r=H4(n.split("."));return e.includes(r)}};fp([en({shortcut:oe.InsertLink})],fl.prototype,"shortcut",1);fp([le()],fl.prototype,"updateLink",1);fp([le()],fl.prototype,"selectLink",1);fp([le()],fl.prototype,"removeLink",1);fl=fp([Ne({defaultOptions:{autoLink:!1,defaultProtocol:"",selectTextOnClick:!1,openLinkOnClick:!1,autoLinkRegex:Kde,autoLinkAllowedTLDs:Gde,findAutoLinks:void 0,isValidUrl:void 0,defaultTarget:null,supportedTargets:[],extractHref:Yde},staticKeys:["autoLinkRegex"],handlerKeyOptions:{onClick:{earlyReturnValue:!0}},handlerKeys:["onActivateLink","onShortcut","onUpdateLink","onClick"],defaultPriority:ot.Medium})],fl);function Yde({url:t,defaultProtocol:e}){const n=/^((?:https?|ftp)?:)\/\//.test(t);return!n&&t.includes("@")?`mailto:${t}`:n?t:`${e}//${t}`}function Xde(t){for(var e=1;e0&&t[e-1]===` -`;)e--;return t.substring(0,e)}var Jde=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function Tk(t){return Ak(t,Jde)}var o$=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function i$(t){return Ak(t,o$)}function Qde(t){return a$(t,o$)}var s$=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function ehe(t){return Ak(t,s$)}function the(t){return a$(t,s$)}function Ak(t,e){return e.indexOf(t.nodeName)>=0}function a$(t,e){return t.getElementsByTagName&&e.some(function(n){return t.getElementsByTagName(n).length})}var Yn={};Yn.paragraph={filter:"p",replacement:function(t){return` + ${kk} +`,ZN={exports:{}};/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var i="",s=0;s{for(var o=r>1?void 0:r?rde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&nde(e,n,o),o};function ode(t){const e=[],n=new Map;for(const s of t){const l=n.get(s.from)??[],a=n.get(s.to)??[];n.set(s.from,[...l,{type:"start",annotation:s}]),n.set(s.to,[...a,{type:"end",annotation:s}])}const r=Us([...n.entries()],([s],[l])=>s-l);let o=[],i=0;for(const[s,l]of r){const a=l.filter(c=>c.type==="start").map(c=>c.annotation),u=new Set(l.filter(c=>c.type==="end").map(c=>c.annotation.id));o.length>0&&e.push({from:i,to:s,annotations:o}),i=s,o=[...o,...a].filter(c=>!u.has(c.id))}return e}var ide=class{constructor(t,e){this.getStyle=t,this.store=e,this.annotations=[],this.decorationSet=He.empty}addAnnotation(t){const e={from:t.from,to:t.to,...t.annotationData};this.store.addAnnotation(e)}updateAnnotation(t){this.store.updateAnnotation(t.annotationId,t.annotationData)}removeAnnotations(t){this.store.removeAnnotations(t.annotationIds)}setAnnotations(t){this.store.setAnnotations(t.annotations)}formatAnnotations(){return this.store.formatAnnotations()}createDecorations(t,e=[]){const n=ode(e).map(r=>{const o=r.annotations.map(s=>s.className).filter(s=>s),i=this.getStyle(r.annotations);return vt.inline(r.from,r.to,{class:o.length>0?o.join(" "):void 0,style:i})});return He.create(t.doc,n)}apply({tr:t,action:e}){const n=e==null?void 0:e.type;return!e&&!t.docChanged?this:(n!==void 0?(n===0&&this.addAnnotation(e),n===4&&this.updateAnnotation(e),n===2&&this.removeAnnotations(e),n===3&&this.setAnnotations(e),this.annotations=this.formatAnnotations(),this.decorationSet=this.createDecorations(t,this.annotations)):(this.annotations=this.annotations.map(r=>({...r,from:t.mapping.map(r.from,1),to:t.mapping.map(r.to,-1)})).filter(r=>r.to!==r.from),this.store.setAnnotations(this.annotations),this.decorationSet=this.decorationSet.map(t.mapping,t.doc)),this)}},JN=class{constructor(t=new Map,e=r=>r,n=r=>r){this.map=t,this.positionToStored=e,this.positionFromStored=n}addAnnotation({from:t,to:e,...n}){const r={from:this.positionToStored(t),to:this.positionToStored(e),...n};this.map.set(n.id,r)}updateAnnotation(t,e){const n=this.map.get(t);n&&this.map.set(t,{...n,...e})}removeAnnotations(t){t.forEach(e=>{this.map.delete(e)})}setAnnotations(t){typeof this.map.clear=="function"?this.map.clear():this.map.forEach(e=>this.map.delete(e.id)),t.forEach(e=>{this.addAnnotation(e)})}formatAnnotations(){const t=[];return this.map.forEach(({from:e,to:n,...r})=>{const o=this.positionFromStored(e),i=this.positionFromStored(n);if(!o||!i)return;const s={from:o,to:i,...r};t.push(s)}),t}};function sde(t){const n=200*(1-Math.min(t.length,5)/5)+55;return`background: rgb(${n}, ${n}, 255);`}var In=class extends ft{constructor(){super(...arguments),this.enrichText=t=>{const{doc:e}=this.store.getState(),n=t.to<=e.content.size?e.textBetween(t.from,t.to,this.options.blockSeparator):void 0;return{...t,text:n}}}get name(){return"annotation"}onSetOptions(t){const{pickChanged:e}=t,n=e(["getStore","getMap","transformPosition","transformPositionBeforeRender"]);jd(n)||this.store.updateExtensionPlugins(this)}createPlugin(){let t;this.options.getMap?(kb(yr.isProduction,'Must not provide both "getMap" and "getStore"'),t=new JN(this.options.getMap(),this.options.transformPosition,this.options.transformPositionBeforeRender)):t=this.options.getStore();const e=new ide(this.options.getStyle,t);return{state:{init(){return e},apply(n){const r=n.getMeta(In.name);return e.apply({tr:n,action:r})}},props:{decorations(n){var r;return(r=this.getState(n))==null?void 0:r.decorationSet}}}}addAnnotation(t){return({tr:e,dispatch:n})=>{const{empty:r,from:o,to:i}=e.selection;return r?!1:(n==null||n(e.setMeta(In.name,{type:0,from:o,to:i,annotationData:t})),!0)}}updateAnnotation(t,e){return({tr:n,dispatch:r})=>{if(r){const o={...e,id:t},i={type:4,annotationId:t,annotationData:o};r(n.setMeta(In.name,i))}return!0}}removeAnnotations(t){return({tr:e,dispatch:n})=>(n==null||n(e.setMeta(In.name,{type:2,annotationIds:t})),!0)}setAnnotations(t){return({tr:e,dispatch:n})=>(n==null||n(e.setMeta(In.name,{type:3,annotations:t})),!0)}redrawAnnotations(){return({tr:t,dispatch:e})=>(e==null||e(t.setMeta(In.name,{type:1})),!0)}getAnnotations(){return this.getPluginState().annotations.map(this.enrichText)}getAnnotationsAt(t,e=!0){const n=[],{doc:r,selection:o}=this.store.getState(),i=this.getPluginState(),{from:s,to:l}=cr(t??o,r);for(const a of i.annotations)(ri(s,a.from,a.to)||ri(l,a.from,a.to)||ri(a.from,s,l)||ri(a.to,s,l))&&(e?n.push(this.enrichText(a)):a.from!==s&&a.to!==l&&n.push(this.enrichText(a)));return n}selectionHasAnnotation(t){return this.getAnnotationsAt(t).length>0}};Ji([le()],In.prototype,"addAnnotation",1);Ji([le()],In.prototype,"updateAnnotation",1);Ji([le()],In.prototype,"removeAnnotations",1);Ji([le()],In.prototype,"setAnnotations",1);Ji([le()],In.prototype,"redrawAnnotations",1);Ji([it()],In.prototype,"getAnnotations",1);Ji([it()],In.prototype,"getAnnotationsAt",1);Ji([it()],In.prototype,"selectionHasAnnotation",1);In=Ji([Ne({defaultOptions:{getStyle:sde,blockSeparator:void 0,getStore:()=>new JN,getMap:void 0,transformPosition:void 0,transformPositionBeforeRender:void 0},defaultPriority:ot.Low})],In);var ade=Object.defineProperty,lde=Object.getOwnPropertyDescriptor,QN=(t,e,n,r)=>{for(var o=r>1?void 0:r?lde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&ade(e,n,o),o},Ek=class extends Dn{get name(){return"blockquote"}createTags(){return[ke.Block,ke.FormattingNode]}createNodeSpec(t,e){return{content:"block+",defining:!0,draggable:!1,...e,attrs:t.defaults(),parseDOM:[{tag:"blockquote",getAttrs:t.parse,priority:100},...e.parseDOM??[]],toDOM:n=>["blockquote",t.dom(n),0]}}toggleBlockquote(){return hM(this.type)}shortcut(t){return this.toggleBlockquote()(t)}createInputRules(){return[gm(/^\s*>\s$/,this.type)]}createPasteRules(){return{type:"node",nodeType:this.type,regexp:/^\s*>\s$/,startOfTextBlock:!0}}};QN([le({icon:"doubleQuotesL",description:({t})=>t($S.DESCRIPTION),label:({t})=>t($S.LABEL)})],Ek.prototype,"toggleBlockquote",1);QN([en({shortcut:"Ctrl->",command:"toggleBlockquote"})],Ek.prototype,"shortcut",1);var cde=Object.defineProperty,ude=Object.getOwnPropertyDescriptor,pp=(t,e,n,r)=>{for(var o=r>1?void 0:r?ude(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&cde(e,n,o),o},dde={icon:"bold",label:({t})=>t(DS.LABEL),description:({t})=>t(DS.DESCRIPTION)},pl=class extends na{get name(){return"bold"}createTags(){return[ke.FormattingMark,ke.FontStyle]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"strong",getAttrs:t.parse},{tag:"b",getAttrs:n=>Vt(n)&&n.style.fontWeight!=="normal"?t.parse(n):!1},{style:"font-weight",getAttrs:n=>Ee(n)&&/^(bold(er)?|[5-9]\d{2,})$/.test(n)?null:!1},...e.parseDOM??[]],toDOM:n=>{const{weight:r}=this.options;return r?["strong",{"font-weight":r.toString()},0]:["strong",t.dom(n),0]}}}createInputRules(){return[Jd({regexp:/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,type:this.type,ignoreWhitespace:!0})]}toggleBold(t){return js({type:this.type,selection:t})}setBold(t){return({tr:e,dispatch:n})=>{const{from:r,to:o}=cr(t??e.selection,e.doc);return n==null||n(e.addMark(r,o,this.type.create())),!0}}removeBold(t){return({tr:e,dispatch:n})=>{const{from:r,to:o}=cr(t??e.selection,e.doc);return e.doc.rangeHasMark(r,o,this.type)?(n==null||n(e.removeMark(r,o,this.type)),!0):!1}}shortcut(t){return this.toggleBold()(t)}};pp([le(dde)],pl.prototype,"toggleBold",1);pp([le()],pl.prototype,"setBold",1);pp([le()],pl.prototype,"removeBold",1);pp([en({shortcut:oe.Bold,command:"toggleBold"})],pl.prototype,"shortcut",1);pl=pp([Ne({defaultOptions:{weight:void 0},staticKeys:["weight"]})],pl);var hde=Object.defineProperty,pde=Object.getOwnPropertyDescriptor,Sk=(t,e,n,r)=>{for(var o=r>1?void 0:r?pde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&hde(e,n,o),o},{DESCRIPTION:fde,LABEL:gde}=N5,mde={icon:"codeLine",description:({t})=>t(fde),label:({t})=>t(gde)},Oh=class extends na{get name(){return"code"}createTags(){return[ke.Code,ke.ExcludeInputRules]}createMarkSpec(t,e){return{excludes:"_",...e,attrs:t.defaults(),parseDOM:[{tag:"code",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["code",{spellcheck:"false",...t.dom(n)},0]}}createKeymap(){return{"Mod-`":js({type:this.type})}}keyboardShortcut(t){return this.toggleCode()(t)}toggleCode(){return js({type:this.type})}createInputRules(){return[Jd({regexp:new RegExp(`(?:\`)([^\`${wb}]+)(?:\`)$`),type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{type:"mark",regexp:/`([^`]+)`/g,markType:this.type}]}};Sk([en({shortcut:oe.Code,command:"toggleCode"})],Oh.prototype,"keyboardShortcut",1);Sk([le(mde)],Oh.prototype,"toggleCode",1);Oh=Sk([Ne({})],Oh);var e$=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Je=(t,e,n)=>(e$(t,e,"read from private field"),n?n.call(t):e.get(t)),nc=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},ps=(t,e,n,r)=>(e$(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),vde='',yde='',bde=encodeURIComponent(vde),wde=encodeURIComponent(yde),gr,xde=class{constructor(t){nc(this,gr,void 0);const e=document.createElement("div"),n=document.createElement("div");this.dom=e,ps(this,gr,n),this.type=t,this.createHandle(t)}createHandle(t){switch(Un(this.dom,{position:"absolute",pointerEvents:"auto",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"100"}),Un(Je(this,gr),{opacity:"0",transition:"opacity 300ms ease-in 0s"}),Je(this,gr).dataset.dragging="",t){case 0:Un(this.dom,{right:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),Un(Je(this,gr),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 1:Un(this.dom,{left:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),Un(Je(this,gr),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 2:Un(this.dom,{bottom:"0px",width:"100%",height:"14px",cursor:"row-resize"}),Un(Je(this,gr),{width:" 42px",height:"4px",boxSizing:"content-box",maxWidth:"50%",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 3:Un(this.dom,{right:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nwse-resize",zIndex:"101"}),Un(Je(this,gr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${wde}") `});break;case 4:Un(this.dom,{left:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nesw-resize",zIndex:"101"}),Un(Je(this,gr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${bde}") `});break}this.dom.append(Je(this,gr))}setHandleVisibility(t){const e=t||!!Je(this,gr).dataset.dragging;Je(this,gr).style.opacity=e?"1":"0"}dataSetDragging(t){Je(this,gr).dataset.dragging=t?"true":""}};gr=new WeakMap;var lf=50,t$=(t=>(t[t.Fixed=0]="Fixed",t[t.Flexible=1]="Flexible",t))(t$||{}),Aa,_a,Ra,Ti,Ma,kde=class{constructor({node:t,view:e,getPos:n,aspectRatio:r=0,options:o,initialSize:i}){nc(this,Aa,void 0),nc(this,_a,void 0),nc(this,Ra,[]),nc(this,Ti,void 0),nc(this,Ma,void 0);const s=this.createWrapper(t,i),l=this.createElement({node:t,view:e,getPos:n,options:o}),u=(r===1?[0,1,2,3,4]:[0,1]).map(h=>new xde(h));for(const h of u){const p=f=>{this.startResizing(f,e,n,h)};h.dom.addEventListener("mousedown",p),Je(this,Ra).push(()=>h.dom.removeEventListener("mousedown",p)),s.append(h.dom)}const c=()=>{u.forEach(h=>h.setHandleVisibility(!0))},d=()=>{u.forEach(h=>h.setHandleVisibility(!1))};s.addEventListener("mouseover",c),s.addEventListener("mouseout",d),Je(this,Ra).push(()=>s.removeEventListener("mouseover",c),()=>s.removeEventListener("mouseout",d)),s.append(l),this.dom=s,ps(this,_a,t),ps(this,Aa,l),this.aspectRatio=r}createWrapper(t,e){const n=document.createElement("div");return n.classList.add("remirror-resizable-view"),n.style.position="relative",e?Un(n,{width:A_(e.width),aspectRatio:`${e.width} / ${e.height}`}):Un(n,{width:A_(t.attrs.width),aspectRatio:`${t.attrs.width} / ${t.attrs.height}`}),Un(n,{maxWidth:"100%",minWidth:`${lf}px`,verticalAlign:"bottom",display:"inline-block",lineHeight:"0",transition:"width 0.15s ease-out, height 0.15s ease-out"}),n}startResizing(t,e,n,r){var o,i;t.preventDefault(),r.dataSetDragging(!0),Je(this,Aa).style.pointerEvents="none";const s=t.pageX,l=t.pageY,a=((o=Je(this,Aa))==null?void 0:o.getBoundingClientRect().width)||0,u=((i=Je(this,Aa))==null?void 0:i.getBoundingClientRect().height)||0,c=x0(100,!1,h=>{const p=h.pageX,f=h.pageY,g=p-s,m=f-l;let v=null,y=null;if(this.aspectRatio===0&&a&&u)switch(r.type){case 0:case 3:v=a+g,y=u/a*v;break;case 1:case 4:v=a-g,y=u/a*v;break;case 2:y=u+m,v=a/u*y;break}else if(this.aspectRatio===1)switch(r.type){case 0:v=a+g;break;case 1:v=a-g;break;case 2:y=u+m;break;case 3:v=a+g,y=u+m;break;case 4:v=a-g,y=u+m;break}typeof v=="number"&&v{h.preventDefault(),r.dataSetDragging(!1),r.setHandleVisibility(!1),Je(this,Aa).style.pointerEvents="auto",document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",d);const p=n(),f=e.state.tr.setNodeMarkup(p,void 0,{...Je(this,_a).attrs,width:Je(this,Ti),height:Je(this,Ma)});e.dispatch(f)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",d),Je(this,Ra).push(()=>document.removeEventListener("mousemove",c)),Je(this,Ra).push(()=>document.removeEventListener("mouseup",d))}update(t){return t.type!==Je(this,_a).type||this.aspectRatio===0&&t.attrs.width&&t.attrs.width!==Je(this,Ti)||this.aspectRatio===1&&t.attrs.width&&t.attrs.height&&t.attrs.width!==Je(this,Ti)&&t.attrs.height!==Je(this,Ma)||!Ede(Je(this,_a),t,["width","height"])?!1:(ps(this,_a,t),ps(this,Ti,t.attrs.width),ps(this,Ma,t.attrs.height),!0)}destroy(){Je(this,Ra).forEach(t=>t())}};Aa=new WeakMap;_a=new WeakMap;Ra=new WeakMap;Ti=new WeakMap;Ma=new WeakMap;function Ede(t,e,n){return t===e||Sde(t,e,n)&&t.content.eq(e.content)}function Sde(t,e,n){const r=t.attrs,o=e.attrs,i={};for(const l of n)i[l]=null;t.attrs={...r,...i},e.attrs={...o,...i};const s=t.sameMarkup(e);return t.attrs=r,e.attrs=o,s}function A_(t){return typeof t=="number"?`${t}px`:t||void 0}var Cde=Object.defineProperty,Tde=Object.getOwnPropertyDescriptor,n$=(t,e,n,r)=>{for(var o=r>1?void 0:r?Tde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Cde(e,n,o),o},Zg=class extends Dn{get name(){return"hardBreak"}createTags(){return[ke.InlineNode]}createNodeSpec(t,e){return{inline:!0,selectable:!1,atom:!0,leafText:()=>` +`,...e,attrs:t.defaults(),parseDOM:[{tag:"br",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["br",t.dom(n)]}}createKeymap(){const t=uF(Ad(xM),()=>(this.store.commands.insertHardBreak(),!0));return{"Mod-Enter":t,"Shift-Enter":t}}insertHardBreak(){return t=>{const{tr:e,dispatch:n}=t;return n==null||n(e.replaceSelectionWith(this.type.create()).scrollIntoView()),!0}}};n$([le()],Zg.prototype,"insertHardBreak",1);Zg=n$([Ne({defaultPriority:ot.Low})],Zg);var Ade=Object.defineProperty,_de=Object.getOwnPropertyDescriptor,r$=(t,e,n,r)=>{for(var o=r>1?void 0:r?_de(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Ade(e,n,o),o},{LABEL:Rde}=D5,Mde={icon:({attrs:t})=>`h${(t==null?void 0:t.level)??"1"}`,label:({t,attrs:e})=>t({...Rde,values:{level:e==null?void 0:e.level}})},Ode=[oe.H1,oe.H2,oe.H3,oe.H4,oe.H5,oe.H6],Jg=class extends Dn{get name(){return"heading"}createTags(){return[ke.Block,ke.TextBlock,ke.FormattingNode]}createNodeSpec(t,e){return{content:"inline*",defining:!0,draggable:!1,...e,attrs:{...t.defaults(),level:{default:this.options.defaultLevel}},parseDOM:[...this.options.levels.map(n=>({tag:`h${n}`,getAttrs:r=>({...t.parse(r),level:n})})),...e.parseDOM??[]],toDOM:n=>this.options.levels.includes(n.attrs.level)?[`h${n.attrs.level}`,t.dom(n),0]:[`h${this.options.defaultLevel}`,t.dom(n),0]}}toggleHeading(t={}){return Gb({type:this.type,toggleType:"paragraph",attrs:t})}createKeymap(t){const e=this.store.getExtension(Ue),n=ye(),r=[];for(const o of this.options.levels){const i=Ode[o-1]??oe.H1;n[i]=Zd(this.type,{level:o}),r.push({attrs:{level:o},shortcut:t(i)[0]})}return e.updateDecorated("toggleHeading",{shortcut:r}),n}createInputRules(){return this.options.levels.map(t=>s3(new RegExp(`^(#{1,${t}})\\s$`),this.type,()=>({level:t})))}createPasteRules(){return this.options.levels.map(t=>({type:"node",nodeType:this.type,regexp:new RegExp(`^#{${t}}\\s([\\s\\w]+)$`),getAttributes:()=>({level:t}),startOfTextBlock:!0}))}};r$([le(Mde)],Jg.prototype,"toggleHeading",1);Jg=r$([Ne({defaultOptions:{levels:[1,2,3,4,5,6],defaultLevel:1},staticKeys:["defaultLevel","levels"]})],Jg);var Ide=Object.defineProperty,Lde=Object.getOwnPropertyDescriptor,o$=(t,e,n,r)=>{for(var o=r>1?void 0:r?Lde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Ide(e,n,o),o},Nde={icon:"separator",label:({t})=>t(PS.LABEL),description:({t})=>t(PS.DESCRIPTION)},Qg=class extends Dn{get name(){return"horizontalRule"}createTags(){return[ke.Block]}createNodeSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"hr",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["hr",t.dom(n)]}}insertHorizontalRule(){return t=>{const{tr:e,dispatch:n}=t,r=e.selection.$anchor,o=r.parent;return o.type.name==="doc"||o.isAtom||o.isLeaf?!1:(n&&(e.selection.empty&&xm(o)&&e.insert(r.pos+1,o),e.replaceSelectionWith(this.type.create()),this.updateFromNodeSelection(e),n(e.scrollIntoView())),!0)}}createInputRules(){return[gM({regexp:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type,beforeDispatch:({tr:t})=>{this.updateFromNodeSelection(t)}})]}updateFromNodeSelection(t){if(!qh(t.selection)||t.selection.node.type.name!==this.name)return;const e=t.selection.$from.pos+1,{insertionNode:n}=this.options;if(!n)return;const r=this.store.schema.nodes[n];we(r,{code:re.EXTENSION,message:`'${n}' node provided as the insertionNode to the '${this.constructorName}' does not exist.`});const o=r.create();t.insert(e,o),t.setSelection(Me.near(t.doc.resolve(e+1)))}};o$([le(Nde)],Qg.prototype,"insertHorizontalRule",1);Qg=o$([Ne({defaultOptions:{insertionNode:"paragraph"}})],Qg);var $de=Object.defineProperty,Dde=Object.getOwnPropertyDescriptor,Ck=(t,e,n,r)=>{for(var o=r>1?void 0:r?Dde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&$de(e,n,o),o},Pde=class extends kde{constructor(t,e,n){super({node:t,view:e,getPos:n,aspectRatio:t$.Fixed})}createElement({node:t}){const e=document.createElement("img");return e.setAttribute("src",t.attrs.src),Un(e,{width:"100%",minWidth:"50px",objectFit:"contain"}),e}},Ih=class extends Dn{get name(){return"image"}createTags(){return[ke.InlineNode,ke.Media]}createNodeSpec(t,e){const{preferPastedTextContent:n}=this.options;return{inline:!0,draggable:!0,selectable:!1,...e,attrs:{...t.defaults(),alt:{default:""},crop:{default:null},height:{default:null},width:{default:null},rotate:{default:null},src:{default:null},title:{default:""},fileName:{default:null},resizable:{default:!1}},parseDOM:[{tag:"img[src]",getAttrs:r=>{var o;if(Vt(r)){const i=Fde({element:r,parse:t.parse});return n&&((o=i.src)!=null&&o.startsWith("file:///"))?!1:i}return{}}},...e.parseDOM??[]],toDOM:r=>{const o=Em(r.attrs,t);return["img",{...t.dom(r),...o}]}}}insertImage(t,e){return({tr:n,dispatch:r})=>{const{from:o,to:i}=cr(e??n.selection,n.doc),s=this.type.create(t);return r==null||r(n.replaceRangeWith(o,i,s)),!0}}uploadImage(t,e){const{updatePlaceholder:n,destroyPlaceholder:r,createPlaceholder:o}=this.options;return i=>{const{tr:s}=i;let l=s.selection.from;return this.store.createPlaceholderCommand({promise:t,placeholder:{type:"widget",get pos(){return l},createElement:(a,u)=>{const c=o(a,u);return e==null||e(c),c},onUpdate:(a,u,c,d)=>{n(a,u,c,d)},onDestroy:(a,u)=>{r(a,u)}},onSuccess:(a,u,c)=>this.insertImage(a,u)(c)}).validate(({tr:a,dispatch:u})=>{const c=i2(a.doc,l,this.type);return c==null?!1:(l=c,a.selection.empty||u==null||u(a.deleteSelection()),!0)},"unshift").generateCommand()(i)}}fileUploadFileHandler(t,e,n){var r;const{preferPastedTextContent:o,uploadHandler:i}=this.options;if(o&&Ude(e)&&((r=e.clipboardData)!=null&&r.getData("text/plain")))return!1;const{commands:s,chain:l}=this.store,a=t.map((c,d)=>({file:c,progress:h=>{s.updatePlaceholder(u[d],h)}})),u=i(a);qr(n)&&l.selectText(n);for(const c of u)l.uploadImage(c);return l.run(),!0}createPasteRules(){return[{type:"file",regexp:/image/i,fileHandler:t=>{const e=t.type==="drop"?t.pos:void 0;return this.fileUploadFileHandler(t.files,t.event,e)}}]}createNodeViews(){return this.options.enableResizing?(t,e,n)=>new Pde(t,e,n):{}}};Ck([le()],Ih.prototype,"insertImage",1);Ck([le()],Ih.prototype,"uploadImage",1);Ih=Ck([Ne({defaultOptions:{createPlaceholder:Bde,updatePlaceholder:()=>{},destroyPlaceholder:()=>{},uploadHandler:Hde,enableResizing:!1,preferPastedTextContent:!0}})],Ih);function zde(t){let{width:e,height:n}=t.style;return e=e||t.getAttribute("width")||"",n=n||t.getAttribute("height")||"",{width:e,height:n}}function Fde({element:t,parse:e}){const{width:n,height:r}=zde(t);return{...e(t),alt:t.getAttribute("alt")??"",height:Number.parseInt(r||"0",10)||null,src:t.getAttribute("src")??null,title:t.getAttribute("title")??"",width:Number.parseInt(n||"0",10)||null,fileName:t.getAttribute("data-file-name")??null}}function Bde(t,e){const n=document.createElement("div");return n.classList.add(vV.IMAGE_LOADER),n}function Hde(t){we(t.length>0,{code:re.EXTENSION,message:"The upload handler was applied for the image extension without any valid files"});let e=0;const n=[];for(const{file:r,progress:o}of t)n.push(()=>new Promise(i=>{const s=new FileReader;s.addEventListener("load",l=>{var a;e+=1,o(e/t.length),i({src:(a=l.target)==null?void 0:a.result,fileName:r.name})},{once:!0}),s.readAsDataURL(r)}));return n}function Ude(t){return t.clipboardData!==void 0}var Wde=Object.defineProperty,Vde=Object.getOwnPropertyDescriptor,Tk=(t,e,n,r)=>{for(var o=r>1?void 0:r?Vde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Wde(e,n,o),o},jde={icon:"italic",label:({t})=>t(zS.LABEL),description:({t})=>t(zS.DESCRIPTION)},Lh=class extends na{get name(){return"italic"}createTags(){return[ke.FontStyle,ke.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"i",getAttrs:t.parse},{tag:"em",getAttrs:t.parse},{style:"font-style=italic"},...e.parseDOM??[]],toDOM:n=>["em",t.dom(n),0]}}createKeymap(){return{"Mod-i":js({type:this.type})}}createInputRules(){return[Jd({regexp:/(?:^|[^*])\*([^*]+)\*$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:t,start:e})=>t.startsWith("*")?{}:{fullMatch:t.slice(1),start:e+1}}),Jd({regexp:/(?:^|\W)_([^_]+)_$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:t,start:e})=>t.startsWith("_")?{}:{fullMatch:t.slice(1),start:e+1}})]}createPasteRules(){return[{type:"mark",markType:this.type,regexp:/(?:^|\W)_([^_]+)_/g},{type:"mark",markType:this.type,regexp:/\*([^*]+)\*/g}]}toggleItalic(t){return js({type:this.type,selection:t})}shortcut(t){return this.toggleItalic()(t)}};Tk([le(jde)],Lh.prototype,"toggleItalic",1);Tk([en({shortcut:oe.Italic,command:"toggleItalic"})],Lh.prototype,"shortcut",1);Lh=Tk([Ne({})],Lh);var i$={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(typeof self<"u"?self:ct,function(){return function(n){function r(i){if(o[i])return o[i].exports;var s=o[i]={i,l:!1,exports:{}};return n[i].call(s.exports,s,s.exports,r),s.l=!0,s.exports}var o={};return r.m=n,r.c=o,r.d=function(i,s,l){r.o(i,s)||Object.defineProperty(i,s,{configurable:!1,enumerable:!0,get:l})},r.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(s,"a",s),s},r.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},r.p="",r(r.s=0)}([function(n,r,o){function i(){throw new TypeError("The given URL is not a string. Please verify your string|array.")}function s(u){typeof u!="string"&&i();for(var c=0,d=0,h=0,p=u.length,f=0;p--&&++f&&!(c&&-1h?"":u.slice(h,c)}var l=["/",":","?","#"],a=[".","/","@"];n.exports=function(u){if(typeof u=="string")return s(u);if(Array.isArray(u)){var c=[],d,h=0;for(d=u.length;h{for(var o=r>1?void 0:r?Xde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Yde(e,n,o),o},qde=["com","de","net","org","uk","cn","ga","nl","cf","ml","tk","ru","br","gq","xyz","fr","eu","info","co","au","ca","it","in","ch","pl","es","online","us","top","be","jp","biz","se","at","dk","cz","za","me","ir","icu","shop","kr","site","mx","hu","io","cc","club","no","cyou"],__="updateLink",Zde=/(?:(?:(?:https?|ftp):)?\/\/)?(?:\S+(?::\S*)?@)?(?:(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)*(?:(?:\d(?!\.)|[a-z\u00A1-\uFFFF])(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)+[a-z\u00A1-\uFFFF]{2,}(?::\d{2,5})?(?:[#/?]\S*)?/gi,fl=class extends na{constructor(){super(...arguments),this._autoLinkRegexNonGlobal=void 0}get name(){return"link"}createTags(){return[ke.Link,ke.ExcludeInputRules]}createMarkSpec(t,e){const n="data-link-auto",r=o=>{const{defaultTarget:i,supportedTargets:s}=this.options,l=i?[...s,i]:s;return o&&ir(l,o)?{target:o}:void 0};return{inclusive:!1,excludes:"_",...e,attrs:{...t.defaults(),href:{},target:{default:this.options.defaultTarget},auto:{default:!1}},parseDOM:[{tag:"a[href]",getAttrs:o=>{if(!Vt(o))return!1;const i=o.getAttribute("href"),s=o.textContent,l=this.options.autoLink&&(o.hasAttribute(n)||i===s||(i==null?void 0:i.replace(`${this.options.defaultProtocol}//`,""))===s);return{...t.parse(o),href:i,auto:l,...r(o.getAttribute("target"))}}},...e.parseDOM??[]],toDOM:o=>{const{auto:i,target:s,...l}=Em(o.attrs,t),a=o.attrs.auto?{[n]:""}:{};return["a",{...t.dom(o),...l,rel:"noopener noreferrer nofollow",...a,...r(o.attrs.target)},0]}}}onCreate(){const{autoLinkRegex:t}=this.options;this._autoLinkRegexNonGlobal=new RegExp(`^${t.source}$`,t.flags.replace("g",""))}shortcut({tr:t}){let e="",{from:n,to:r,empty:o,$from:i}=t.selection,s=!1;const l=Hi(i,this.type);if(o){const a=l??aM(t);if(!a)return!1;({text:e,from:n,to:r}=a),s=!0}return n===r?!1:(s||(e=t.doc.textBetween(n,r)),this.options.onActivateLink(e),this.options.onShortcut({activeLink:l?{attrs:l.mark.attrs,from:l.from,to:l.to}:void 0,selectedText:e,from:n,to:r}),!0)}updateLink(t,e){return n=>{const{tr:r}=n;return!(ta(r.selection)&&!Ub(r.selection)||TF(r.selection)||lg({trState:r,type:this.type}))&&!e?!1:(r.setMeta(this.name,{command:__,attrs:t,range:e}),KF({type:this.type,attrs:t,range:e})(n))}}selectLink(){return this.store.commands.selectMark.original(this.type)}removeLink(t){return e=>{const{tr:n}=e;return lg({trState:n,type:this.type,...t})?fM({type:this.type,expand:!0,range:t})(e):!1}}createPasteRules(){return[{type:"mark",regexp:this.options.autoLinkRegex,markType:this.type,getAttributes:(t,e)=>({href:this.buildHref(wc(t)),auto:!e}),transformMatch:t=>{const e=wc(t);return!e||!this.isValidUrl(e)?!1:e}}]}createEventHandlers(){return{clickMark:(t,e)=>{const n=e.getMark(this.type);if(!n)return;const r=n.mark.attrs,o={...r,...n};if(this.options.onClick(t,o))return!0;if(!this.store.view.editable)return;let i=!1;if(this.options.openLinkOnClick){i=!0;const s=r.href;window.open(s,"_blank")}return this.options.selectTextOnClick&&(i=!0,this.store.commands.selectText(n)),i}}}createPlugin(){return{appendTransaction:(t,e,n)=>{if(t.filter(p=>!!p.getMeta(this.name)).forEach(p=>{const f=p.getMeta(this.name);if(f.command===__){const{range:g,attrs:m}=f,{selection:v,doc:y}=n,b={range:g,selection:v,doc:y,attrs:m},{from:w,to:k}=g??v;this.options.onUpdateLink(y.textBetween(w,k),b)}}),!this.options.autoLink||ey(e)-ey(n)===1||!t.some(p=>p.docChanged))return;const s=dF(t,e),l=sM(s,[Yt,vn]),{mapping:a}=s,{tr:u,doc:c}=n,{updateLink:d,removeLink:h}=this.store.chain(u);if(l.forEach(({prevFrom:p,prevTo:f,from:g,to:m})=>{const v=[],y=m-g===2,b=this.getLinkMarksInRange(e.doc,p,f,!0).filter(w=>w.mark.type===this.type).map(({from:w,to:k,text:x})=>({mappedFrom:a.map(w),mappedTo:a.map(k),text:x,from:w,to:k}));b.forEach(({mappedFrom:w,mappedTo:k,from:x,to:S},A)=>this.getLinkMarksInRange(c,w,k,!0).filter(C=>C.mark.type===this.type).forEach(C=>{const O=e.doc.textBetween(x,S,void 0," "),R=c.textBetween(C.from,C.to+1,void 0," ").trim(),_=this.isValidUrl(O);this.isValidUrl(R)||(_&&(h({from:C.from,to:C.to}).tr(),b.splice(A,1)),!y&&g===m&&this.findAutoLinks(R).map(E=>this.addLinkProperties({...E,from:w+E.start,to:w+E.end})).forEach(({attrs:E,range:M,text:I})=>{d(E,M).tr(),v.push({attrs:E,range:M,text:I})}))})),this.findTextBlocksInRange(c,{from:g,to:m}).forEach(({text:w,positionStart:k})=>{this.findAutoLinks(w).map(x=>this.addLinkProperties({...x,from:k+x.start+1,to:k+x.end+1})).filter(({range:x})=>{const S=g>=x.from&&g<=x.to,A=m>=x.from&&m<=x.to;return S||A||y}).filter(({range:x})=>this.getLinkMarksInRange(u.doc,x.from,x.to,!1).length===0).filter(({range:{from:x},text:S})=>!b.some(({text:A,mappedFrom:C})=>C===x&&A===S)).forEach(({attrs:x,text:S,range:A})=>{d(x,A).tr(),v.push({attrs:x,range:A,text:S})})}),window.requestAnimationFrame(()=>{v.forEach(({attrs:w,range:k,text:x})=>{const{doc:S,selection:A}=u;this.options.onUpdateLink(x,{attrs:w,doc:S,range:k,selection:A})})})}),u.steps.length!==0)return u}}}buildHref(t){return this.options.extractHref({url:t,defaultProtocol:this.options.defaultProtocol})}getLinkMarksInRange(t,e,n,r){const o=[];if(e===n){const i=Math.max(e-1,0),s=t.resolve(i),l=Hi(s,this.type);(l==null?void 0:l.mark.attrs.auto)===r&&o.push(l)}else t.nodesBetween(e,n,(i,s)=>{const a=(i.marks??[]).find(({type:u,attrs:c})=>u===this.type&&c.auto===r);a&&o.push({from:s,to:s+i.nodeSize,mark:a,text:i.textContent})});return o}findTextBlocksInRange(t,e){const n=[];return t.nodesBetween(e.from,e.to,(r,o)=>{!r.isTextblock||!r.type.allowsMarkType(this.type)||n.push({node:r,pos:o})}),n.map(r=>({text:t.textBetween(r.pos,r.pos+r.node.nodeSize,void 0," "),positionStart:r.pos}))}addLinkProperties({from:t,to:e,href:n,...r}){return{...r,range:{from:t,to:e},attrs:{href:n,auto:!0}}}findAutoLinks(t){if(this.options.findAutoLinks)return this.options.findAutoLinks(t,this.options.defaultProtocol);const e=[];for(const n of lu(t,this.options.autoLinkRegex)){const r=wc(n);if(!r)continue;const o=this.buildHref(r);!this.isValidTLD(o)&&!o.startsWith("tel:")||e.push({text:r,href:o,start:n.index,end:n.index+r.length})}return e}isValidUrl(t){var e;return this.options.isValidUrl?this.options.isValidUrl(t,this.options.defaultProtocol):this.isValidTLD(this.buildHref(t))&&!!((e=this._autoLinkRegexNonGlobal)!=null&&e.test(t))}isValidTLD(t){const{autoLinkAllowedTLDs:e}=this.options;if(e.length===0)return!0;const n=Kde(t);if(n==="")return!0;const r=W4(n.split("."));return e.includes(r)}};fp([en({shortcut:oe.InsertLink})],fl.prototype,"shortcut",1);fp([le()],fl.prototype,"updateLink",1);fp([le()],fl.prototype,"selectLink",1);fp([le()],fl.prototype,"removeLink",1);fl=fp([Ne({defaultOptions:{autoLink:!1,defaultProtocol:"",selectTextOnClick:!1,openLinkOnClick:!1,autoLinkRegex:Zde,autoLinkAllowedTLDs:qde,findAutoLinks:void 0,isValidUrl:void 0,defaultTarget:null,supportedTargets:[],extractHref:Jde},staticKeys:["autoLinkRegex"],handlerKeyOptions:{onClick:{earlyReturnValue:!0}},handlerKeys:["onActivateLink","onShortcut","onUpdateLink","onClick"],defaultPriority:ot.Medium})],fl);function Jde({url:t,defaultProtocol:e}){const n=/^((?:https?|ftp)?:)\/\//.test(t);return!n&&t.includes("@")?`mailto:${t}`:n?t:`${e}//${t}`}function Qde(t){for(var e=1;e0&&t[e-1]===` +`;)e--;return t.substring(0,e)}var nhe=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function Ak(t){return _k(t,nhe)}var s$=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function a$(t){return _k(t,s$)}function rhe(t){return c$(t,s$)}var l$=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function ohe(t){return _k(t,l$)}function ihe(t){return c$(t,l$)}function _k(t,e){return e.indexOf(t.nodeName)>=0}function c$(t,e){return t.getElementsByTagName&&e.some(function(n){return t.getElementsByTagName(n).length})}var Yn={};Yn.paragraph={filter:"p",replacement:function(t){return` `+t+` `}};Yn.lineBreak={filter:"br",replacement:function(t,e,n){return n.br+` -`}};Yn.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(t,e,n){var r=Number(e.nodeName.charAt(1));if(n.headingStyle==="setext"&&r<3){var o=ab(r===1?"=":"-",t.length);return` +`}};Yn.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(t,e,n){var r=Number(e.nodeName.charAt(1));if(n.headingStyle==="setext"&&r<3){var o=cb(r===1?"=":"-",t.length);return` `+t+` `+o+` `}else return` -`+ab("#",r)+" "+t+` +`+cb("#",r)+" "+t+` `}};Yn.blockquote={filter:"blockquote",replacement:function(t){return t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^/gm,"> "),` @@ -4896,7 +4900,7 @@ Error generating stack: `+i.message+` `+e.firstChild.textContent.replace(/\n/g,` `)+` -`}};Yn.fencedCodeBlock={filter:function(t,e){return e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"},replacement:function(t,e,n){for(var r=e.firstChild.getAttribute("class")||"",o=(r.match(/language-(\S+)/)||[null,""])[1],i=e.firstChild.textContent,s=n.fence.charAt(0),l=3,a=new RegExp("^"+s+"{3,}","gm"),u;u=a.exec(i);)u[0].length>=l&&(l=u[0].length+1);var c=ab(s,l);return` +`}};Yn.fencedCodeBlock={filter:function(t,e){return e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"},replacement:function(t,e,n){for(var r=e.firstChild.getAttribute("class")||"",o=(r.match(/language-(\S+)/)||[null,""])[1],i=e.firstChild.textContent,s=n.fence.charAt(0),l=3,a=new RegExp("^"+s+"{3,}","gm"),u;u=a.exec(i);)u[0].length>=l&&(l=u[0].length+1);var c=cb(s,l);return` `+c+o+` `+i.replace(/\n$/,"")+` @@ -4912,7 +4916,7 @@ Error generating stack: `+i.message+` `)+` `,this.references=[]),e}};Yn.emphasis={filter:["em","i"],replacement:function(t,e,n){return t.trim()?n.emDelimiter+t+n.emDelimiter:""}};Yn.strong={filter:["strong","b"],replacement:function(t,e,n){return t.trim()?n.strongDelimiter+t+n.strongDelimiter:""}};Yn.code={filter:function(t){var e=t.previousSibling||t.nextSibling,n=t.parentNode.nodeName==="PRE"&&!e;return t.nodeName==="CODE"&&!n},replacement:function(t){if(!t)return"";t=t.replace(/\r?\n|\r/g," ");for(var e=/^`|^ .*?[^ ].* $|`$/.test(t)?" ":"",n="`",r=t.match(/`+/gm)||[];r.indexOf(n)!==-1;)n=n+"`";return n+e+t+e+n}};Yn.image={filter:"img",replacement:function(t,e){var n=em(e.getAttribute("alt")),r=e.getAttribute("src")||"",o=em(e.getAttribute("title")),i=o?' "'+o+'"':"";return r?"!["+n+"]("+r+i+")":""}};function em(t){return t?t.replace(/(\n+\s*)+/g,` -`):""}function l$(t){this.options=t,this._keep=[],this._remove=[],this.blankRule={replacement:t.blankReplacement},this.keepReplacement=t.keepReplacement,this.defaultRule={replacement:t.defaultReplacement},this.array=[];for(var e in t.rules)this.array.push(t.rules[e])}l$.prototype={add:function(t,e){this.array.unshift(e)},keep:function(t){this._keep.unshift({filter:t,replacement:this.keepReplacement})},remove:function(t){this._remove.unshift({filter:t,replacement:function(){return""}})},forNode:function(t){if(t.isBlank)return this.blankRule;var e;return(e=c0(this.array,t,this.options))||(e=c0(this._keep,t,this.options))||(e=c0(this._remove,t,this.options))?e:this.defaultRule},forEach:function(t){for(var e=0;e-1)return!0}else if(typeof r=="function"){if(r.call(t,e,n))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}function rhe(t){var e=t.element,n=t.isBlock,r=t.isVoid,o=t.isPre||function(d){return d.nodeName==="PRE"};if(!(!e.firstChild||o(e))){for(var i=null,s=!1,l=null,a=__(l,e,o);a!==e;){if(a.nodeType===3||a.nodeType===4){var u=a.data.replace(/[ \r\n\t]+/g," ");if((!i||/ $/.test(i.data))&&!s&&u[0]===" "&&(u=u.substr(1)),!u){a=u0(a);continue}a.data=u,i=a}else if(a.nodeType===1)n(a)||a.nodeName==="BR"?(i&&(i.data=i.data.replace(/ $/,"")),i=null,s=!1):r(a)||o(a)?(i=null,s=!0):i&&(s=!1);else{a=u0(a);continue}var c=__(l,a,o);l=a,a=c}i&&(i.data=i.data.replace(/ $/,""),i.data||u0(i))}}function u0(t){var e=t.nextSibling||t.parentNode;return t.parentNode.removeChild(t),e}function __(t,e,n){return t&&t.parentNode===e||n(e)?e.nextSibling||e.parentNode:e.firstChild||e.nextSibling||e.parentNode}var _k=typeof window<"u"?window:{};function ohe(){var t=_k.DOMParser,e=!1;try{new t().parseFromString("","text/html")&&(e=!0)}catch{}return e}function ihe(){var t=function(){};return she()?t.prototype.parseFromString=function(e){var n=new window.ActiveXObject("htmlfile");return n.designMode="on",n.open(),n.write(e),n.close(),n}:t.prototype.parseFromString=function(e){var n=document.implementation.createHTMLDocument("");return n.open(),n.write(e),n.close(),n},t}function she(){var t=!1;try{document.implementation.createHTMLDocument("").open()}catch{_k.ActiveXObject&&(t=!0)}return t}var ahe=ohe()?_k.DOMParser:ihe();function lhe(t,e){var n;if(typeof t=="string"){var r=che().parseFromString(''+t+"","text/html");n=r.getElementById("turndown-root")}else n=t.cloneNode(!0);return rhe({element:n,isBlock:Tk,isVoid:i$,isPre:e.preformattedCode?uhe:null}),n}var d0;function che(){return d0=d0||new ahe,d0}function uhe(t){return t.nodeName==="PRE"||t.nodeName==="CODE"}function dhe(t,e){return t.isBlock=Tk(t),t.isCode=t.nodeName==="CODE"||t.parentNode.isCode,t.isBlank=hhe(t),t.flankingWhitespace=phe(t,e),t}function hhe(t){return!i$(t)&&!ehe(t)&&/^\s*$/i.test(t.textContent)&&!Qde(t)&&!the(t)}function phe(t,e){if(t.isBlock||e.preformattedCode&&t.isCode)return{leading:"",trailing:""};var n=fhe(t.textContent);return n.leadingAscii&&R_("left",t,e)&&(n.leading=n.leadingNonAscii),n.trailingAscii&&R_("right",t,e)&&(n.trailing=n.trailingNonAscii),{leading:n.leading,trailing:n.trailing}}function fhe(t){var e=t.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:e[1],leadingAscii:e[2],leadingNonAscii:e[3],trailing:e[4],trailingNonAscii:e[5],trailingAscii:e[6]}}function R_(t,e,n){var r,o,i;return t==="left"?(r=e.previousSibling,o=/ $/):(r=e.nextSibling,o=/^ /),r&&(r.nodeType===3?i=o.test(r.nodeValue):n.preformattedCode&&r.nodeName==="CODE"?i=!1:r.nodeType===1&&!Tk(r)&&(i=o.test(r.textContent))),i}var ghe=Array.prototype.reduce,mhe=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function Nh(t){if(!(this instanceof Nh))return new Nh(t);var e={rules:Yn,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(n,r){return r.isBlock?` +`):""}function u$(t){this.options=t,this._keep=[],this._remove=[],this.blankRule={replacement:t.blankReplacement},this.keepReplacement=t.keepReplacement,this.defaultRule={replacement:t.defaultReplacement},this.array=[];for(var e in t.rules)this.array.push(t.rules[e])}u$.prototype={add:function(t,e){this.array.unshift(e)},keep:function(t){this._keep.unshift({filter:t,replacement:this.keepReplacement})},remove:function(t){this._remove.unshift({filter:t,replacement:function(){return""}})},forNode:function(t){if(t.isBlank)return this.blankRule;var e;return(e=u0(this.array,t,this.options))||(e=u0(this._keep,t,this.options))||(e=u0(this._remove,t,this.options))?e:this.defaultRule},forEach:function(t){for(var e=0;e-1)return!0}else if(typeof r=="function"){if(r.call(t,e,n))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}function ahe(t){var e=t.element,n=t.isBlock,r=t.isVoid,o=t.isPre||function(d){return d.nodeName==="PRE"};if(!(!e.firstChild||o(e))){for(var i=null,s=!1,l=null,a=R_(l,e,o);a!==e;){if(a.nodeType===3||a.nodeType===4){var u=a.data.replace(/[ \r\n\t]+/g," ");if((!i||/ $/.test(i.data))&&!s&&u[0]===" "&&(u=u.substr(1)),!u){a=d0(a);continue}a.data=u,i=a}else if(a.nodeType===1)n(a)||a.nodeName==="BR"?(i&&(i.data=i.data.replace(/ $/,"")),i=null,s=!1):r(a)||o(a)?(i=null,s=!0):i&&(s=!1);else{a=d0(a);continue}var c=R_(l,a,o);l=a,a=c}i&&(i.data=i.data.replace(/ $/,""),i.data||d0(i))}}function d0(t){var e=t.nextSibling||t.parentNode;return t.parentNode.removeChild(t),e}function R_(t,e,n){return t&&t.parentNode===e||n(e)?e.nextSibling||e.parentNode:e.firstChild||e.nextSibling||e.parentNode}var Rk=typeof window<"u"?window:{};function lhe(){var t=Rk.DOMParser,e=!1;try{new t().parseFromString("","text/html")&&(e=!0)}catch{}return e}function che(){var t=function(){};return uhe()?t.prototype.parseFromString=function(e){var n=new window.ActiveXObject("htmlfile");return n.designMode="on",n.open(),n.write(e),n.close(),n}:t.prototype.parseFromString=function(e){var n=document.implementation.createHTMLDocument("");return n.open(),n.write(e),n.close(),n},t}function uhe(){var t=!1;try{document.implementation.createHTMLDocument("").open()}catch{Rk.ActiveXObject&&(t=!0)}return t}var dhe=lhe()?Rk.DOMParser:che();function hhe(t,e){var n;if(typeof t=="string"){var r=phe().parseFromString(''+t+"","text/html");n=r.getElementById("turndown-root")}else n=t.cloneNode(!0);return ahe({element:n,isBlock:Ak,isVoid:a$,isPre:e.preformattedCode?fhe:null}),n}var h0;function phe(){return h0=h0||new dhe,h0}function fhe(t){return t.nodeName==="PRE"||t.nodeName==="CODE"}function ghe(t,e){return t.isBlock=Ak(t),t.isCode=t.nodeName==="CODE"||t.parentNode.isCode,t.isBlank=mhe(t),t.flankingWhitespace=vhe(t,e),t}function mhe(t){return!a$(t)&&!ohe(t)&&/^\s*$/i.test(t.textContent)&&!rhe(t)&&!ihe(t)}function vhe(t,e){if(t.isBlock||e.preformattedCode&&t.isCode)return{leading:"",trailing:""};var n=yhe(t.textContent);return n.leadingAscii&&M_("left",t,e)&&(n.leading=n.leadingNonAscii),n.trailingAscii&&M_("right",t,e)&&(n.trailing=n.trailingNonAscii),{leading:n.leading,trailing:n.trailing}}function yhe(t){var e=t.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:e[1],leadingAscii:e[2],leadingNonAscii:e[3],trailing:e[4],trailingNonAscii:e[5],trailingAscii:e[6]}}function M_(t,e,n){var r,o,i;return t==="left"?(r=e.previousSibling,o=/ $/):(r=e.nextSibling,o=/^ /),r&&(r.nodeType===3?i=o.test(r.nodeValue):n.preformattedCode&&r.nodeName==="CODE"?i=!1:r.nodeType===1&&!Ak(r)&&(i=o.test(r.textContent))),i}var bhe=Array.prototype.reduce,whe=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function Nh(t){if(!(this instanceof Nh))return new Nh(t);var e={rules:Yn,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(n,r){return r.isBlock?` `:""},keepReplacement:function(n,r){return r.isBlock?` @@ -4922,22 +4926,22 @@ Error generating stack: `+i.message+` `+n+` -`:n}};this.options=Xde({},e,t),this.rules=new l$(this.options)}Nh.prototype={turndown:function(t){if(!bhe(t))throw new TypeError(t+" is not a string, or an element/document/fragment node.");if(t==="")return"";var e=c$.call(this,new lhe(t,this.options));return vhe.call(this,e)},use:function(t){if(Array.isArray(t))for(var e=0;e"']/,xhe=new RegExp(h$.source,"g"),p$=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,khe=new RegExp(p$.source,"g"),Ehe={"&":"&","<":"<",">":">",'"':""","'":"'"},M_=t=>Ehe[t];function Vn(t,e){if(e){if(h$.test(t))return t.replace(xhe,M_)}else if(p$.test(t))return t.replace(khe,M_);return t}const She=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function f$(t){return t.replace(She,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Che=/(^|[^\[])\^/g;function yt(t,e){t=typeof t=="string"?t:t.source,e=e||"";const n={replace:(r,o)=>(o=o.source||o,o=o.replace(Che,"$1"),t=t.replace(r,o),n),getRegex:()=>new RegExp(t,e)};return n}const The=/[^\w:]/g,Ahe=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function O_(t,e,n){if(t){let r;try{r=decodeURIComponent(f$(n)).replace(The,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}e&&!Ahe.test(n)&&(n=Ohe(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const cf={},_he=/^[^:]+:\/*[^/]*$/,Rhe=/^([^:]+:)[\s\S]*$/,Mhe=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Ohe(t,e){cf[" "+t]||(_he.test(t)?cf[" "+t]=t+"/":cf[" "+t]=Gf(t,"/",!0)),t=cf[" "+t];const n=t.indexOf(":")===-1;return e.substring(0,2)==="//"?n?e:t.replace(Rhe,"$1")+e:e.charAt(0)==="/"?n?e:t.replace(Mhe,"$1")+e:t+e}const tm={exec:function(){}};function I_(t,e){const n=t.replace(/\|/g,(i,s,l)=>{let a=!1,u=s;for(;--u>=0&&l[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>e)r.splice(e);else for(;r.length1;)e&1&&(n+=t),e>>=1,t+=t;return n+t}function N_(t,e,n,r){const o=e.href,i=e.title?Vn(e.title):null,s=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){r.state.inLink=!0;const l={type:"link",raw:n,href:o,title:i,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:o,title:i,text:Vn(s)}}function Nhe(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null)return e;const r=n[1];return e.split(` +`.substring(0,o);return n+i+r}function Ehe(t){return t!=null&&(typeof t=="string"||t.nodeType&&(t.nodeType===1||t.nodeType===9||t.nodeType===11))}function p$(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let Sl=p$();function She(t){Sl=t}const f$=/[&<>"']/,Che=new RegExp(f$.source,"g"),g$=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,The=new RegExp(g$.source,"g"),Ahe={"&":"&","<":"<",">":">",'"':""","'":"'"},O_=t=>Ahe[t];function Vn(t,e){if(e){if(f$.test(t))return t.replace(Che,O_)}else if(g$.test(t))return t.replace(The,O_);return t}const _he=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function m$(t){return t.replace(_he,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Rhe=/(^|[^\[])\^/g;function yt(t,e){t=typeof t=="string"?t:t.source,e=e||"";const n={replace:(r,o)=>(o=o.source||o,o=o.replace(Rhe,"$1"),t=t.replace(r,o),n),getRegex:()=>new RegExp(t,e)};return n}const Mhe=/[^\w:]/g,Ohe=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function I_(t,e,n){if(t){let r;try{r=decodeURIComponent(m$(n)).replace(Mhe,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}e&&!Ohe.test(n)&&(n=$he(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const cf={},Ihe=/^[^:]+:\/*[^/]*$/,Lhe=/^([^:]+:)[\s\S]*$/,Nhe=/^([^:]+:\/*[^/]*)[\s\S]*$/;function $he(t,e){cf[" "+t]||(Ihe.test(t)?cf[" "+t]=t+"/":cf[" "+t]=Gf(t,"/",!0)),t=cf[" "+t];const n=t.indexOf(":")===-1;return e.substring(0,2)==="//"?n?e:t.replace(Lhe,"$1")+e:e.charAt(0)==="/"?n?e:t.replace(Nhe,"$1")+e:t+e}const tm={exec:function(){}};function L_(t,e){const n=t.replace(/\|/g,(i,s,l)=>{let a=!1,u=s;for(;--u>=0&&l[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>e)r.splice(e);else for(;r.length1;)e&1&&(n+=t),e>>=1,t+=t;return n+t}function $_(t,e,n,r){const o=e.href,i=e.title?Vn(e.title):null,s=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){r.state.inLink=!0;const l={type:"link",raw:n,href:o,title:i,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:o,title:i,text:Vn(s)}}function zhe(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null)return e;const r=n[1];return e.split(` `).map(o=>{const i=o.match(/^\s+/);if(i===null)return o;const[s]=i;return s.length>=r.length?o.slice(r.length):o}).join(` -`)}class Rk{constructor(e){this.options=e||Sl}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Gf(r,` -`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],o=Nhe(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=Gf(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){const r=n[0].replace(/^ *>[ \t]?/gm,""),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(e){let n=this.rules.block.list.exec(e);if(n){let r,o,i,s,l,a,u,c,d,h,p,f,g=n[1].trim();const m=g.length>1,v={type:"list",raw:"",ordered:m,start:m?+g.slice(0,-1):"",loose:!1,items:[]};g=m?`\\d{1,9}\\${g.slice(-1)}`:`\\${g}`,this.options.pedantic&&(g=m?g:"[*+-]");const y=new RegExp(`^( {0,3}${g})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;e&&(f=!1,!(!(n=y.exec(e))||this.rules.block.hr.test(e)));){if(r=n[0],e=e.substring(r.length),c=n[2].split(` +`)}class Mk{constructor(e){this.options=e||Sl}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Gf(r,` +`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],o=zhe(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=Gf(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){const r=n[0].replace(/^ *>[ \t]?/gm,""),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(e){let n=this.rules.block.list.exec(e);if(n){let r,o,i,s,l,a,u,c,d,h,p,f,g=n[1].trim();const m=g.length>1,v={type:"list",raw:"",ordered:m,start:m?+g.slice(0,-1):"",loose:!1,items:[]};g=m?`\\d{1,9}\\${g.slice(-1)}`:`\\${g}`,this.options.pedantic&&(g=m?g:"[*+-]");const y=new RegExp(`^( {0,3}${g})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;e&&(f=!1,!(!(n=y.exec(e))||this.rules.block.hr.test(e)));){if(r=n[0],e=e.substring(r.length),c=n[2].split(` `,1)[0].replace(/^\t+/,w=>" ".repeat(3*w.length)),d=e.split(` `,1)[0],this.options.pedantic?(s=2,p=c.trimLeft()):(s=n[2].search(/[^ ]/),s=s>4?1:s,p=c.slice(s),s+=n[1].length),a=!1,!c&&/^ *$/.test(d)&&(r+=d+` `,e=e.substring(d.length+1),f=!0),!f){const w=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),k=new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),x=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),S=new RegExp(`^ {0,${Math.min(3,s-1)}}#`);for(;e&&(h=e.split(` `,1)[0],d=h,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(x.test(d)||S.test(d)||w.test(d)||k.test(e)));){if(d.search(/[^ ]/)>=s||!d.trim())p+=` `+d.slice(s);else{if(a||c.search(/[^ ]/)>=4||x.test(c)||S.test(c)||k.test(c))break;p+=` `+d}!a&&!d.trim()&&(a=!0),r+=h+` -`,e=e.substring(h.length+1),c=d.slice(s)}}v.loose||(u?v.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(o=/^\[[ xX]\] /.exec(p),o&&(i=o[0]!=="[ ] ",p=p.replace(/^\[[ xX]\] +/,""))),v.items.push({type:"list_item",raw:r,task:!!o,checked:i,loose:!1,text:p}),v.raw+=r}v.items[v.items.length-1].raw=r.trimRight(),v.items[v.items.length-1].text=p.trimRight(),v.raw=v.raw.trimRight();const b=v.items.length;for(l=0;lx.type==="space"),k=w.length>0&&w.some(x=>/\n.*\n/.test(x.raw));v.loose=k}if(v.loose)for(l=0;l$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(e){const n=this.rules.block.table.exec(e);if(n){const r={type:"table",header:I_(n[1]).map(o=>({text:o})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(r.header.length===r.align.length){r.raw=n[0];let o=r.align.length,i,s,l,a;for(i=0;i({text:u}));for(o=r.header.length,s=0;s/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):Vn(n[0]):n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const s=Gf(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=Ihe(n[2],"()");if(s>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),N_(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(e,n){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return N_(r,o,r[0],this.lexer)}}emStrong(e,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(e);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;const i=o[1]||o[2]||"";if(!i||i&&(r===""||this.rules.inline.punctuation.exec(r))){const s=o[0].length-1;let l,a,u=s,c=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*e.length+s);(o=d.exec(n))!=null;){if(l=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!l)continue;if(a=l.length,o[3]||o[4]){u+=a;continue}else if((o[5]||o[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const h=e.slice(0,s+o.index+(o[0].length-l.length)+a);if(Math.min(s,a)%2){const f=h.slice(1,-1);return{type:"em",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}const p=h.slice(2,-2);return{type:"strong",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=Vn(r,!0),{type:"codespan",raw:n[0],text:r}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e,n){const r=this.rules.inline.autolink.exec(e);if(r){let o,i;return r[2]==="@"?(o=Vn(this.options.mangle?n(r[1]):r[1]),i="mailto:"+o):(o=Vn(r[1]),i=o),{type:"link",raw:r[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}url(e,n){let r;if(r=this.rules.inline.url.exec(e)){let o,i;if(r[2]==="@")o=Vn(this.options.mangle?n(r[0]):r[0]),i="mailto:"+o;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(s!==r[0]);o=Vn(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(e,n){const r=this.rules.inline.text.exec(e);if(r){let o;return this.lexer.state.inRawBlock?o=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Vn(r[0]):r[0]:o=Vn(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:o}}}}const Ae={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:tm,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Ae._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Ae._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Ae.def=yt(Ae.def).replace("label",Ae._label).replace("title",Ae._title).getRegex();Ae.bullet=/(?:[*+-]|\d{1,9}[.)])/;Ae.listItemStart=yt(/^( *)(bull) */).replace("bull",Ae.bullet).getRegex();Ae.list=yt(Ae.list).replace(/bull/g,Ae.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ae.def.source+")").getRegex();Ae._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";Ae._comment=/|$)/;Ae.html=yt(Ae.html,"i").replace("comment",Ae._comment).replace("tag",Ae._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Ae.paragraph=yt(Ae._paragraph).replace("hr",Ae.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ae._tag).getRegex();Ae.blockquote=yt(Ae.blockquote).replace("paragraph",Ae.paragraph).getRegex();Ae.normal={...Ae};Ae.gfm={...Ae.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};Ae.gfm.table=yt(Ae.gfm.table).replace("hr",Ae.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ae._tag).getRegex();Ae.gfm.paragraph=yt(Ae._paragraph).replace("hr",Ae.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Ae.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ae._tag).getRegex();Ae.pedantic={...Ae.normal,html:yt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ae._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:tm,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:yt(Ae.normal._paragraph).replace("hr",Ae.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",Ae.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const fe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:tm,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:tm,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";fe.punctuation=yt(fe.punctuation).replace(/punctuation/g,fe._punctuation).getRegex();fe.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;fe.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;fe._comment=yt(Ae._comment).replace("(?:-->|$)","-->").getRegex();fe.emStrong.lDelim=yt(fe.emStrong.lDelim).replace(/punct/g,fe._punctuation).getRegex();fe.emStrong.rDelimAst=yt(fe.emStrong.rDelimAst,"g").replace(/punct/g,fe._punctuation).getRegex();fe.emStrong.rDelimUnd=yt(fe.emStrong.rDelimUnd,"g").replace(/punct/g,fe._punctuation).getRegex();fe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;fe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;fe._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;fe.autolink=yt(fe.autolink).replace("scheme",fe._scheme).replace("email",fe._email).getRegex();fe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;fe.tag=yt(fe.tag).replace("comment",fe._comment).replace("attribute",fe._attribute).getRegex();fe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;fe._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;fe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;fe.link=yt(fe.link).replace("label",fe._label).replace("href",fe._href).replace("title",fe._title).getRegex();fe.reflink=yt(fe.reflink).replace("label",fe._label).replace("ref",Ae._label).getRegex();fe.nolink=yt(fe.nolink).replace("ref",Ae._label).getRegex();fe.reflinkSearch=yt(fe.reflinkSearch,"g").replace("reflink",fe.reflink).replace("nolink",fe.nolink).getRegex();fe.normal={...fe};fe.pedantic={...fe.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:yt(/^!?\[(label)\]\((.*?)\)/).replace("label",fe._label).getRegex(),reflink:yt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",fe._label).getRegex()};fe.gfm={...fe.normal,escape:yt(fe.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(r="x"+r.toString(16)),e+="&#"+r+";";return e}class Zs{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Sl,this.options.tokenizer=this.options.tokenizer||new Rk,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:Ae.normal,inline:fe.normal};this.options.pedantic?(n.block=Ae.pedantic,n.inline=fe.pedantic):this.options.gfm&&(n.block=Ae.gfm,this.options.breaks?n.inline=fe.breaks:n.inline=fe.gfm),this.tokenizer.rules=n}static get rules(){return{block:Ae,inline:fe}}static lex(e,n){return new Zs(n).lex(e)}static lexInline(e,n){return new Zs(n).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,` +`,e=e.substring(h.length+1),c=d.slice(s)}}v.loose||(u?v.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(o=/^\[[ xX]\] /.exec(p),o&&(i=o[0]!=="[ ] ",p=p.replace(/^\[[ xX]\] +/,""))),v.items.push({type:"list_item",raw:r,task:!!o,checked:i,loose:!1,text:p}),v.raw+=r}v.items[v.items.length-1].raw=r.trimRight(),v.items[v.items.length-1].text=p.trimRight(),v.raw=v.raw.trimRight();const b=v.items.length;for(l=0;lx.type==="space"),k=w.length>0&&w.some(x=>/\n.*\n/.test(x.raw));v.loose=k}if(v.loose)for(l=0;l$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(e){const n=this.rules.block.table.exec(e);if(n){const r={type:"table",header:L_(n[1]).map(o=>({text:o})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` +`):[]};if(r.header.length===r.align.length){r.raw=n[0];let o=r.align.length,i,s,l,a;for(i=0;i({text:u}));for(o=r.header.length,s=0;s/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):Vn(n[0]):n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const s=Gf(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=Dhe(n[2],"()");if(s>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),$_(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(e,n){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return $_(r,o,r[0],this.lexer)}}emStrong(e,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(e);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;const i=o[1]||o[2]||"";if(!i||i&&(r===""||this.rules.inline.punctuation.exec(r))){const s=o[0].length-1;let l,a,u=s,c=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*e.length+s);(o=d.exec(n))!=null;){if(l=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!l)continue;if(a=l.length,o[3]||o[4]){u+=a;continue}else if((o[5]||o[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const h=e.slice(0,s+o.index+(o[0].length-l.length)+a);if(Math.min(s,a)%2){const f=h.slice(1,-1);return{type:"em",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}const p=h.slice(2,-2);return{type:"strong",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=Vn(r,!0),{type:"codespan",raw:n[0],text:r}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e,n){const r=this.rules.inline.autolink.exec(e);if(r){let o,i;return r[2]==="@"?(o=Vn(this.options.mangle?n(r[1]):r[1]),i="mailto:"+o):(o=Vn(r[1]),i=o),{type:"link",raw:r[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}url(e,n){let r;if(r=this.rules.inline.url.exec(e)){let o,i;if(r[2]==="@")o=Vn(this.options.mangle?n(r[0]):r[0]),i="mailto:"+o;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(s!==r[0]);o=Vn(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(e,n){const r=this.rules.inline.text.exec(e);if(r){let o;return this.lexer.state.inRawBlock?o=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Vn(r[0]):r[0]:o=Vn(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:o}}}}const Ae={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:tm,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Ae._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Ae._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Ae.def=yt(Ae.def).replace("label",Ae._label).replace("title",Ae._title).getRegex();Ae.bullet=/(?:[*+-]|\d{1,9}[.)])/;Ae.listItemStart=yt(/^( *)(bull) */).replace("bull",Ae.bullet).getRegex();Ae.list=yt(Ae.list).replace(/bull/g,Ae.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ae.def.source+")").getRegex();Ae._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";Ae._comment=/|$)/;Ae.html=yt(Ae.html,"i").replace("comment",Ae._comment).replace("tag",Ae._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Ae.paragraph=yt(Ae._paragraph).replace("hr",Ae.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ae._tag).getRegex();Ae.blockquote=yt(Ae.blockquote).replace("paragraph",Ae.paragraph).getRegex();Ae.normal={...Ae};Ae.gfm={...Ae.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};Ae.gfm.table=yt(Ae.gfm.table).replace("hr",Ae.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ae._tag).getRegex();Ae.gfm.paragraph=yt(Ae._paragraph).replace("hr",Ae.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Ae.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ae._tag).getRegex();Ae.pedantic={...Ae.normal,html:yt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ae._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:tm,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:yt(Ae.normal._paragraph).replace("hr",Ae.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Ae.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const fe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:tm,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:tm,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";fe.punctuation=yt(fe.punctuation).replace(/punctuation/g,fe._punctuation).getRegex();fe.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;fe.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;fe._comment=yt(Ae._comment).replace("(?:-->|$)","-->").getRegex();fe.emStrong.lDelim=yt(fe.emStrong.lDelim).replace(/punct/g,fe._punctuation).getRegex();fe.emStrong.rDelimAst=yt(fe.emStrong.rDelimAst,"g").replace(/punct/g,fe._punctuation).getRegex();fe.emStrong.rDelimUnd=yt(fe.emStrong.rDelimUnd,"g").replace(/punct/g,fe._punctuation).getRegex();fe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;fe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;fe._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;fe.autolink=yt(fe.autolink).replace("scheme",fe._scheme).replace("email",fe._email).getRegex();fe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;fe.tag=yt(fe.tag).replace("comment",fe._comment).replace("attribute",fe._attribute).getRegex();fe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;fe._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;fe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;fe.link=yt(fe.link).replace("label",fe._label).replace("href",fe._href).replace("title",fe._title).getRegex();fe.reflink=yt(fe.reflink).replace("label",fe._label).replace("ref",Ae._label).getRegex();fe.nolink=yt(fe.nolink).replace("ref",Ae._label).getRegex();fe.reflinkSearch=yt(fe.reflinkSearch,"g").replace("reflink",fe.reflink).replace("nolink",fe.nolink).getRegex();fe.normal={...fe};fe.pedantic={...fe.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:yt(/^!?\[(label)\]\((.*?)\)/).replace("label",fe._label).getRegex(),reflink:yt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",fe._label).getRegex()};fe.gfm={...fe.normal,escape:yt(fe.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(r="x"+r.toString(16)),e+="&#"+r+";";return e}class Zs{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Sl,this.options.tokenizer=this.options.tokenizer||new Mk,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:Ae.normal,inline:fe.normal};this.options.pedantic?(n.block=Ae.pedantic,n.inline=fe.pedantic):this.options.gfm&&(n.block=Ae.gfm,this.options.breaks?n.inline=fe.breaks:n.inline=fe.gfm),this.tokenizer.rules=n}static get rules(){return{block:Ae,inline:fe}}static lex(e,n){return new Zs(n).lex(e)}static lexInline(e,n){return new Zs(n).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,` `),this.blockTokens(e,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(e,n=[]){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(l,a,u)=>a+" ".repeat(u.length));let r,o,i,s;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(r=l.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` `:n.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` `+r.raw,o.text+=` @@ -4947,7 +4951,7 @@ Error generating stack: `+i.message+` `+r.raw,o.text+=` `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),s=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=` `+r.raw,o.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let r,o,i,s=e,l,a,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,l.index)+"["+L_("a",l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,l.index)+"["+L_("a",l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,l.index+l[0].length-2)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(e,s,u)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(e,$_)){e=e.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e,$_))){e=e.substring(r.raw.length),n.push(r);continue}if(i=e,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=e.slice(1);let h;this.options.extensions.startInline.forEach(function(p){h=p.call({lexer:this},d),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(i=e.substring(0,c+1))}if(r=this.tokenizer.inlineText(i,$he)){e=e.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),a=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class Mk{constructor(e){this.options=e||Sl}code(e,n,r){const o=(n||"").match(/\S*/)[0];if(this.options.highlight){const i=this.options.highlight(e,o);i!=null&&i!==e&&(r=!0,e=i)}return e=e.replace(/\n$/,"")+` +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let r,o,i,s=e,l,a,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,l.index)+"["+N_("a",l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,l.index)+"["+N_("a",l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,l.index+l[0].length-2)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(e,s,u)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(e,D_)){e=e.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e,D_))){e=e.substring(r.raw.length),n.push(r);continue}if(i=e,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=e.slice(1);let h;this.options.extensions.startInline.forEach(function(p){h=p.call({lexer:this},d),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(i=e.substring(0,c+1))}if(r=this.tokenizer.inlineText(i,Fhe)){e=e.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),a=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class Ok{constructor(e){this.options=e||Sl}code(e,n,r){const o=(n||"").match(/\S*/)[0];if(this.options.highlight){const i=this.options.highlight(e,o);i!=null&&i!==e&&(r=!0,e=i)}return e=e.replace(/\n$/,"")+` `,o?'
'+(r?e:Vn(e,!0))+`
`:"
"+(r?e:Vn(e,!0))+`
`}blockquote(e){return`
@@ -4967,18 +4971,18 @@ ${e}
`}tablerow(e){return` ${e} `}tablecell(e,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+e+` -`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return this.options.xhtml?"
":"
"}del(e){return`${e}`}link(e,n,r){if(e=O_(this.options.sanitize,this.options.baseUrl,e),e===null)return r;let o='",o}image(e,n,r){if(e=O_(this.options.sanitize,this.options.baseUrl,e),e===null)return r;let o=`${r}":">",o}text(e){return e}}class g${strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,n,r){return""+r}image(e,n,r){return""+r}br(){return""}}class m${constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,n){let r=e,o=0;if(this.seen.hasOwnProperty(r)){o=this.seen[e];do o++,r=e+"-"+o;while(this.seen.hasOwnProperty(r))}return n||(this.seen[e]=o,this.seen[r]=0),r}slug(e,n={}){const r=this.serialize(e);return this.getNextSafeSlug(r,n.dryrun)}}class Js{constructor(e){this.options=e||Sl,this.options.renderer=this.options.renderer||new Mk,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new g$,this.slugger=new m$}static parse(e,n){return new Js(n).parse(e)}static parseInline(e,n){return new Js(n).parseInline(e)}parse(e,n=!0){let r="",o,i,s,l,a,u,c,d,h,p,f,g,m,v,y,b,w,k,x;const S=e.length;for(o=0;o0&&y.tokens[0].type==="paragraph"?(y.tokens[0].text=k+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=k+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:k}):v+=k),v+=this.parse(y.tokens,m),h+=this.renderer.listitem(v,w,b);r+=this.renderer.list(h,f,g);continue}case"html":{r+=this.renderer.html(p.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(p.tokens));continue}case"text":{for(h=p.tokens?this.parseInline(p.tokens):p.text;o+1{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,t){const o="

An error occurred:

"+Vn(r.message+"",!0)+"
";if(e)return Promise.resolve(o);if(n){n(null,o);return}return o}if(e)return Promise.reject(r);if(n){n(r);return}throw r}}function v$(t,e){return(n,r,o)=>{typeof r=="function"&&(o=r,r=null);const i={...r};r={...Te.defaults,...i};const s=Dhe(r.silent,r.async,o);if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(Lhe(r),r.hooks&&(r.hooks.options=r),o){const l=r.highlight;let a;try{r.hooks&&(n=r.hooks.preprocess(n)),a=t(n,r)}catch(d){return s(d)}const u=function(d){let h;if(!d)try{r.walkTokens&&Te.walkTokens(a,r.walkTokens),h=e(a,r),r.hooks&&(h=r.hooks.postprocess(h))}catch(p){d=p}return r.highlight=l,d?s(d):o(null,h)};if(!l||l.length<3||(delete r.highlight,!a.length))return u();let c=0;Te.walkTokens(a,function(d){d.type==="code"&&(c++,setTimeout(()=>{l(d.text,d.lang,function(h,p){if(h)return u(h);p!=null&&p!==d.text&&(d.text=p,d.escaped=!0),c--,c===0&&u()})},0))}),c===0&&u();return}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(l=>t(l,r)).then(l=>r.walkTokens?Promise.all(Te.walkTokens(l,r.walkTokens)).then(()=>l):l).then(l=>e(l,r)).then(l=>r.hooks?r.hooks.postprocess(l):l).catch(s);try{r.hooks&&(n=r.hooks.preprocess(n));const l=t(n,r);r.walkTokens&&Te.walkTokens(l,r.walkTokens);let a=e(l,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(l){return s(l)}}}function Te(t,e,n){return v$(Zs.lex,Js.parse)(t,e,n)}Te.options=Te.setOptions=function(t){return Te.defaults={...Te.defaults,...t},whe(Te.defaults),Te};Te.getDefaults=d$;Te.defaults=Sl;Te.use=function(...t){const e=Te.defaults.extensions||{renderers:{},childTokens:{}};t.forEach(n=>{const r={...n};if(r.async=Te.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){const i=e.renderers[o.name];i?e.renderers[o.name]=function(...s){let l=o.renderer.apply(this,s);return l===!1&&(l=i.apply(this,s)),l}:e.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");e[o.level]?e[o.level].unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),n.renderer){const o=Te.defaults.renderer||new Mk;for(const i in n.renderer){const s=o[i];o[i]=(...l)=>{let a=n.renderer[i].apply(o,l);return a===!1&&(a=s.apply(o,l)),a}}r.renderer=o}if(n.tokenizer){const o=Te.defaults.tokenizer||new Rk;for(const i in n.tokenizer){const s=o[i];o[i]=(...l)=>{let a=n.tokenizer[i].apply(o,l);return a===!1&&(a=s.apply(o,l)),a}}r.tokenizer=o}if(n.hooks){const o=Te.defaults.hooks||new nm;for(const i in n.hooks){const s=o[i];nm.passThroughHooks.has(i)?o[i]=l=>{if(Te.defaults.async)return Promise.resolve(n.hooks[i].call(o,l)).then(u=>s.call(o,u));const a=n.hooks[i].call(o,l);return s.call(o,a)}:o[i]=(...l)=>{let a=n.hooks[i].apply(o,l);return a===!1&&(a=s.apply(o,l)),a}}r.hooks=o}if(n.walkTokens){const o=Te.defaults.walkTokens;r.walkTokens=function(i){let s=[];return s.push(n.walkTokens.call(this,i)),o&&(s=s.concat(o.call(this,i))),s}}Te.setOptions(r)})};Te.walkTokens=function(t,e){let n=[];for(const r of t)switch(n=n.concat(e.call(Te,r)),r.type){case"table":{for(const o of r.header)n=n.concat(Te.walkTokens(o.tokens,e));for(const o of r.rows)for(const i of o)n=n.concat(Te.walkTokens(i.tokens,e));break}case"list":{n=n.concat(Te.walkTokens(r.items,e));break}default:Te.defaults.extensions&&Te.defaults.extensions.childTokens&&Te.defaults.extensions.childTokens[r.type]?Te.defaults.extensions.childTokens[r.type].forEach(function(o){n=n.concat(Te.walkTokens(r[o],e))}):r.tokens&&(n=n.concat(Te.walkTokens(r.tokens,e)))}return n};Te.parseInline=v$(Zs.lexInline,Js.parseInline);Te.Parser=Js;Te.parser=Js.parse;Te.Renderer=Mk;Te.TextRenderer=g$;Te.Lexer=Zs;Te.lexer=Zs.lex;Te.Tokenizer=Rk;Te.Slugger=m$;Te.Hooks=nm;Te.parse=Te;Te.options;Te.setOptions;Te.use;Te.walkTokens;Te.parseInline;Js.parse;Zs.lex;var Phe=Object.defineProperty,zhe=Object.getOwnPropertyDescriptor,Lv=(t,e,n,r)=>{for(var o=r>1?void 0:r?zhe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Phe(e,n,o),o},Fhe=pm(Nh);function Bhe(t){return Uhe.turndown(t)}function h0(t){const e=t.parentNode;if(!Vt(e))return!1;if(e.nodeName==="THEAD")return!0;if(e.nodeName!=="TABLE"&&!y$(e))return!1;const n=[...t.childNodes];return n.every(r=>r.nodeName==="TH")&&n.some(r=>!!r.textContent)}function rm(t){return Vt(t)&&t.matches("th[data-controller-cell]")}function Hhe(t){const e=t.parentNode;return!Vt(e)||e.nodeName!=="TABLE"&&!y$(e)?!1:[...t.childNodes].every(r=>rm(r))}function y$(t){var n;if(t.nodeName!=="TBODY")return!1;const e=t.previousSibling;return e?Vt(e)&&e.nodeName==="THEAD"&&!((n=e.textContent)!=null&&n.trim()):!0}function D_(t){const e=t.closest("table");if(!e)return!1;const{parentNode:n}=e;return n?!!n.closest("table"):!0}function P_(t,e){var i;const n=[];for(const s of((i=e.parentNode)==null?void 0:i.childNodes)??[])rm(s)||n.push(s);return`${(n.indexOf(e)===0?"| ":" ")+t.trim()} |`}var Uhe=new Fhe({codeBlockStyle:"fenced",headingStyle:"atx"}).addRule("taskListItems",{filter:t=>t.nodeName==="LI"&&t.hasAttribute("data-task-list-item"),replacement:(t,e)=>`- ${e.hasAttribute("data-checked")?"[x]":"[ ]"} ${t.trimStart()}`}).addRule("tableCell",{filter:["th","td"],replacement:(t,e)=>rm(e)?"":P_(t,e)}).addRule("tableRow",{filter:"tr",replacement:(t,e)=>{let n="";const r={left:":--",right:"--:",center:":-:"},o=[...e.childNodes].filter(i=>!rm(i));if(h0(e))for(const i of o){if(!Vt(i))continue;let s="---";const l=(i.getAttribute("align")??"").toLowerCase();l&&(s=r[l]||s),n+=P_(s,i)}return` +`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return this.options.xhtml?"
":"
"}del(e){return`${e}`}link(e,n,r){if(e=I_(this.options.sanitize,this.options.baseUrl,e),e===null)return r;let o='
",o}image(e,n,r){if(e=I_(this.options.sanitize,this.options.baseUrl,e),e===null)return r;let o=`${r}":">",o}text(e){return e}}class v${strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,n,r){return""+r}image(e,n,r){return""+r}br(){return""}}class y${constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,n){let r=e,o=0;if(this.seen.hasOwnProperty(r)){o=this.seen[e];do o++,r=e+"-"+o;while(this.seen.hasOwnProperty(r))}return n||(this.seen[e]=o,this.seen[r]=0),r}slug(e,n={}){const r=this.serialize(e);return this.getNextSafeSlug(r,n.dryrun)}}class Js{constructor(e){this.options=e||Sl,this.options.renderer=this.options.renderer||new Ok,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new v$,this.slugger=new y$}static parse(e,n){return new Js(n).parse(e)}static parseInline(e,n){return new Js(n).parseInline(e)}parse(e,n=!0){let r="",o,i,s,l,a,u,c,d,h,p,f,g,m,v,y,b,w,k,x;const S=e.length;for(o=0;o0&&y.tokens[0].type==="paragraph"?(y.tokens[0].text=k+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=k+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:k}):v+=k),v+=this.parse(y.tokens,m),h+=this.renderer.listitem(v,w,b);r+=this.renderer.list(h,f,g);continue}case"html":{r+=this.renderer.html(p.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(p.tokens));continue}case"text":{for(h=p.tokens?this.parseInline(p.tokens):p.text;o+1{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,t){const o="

An error occurred:

"+Vn(r.message+"",!0)+"
";if(e)return Promise.resolve(o);if(n){n(null,o);return}return o}if(e)return Promise.reject(r);if(n){n(r);return}throw r}}function b$(t,e){return(n,r,o)=>{typeof r=="function"&&(o=r,r=null);const i={...r};r={...Te.defaults,...i};const s=Bhe(r.silent,r.async,o);if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(Phe(r),r.hooks&&(r.hooks.options=r),o){const l=r.highlight;let a;try{r.hooks&&(n=r.hooks.preprocess(n)),a=t(n,r)}catch(d){return s(d)}const u=function(d){let h;if(!d)try{r.walkTokens&&Te.walkTokens(a,r.walkTokens),h=e(a,r),r.hooks&&(h=r.hooks.postprocess(h))}catch(p){d=p}return r.highlight=l,d?s(d):o(null,h)};if(!l||l.length<3||(delete r.highlight,!a.length))return u();let c=0;Te.walkTokens(a,function(d){d.type==="code"&&(c++,setTimeout(()=>{l(d.text,d.lang,function(h,p){if(h)return u(h);p!=null&&p!==d.text&&(d.text=p,d.escaped=!0),c--,c===0&&u()})},0))}),c===0&&u();return}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(l=>t(l,r)).then(l=>r.walkTokens?Promise.all(Te.walkTokens(l,r.walkTokens)).then(()=>l):l).then(l=>e(l,r)).then(l=>r.hooks?r.hooks.postprocess(l):l).catch(s);try{r.hooks&&(n=r.hooks.preprocess(n));const l=t(n,r);r.walkTokens&&Te.walkTokens(l,r.walkTokens);let a=e(l,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(l){return s(l)}}}function Te(t,e,n){return b$(Zs.lex,Js.parse)(t,e,n)}Te.options=Te.setOptions=function(t){return Te.defaults={...Te.defaults,...t},She(Te.defaults),Te};Te.getDefaults=p$;Te.defaults=Sl;Te.use=function(...t){const e=Te.defaults.extensions||{renderers:{},childTokens:{}};t.forEach(n=>{const r={...n};if(r.async=Te.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){const i=e.renderers[o.name];i?e.renderers[o.name]=function(...s){let l=o.renderer.apply(this,s);return l===!1&&(l=i.apply(this,s)),l}:e.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");e[o.level]?e[o.level].unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),n.renderer){const o=Te.defaults.renderer||new Ok;for(const i in n.renderer){const s=o[i];o[i]=(...l)=>{let a=n.renderer[i].apply(o,l);return a===!1&&(a=s.apply(o,l)),a}}r.renderer=o}if(n.tokenizer){const o=Te.defaults.tokenizer||new Mk;for(const i in n.tokenizer){const s=o[i];o[i]=(...l)=>{let a=n.tokenizer[i].apply(o,l);return a===!1&&(a=s.apply(o,l)),a}}r.tokenizer=o}if(n.hooks){const o=Te.defaults.hooks||new nm;for(const i in n.hooks){const s=o[i];nm.passThroughHooks.has(i)?o[i]=l=>{if(Te.defaults.async)return Promise.resolve(n.hooks[i].call(o,l)).then(u=>s.call(o,u));const a=n.hooks[i].call(o,l);return s.call(o,a)}:o[i]=(...l)=>{let a=n.hooks[i].apply(o,l);return a===!1&&(a=s.apply(o,l)),a}}r.hooks=o}if(n.walkTokens){const o=Te.defaults.walkTokens;r.walkTokens=function(i){let s=[];return s.push(n.walkTokens.call(this,i)),o&&(s=s.concat(o.call(this,i))),s}}Te.setOptions(r)})};Te.walkTokens=function(t,e){let n=[];for(const r of t)switch(n=n.concat(e.call(Te,r)),r.type){case"table":{for(const o of r.header)n=n.concat(Te.walkTokens(o.tokens,e));for(const o of r.rows)for(const i of o)n=n.concat(Te.walkTokens(i.tokens,e));break}case"list":{n=n.concat(Te.walkTokens(r.items,e));break}default:Te.defaults.extensions&&Te.defaults.extensions.childTokens&&Te.defaults.extensions.childTokens[r.type]?Te.defaults.extensions.childTokens[r.type].forEach(function(o){n=n.concat(Te.walkTokens(r[o],e))}):r.tokens&&(n=n.concat(Te.walkTokens(r.tokens,e)))}return n};Te.parseInline=b$(Zs.lexInline,Js.parseInline);Te.Parser=Js;Te.parser=Js.parse;Te.Renderer=Ok;Te.TextRenderer=v$;Te.Lexer=Zs;Te.lexer=Zs.lex;Te.Tokenizer=Mk;Te.Slugger=y$;Te.Hooks=nm;Te.parse=Te;Te.options;Te.setOptions;Te.use;Te.walkTokens;Te.parseInline;Js.parse;Zs.lex;var Hhe=Object.defineProperty,Uhe=Object.getOwnPropertyDescriptor,Nv=(t,e,n,r)=>{for(var o=r>1?void 0:r?Uhe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Hhe(e,n,o),o},Whe=pm(Nh);function Vhe(t){return Ghe.turndown(t)}function p0(t){const e=t.parentNode;if(!Vt(e))return!1;if(e.nodeName==="THEAD")return!0;if(e.nodeName!=="TABLE"&&!w$(e))return!1;const n=[...t.childNodes];return n.every(r=>r.nodeName==="TH")&&n.some(r=>!!r.textContent)}function rm(t){return Vt(t)&&t.matches("th[data-controller-cell]")}function jhe(t){const e=t.parentNode;return!Vt(e)||e.nodeName!=="TABLE"&&!w$(e)?!1:[...t.childNodes].every(r=>rm(r))}function w$(t){var n;if(t.nodeName!=="TBODY")return!1;const e=t.previousSibling;return e?Vt(e)&&e.nodeName==="THEAD"&&!((n=e.textContent)!=null&&n.trim()):!0}function P_(t){const e=t.closest("table");if(!e)return!1;const{parentNode:n}=e;return n?!!n.closest("table"):!0}function z_(t,e){var i;const n=[];for(const s of((i=e.parentNode)==null?void 0:i.childNodes)??[])rm(s)||n.push(s);return`${(n.indexOf(e)===0?"| ":" ")+t.trim()} |`}var Ghe=new Whe({codeBlockStyle:"fenced",headingStyle:"atx"}).addRule("taskListItems",{filter:t=>t.nodeName==="LI"&&t.hasAttribute("data-task-list-item"),replacement:(t,e)=>`- ${e.hasAttribute("data-checked")?"[x]":"[ ]"} ${t.trimStart()}`}).addRule("tableCell",{filter:["th","td"],replacement:(t,e)=>rm(e)?"":z_(t,e)}).addRule("tableRow",{filter:"tr",replacement:(t,e)=>{let n="";const r={left:":--",right:"--:",center:":-:"},o=[...e.childNodes].filter(i=>!rm(i));if(p0(e))for(const i of o){if(!Vt(i))continue;let s="---";const l=(i.getAttribute("align")??"").toLowerCase();l&&(s=r[l]||s),n+=z_(s,i)}return` ${t}${n?` -${n}`:""}`}}).addRule("table",{filter:t=>{if(t.nodeName!=="TABLE"||D_(t))return!1;const e=[...t.rows].filter(n=>!Hhe(n));return h0(e[0])},replacement:t=>(t=t.replace(` +${n}`:""}`}}).addRule("table",{filter:t=>{if(t.nodeName!=="TABLE"||P_(t))return!1;const e=[...t.rows].filter(n=>!jhe(n));return p0(e[0])},replacement:t=>(t=t.replace(` `,` `),` ${t} -`)}).addRule("tableSection",{filter:["thead","tbody","tfoot"],replacement:function(t){return t}}).keep(t=>t.nodeName==="TABLE"&&!h0(t.rows[0])).keep(t=>t.nodeName==="TABLE"&&D_(t)).addRule("strikethrough",{filter:["del","s","strike"],replacement:function(t){return`~${t}~`}}).addRule("fencedCodeBlock",{filter:(t,e)=>!!(e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"),replacement:(t,e,n)=>{var i,s;we(Vt(e.firstChild),{code:re.EXTENSION,message:`Invalid node \`${(i=e.firstChild)==null?void 0:i.nodeName}\` encountered for codeblock when converting html to markdown.`});const o=((s=(e.firstChild.getAttribute("class")??"").match(/(?:lang|language)-(\S+)/))==null?void 0:s[1])??e.firstChild.getAttribute("data-code-block-language")??"";return` +`)}).addRule("tableSection",{filter:["thead","tbody","tfoot"],replacement:function(t){return t}}).keep(t=>t.nodeName==="TABLE"&&!p0(t.rows[0])).keep(t=>t.nodeName==="TABLE"&&P_(t)).addRule("strikethrough",{filter:["del","s","strike"],replacement:function(t){return`~${t}~`}}).addRule("fencedCodeBlock",{filter:(t,e)=>!!(e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"),replacement:(t,e,n)=>{var i,s;we(Vt(e.firstChild),{code:re.EXTENSION,message:`Invalid node \`${(i=e.firstChild)==null?void 0:i.nodeName}\` encountered for codeblock when converting html to markdown.`});const o=((s=(e.firstChild.getAttribute("class")??"").match(/(?:lang|language)-(\S+)/))==null?void 0:s[1])??e.firstChild.getAttribute("data-code-block-language")??"";return` ${n.fence}${o} ${e.firstChild.textContent} @@ -4990,13 +4994,13 @@ ${t} ${t} `},listitem(t,e,n){return e?`
  • ${t}
  • `:`
  • ${t}
  • -`}}});function Whe(t,e){const n=Te(t,{gfm:!0,smartLists:!0,xhtml:!0});return e?e(n):n}var ou=class extends ft{get name(){return"markdown"}onCreate(){this.store.setStringHandler("markdown",this.markdownToProsemirrorNode.bind(this))}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsMarkdown?e=>{const n=document.createElement("div"),r=Vr.fromSchema(this.store.schema);return n.append(r.serializeFragment(e.content)),this.options.htmlToMarkdown(n.innerHTML)}:void 0}}}markdownToProsemirrorNode(t){return this.store.stringHandlers.html({...t,content:this.options.markdownToHtml(t.content,this.options.htmlSanitizer)})}insertMarkdown(t,e){return n=>{const{state:r}=n;let o=this.options.markdownToHtml(t,this.options.htmlSanitizer);o=!(e!=null&&e.alwaysWrapInBlock)&&o.startsWith("

    <")&&o.endsWith(`

    -`)?o.slice(3,-5):`
    ${o}
    `;const i=this.store.stringHandlers.html({content:o,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(i,{...e,replaceEmptyParentBlock:!0})(n)}}getMarkdown(t){return this.options.htmlToMarkdown(this.store.helpers.getHTML(t))}toggleBoldMarkdown(){return t=>!1}};Lv([le()],ou.prototype,"insertMarkdown",1);Lv([it()],ou.prototype,"getMarkdown",1);Lv([le()],ou.prototype,"toggleBoldMarkdown",1);ou=Lv([Ne({defaultOptions:{htmlToMarkdown:Bhe,markdownToHtml:Whe,htmlSanitizer:void 0,activeNodes:[ke.Code],copyAsMarkdown:!1},staticKeys:["htmlToMarkdown","markdownToHtml","htmlSanitizer"]})],ou);var Vhe=Object.defineProperty,jhe=Object.getOwnPropertyDescriptor,Ok=(t,e,n,r)=>{for(var o=r>1?void 0:r?jhe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Vhe(e,n,o),o},Ghe={icon:"strikethrough",label:({t})=>t(zS.LABEL),description:({t})=>t(zS.DESCRIPTION)},$h=class extends na{get name(){return"strike"}createTags(){return[ke.FontStyle,ke.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"s",getAttrs:t.parse},{tag:"del",getAttrs:t.parse},{tag:"strike",getAttrs:t.parse},{style:"text-decoration",getAttrs:n=>n==="line-through"?{}:!1},...e.parseDOM??[]],toDOM:n=>["s",t.dom(n),0]}}toggleStrike(){return js({type:this.type})}shortcut(t){return this.toggleStrike()(t)}createInputRules(){return[Jd({regexp:/~([^~]+)~$/,type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{regexp:/~([^~]+)~/g,type:"mark",markType:this.type}]}};Ok([le(Ghe)],$h.prototype,"toggleStrike",1);Ok([en({shortcut:oe.Strike,command:"toggleStrike"})],$h.prototype,"shortcut",1);$h=Ok([Ne({})],$h);var z_=new vl("trailingNode");function Khe(t){const{ignoredNodes:e=[],nodeName:n="paragraph"}=t??{},r=Ic([...e,n]);let o,i;return new mi({key:z_,appendTransaction(s,l,a){const{doc:u,tr:c}=a,d=z_.getState(a),h=u.content.size;if(d)return c.insert(h,o.create())},state:{init:(s,{doc:l,schema:a})=>{var u;const c=a.nodes[n];if(!c)throw new Error(`Invalid node being used for trailing node extension: '${n}'`);return o=c,i=Object.values(a.nodes).map(d=>d).filter(d=>!r.includes(d.name)),ir(i,(u=l.lastChild)==null?void 0:u.type)},apply:(s,l)=>{var a;return s.docChanged?ir(i,(a=s.doc.lastChild)==null?void 0:a.type):l}}})}var Yhe=Object.defineProperty,Xhe=Object.getOwnPropertyDescriptor,qhe=(t,e,n,r)=>{for(var o=r>1?void 0:r?Xhe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Yhe(e,n,o),o},lb=class extends ft{get name(){return"trailingNode"}onSetOptions(t){const{changes:e}=t;(e.disableTags.changed||e.ignoredNodes.changed||e.nodeName.changed)&&this.store.updateExtensionPlugins(this)}createExternalPlugins(){const{tags:t}=this.store,{disableTags:e,nodeName:n}=this.options,r=e?[...this.options.ignoredNodes]:[...this.options.ignoredNodes,...t.lastNodeCompatible];return[Khe({ignoredNodes:r,nodeName:n})]}};lb=qhe([Ne({defaultOptions:{ignoredNodes:[],disableTags:!1,nodeName:"paragraph"}})],lb);var Zhe=Object.defineProperty,Jhe=Object.getOwnPropertyDescriptor,Ik=(t,e,n,r)=>{for(var o=r>1?void 0:r?Jhe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Zhe(e,n,o),o},Qhe={icon:"underline",label:({t})=>t(FS.LABEL),description:({t})=>t(FS.DESCRIPTION)},Dh=class extends na{get name(){return"underline"}createTags(){return[ke.FontStyle,ke.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"u",getAttrs:t.parse},{style:"text-decoration",getAttrs:n=>n==="underline"?{}:!1},...e.parseDOM??[]],toDOM:n=>["u",t.dom(n),0]}}toggleUnderline(t){return js({type:this.type,selection:t})}shortcut(t){return this.toggleUnderline()(t)}};Ik([le(Qhe)],Dh.prototype,"toggleUnderline",1);Ik([en({shortcut:oe.Underline,command:"toggleUnderline"})],Dh.prototype,"shortcut",1);Dh=Ik([Ne({})],Dh);/* +`}}});function Khe(t,e){const n=Te(t,{gfm:!0,smartLists:!0,xhtml:!0});return e?e(n):n}var ou=class extends ft{get name(){return"markdown"}onCreate(){this.store.setStringHandler("markdown",this.markdownToProsemirrorNode.bind(this))}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsMarkdown?e=>{const n=document.createElement("div"),r=Vr.fromSchema(this.store.schema);return n.append(r.serializeFragment(e.content)),this.options.htmlToMarkdown(n.innerHTML)}:void 0}}}markdownToProsemirrorNode(t){return this.store.stringHandlers.html({...t,content:this.options.markdownToHtml(t.content,this.options.htmlSanitizer)})}insertMarkdown(t,e){return n=>{const{state:r}=n;let o=this.options.markdownToHtml(t,this.options.htmlSanitizer);o=!(e!=null&&e.alwaysWrapInBlock)&&o.startsWith("

    <")&&o.endsWith(`

    +`)?o.slice(3,-5):`
    ${o}
    `;const i=this.store.stringHandlers.html({content:o,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(i,{...e,replaceEmptyParentBlock:!0})(n)}}getMarkdown(t){return this.options.htmlToMarkdown(this.store.helpers.getHTML(t))}toggleBoldMarkdown(){return t=>!1}};Nv([le()],ou.prototype,"insertMarkdown",1);Nv([it()],ou.prototype,"getMarkdown",1);Nv([le()],ou.prototype,"toggleBoldMarkdown",1);ou=Nv([Ne({defaultOptions:{htmlToMarkdown:Vhe,markdownToHtml:Khe,htmlSanitizer:void 0,activeNodes:[ke.Code],copyAsMarkdown:!1},staticKeys:["htmlToMarkdown","markdownToHtml","htmlSanitizer"]})],ou);var Yhe=Object.defineProperty,Xhe=Object.getOwnPropertyDescriptor,Ik=(t,e,n,r)=>{for(var o=r>1?void 0:r?Xhe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Yhe(e,n,o),o},qhe={icon:"strikethrough",label:({t})=>t(FS.LABEL),description:({t})=>t(FS.DESCRIPTION)},$h=class extends na{get name(){return"strike"}createTags(){return[ke.FontStyle,ke.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"s",getAttrs:t.parse},{tag:"del",getAttrs:t.parse},{tag:"strike",getAttrs:t.parse},{style:"text-decoration",getAttrs:n=>n==="line-through"?{}:!1},...e.parseDOM??[]],toDOM:n=>["s",t.dom(n),0]}}toggleStrike(){return js({type:this.type})}shortcut(t){return this.toggleStrike()(t)}createInputRules(){return[Jd({regexp:/~([^~]+)~$/,type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{regexp:/~([^~]+)~/g,type:"mark",markType:this.type}]}};Ik([le(qhe)],$h.prototype,"toggleStrike",1);Ik([en({shortcut:oe.Strike,command:"toggleStrike"})],$h.prototype,"shortcut",1);$h=Ik([Ne({})],$h);var F_=new vl("trailingNode");function Zhe(t){const{ignoredNodes:e=[],nodeName:n="paragraph"}=t??{},r=Ic([...e,n]);let o,i;return new mi({key:F_,appendTransaction(s,l,a){const{doc:u,tr:c}=a,d=F_.getState(a),h=u.content.size;if(d)return c.insert(h,o.create())},state:{init:(s,{doc:l,schema:a})=>{var u;const c=a.nodes[n];if(!c)throw new Error(`Invalid node being used for trailing node extension: '${n}'`);return o=c,i=Object.values(a.nodes).map(d=>d).filter(d=>!r.includes(d.name)),ir(i,(u=l.lastChild)==null?void 0:u.type)},apply:(s,l)=>{var a;return s.docChanged?ir(i,(a=s.doc.lastChild)==null?void 0:a.type):l}}})}var Jhe=Object.defineProperty,Qhe=Object.getOwnPropertyDescriptor,epe=(t,e,n,r)=>{for(var o=r>1?void 0:r?Qhe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Jhe(e,n,o),o},ub=class extends ft{get name(){return"trailingNode"}onSetOptions(t){const{changes:e}=t;(e.disableTags.changed||e.ignoredNodes.changed||e.nodeName.changed)&&this.store.updateExtensionPlugins(this)}createExternalPlugins(){const{tags:t}=this.store,{disableTags:e,nodeName:n}=this.options,r=e?[...this.options.ignoredNodes]:[...this.options.ignoredNodes,...t.lastNodeCompatible];return[Zhe({ignoredNodes:r,nodeName:n})]}};ub=epe([Ne({defaultOptions:{ignoredNodes:[],disableTags:!1,nodeName:"paragraph"}})],ub);var tpe=Object.defineProperty,npe=Object.getOwnPropertyDescriptor,Lk=(t,e,n,r)=>{for(var o=r>1?void 0:r?npe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&tpe(e,n,o),o},rpe={icon:"underline",label:({t})=>t(BS.LABEL),description:({t})=>t(BS.DESCRIPTION)},Dh=class extends na{get name(){return"underline"}createTags(){return[ke.FontStyle,ke.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"u",getAttrs:t.parse},{style:"text-decoration",getAttrs:n=>n==="underline"?{}:!1},...e.parseDOM??[]],toDOM:n=>["u",t.dom(n),0]}}toggleUnderline(t){return js({type:this.type,selection:t})}shortcut(t){return this.toggleUnderline()(t)}};Lk([le(rpe)],Dh.prototype,"toggleUnderline",1);Lk([en({shortcut:oe.Underline,command:"toggleUnderline"})],Dh.prototype,"shortcut",1);Dh=Lk([Ne({})],Dh);/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const F_={};function epe(t,e){if(F_[t])return;const n=document.createElement("style"),r=tpe(t)/1e4,o=npe({h:Math.abs(r),s:.6,v:.6}),i=rpe(o);n.type="text/css",n.textContent=` + */const B_={};function ope(t,e){if(B_[t])return;const n=document.createElement("style"),r=ipe(t)/1e4,o=spe({h:Math.abs(r),s:.6,v:.6}),i=ape(o);n.type="text/css",n.textContent=` .remirror-editor-wrapper .${e}${t}::before { content: '[${t}]'; font-family: monospace; @@ -5010,25 +5014,25 @@ ${t} font-size: 90%; color: ${i}; } - `,document.head.appendChild(n),F_[t]=!0}function tpe(t){let e=0;if(!t||t.length===0)return e;for(let n=0;n{for(var o=r>1?void 0:r?ipe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&ope(e,n,o),o};const Kf="__editor_";let iu=class extends na{get name(){return"className"}constructor(t){super(t);for(const e of t.classNames||[])epe(e,Kf)}createTags(){return[ke.FontStyle,ke.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:{...t.defaults(),className:{}},excludes:"",parseDOM:[{tag:"*",getAttrs:n=>{var r;if(!Vt(n))return!1;for(let o of n.classList)if(o.startsWith(Kf)&&(o=o.substring(Kf.length)),((r=this.options.classNames)==null?void 0:r.indexOf(o))>=0)return{...t.parse(n),className:o};return!1}},...e.parseDOM??[]],toDOM:n=>{const{className:r,...o}=Em(n.attrs,t),i=t.dom(n),s=i.className,l=spe(r,s);return["span",{...o,...i,class:l},0]}}}setClassName(t,e){return({tr:n,dispatch:r})=>{const{from:o,to:i}=cr(e??n.selection,n.doc);return r==null||r(n.addMark(o,i,this.type.create({className:t}))),!0}}removeClassName(t){return this.store.commands.removeMark.original({type:this.type,selection:t,expand:!0})}};Lk([le({})],iu.prototype,"setClassName",1);Lk([le({})],iu.prototype,"removeClassName",1);iu=Lk([Ne({defaultOptions:{},staticKeys:["classNames"]})],iu);function spe(t,e){return t&&(t=`${Kf}${t}`),t&&e?`${t} ${e}`:t||e}/* + `,document.head.appendChild(n),B_[t]=!0}function ipe(t){let e=0;if(!t||t.length===0)return e;for(let n=0;n{for(var o=r>1?void 0:r?cpe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&lpe(e,n,o),o};const Kf="__editor_";let iu=class extends na{get name(){return"className"}constructor(t){super(t);for(const e of t.classNames||[])ope(e,Kf)}createTags(){return[ke.FontStyle,ke.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:{...t.defaults(),className:{}},excludes:"",parseDOM:[{tag:"*",getAttrs:n=>{var r;if(!Vt(n))return!1;for(let o of n.classList)if(o.startsWith(Kf)&&(o=o.substring(Kf.length)),((r=this.options.classNames)==null?void 0:r.indexOf(o))>=0)return{...t.parse(n),className:o};return!1}},...e.parseDOM??[]],toDOM:n=>{const{className:r,...o}=Em(n.attrs,t),i=t.dom(n),s=i.className,l=upe(r,s);return["span",{...o,...i,class:l},0]}}}setClassName(t,e){return({tr:n,dispatch:r})=>{const{from:o,to:i}=cr(e??n.selection,n.doc);return r==null||r(n.addMark(o,i,this.type.create({className:t}))),!0}}removeClassName(t){return this.store.commands.removeMark.original({type:this.type,selection:t,expand:!0})}};Nk([le({})],iu.prototype,"setClassName",1);Nk([le({})],iu.prototype,"removeClassName",1);iu=Nk([Ne({defaultOptions:{},staticKeys:["classNames"]})],iu);function upe(t,e){return t&&(t=`${Kf}${t}`),t&&e?`${t} ${e}`:t||e}/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */function b$(t){const[e,n]=P.useState(t),r=P.useRef(t);return r.current=e,[e,n,r]}function ape(){const{getState:t,getPluginState:e}=to({autoUpdate:!0}),{doc:n,selection:r}=t(),{from:o,to:i}=cr(r,n),s=e("annotation");let l=H_,a=U_;for(const u of s.annotations)(ri(o,u.from,u.to)||ri(i,u.from,u.to)||ri(u.from,o,i)||ri(u.to,o,i))&&(a===U_&&(a=[]),a.push(u.id)),l===H_&&(l=[]),l.push(u);return{selected:a,available:l}}function B_(t,e,n){const[r,o]=P.useState(e());return P.useEffect(()=>{const i=setTimeout(()=>{o(e())},t);return()=>{clearTimeout(i)}},n),r}const H_=[],U_=[];Nk.displayName="abap";Nk.aliases=[];function Nk(t){t.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}}pr.displayName="clike";pr.aliases=[];function pr(t){t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}ca.displayName="javascript";ca.aliases=["js"];function ca(t){t.register(pr),t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript}$k.displayName="actionscript";$k.aliases=[];function $k(t){t.register(ca),t.languages.actionscript=t.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),t.languages.actionscript["class-name"].alias="function",delete t.languages.actionscript.parameter,delete t.languages.actionscript["literal-property"],t.languages.markup&&t.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:t.languages.markup}})}Dk.displayName="bash";Dk.aliases=["sh","shell"];function Dk(t){(function(e){var n="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},o={bash:r,environment:{pattern:RegExp("\\$"+n),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+n),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+n),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:o},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:o},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:o.entity}}],environment:{pattern:RegExp("\\$?"+n),alias:"constant"},variable:o.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=o.variable[1].inside,l=0;l?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}zk.displayName="batch";zk.aliases=[];function zk(t){(function(e){var n=/%%?[~:\w]+%?|!\S+!/,r={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},o=/"(?:[\\"]"|[^"])*"(?!")/,i=/(?:\b|-)\d+\b/;e.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/\b(?:do|in)\b|^for\b/i,string:o,parameter:r,variable:n,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,string:o,parameter:r,variable:n,number:i,operator:/\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:o,parameter:r,variable:[n,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,lookbehind:!0,inside:{keyword:/^\w+\b/,string:o,parameter:r,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:n,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}})(t)}gp.displayName="c";gp.aliases=[];function gp(t){t.register(pr),t.languages.c=t.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),t.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),t.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},t.languages.c.string],char:t.languages.c.char,comment:t.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:t.languages.c}}}}),t.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete t.languages.c.boolean}Fk.displayName="clojure";Fk.aliases=[];function Fk(t){t.languages.clojure={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},char:/\\\w+/,symbol:{pattern:/(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,lookbehind:!0},keyword:{pattern:/(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,lookbehind:!0},boolean:/\b(?:false|nil|true)\b/,number:{pattern:/(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,lookbehind:!0},function:{pattern:/((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,lookbehind:!0},operator:/[#@^`~]/,punctuation:/[{}\[\](),]/}}Bk.displayName="cmake";Bk.aliases=[];function Bk(t){t.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_NAME|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/}}Hk.displayName="cobol";Hk.aliases=[];function Hk(t){t.languages.cobol={comment:{pattern:/\*>.*|(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},string:{pattern:/[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,greedy:!0},level:{pattern:/(^[ \t]*)\d+\b/m,lookbehind:!0,greedy:!0,alias:"number"},"class-name":{pattern:/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,lookbehind:!0,inside:{number:{pattern:/(\()\d+/,lookbehind:!0},punctuation:/[()]/}},keyword:{pattern:/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,lookbehind:!0},boolean:{pattern:/(^|[^\w-])(?:false|true)(?![\w-])/i,lookbehind:!0},number:{pattern:/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,lookbehind:!0},operator:[/<>|[<>]=?|[=+*/&]/,{pattern:/(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,lookbehind:!0}],punctuation:/[.:,()]/}}Uk.displayName="coffeescript";Uk.aliases=["coffee"];function Uk(t){t.register(ca),function(e){var n=/#(?!\{).+/,r={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:n,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:r}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:n,interpolation:r}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:r}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(t)}Wk.displayName="cpp";Wk.aliases=[];function Wk(t){t.register(gp),function(e){var n=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return n.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return n.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:n,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(t)}Vk.displayName="csharp";Vk.aliases=["cs","dotnet"];function Vk(t){t.register(pr),function(e){function n(D,F){return D.replace(/<<(\d+)>>/g,function(U,W){return"(?:"+F[+W]+")"})}function r(D,F,U){return RegExp(n(D,F),U||"")}function o(D,F){for(var U=0;U>/g,function(){return"(?:"+D+")"});return D.replace(/<>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function s(D){return"\\b(?:"+D.trim().replace(/ /g,"|")+")\\b"}var l=s(i.typeDeclaration),a=RegExp(s(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),u=s(i.typeDeclaration+" "+i.contextual+" "+i.other),c=s(i.type+" "+i.typeDeclaration+" "+i.other),d=o(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),h=o(/\((?:[^()]|<>)*\)/.source,2),p=/@?\b[A-Za-z_]\w*\b/.source,f=n(/<<0>>(?:\s*<<1>>)?/.source,[p,d]),g=n(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,f]),m=/\[\s*(?:,\s*)*\]/.source,v=n(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[g,m]),y=n(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[d,h,m]),b=n(/\(<<0>>+(?:,<<0>>+)+\)/.source,[y]),w=n(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[b,g,m]),k={keyword:a,punctuation:/[<>()?,.:[\]]/},x=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,A=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[g]),lookbehind:!0,inside:k},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[p,w]),lookbehind:!0,inside:k},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[p]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[l,f]),lookbehind:!0,inside:k},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[g]),lookbehind:!0,inside:k},{pattern:r(/(\bwhere\s+)<<0>>/.source,[p]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:k},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[w,c,p]),inside:k}],keyword:a,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[p]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[p]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:k},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[w,g]),inside:k,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[w]),lookbehind:!0,inside:k,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[p,d]),inside:{function:r(/^<<0>>/.source,[p]),generic:{pattern:RegExp(d),alias:"class-name",inside:k}}},"type-list":{pattern:r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[l,f,p,w,a.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[f,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:a,"class-name":{pattern:RegExp(w),greedy:!0,inside:k},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var C=S+"|"+x,O=n(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[C]),R=o(n(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),_=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,T=n(/<<0>>(?:\s*\(<<1>>*\))?/.source,[g,R]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[_,T]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[_]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[R]),inside:e.languages.csharp},"class-name":{pattern:RegExp(g),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var E=/:[^}\r\n]+/.source,M=o(n(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),I=n(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[M,E]),N=o(n(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[C]),2),L=n(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[N,E]);function $(D,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[D]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,E]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[I]),lookbehind:!0,greedy:!0,inside:$(I,M)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:$(L,N)}],char:{pattern:RegExp(x),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(t)}mp.displayName="css";mp.aliases=[];function mp(t){(function(e){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+n.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(t)}jk.displayName="csv";jk.aliases=[];function jk(t){t.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}}Gk.displayName="d";Gk.aliases=[];function Gk(t){t.register(pr),t.languages.d=t.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp(/(^|[^\\])/.source+"(?:"+[/\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source,/\/\/.*/.source,/\/\*[\s\S]*?\*\//.source].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp([/\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source,/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source,/\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source,/\bq"(.)[\s\S]*?\2"/.source,/(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],keyword:/\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,lookbehind:!0}],operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),t.languages.insertBefore("d","string",{char:/'(?:\\(?:\W|\w+)|[^\\])'/}),t.languages.insertBefore("d","keyword",{property:/\B@\w*/}),t.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}})}Kk.displayName="dart";Kk.aliases=[];function Kk(t){t.register(pr),function(e){var n=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],r=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,o={pattern:RegExp(r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[o,{pattern:RegExp(r+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:o.inside}],keyword:n,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":o,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(t)}bu.displayName="markup";bu.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function bu(t){t.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.value.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(n,r){var o={};o["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[r]},o.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:o}};i["language-"+r]={pattern:/[\s\S]+/,inside:t.languages[r]};var s={};s[n]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:i},t.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml}Cl.displayName="markup-templating";Cl.aliases=[];function Cl(t){t.register(bu),function(e){function n(r,o){return"___"+r.toUpperCase()+o+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,o,i,s){if(r.language===o){var l=r.tokenStack=[];r.code=r.code.replace(i,function(a){if(typeof s=="function"&&!s(a))return a;for(var u=l.length,c;r.code.indexOf(c=n(o,u))!==-1;)++u;return l[u]=a,c}),r.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(r,o){if(r.language!==o||!r.tokenStack)return;r.grammar=e.languages[o];var i=0,s=Object.keys(r.tokenStack);function l(a){for(var u=0;u=s.length);u++){var c=a[u];if(typeof c=="string"||c.content&&typeof c.content=="string"){var d=s[i],h=r.tokenStack[d],p=typeof c=="string"?c:c.content,f=n(o,d),g=p.indexOf(f);if(g>-1){++i;var m=p.substring(0,g),v=new e.Token(o,e.tokenize(h,r.grammar),"language-"+o,h),y=p.substring(g+f.length),b=[];m&&b.push.apply(b,l([m])),b.push(v),y&&b.push.apply(b,l([y])),typeof c=="string"?a.splice.apply(a,[u,1].concat(b)):c.content=b}}else c.content&&l(c.content)}return a}l(r.tokens)}}})}(t)}Yk.displayName="django";Yk.aliases=["jinja2"];function Yk(t){t.register(Cl),function(e){e.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/};var n=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,r=e.languages["markup-templating"];e.hooks.add("before-tokenize",function(o){r.buildPlaceholders(o,"django",n)}),e.hooks.add("after-tokenize",function(o){r.tokenizePlaceholders(o,"django")}),e.languages.jinja2=e.languages.django,e.hooks.add("before-tokenize",function(o){r.buildPlaceholders(o,"jinja2",n)}),e.hooks.add("after-tokenize",function(o){r.tokenizePlaceholders(o,"jinja2")})}(t)}Xk.displayName="docker";Xk.aliases=["dockerfile"];function Xk(t){(function(e){var n=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,r=/(?:[ \t]+(?![ \t])(?:)?|)/.source.replace(//g,function(){return n}),o=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,i=/--[\w-]+=(?:|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(//g,function(){return o}),s={pattern:RegExp(o),greedy:!0},l={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function a(u,c){return u=u.replace(//g,function(){return i}).replace(//g,function(){return r}),RegExp(u,c)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:a(/(^(?:ONBUILD)?\w+)(?:)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[s,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:a(/(^(?:ONBUILD)?HEALTHCHECK(?:)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:a(/(^(?:ONBUILD)?FROM(?:)*(?!--)[^ \t\\]+)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:a(/(^ONBUILD)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:l,string:s,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:l},e.languages.dockerfile=e.languages.docker})(t)}qk.displayName="eiffel";qk.aliases=[];function qk(t){t.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}Zk.displayName="ejs";Zk.aliases=["eta"];function Zk(t){t.register(ca),t.register(Cl),function(e){e.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:e.languages.javascript}},e.hooks.add("before-tokenize",function(n){var r=/<%(?!%)[\s\S]+?%>/g;e.languages["markup-templating"].buildPlaceholders(n,"ejs",r)}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"ejs")}),e.languages.eta=e.languages.ejs}(t)}Jk.displayName="elixir";Jk.aliases=[];function Jk(t){t.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},t.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:t.languages.elixir}}}})}Qk.displayName="elm";Qk.aliases=[];function Qk(t){t.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}}eE.displayName="erlang";eE.aliases=[];function eE(t){t.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^\\'\r\n])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^\\'\r\n])+'/,alias:"atom"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:after|begin|case|catch|end|fun|if|of|receive|try|when)\b/,number:[/\$\\?./,/\b\d+#[a-z0-9]+/i,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i],function:/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/}}tE.displayName="fortran";tE.aliases=[];function tE(t){t.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:FALSE|TRUE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}}nE.displayName="fsharp";nE.aliases=[];function nE(t){t.register(pr),t.languages.fsharp=t.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,number:[/\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,/\b0b[01]+(?:uy|y)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),t.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(^#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),t.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/\b[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),t.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,greedy:!0,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:t.languages.fsharp}}},char:{pattern:/'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0}})}rE.displayName="git";rE.aliases=[];function rE(t){t.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}}oE.displayName="go";oE.aliases=[];function oE(t){t.register(pr),t.languages.go=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),t.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete t.languages.go["class-name"]}iE.displayName="gradle";iE.aliases=[];function iE(t){t.register(pr),function(e){var n={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.gradle=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:apply|def|dependencies|else|if|implementation|import|plugin|plugins|project|repositories|repository|sourceSets|tasks|val)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("gradle","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}}}),e.languages.insertBefore("gradle","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("gradle","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),n.inside.expression.inside=e.languages.gradle}(t)}sE.displayName="graphql";sE.aliases=[];function sE(t){t.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:t.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},t.hooks.add("after-tokenize",function(n){if(n.language!=="graphql")return;var r=n.tokens.filter(function(m){return typeof m!="string"&&m.type!=="comment"&&m.type!=="scalar"}),o=0;function i(m){return r[o+m]}function s(m,v){v=v||0;for(var y=0;y0)){var p=l(/^\{$/,/^\}$/);if(p===-1)continue;for(var f=o;f=0&&a(g,"variable-input")}}}}})}aE.displayName="groovy";aE.aliases=[];function aE(t){t.register(pr),function(e){var n={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.groovy=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),n.inside.expression.inside=e.languages.groovy}(t)}lE.displayName="handlebars";lE.aliases=["hbs","mustache"];function lE(t){t.register(Cl),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(n){var r=/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g;e.languages["markup-templating"].buildPlaceholders(n,"handlebars",r)}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"handlebars")}),e.languages.hbs=e.languages.handlebars,e.languages.mustache=e.languages.handlebars}(t)}cE.displayName="ignore";cE.aliases=["gitignore","hgignore","npmignore"];function cE(t){(function(e){e.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},e.languages.gitignore=e.languages.ignore,e.languages.hgignore=e.languages.ignore,e.languages.npmignore=e.languages.ignore})(t)}Nv.displayName="java";Nv.aliases=[];function Nv(t){t.register(pr),function(e){var n=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,o={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[o,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:o.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:o.inside}],keyword:n,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":o,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:o.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:o.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return n.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(t)}uE.displayName="json";uE.aliases=["webmanifest"];function uE(t){t.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},t.languages.webmanifest=t.languages.json}dE.displayName="jsx";dE.aliases=[];function dE(t){t.register(ca),t.register(bu),function(e){var n=e.util.clone(e.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,o=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{*\.{3}(?:[^{}]|)*\})/.source;function s(u,c){return u=u.replace(//g,function(){return r}).replace(//g,function(){return o}).replace(//g,function(){return i}),RegExp(u,c)}i=s(i).source,e.languages.jsx=e.languages.extend("markup",n),e.languages.jsx.tag.pattern=s(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=n.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:s(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:s(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var l=function(u){return u?typeof u=="string"?u:typeof u.content=="string"?u.content:u.content.map(l).join(""):""},a=function(u){for(var c=[],d=0;d0&&c[c.length-1].tagName===l(h.content[0].content[1])&&c.pop():h.content[h.content.length-1].content==="/>"||c.push({tagName:l(h.content[0].content[1]),openedBraces:0}):c.length>0&&h.type==="punctuation"&&h.content==="{"?c[c.length-1].openedBraces++:c.length>0&&c[c.length-1].openedBraces>0&&h.type==="punctuation"&&h.content==="}"?c[c.length-1].openedBraces--:p=!0),(p||typeof h=="string")&&c.length>0&&c[c.length-1].openedBraces===0){var f=l(h);d0&&(typeof u[d-1]=="string"||u[d-1].type==="plain-text")&&(f=l(u[d-1])+f,u.splice(d-1,1),d--),u[d]=new e.Token("plain-text",f,null,f)}h.content&&typeof h.content!="string"&&a(h.content)}};e.hooks.add("after-tokenize",function(u){u.language!=="jsx"&&u.language!=="tsx"||a(u.tokens)})}(t)}hE.displayName="kotlin";hE.aliases=["kt","kts"];function hE(t){t.register(pr),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var n={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:n},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:n},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(t)}pE.displayName="latex";pE.aliases=["context","tex"];function pE(t){(function(e){var n=/\\(?:[^a-z()[\]]|[a-z*]+)/i,r={"equation-command":{pattern:n,alias:"regex"}};e.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:r,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:r,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:n,alias:"selector"},punctuation:/[[\]{}&]/},e.languages.tex=e.languages.latex,e.languages.context=e.languages.latex})(t)}fE.displayName="liquid";fE.aliases=[];function fE(t){t.register(Cl),t.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},t.hooks.add("before-tokenize",function(e){var n=/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,r=!1;t.languages["markup-templating"].buildPlaceholders(e,"liquid",n,function(o){var i=/^\{%-?\s*(\w+)/.exec(o);if(i){var s=i[1];if(s==="raw"&&!r)return r=!0,!0;if(s==="endraw")return r=!1,!0}return!r})}),t.hooks.add("after-tokenize",function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"liquid")})}gE.displayName="lisp";gE.aliases=["elisp","emacs","emacs-lisp"];function gE(t){(function(e){function n(f){return RegExp(/(\()/.source+"(?:"+f+")"+/(?=[\s\)])/.source)}function r(f){return RegExp(/([\s([])/.source+"(?:"+f+")"+/(?=[\s)])/.source)}var o=/(?!\d)[-+*/~!@$%^=<>{}\w]+/.source,i="&"+o,s="(\\()",l="(?=\\))",a="(?=\\s)",u=/(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source,c={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+o+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+o),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+o),alias:"property"},splice:{pattern:RegExp(",@?"+o),alias:["symbol","variable"]},keyword:[{pattern:RegExp(s+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+a),lookbehind:!0},{pattern:RegExp(s+"(?:append|by|collect|concat|do|finally|for|in|return)"+a),lookbehind:!0}],declare:{pattern:n(/declare/.source),lookbehind:!0,alias:"keyword"},interactive:{pattern:n(/interactive/.source),lookbehind:!0,alias:"keyword"},boolean:{pattern:r(/nil|t/.source),lookbehind:!0},number:{pattern:r(/[-+]?\d+(?:\.\d*)?/.source),lookbehind:!0},defvar:{pattern:RegExp(s+"def(?:const|custom|group|var)\\s+"+o),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(o)}},defun:{pattern:RegExp(s+/(?:cl-)?(?:defmacro|defun\*?)\s+/.source+o+/\s+\(/.source+u+/\)/.source),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+o),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(s+"lambda\\s+\\(\\s*(?:&?"+o+"(?:\\s+&?"+o+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(s+o),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},d={"lisp-marker":RegExp(i),varform:{pattern:RegExp(/\(/.source+o+/\s+(?=\S)/.source+u+/\)/.source),inside:c},argument:{pattern:RegExp(/(^|[\s(])/.source+o),lookbehind:!0,alias:"variable"},rest:c},h="\\S+(?:\\s+\\S+)*",p={pattern:RegExp(s+u+l),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+h),inside:d},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+h),inside:d},keys:{pattern:RegExp("&key\\s+"+h+"(?:\\s+&allow-other-keys)?"),inside:d},argument:{pattern:RegExp(o),alias:"variable"},punctuation:/[()]/}};c.lambda.inside.arguments=p,c.defun.inside.arguments=e.util.clone(p),c.defun.inside.arguments.inside.sublist=p,e.languages.lisp=c,e.languages.elisp=c,e.languages.emacs=c,e.languages["emacs-lisp"]=c})(t)}mE.displayName="lua";mE.aliases=[];function mE(t){t.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}vE.displayName="makefile";vE.aliases=[];function vE(t){t.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}yE.displayName="markdown";yE.aliases=["md"];function yE(t){t.register(bu),function(e){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(l){return l=l.replace(//g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+l+")")}var o=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return o}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+s+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+s+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(o),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(o),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(l){["url","bold","italic","strike","code-snippet"].forEach(function(a){l!==a&&(e.languages.markdown[l].inside.content.inside[a]=e.languages.markdown[a])})}),e.hooks.add("after-tokenize",function(l){if(l.language!=="markdown"&&l.language!=="md")return;function a(u){if(!(!u||typeof u=="string"))for(var c=0,d=u.length;c]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete t.languages.objectivec["class-name"],t.languages.objc=t.languages.objectivec}wE.displayName="perl";wE.aliases=[];function wE(t){(function(e){var n=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,n].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,n].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,n+/\s*/.source+n].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(t)}xE.displayName="php";xE.aliases=[];function xE(t){t.register(Cl),function(e){var n=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,r=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],o=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:n,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:o,operator:i,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},a=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];e.languages.insertBefore("php","variable",{string:a,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:n,string:a,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,number:o,operator:i,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var c=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;e.languages["markup-templating"].buildPlaceholders(u,"php",c)}}),e.hooks.add("after-tokenize",function(u){e.languages["markup-templating"].tokenizePlaceholders(u,"php")})}(t)}kE.displayName="sql";kE.aliases=[];function kE(t){t.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}EE.displayName="plsql";EE.aliases=[];function EE(t){t.register(kE),t.languages.plsql=t.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),t.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}SE.displayName="powershell";SE.aliases=[];function SE(t){(function(e){var n=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};n.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:n},boolean:n.boolean,variable:n.variable}})(t)}CE.displayName="protobuf";CE.aliases=[];function CE(t){t.register(pr),function(e){var n=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:n}},builtin:n,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})}(t)}TE.displayName="python";TE.aliases=["py"];function TE(t){t.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},t.languages.python["string-interpolation"].inside.interpolation.inside.rest=t.languages.python,t.languages.py=t.languages.python}AE.displayName="regex";AE.aliases=[];function AE(t){(function(e){var n={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},r=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,o={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},i={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},s="(?:[^\\\\-]|"+r.source+")",l=RegExp(s+"-"+s),a={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:l,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":n,"char-set":i,escape:r}},"special-escape":n,"char-set":o,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":a}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:r,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var n={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var r="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",o=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+o),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+o+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+r),greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(t)}RE.displayName="rust";RE.aliases=[];function RE(t){(function(e){for(var n=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,r=0;r<2;r++)n=n.replace(//g,function(){return n});n=n.replace(//g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+n),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(t)}ME.displayName="sass";ME.aliases=[];function ME(t){t.register(mp),function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var n=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:n,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:n,operator:r,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(t)}OE.displayName="scala";OE.aliases=[];function OE(t){t.register(Nv),t.languages.scala=t.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),t.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:t.languages.scala}}},string:/[\s\S]+/}}}),delete t.languages.scala["class-name"],delete t.languages.scala.function,delete t.languages.scala.constant}IE.displayName="scss";IE.aliases=[];function IE(t){t.register(mp),t.languages.scss=t.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),t.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),t.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),t.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),t.languages.scss.atrule.inside.rest=t.languages.scss}LE.displayName="smalltalk";LE.aliases=[];function LE(t){t.languages.smalltalk={comment:{pattern:/"(?:""|[^"])*"/,greedy:!0},char:{pattern:/\$./,greedy:!0},string:{pattern:/'(?:''|[^'])*'/,greedy:!0},symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:new|nil|self|super)\b/,boolean:/\b(?:false|true)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}}NE.displayName="swift";NE.aliases=[];function NE(t){t.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},t.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=t.languages.swift})}$E.displayName="toml";$E.aliases=[];function $E(t){(function(e){var n=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function r(o){return o.replace(/__/g,function(){return n})}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(r(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(r(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}})(t)}DE.displayName="typescript";DE.aliases=["ts"];function DE(t){t.register(ca),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var n=e.languages.extend("typescript",{});delete n["class-name"],e.languages.typescript["class-name"].inside=n,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),e.languages.ts=e.languages.typescript}(t)}PE.displayName="unrealscript";PE.aliases=["uc","uscript"];function PE(t){t.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},t.languages.uc=t.languages.uscript=t.languages.unrealscript}zE.displayName="yaml";zE.aliases=["yml"];function zE(t){(function(e){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,o="(?:"+r.source+"(?:[ ]+"+n.source+")?|"+n.source+"(?:[ ]+"+r.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),s=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function l(a,u){u=(u||"").replace(/m/g,"")+"m";var c=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return o}).replace(/<>/g,function(){return a});return RegExp(c,u)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return o})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return o}).replace(/<>/g,function(){return"(?:"+i+"|"+s+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:l(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:l(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:l(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:l(s),lookbehind:!0,greedy:!0},number:{pattern:l(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(t)}FE.displayName="zig";FE.aliases=[];function FE(t){(function(e){function n(u){return function(){return u}}var r=/\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,o="\\b(?!"+r.source+")(?!\\d)\\w+\\b",i=/align\s*\((?:[^()]|\([^()]*\))*\)/.source,s=/(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(//g,n(i)),l=/(?:\bpromise\b|(?:\berror\.)?(?:\.)*(?!\s+))/.source.replace(//g,n(o)),a="(?!\\s)(?:!?\\s*(?:"+s+"\\s*)*"+l+")+";e.languages.zig={comment:[{pattern:/\/\/[/!].*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0}],char:{pattern:/(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0},builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp(/(:\s*)(?=\s*(?:\s*)?[=;,)])|(?=\s*(?:\s*)?\{)/.source.replace(//g,n(a)).replace(//g,n(i))),lookbehind:!0,inside:null},{pattern:RegExp(/(\)\s*)(?=\s*(?:\s*)?;)/.source.replace(//g,n(a)).replace(//g,n(i))),lookbehind:!0,inside:null}],"builtin-type":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:r,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},e.languages.zig["class-name"].forEach(function(u){u.inside===null&&(u.inside=e.languages.zig)})})(t)}/* + */function x$(t){const[e,n]=D.useState(t),r=D.useRef(t);return r.current=e,[e,n,r]}function dpe(){const{getState:t,getPluginState:e}=to({autoUpdate:!0}),{doc:n,selection:r}=t(),{from:o,to:i}=cr(r,n),s=e("annotation");let l=U_,a=W_;for(const u of s.annotations)(ri(o,u.from,u.to)||ri(i,u.from,u.to)||ri(u.from,o,i)||ri(u.to,o,i))&&(a===W_&&(a=[]),a.push(u.id)),l===U_&&(l=[]),l.push(u);return{selected:a,available:l}}function H_(t,e,n){const[r,o]=D.useState(e());return D.useEffect(()=>{const i=setTimeout(()=>{o(e())},t);return()=>{clearTimeout(i)}},n),r}function hpe(t,e){const[n,r]=D.useState(!0);return D.useEffect(()=>{r(!1);const o=setTimeout(()=>{r(!0)},t);return()=>{clearTimeout(o)}},e),n}function ppe(t){const[e,n]=D.useState(()=>!!localStorage.getItem(t));D.useEffect(()=>{const o=i=>{const s=i;s.detail.key===t&&n(s.detail.value)};return document.addEventListener(f0,o),()=>{document.removeEventListener(f0,o)}},[]);const r=D.useCallback(o=>{n(o),o?localStorage.setItem(t,"1"):localStorage.removeItem(t),document.dispatchEvent(new CustomEvent(f0,{detail:{key:t,value:o}}))},[]);return[e,r]}const U_=[],W_=[],f0="storeChanged";$k.displayName="abap";$k.aliases=[];function $k(t){t.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}}pr.displayName="clike";pr.aliases=[];function pr(t){t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}ca.displayName="javascript";ca.aliases=["js"];function ca(t){t.register(pr),t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript}Dk.displayName="actionscript";Dk.aliases=[];function Dk(t){t.register(ca),t.languages.actionscript=t.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),t.languages.actionscript["class-name"].alias="function",delete t.languages.actionscript.parameter,delete t.languages.actionscript["literal-property"],t.languages.markup&&t.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:t.languages.markup}})}Pk.displayName="bash";Pk.aliases=["sh","shell"];function Pk(t){(function(e){var n="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},o={bash:r,environment:{pattern:RegExp("\\$"+n),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+n),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+n),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:o},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:o},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:o.entity}}],environment:{pattern:RegExp("\\$?"+n),alias:"constant"},variable:o.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=o.variable[1].inside,l=0;l?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}Fk.displayName="batch";Fk.aliases=[];function Fk(t){(function(e){var n=/%%?[~:\w]+%?|!\S+!/,r={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},o=/"(?:[\\"]"|[^"])*"(?!")/,i=/(?:\b|-)\d+\b/;e.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/\b(?:do|in)\b|^for\b/i,string:o,parameter:r,variable:n,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,string:o,parameter:r,variable:n,number:i,operator:/\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:o,parameter:r,variable:[n,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,lookbehind:!0,inside:{keyword:/^\w+\b/,string:o,parameter:r,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:n,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}})(t)}gp.displayName="c";gp.aliases=[];function gp(t){t.register(pr),t.languages.c=t.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),t.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),t.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},t.languages.c.string],char:t.languages.c.char,comment:t.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:t.languages.c}}}}),t.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete t.languages.c.boolean}Bk.displayName="clojure";Bk.aliases=[];function Bk(t){t.languages.clojure={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},char:/\\\w+/,symbol:{pattern:/(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,lookbehind:!0},keyword:{pattern:/(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,lookbehind:!0},boolean:/\b(?:false|nil|true)\b/,number:{pattern:/(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,lookbehind:!0},function:{pattern:/((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,lookbehind:!0},operator:/[#@^`~]/,punctuation:/[{}\[\](),]/}}Hk.displayName="cmake";Hk.aliases=[];function Hk(t){t.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_NAME|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/}}Uk.displayName="cobol";Uk.aliases=[];function Uk(t){t.languages.cobol={comment:{pattern:/\*>.*|(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},string:{pattern:/[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,greedy:!0},level:{pattern:/(^[ \t]*)\d+\b/m,lookbehind:!0,greedy:!0,alias:"number"},"class-name":{pattern:/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,lookbehind:!0,inside:{number:{pattern:/(\()\d+/,lookbehind:!0},punctuation:/[()]/}},keyword:{pattern:/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,lookbehind:!0},boolean:{pattern:/(^|[^\w-])(?:false|true)(?![\w-])/i,lookbehind:!0},number:{pattern:/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,lookbehind:!0},operator:[/<>|[<>]=?|[=+*/&]/,{pattern:/(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,lookbehind:!0}],punctuation:/[.:,()]/}}Wk.displayName="coffeescript";Wk.aliases=["coffee"];function Wk(t){t.register(ca),function(e){var n=/#(?!\{).+/,r={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:n,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:r}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:n,interpolation:r}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:r}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(t)}Vk.displayName="cpp";Vk.aliases=[];function Vk(t){t.register(gp),function(e){var n=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return n.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return n.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:n,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(t)}jk.displayName="csharp";jk.aliases=["cs","dotnet"];function jk(t){t.register(pr),function(e){function n(P,F){return P.replace(/<<(\d+)>>/g,function(H,W){return"(?:"+F[+W]+")"})}function r(P,F,H){return RegExp(n(P,F),H||"")}function o(P,F){for(var H=0;H>/g,function(){return"(?:"+P+")"});return P.replace(/<>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function s(P){return"\\b(?:"+P.trim().replace(/ /g,"|")+")\\b"}var l=s(i.typeDeclaration),a=RegExp(s(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),u=s(i.typeDeclaration+" "+i.contextual+" "+i.other),c=s(i.type+" "+i.typeDeclaration+" "+i.other),d=o(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),h=o(/\((?:[^()]|<>)*\)/.source,2),p=/@?\b[A-Za-z_]\w*\b/.source,f=n(/<<0>>(?:\s*<<1>>)?/.source,[p,d]),g=n(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,f]),m=/\[\s*(?:,\s*)*\]/.source,v=n(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[g,m]),y=n(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[d,h,m]),b=n(/\(<<0>>+(?:,<<0>>+)+\)/.source,[y]),w=n(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[b,g,m]),k={keyword:a,punctuation:/[<>()?,.:[\]]/},x=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,A=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[g]),lookbehind:!0,inside:k},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[p,w]),lookbehind:!0,inside:k},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[p]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[l,f]),lookbehind:!0,inside:k},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[g]),lookbehind:!0,inside:k},{pattern:r(/(\bwhere\s+)<<0>>/.source,[p]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:k},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[w,c,p]),inside:k}],keyword:a,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[p]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[p]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:k},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[w,g]),inside:k,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[w]),lookbehind:!0,inside:k,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[p,d]),inside:{function:r(/^<<0>>/.source,[p]),generic:{pattern:RegExp(d),alias:"class-name",inside:k}}},"type-list":{pattern:r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[l,f,p,w,a.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[f,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:a,"class-name":{pattern:RegExp(w),greedy:!0,inside:k},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var C=S+"|"+x,O=n(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[C]),R=o(n(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),_=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,T=n(/<<0>>(?:\s*\(<<1>>*\))?/.source,[g,R]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[_,T]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[_]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[R]),inside:e.languages.csharp},"class-name":{pattern:RegExp(g),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var E=/:[^}\r\n]+/.source,M=o(n(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),I=n(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[M,E]),N=o(n(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[C]),2),L=n(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[N,E]);function $(P,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[P]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,E]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[I]),lookbehind:!0,greedy:!0,inside:$(I,M)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:$(L,N)}],char:{pattern:RegExp(x),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(t)}mp.displayName="css";mp.aliases=[];function mp(t){(function(e){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+n.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(t)}Gk.displayName="csv";Gk.aliases=[];function Gk(t){t.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}}Kk.displayName="d";Kk.aliases=[];function Kk(t){t.register(pr),t.languages.d=t.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp(/(^|[^\\])/.source+"(?:"+[/\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source,/\/\/.*/.source,/\/\*[\s\S]*?\*\//.source].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp([/\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source,/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source,/\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source,/\bq"(.)[\s\S]*?\2"/.source,/(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],keyword:/\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,lookbehind:!0}],operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),t.languages.insertBefore("d","string",{char:/'(?:\\(?:\W|\w+)|[^\\])'/}),t.languages.insertBefore("d","keyword",{property:/\B@\w*/}),t.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}})}Yk.displayName="dart";Yk.aliases=[];function Yk(t){t.register(pr),function(e){var n=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],r=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,o={pattern:RegExp(r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[o,{pattern:RegExp(r+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:o.inside}],keyword:n,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":o,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(t)}bu.displayName="markup";bu.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function bu(t){t.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.value.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(n,r){var o={};o["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[r]},o.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:o}};i["language-"+r]={pattern:/[\s\S]+/,inside:t.languages[r]};var s={};s[n]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:i},t.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml}Cl.displayName="markup-templating";Cl.aliases=[];function Cl(t){t.register(bu),function(e){function n(r,o){return"___"+r.toUpperCase()+o+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,o,i,s){if(r.language===o){var l=r.tokenStack=[];r.code=r.code.replace(i,function(a){if(typeof s=="function"&&!s(a))return a;for(var u=l.length,c;r.code.indexOf(c=n(o,u))!==-1;)++u;return l[u]=a,c}),r.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(r,o){if(r.language!==o||!r.tokenStack)return;r.grammar=e.languages[o];var i=0,s=Object.keys(r.tokenStack);function l(a){for(var u=0;u=s.length);u++){var c=a[u];if(typeof c=="string"||c.content&&typeof c.content=="string"){var d=s[i],h=r.tokenStack[d],p=typeof c=="string"?c:c.content,f=n(o,d),g=p.indexOf(f);if(g>-1){++i;var m=p.substring(0,g),v=new e.Token(o,e.tokenize(h,r.grammar),"language-"+o,h),y=p.substring(g+f.length),b=[];m&&b.push.apply(b,l([m])),b.push(v),y&&b.push.apply(b,l([y])),typeof c=="string"?a.splice.apply(a,[u,1].concat(b)):c.content=b}}else c.content&&l(c.content)}return a}l(r.tokens)}}})}(t)}Xk.displayName="django";Xk.aliases=["jinja2"];function Xk(t){t.register(Cl),function(e){e.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/};var n=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,r=e.languages["markup-templating"];e.hooks.add("before-tokenize",function(o){r.buildPlaceholders(o,"django",n)}),e.hooks.add("after-tokenize",function(o){r.tokenizePlaceholders(o,"django")}),e.languages.jinja2=e.languages.django,e.hooks.add("before-tokenize",function(o){r.buildPlaceholders(o,"jinja2",n)}),e.hooks.add("after-tokenize",function(o){r.tokenizePlaceholders(o,"jinja2")})}(t)}qk.displayName="docker";qk.aliases=["dockerfile"];function qk(t){(function(e){var n=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,r=/(?:[ \t]+(?![ \t])(?:)?|)/.source.replace(//g,function(){return n}),o=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,i=/--[\w-]+=(?:|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(//g,function(){return o}),s={pattern:RegExp(o),greedy:!0},l={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function a(u,c){return u=u.replace(//g,function(){return i}).replace(//g,function(){return r}),RegExp(u,c)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:a(/(^(?:ONBUILD)?\w+)(?:)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[s,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:a(/(^(?:ONBUILD)?HEALTHCHECK(?:)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:a(/(^(?:ONBUILD)?FROM(?:)*(?!--)[^ \t\\]+)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:a(/(^ONBUILD)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:l,string:s,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:l},e.languages.dockerfile=e.languages.docker})(t)}Zk.displayName="eiffel";Zk.aliases=[];function Zk(t){t.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}Jk.displayName="ejs";Jk.aliases=["eta"];function Jk(t){t.register(ca),t.register(Cl),function(e){e.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:e.languages.javascript}},e.hooks.add("before-tokenize",function(n){var r=/<%(?!%)[\s\S]+?%>/g;e.languages["markup-templating"].buildPlaceholders(n,"ejs",r)}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"ejs")}),e.languages.eta=e.languages.ejs}(t)}Qk.displayName="elixir";Qk.aliases=[];function Qk(t){t.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},t.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:t.languages.elixir}}}})}eE.displayName="elm";eE.aliases=[];function eE(t){t.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}}tE.displayName="erlang";tE.aliases=[];function tE(t){t.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^\\'\r\n])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^\\'\r\n])+'/,alias:"atom"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:after|begin|case|catch|end|fun|if|of|receive|try|when)\b/,number:[/\$\\?./,/\b\d+#[a-z0-9]+/i,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i],function:/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/}}nE.displayName="fortran";nE.aliases=[];function nE(t){t.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:FALSE|TRUE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}}rE.displayName="fsharp";rE.aliases=[];function rE(t){t.register(pr),t.languages.fsharp=t.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,number:[/\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,/\b0b[01]+(?:uy|y)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),t.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(^#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),t.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/\b[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),t.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,greedy:!0,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:t.languages.fsharp}}},char:{pattern:/'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0}})}oE.displayName="git";oE.aliases=[];function oE(t){t.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}}iE.displayName="go";iE.aliases=[];function iE(t){t.register(pr),t.languages.go=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),t.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete t.languages.go["class-name"]}sE.displayName="gradle";sE.aliases=[];function sE(t){t.register(pr),function(e){var n={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.gradle=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:apply|def|dependencies|else|if|implementation|import|plugin|plugins|project|repositories|repository|sourceSets|tasks|val)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("gradle","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}}}),e.languages.insertBefore("gradle","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("gradle","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),n.inside.expression.inside=e.languages.gradle}(t)}aE.displayName="graphql";aE.aliases=[];function aE(t){t.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:t.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},t.hooks.add("after-tokenize",function(n){if(n.language!=="graphql")return;var r=n.tokens.filter(function(m){return typeof m!="string"&&m.type!=="comment"&&m.type!=="scalar"}),o=0;function i(m){return r[o+m]}function s(m,v){v=v||0;for(var y=0;y0)){var p=l(/^\{$/,/^\}$/);if(p===-1)continue;for(var f=o;f=0&&a(g,"variable-input")}}}}})}lE.displayName="groovy";lE.aliases=[];function lE(t){t.register(pr),function(e){var n={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.groovy=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),n.inside.expression.inside=e.languages.groovy}(t)}cE.displayName="handlebars";cE.aliases=["hbs","mustache"];function cE(t){t.register(Cl),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(n){var r=/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g;e.languages["markup-templating"].buildPlaceholders(n,"handlebars",r)}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"handlebars")}),e.languages.hbs=e.languages.handlebars,e.languages.mustache=e.languages.handlebars}(t)}uE.displayName="ignore";uE.aliases=["gitignore","hgignore","npmignore"];function uE(t){(function(e){e.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},e.languages.gitignore=e.languages.ignore,e.languages.hgignore=e.languages.ignore,e.languages.npmignore=e.languages.ignore})(t)}$v.displayName="java";$v.aliases=[];function $v(t){t.register(pr),function(e){var n=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,o={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[o,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:o.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:o.inside}],keyword:n,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":o,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:o.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:o.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return n.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(t)}dE.displayName="json";dE.aliases=["webmanifest"];function dE(t){t.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},t.languages.webmanifest=t.languages.json}hE.displayName="jsx";hE.aliases=[];function hE(t){t.register(ca),t.register(bu),function(e){var n=e.util.clone(e.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,o=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{*\.{3}(?:[^{}]|)*\})/.source;function s(u,c){return u=u.replace(//g,function(){return r}).replace(//g,function(){return o}).replace(//g,function(){return i}),RegExp(u,c)}i=s(i).source,e.languages.jsx=e.languages.extend("markup",n),e.languages.jsx.tag.pattern=s(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=n.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:s(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:s(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var l=function(u){return u?typeof u=="string"?u:typeof u.content=="string"?u.content:u.content.map(l).join(""):""},a=function(u){for(var c=[],d=0;d0&&c[c.length-1].tagName===l(h.content[0].content[1])&&c.pop():h.content[h.content.length-1].content==="/>"||c.push({tagName:l(h.content[0].content[1]),openedBraces:0}):c.length>0&&h.type==="punctuation"&&h.content==="{"?c[c.length-1].openedBraces++:c.length>0&&c[c.length-1].openedBraces>0&&h.type==="punctuation"&&h.content==="}"?c[c.length-1].openedBraces--:p=!0),(p||typeof h=="string")&&c.length>0&&c[c.length-1].openedBraces===0){var f=l(h);d0&&(typeof u[d-1]=="string"||u[d-1].type==="plain-text")&&(f=l(u[d-1])+f,u.splice(d-1,1),d--),u[d]=new e.Token("plain-text",f,null,f)}h.content&&typeof h.content!="string"&&a(h.content)}};e.hooks.add("after-tokenize",function(u){u.language!=="jsx"&&u.language!=="tsx"||a(u.tokens)})}(t)}pE.displayName="kotlin";pE.aliases=["kt","kts"];function pE(t){t.register(pr),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var n={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:n},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:n},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(t)}fE.displayName="latex";fE.aliases=["context","tex"];function fE(t){(function(e){var n=/\\(?:[^a-z()[\]]|[a-z*]+)/i,r={"equation-command":{pattern:n,alias:"regex"}};e.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:r,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:r,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:n,alias:"selector"},punctuation:/[[\]{}&]/},e.languages.tex=e.languages.latex,e.languages.context=e.languages.latex})(t)}gE.displayName="liquid";gE.aliases=[];function gE(t){t.register(Cl),t.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},t.hooks.add("before-tokenize",function(e){var n=/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,r=!1;t.languages["markup-templating"].buildPlaceholders(e,"liquid",n,function(o){var i=/^\{%-?\s*(\w+)/.exec(o);if(i){var s=i[1];if(s==="raw"&&!r)return r=!0,!0;if(s==="endraw")return r=!1,!0}return!r})}),t.hooks.add("after-tokenize",function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"liquid")})}mE.displayName="lisp";mE.aliases=["elisp","emacs","emacs-lisp"];function mE(t){(function(e){function n(f){return RegExp(/(\()/.source+"(?:"+f+")"+/(?=[\s\)])/.source)}function r(f){return RegExp(/([\s([])/.source+"(?:"+f+")"+/(?=[\s)])/.source)}var o=/(?!\d)[-+*/~!@$%^=<>{}\w]+/.source,i="&"+o,s="(\\()",l="(?=\\))",a="(?=\\s)",u=/(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source,c={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+o+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+o),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+o),alias:"property"},splice:{pattern:RegExp(",@?"+o),alias:["symbol","variable"]},keyword:[{pattern:RegExp(s+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+a),lookbehind:!0},{pattern:RegExp(s+"(?:append|by|collect|concat|do|finally|for|in|return)"+a),lookbehind:!0}],declare:{pattern:n(/declare/.source),lookbehind:!0,alias:"keyword"},interactive:{pattern:n(/interactive/.source),lookbehind:!0,alias:"keyword"},boolean:{pattern:r(/nil|t/.source),lookbehind:!0},number:{pattern:r(/[-+]?\d+(?:\.\d*)?/.source),lookbehind:!0},defvar:{pattern:RegExp(s+"def(?:const|custom|group|var)\\s+"+o),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(o)}},defun:{pattern:RegExp(s+/(?:cl-)?(?:defmacro|defun\*?)\s+/.source+o+/\s+\(/.source+u+/\)/.source),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+o),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(s+"lambda\\s+\\(\\s*(?:&?"+o+"(?:\\s+&?"+o+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(s+o),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},d={"lisp-marker":RegExp(i),varform:{pattern:RegExp(/\(/.source+o+/\s+(?=\S)/.source+u+/\)/.source),inside:c},argument:{pattern:RegExp(/(^|[\s(])/.source+o),lookbehind:!0,alias:"variable"},rest:c},h="\\S+(?:\\s+\\S+)*",p={pattern:RegExp(s+u+l),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+h),inside:d},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+h),inside:d},keys:{pattern:RegExp("&key\\s+"+h+"(?:\\s+&allow-other-keys)?"),inside:d},argument:{pattern:RegExp(o),alias:"variable"},punctuation:/[()]/}};c.lambda.inside.arguments=p,c.defun.inside.arguments=e.util.clone(p),c.defun.inside.arguments.inside.sublist=p,e.languages.lisp=c,e.languages.elisp=c,e.languages.emacs=c,e.languages["emacs-lisp"]=c})(t)}vE.displayName="lua";vE.aliases=[];function vE(t){t.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}yE.displayName="makefile";yE.aliases=[];function yE(t){t.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}bE.displayName="markdown";bE.aliases=["md"];function bE(t){t.register(bu),function(e){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(l){return l=l.replace(//g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+l+")")}var o=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return o}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+s+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+s+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(o),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(o),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(l){["url","bold","italic","strike","code-snippet"].forEach(function(a){l!==a&&(e.languages.markdown[l].inside.content.inside[a]=e.languages.markdown[a])})}),e.hooks.add("after-tokenize",function(l){if(l.language!=="markdown"&&l.language!=="md")return;function a(u){if(!(!u||typeof u=="string"))for(var c=0,d=u.length;c]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete t.languages.objectivec["class-name"],t.languages.objc=t.languages.objectivec}xE.displayName="perl";xE.aliases=[];function xE(t){(function(e){var n=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,n].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,n].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,n+/\s*/.source+n].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(t)}kE.displayName="php";kE.aliases=[];function kE(t){t.register(Cl),function(e){var n=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,r=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],o=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:n,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:o,operator:i,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},a=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];e.languages.insertBefore("php","variable",{string:a,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:n,string:a,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,number:o,operator:i,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var c=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;e.languages["markup-templating"].buildPlaceholders(u,"php",c)}}),e.hooks.add("after-tokenize",function(u){e.languages["markup-templating"].tokenizePlaceholders(u,"php")})}(t)}EE.displayName="sql";EE.aliases=[];function EE(t){t.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}SE.displayName="plsql";SE.aliases=[];function SE(t){t.register(EE),t.languages.plsql=t.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),t.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}CE.displayName="powershell";CE.aliases=[];function CE(t){(function(e){var n=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};n.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:n},boolean:n.boolean,variable:n.variable}})(t)}TE.displayName="protobuf";TE.aliases=[];function TE(t){t.register(pr),function(e){var n=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:n}},builtin:n,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})}(t)}AE.displayName="python";AE.aliases=["py"];function AE(t){t.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},t.languages.python["string-interpolation"].inside.interpolation.inside.rest=t.languages.python,t.languages.py=t.languages.python}_E.displayName="regex";_E.aliases=[];function _E(t){(function(e){var n={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},r=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,o={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},i={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},s="(?:[^\\\\-]|"+r.source+")",l=RegExp(s+"-"+s),a={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:l,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":n,"char-set":i,escape:r}},"special-escape":n,"char-set":o,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":a}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:r,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var n={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var r="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",o=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+o),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+o+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+r),greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(t)}ME.displayName="rust";ME.aliases=[];function ME(t){(function(e){for(var n=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,r=0;r<2;r++)n=n.replace(//g,function(){return n});n=n.replace(//g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+n),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(t)}OE.displayName="sass";OE.aliases=[];function OE(t){t.register(mp),function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var n=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:n,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:n,operator:r,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(t)}IE.displayName="scala";IE.aliases=[];function IE(t){t.register($v),t.languages.scala=t.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),t.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:t.languages.scala}}},string:/[\s\S]+/}}}),delete t.languages.scala["class-name"],delete t.languages.scala.function,delete t.languages.scala.constant}LE.displayName="scss";LE.aliases=[];function LE(t){t.register(mp),t.languages.scss=t.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),t.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),t.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),t.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),t.languages.scss.atrule.inside.rest=t.languages.scss}NE.displayName="smalltalk";NE.aliases=[];function NE(t){t.languages.smalltalk={comment:{pattern:/"(?:""|[^"])*"/,greedy:!0},char:{pattern:/\$./,greedy:!0},string:{pattern:/'(?:''|[^'])*'/,greedy:!0},symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:new|nil|self|super)\b/,boolean:/\b(?:false|true)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}}$E.displayName="swift";$E.aliases=[];function $E(t){t.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},t.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=t.languages.swift})}DE.displayName="toml";DE.aliases=[];function DE(t){(function(e){var n=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function r(o){return o.replace(/__/g,function(){return n})}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(r(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(r(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}})(t)}PE.displayName="typescript";PE.aliases=["ts"];function PE(t){t.register(ca),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var n=e.languages.extend("typescript",{});delete n["class-name"],e.languages.typescript["class-name"].inside=n,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),e.languages.ts=e.languages.typescript}(t)}zE.displayName="unrealscript";zE.aliases=["uc","uscript"];function zE(t){t.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},t.languages.uc=t.languages.uscript=t.languages.unrealscript}FE.displayName="yaml";FE.aliases=["yml"];function FE(t){(function(e){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,o="(?:"+r.source+"(?:[ ]+"+n.source+")?|"+n.source+"(?:[ ]+"+r.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),s=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function l(a,u){u=(u||"").replace(/m/g,"")+"m";var c=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return o}).replace(/<>/g,function(){return a});return RegExp(c,u)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return o})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return o}).replace(/<>/g,function(){return"(?:"+i+"|"+s+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:l(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:l(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:l(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:l(s),lookbehind:!0,greedy:!0},number:{pattern:l(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(t)}BE.displayName="zig";BE.aliases=[];function BE(t){(function(e){function n(u){return function(){return u}}var r=/\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,o="\\b(?!"+r.source+")(?!\\d)\\w+\\b",i=/align\s*\((?:[^()]|\([^()]*\))*\)/.source,s=/(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(//g,n(i)),l=/(?:\bpromise\b|(?:\berror\.)?(?:\.)*(?!\s+))/.source.replace(//g,n(o)),a="(?!\\s)(?:!?\\s*(?:"+s+"\\s*)*"+l+")+";e.languages.zig={comment:[{pattern:/\/\/[/!].*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0}],char:{pattern:/(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0},builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp(/(:\s*)(?=\s*(?:\s*)?[=;,)])|(?=\s*(?:\s*)?\{)/.source.replace(//g,n(a)).replace(//g,n(i))),lookbehind:!0,inside:null},{pattern:RegExp(/(\)\s*)(?=\s*(?:\s*)?;)/.source.replace(//g,n(a)).replace(//g,n(i))),lookbehind:!0,inside:null}],"builtin-type":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:r,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},e.languages.zig["class-name"].forEach(function(u){u.inside===null&&(u.inside=e.languages.zig)})})(t)}/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const lpe=[Nk,$k,Dk,Pk,zk,gp,Fk,Bk,Hk,Uk,Wk,Vk,mp,jk,Gk,Kk,Yk,Xk,qk,Zk,Jk,Qk,eE,tE,nE,rE,oE,iE,sE,aE,lE,cE,Nv,ca,uE,dE,hE,pE,fE,gE,mE,vE,yE,bu,bE,wE,xE,EE,SE,CE,TE,AE,_E,RE,ME,OE,IE,LE,NE,$E,DE,PE,zE,FE];/* + */const fpe=[$k,Dk,Pk,zk,Fk,gp,Bk,Hk,Uk,Wk,Vk,jk,mp,Gk,Kk,Yk,Xk,qk,Zk,Jk,Qk,eE,tE,nE,rE,oE,iE,sE,aE,lE,cE,uE,$v,ca,dE,hE,pE,fE,gE,mE,vE,yE,bE,bu,wE,xE,kE,SE,CE,TE,AE,_E,RE,ME,OE,IE,LE,NE,$E,DE,PE,zE,FE,BE];/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */function cpe(t,e,n){if(!t)return;const r=`${e}/api/assets/${n}/`;if(t.startsWith(r)){const o=t.substring(r.length).split(/[/?]+/);return o.length<1?null:{id:o[0]}}return null}function upe(t,e,n){if(!t)return;const r=`${e}/api/content/${n}/`;if(t.startsWith(r)){const o=t.substring(r.length).split(/[/?]+/);return o.length<2?null:{schemaName:o[0],id:o[1]}}return null}function BE(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Tl=BE();function w$(t){Tl=t}const x$=/[&<>"']/,dpe=new RegExp(x$.source,"g"),k$=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,hpe=new RegExp(k$.source,"g"),ppe={"&":"&","<":"<",">":">",'"':""","'":"'"},W_=t=>ppe[t];function Br(t,e){if(e){if(x$.test(t))return t.replace(dpe,W_)}else if(k$.test(t))return t.replace(hpe,W_);return t}const fpe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function gpe(t){return t.replace(fpe,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const mpe=/(^|[^\[])\^/g;function pt(t,e){let n=typeof t=="string"?t:t.source;e=e||"";const r={replace:(o,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(mpe,"$1"),n=n.replace(o,s),r},getRegex:()=>new RegExp(n,e)};return r}function V_(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const Hd={exec:()=>null};function j_(t,e){const n=t.replace(/\|/g,(i,s,l)=>{let a=!1,u=s;for(;--u>=0&&l[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length"']/,vpe=new RegExp(E$.source,"g"),S$=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ype=new RegExp(S$.source,"g"),bpe={"&":"&","<":"<",">":">",'"':""","'":"'"},V_=t=>bpe[t];function Br(t,e){if(e){if(E$.test(t))return t.replace(vpe,V_)}else if(S$.test(t))return t.replace(ype,V_);return t}const wpe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function xpe(t){return t.replace(wpe,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const kpe=/(^|[^\[])\^/g;function pt(t,e){let n=typeof t=="string"?t:t.source;e=e||"";const r={replace:(o,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(kpe,"$1"),n=n.replace(o,s),r},getRegex:()=>new RegExp(n,e)};return r}function j_(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const Hd={exec:()=>null};function G_(t,e){const n=t.replace(/\|/g,(i,s,l)=>{let a=!1,u=s;for(;--u>=0&&l[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length{const i=o.match(/^\s+/);if(i===null)return o;const[s]=i;return s.length>=r.length?o.slice(r.length):o}).join(` `)}class om{constructor(e){lt(this,"options");lt(this,"rules");lt(this,"lexer");this.options=e||Tl}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:uf(r,` -`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],o=ype(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:o}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=uf(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){const r=uf(n[0].replace(/^ *>[ \t]?/gm,""),` +`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],o=Spe(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:o}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=uf(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){const r=uf(n[0].replace(/^ *>[ \t]?/gm,""),` `),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(e){let n=this.rules.block.list.exec(e);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const s=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let l="",a="",u=!1;for(;e;){let c=!1;if(!(n=s.exec(e))||this.rules.block.hr.test(e))break;l=n[0],e=e.substring(l.length);let d=n[2].split(` `,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),h=e.split(` `,1)[0],p=0;this.options.pedantic?(p=2,a=d.trimStart()):(p=n[2].search(/[^ ]/),p=p>4?1:p,a=d.slice(p),p+=n[1].length);let f=!1;if(!d&&/^ *$/.test(h)&&(l+=h+` @@ -5036,10 +5040,10 @@ ${t} `,1)[0];if(h=k,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),b.test(h)||w.test(h)||v.test(h)||y.test(e))break;if(h.search(/[^ ]/)>=p||!h.trim())a+=` `+h.slice(p);else{if(f||d.search(/[^ ]/)>=4||b.test(d)||w.test(d)||y.test(d))break;a+=` `+h}!f&&!h.trim()&&(f=!0),l+=k+` -`,e=e.substring(k.length+1),d=h.slice(p)}}i.loose||(u?i.loose=!0:/\n *\n *$/.test(l)&&(u=!0));let g=null,m;this.options.gfm&&(g=/^\[[ xX]\] /.exec(a),g&&(m=g[0]!=="[ ] ",a=a.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:l,task:!!g,checked:m,loose:!1,text:a,tokens:[]}),i.raw+=l}i.items[i.items.length-1].raw=l.trimEnd(),i.items[i.items.length-1].text=a.trimEnd(),i.raw=i.raw.trimEnd();for(let c=0;cp.type==="space"),h=d.length>0&&d.some(p=>/\n.*\n/.test(p.raw));i.loose=h}if(i.loose)for(let c=0;c$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(e){const n=this.rules.block.table.exec(e);if(!n||!/[:|]/.test(n[2]))return;const r=j_(n[1]),o=n[2].replace(/^\||\| *$/g,"").split("|"),i=n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` -`):[],s={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(const l of o)/^ *-+: *$/.test(l)?s.align.push("right"):/^ *:-+: *$/.test(l)?s.align.push("center"):/^ *:-+ *$/.test(l)?s.align.push("left"):s.align.push(null);for(const l of r)s.header.push({text:l,tokens:this.lexer.inline(l)});for(const l of i)s.rows.push(j_(l,s.header.length).map(a=>({text:a,tokens:this.lexer.inline(a)})));return s}}lheading(e){const n=this.rules.block.lheading.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(e){const n=this.rules.block.paragraph.exec(e);if(n){const r=n[1].charAt(n[1].length-1)===` -`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const n=this.rules.block.text.exec(e);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(e){const n=this.rules.inline.escape.exec(e);if(n)return{type:"escape",raw:n[0],text:Br(n[1])}}tag(e){const n=this.rules.inline.tag.exec(e);if(n)return!this.lexer.state.inLink&&/^
    /i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const s=uf(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=vpe(n[2],"()");if(s>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),G_(n,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer)}}reflink(e,n){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const o=(r[2]||r[1]).replace(/\s+/g," "),i=n[o.toLowerCase()];if(!i){const s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return G_(r,i,r[0],this.lexer)}}emStrong(e,n,r=""){let o=this.rules.inline.emStrongLDelim.exec(e);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const s=[...o[0]].length-1;let l,a,u=s,c=0;const d=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,n=n.slice(-1*e.length+s);(o=d.exec(n))!=null;){if(l=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!l)continue;if(a=[...l].length,o[3]||o[4]){u+=a;continue}else if((o[5]||o[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const h=[...o[0]][0].length,p=e.slice(0,s+o.index+h+a);if(Math.min(s,a)%2){const g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}const f=p.slice(2,-2);return{type:"strong",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=Br(r,!0),{type:"codespan",raw:n[0],text:r}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e){const n=this.rules.inline.autolink.exec(e);if(n){let r,o;return n[2]==="@"?(r=Br(n[1]),o="mailto:"+r):(r=Br(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let n;if(n=this.rules.inline.url.exec(e)){let o,i;if(n[2]==="@")o=Br(n[0]),i="mailto:"+o;else{let s;do s=n[0],n[0]=((r=this.rules.inline._backpedal.exec(n[0]))==null?void 0:r[0])??"";while(s!==n[0]);o=Br(n[0]),n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(e){const n=this.rules.inline.text.exec(e);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=Br(n[0]),{type:"text",raw:n[0],text:r}}}}const bpe=/^(?: *(?:\n|$))+/,wpe=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,xpe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,vp=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,kpe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,E$=/(?:[*+-]|\d{1,9}[.)])/,S$=pt(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,E$).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),HE=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Epe=/^[^\n]+/,UE=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Spe=pt(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",UE).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Cpe=pt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,E$).getRegex(),$v="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",WE=/|$))/,Tpe=pt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",WE).replace("tag",$v).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),C$=pt(HE).replace("hr",vp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$v).getRegex(),Ape=pt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",C$).getRegex(),VE={blockquote:Ape,code:wpe,def:Spe,fences:xpe,heading:kpe,hr:vp,html:Tpe,lheading:S$,list:Cpe,newline:bpe,paragraph:C$,table:Hd,text:Epe},K_=pt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",vp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$v).getRegex(),_pe={...VE,table:K_,paragraph:pt(HE).replace("hr",vp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",K_).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$v).getRegex()},Rpe={...VE,html:pt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",WE).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Hd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:pt(HE).replace("hr",vp).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",S$).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},T$=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Mpe=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,A$=/^( {2,}|\\)\n(?!\s*$)/,Ope=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Npe=pt(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,yp).getRegex(),$pe=pt("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,yp).getRegex(),Dpe=pt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,yp).getRegex(),Ppe=pt(/\\([punct])/,"gu").replace(/punct/g,yp).getRegex(),zpe=pt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Fpe=pt(WE).replace("(?:-->|$)","-->").getRegex(),Bpe=pt("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Fpe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),im=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Hpe=pt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",im).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),_$=pt(/^!?\[(label)\]\[(ref)\]/).replace("label",im).replace("ref",UE).getRegex(),R$=pt(/^!?\[(ref)\](?:\[\])?/).replace("ref",UE).getRegex(),Upe=pt("reflink|nolink(?!\\()","g").replace("reflink",_$).replace("nolink",R$).getRegex(),jE={_backpedal:Hd,anyPunctuation:Ppe,autolink:zpe,blockSkip:Lpe,br:A$,code:Mpe,del:Hd,emStrongLDelim:Npe,emStrongRDelimAst:$pe,emStrongRDelimUnd:Dpe,escape:T$,link:Hpe,nolink:R$,punctuation:Ipe,reflink:_$,reflinkSearch:Upe,tag:Bpe,text:Ope,url:Hd},Wpe={...jE,link:pt(/^!?\[(label)\]\((.*?)\)/).replace("label",im).getRegex(),reflink:pt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",im).getRegex()},cb={...jE,escape:pt(T$).replace("])","~|])").getRegex(),url:pt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\p.type==="space"),h=d.length>0&&d.some(p=>/\n.*\n/.test(p.raw));i.loose=h}if(i.loose)for(let c=0;c$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(e){const n=this.rules.block.table.exec(e);if(!n||!/[:|]/.test(n[2]))return;const r=G_(n[1]),o=n[2].replace(/^\||\| *$/g,"").split("|"),i=n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` +`):[],s={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(const l of o)/^ *-+: *$/.test(l)?s.align.push("right"):/^ *:-+: *$/.test(l)?s.align.push("center"):/^ *:-+ *$/.test(l)?s.align.push("left"):s.align.push(null);for(const l of r)s.header.push({text:l,tokens:this.lexer.inline(l)});for(const l of i)s.rows.push(G_(l,s.header.length).map(a=>({text:a,tokens:this.lexer.inline(a)})));return s}}lheading(e){const n=this.rules.block.lheading.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(e){const n=this.rules.block.paragraph.exec(e);if(n){const r=n[1].charAt(n[1].length-1)===` +`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const n=this.rules.block.text.exec(e);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(e){const n=this.rules.inline.escape.exec(e);if(n)return{type:"escape",raw:n[0],text:Br(n[1])}}tag(e){const n=this.rules.inline.tag.exec(e);if(n)return!this.lexer.state.inLink&&/^/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const s=uf(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=Epe(n[2],"()");if(s>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),K_(n,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer)}}reflink(e,n){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const o=(r[2]||r[1]).replace(/\s+/g," "),i=n[o.toLowerCase()];if(!i){const s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return K_(r,i,r[0],this.lexer)}}emStrong(e,n,r=""){let o=this.rules.inline.emStrongLDelim.exec(e);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const s=[...o[0]].length-1;let l,a,u=s,c=0;const d=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,n=n.slice(-1*e.length+s);(o=d.exec(n))!=null;){if(l=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!l)continue;if(a=[...l].length,o[3]||o[4]){u+=a;continue}else if((o[5]||o[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const h=[...o[0]][0].length,p=e.slice(0,s+o.index+h+a);if(Math.min(s,a)%2){const g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}const f=p.slice(2,-2);return{type:"strong",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=Br(r,!0),{type:"codespan",raw:n[0],text:r}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e){const n=this.rules.inline.autolink.exec(e);if(n){let r,o;return n[2]==="@"?(r=Br(n[1]),o="mailto:"+r):(r=Br(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let n;if(n=this.rules.inline.url.exec(e)){let o,i;if(n[2]==="@")o=Br(n[0]),i="mailto:"+o;else{let s;do s=n[0],n[0]=((r=this.rules.inline._backpedal.exec(n[0]))==null?void 0:r[0])??"";while(s!==n[0]);o=Br(n[0]),n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(e){const n=this.rules.inline.text.exec(e);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=Br(n[0]),{type:"text",raw:n[0],text:r}}}}const Cpe=/^(?: *(?:\n|$))+/,Tpe=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,Ape=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,vp=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_pe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,C$=/(?:[*+-]|\d{1,9}[.)])/,T$=pt(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,C$).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),UE=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Rpe=/^[^\n]+/,WE=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Mpe=pt(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",WE).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ope=pt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,C$).getRegex(),Dv="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",VE=/|$))/,Ipe=pt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",VE).replace("tag",Dv).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),A$=pt(UE).replace("hr",vp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Dv).getRegex(),Lpe=pt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",A$).getRegex(),jE={blockquote:Lpe,code:Tpe,def:Mpe,fences:Ape,heading:_pe,hr:vp,html:Ipe,lheading:T$,list:Ope,newline:Cpe,paragraph:A$,table:Hd,text:Rpe},Y_=pt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",vp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Dv).getRegex(),Npe={...jE,table:Y_,paragraph:pt(UE).replace("hr",vp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Y_).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Dv).getRegex()},$pe={...jE,html:pt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",VE).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Hd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:pt(UE).replace("hr",vp).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",T$).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},_$=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Dpe=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,R$=/^( {2,}|\\)\n(?!\s*$)/,Ppe=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Bpe=pt(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,yp).getRegex(),Hpe=pt("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,yp).getRegex(),Upe=pt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,yp).getRegex(),Wpe=pt(/\\([punct])/,"gu").replace(/punct/g,yp).getRegex(),Vpe=pt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),jpe=pt(VE).replace("(?:-->|$)","-->").getRegex(),Gpe=pt("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",jpe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),im=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Kpe=pt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",im).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),M$=pt(/^!?\[(label)\]\[(ref)\]/).replace("label",im).replace("ref",WE).getRegex(),O$=pt(/^!?\[(ref)\](?:\[\])?/).replace("ref",WE).getRegex(),Ype=pt("reflink|nolink(?!\\()","g").replace("reflink",M$).replace("nolink",O$).getRegex(),GE={_backpedal:Hd,anyPunctuation:Wpe,autolink:Vpe,blockSkip:Fpe,br:R$,code:Dpe,del:Hd,emStrongLDelim:Bpe,emStrongRDelimAst:Hpe,emStrongRDelimUnd:Upe,escape:_$,link:Kpe,nolink:O$,punctuation:zpe,reflink:M$,reflinkSearch:Ype,tag:Gpe,text:Ppe,url:Hd},Xpe={...GE,link:pt(/^!?\[(label)\]\((.*?)\)/).replace("label",im).getRegex(),reflink:pt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",im).getRegex()},db={...GE,escape:pt(_$).replace("])","~|])").getRegex(),url:pt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\a+" ".repeat(u.length));let r,o,i,s;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(r=l.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` `:n.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` `+r.raw,o.text+=` @@ -5067,58 +5071,58 @@ ${e} `}tablerow(e){return` ${e} `}tablecell(e,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+e+` -`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return"
    "}del(e){return`${e}`}link(e,n,r){const o=V_(e);if(o===null)return r;e=o;let i='
    ",i}image(e,n,r){const o=V_(e);if(o===null)return r;e=o;let i=`${r}0&&h.tokens[0].type==="paragraph"?(h.tokens[0].text=m+" "+h.tokens[0].text,h.tokens[0].tokens&&h.tokens[0].tokens.length>0&&h.tokens[0].tokens[0].type==="text"&&(h.tokens[0].tokens[0].text=m+" "+h.tokens[0].tokens[0].text)):h.tokens.unshift({type:"text",text:m+" "}):g+=m+" "}g+=this.parse(h.tokens,u),c+=this.renderer.listitem(g,f,!!p)}r+=this.renderer.list(c,l,a);continue}case"html":{const s=i;r+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=i;r+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=i,l=s.tokens?this.parseInline(s.tokens):s.text;for(;o+1{const u=l[a].flat(1/0);r=r.concat(this.walkTokens(u,n))}):l.tokens&&(r=r.concat(this.walkTokens(l.tokens,n)))}}return r}use(...e){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const s=n.renderers[i.name];s?n.renderers[i.name]=function(...l){let a=i.renderer.apply(this,l);return a===!1&&(a=s.apply(this,l)),a}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=n[i.level];s?s.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new sm(this.defaults);for(const s in r.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(s==="options")continue;const l=s,a=r.renderer[l],u=i[l];i[l]=(...c)=>{let d=a.apply(i,c);return d===!1&&(d=u.apply(i,c)),d||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new om(this.defaults);for(const s in r.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const l=s,a=r.tokenizer[l],u=i[l];i[l]=(...c)=>{let d=a.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new Ud;for(const s in r.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;const l=s,a=r.hooks[l],u=i[l];Ud.passThroughHooks.has(s)?i[l]=c=>{if(this.defaults.async)return Promise.resolve(a.call(i,c)).then(h=>u.call(i,h));const d=a.call(i,c);return u.call(i,d)}:i[l]=(...c)=>{let d=a.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,s=r.walkTokens;o.walkTokens=function(l){let a=[];return a.push(s.call(this,l)),i&&(a=a.concat(i.call(this,l))),a}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return oi.lex(e,n??this.defaults)}parser(e,n){return ii.parse(e,n??this.defaults)}}Bh=new WeakSet,ub=function(e,n){return(r,o)=>{const i={...o},s={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const l=Mp(this,um,M$).call(this,!!s.silent,!!s.async);if(typeof r>"u"||r===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(r):r).then(a=>e(a,s)).then(a=>s.hooks?s.hooks.processAllTokens(a):a).then(a=>s.walkTokens?Promise.all(this.walkTokens(a,s.walkTokens)).then(()=>a):a).then(a=>n(a,s)).then(a=>s.hooks?s.hooks.postprocess(a):a).catch(l);try{s.hooks&&(r=s.hooks.preprocess(r));let a=e(r,s);s.hooks&&(a=s.hooks.processAllTokens(a)),s.walkTokens&&this.walkTokens(a,s.walkTokens);let u=n(a,s);return s.hooks&&(u=s.hooks.postprocess(u)),u}catch(a){return l(a)}}},um=new WeakSet,M$=function(e,n){return r=>{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,e){const o="

    An error occurred:

    "+Br(r.message+"",!0)+"
    ";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const gl=new jpe;function rt(t,e){return gl.parse(t,e)}rt.options=rt.setOptions=function(t){return gl.setOptions(t),rt.defaults=gl.defaults,w$(rt.defaults),rt};rt.getDefaults=BE;rt.defaults=Tl;rt.use=function(...t){return gl.use(...t),rt.defaults=gl.defaults,w$(rt.defaults),rt};rt.walkTokens=function(t,e){return gl.walkTokens(t,e)};rt.parseInline=gl.parseInline;rt.Parser=ii;rt.parser=ii.parse;rt.Renderer=sm;rt.TextRenderer=GE;rt.Lexer=oi;rt.lexer=oi.lex;rt.Tokenizer=om;rt.Hooks=Ud;rt.parse=rt;rt.options;rt.setOptions;rt.use;rt.walkTokens;rt.parseInline;ii.parse;oi.lex;/* +`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return"
    "}del(e){return`${e}`}link(e,n,r){const o=j_(e);if(o===null)return r;e=o;let i='
    ",i}image(e,n,r){const o=j_(e);if(o===null)return r;e=o;let i=`${r}0&&h.tokens[0].type==="paragraph"?(h.tokens[0].text=m+" "+h.tokens[0].text,h.tokens[0].tokens&&h.tokens[0].tokens.length>0&&h.tokens[0].tokens[0].type==="text"&&(h.tokens[0].tokens[0].text=m+" "+h.tokens[0].tokens[0].text)):h.tokens.unshift({type:"text",text:m+" "}):g+=m+" "}g+=this.parse(h.tokens,u),c+=this.renderer.listitem(g,f,!!p)}r+=this.renderer.list(c,l,a);continue}case"html":{const s=i;r+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=i;r+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=i,l=s.tokens?this.parseInline(s.tokens):s.text;for(;o+1{const u=l[a].flat(1/0);r=r.concat(this.walkTokens(u,n))}):l.tokens&&(r=r.concat(this.walkTokens(l.tokens,n)))}}return r}use(...e){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const s=n.renderers[i.name];s?n.renderers[i.name]=function(...l){let a=i.renderer.apply(this,l);return a===!1&&(a=s.apply(this,l)),a}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=n[i.level];s?s.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new sm(this.defaults);for(const s in r.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(s==="options")continue;const l=s,a=r.renderer[l],u=i[l];i[l]=(...c)=>{let d=a.apply(i,c);return d===!1&&(d=u.apply(i,c)),d||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new om(this.defaults);for(const s in r.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const l=s,a=r.tokenizer[l],u=i[l];i[l]=(...c)=>{let d=a.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new Ud;for(const s in r.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;const l=s,a=r.hooks[l],u=i[l];Ud.passThroughHooks.has(s)?i[l]=c=>{if(this.defaults.async)return Promise.resolve(a.call(i,c)).then(h=>u.call(i,h));const d=a.call(i,c);return u.call(i,d)}:i[l]=(...c)=>{let d=a.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,s=r.walkTokens;o.walkTokens=function(l){let a=[];return a.push(s.call(this,l)),i&&(a=a.concat(i.call(this,l))),a}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return oi.lex(e,n??this.defaults)}parser(e,n){return ii.parse(e,n??this.defaults)}}Bh=new WeakSet,hb=function(e,n){return(r,o)=>{const i={...o},s={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const l=Mp(this,um,I$).call(this,!!s.silent,!!s.async);if(typeof r>"u"||r===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(r):r).then(a=>e(a,s)).then(a=>s.hooks?s.hooks.processAllTokens(a):a).then(a=>s.walkTokens?Promise.all(this.walkTokens(a,s.walkTokens)).then(()=>a):a).then(a=>n(a,s)).then(a=>s.hooks?s.hooks.postprocess(a):a).catch(l);try{s.hooks&&(r=s.hooks.preprocess(r));let a=e(r,s);s.hooks&&(a=s.hooks.processAllTokens(a)),s.walkTokens&&this.walkTokens(a,s.walkTokens);let u=n(a,s);return s.hooks&&(u=s.hooks.postprocess(u)),u}catch(a){return l(a)}}},um=new WeakSet,I$=function(e,n){return r=>{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,e){const o="

    An error occurred:

    "+Br(r.message+"",!0)+"
    ";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const gl=new Zpe;function rt(t,e){return gl.parse(t,e)}rt.options=rt.setOptions=function(t){return gl.setOptions(t),rt.defaults=gl.defaults,k$(rt.defaults),rt};rt.getDefaults=HE;rt.defaults=Tl;rt.use=function(...t){return gl.use(...t),rt.defaults=gl.defaults,k$(rt.defaults),rt};rt.walkTokens=function(t,e){return gl.walkTokens(t,e)};rt.parseInline=gl.parseInline;rt.Parser=ii;rt.parser=ii.parse;rt.Renderer=sm;rt.TextRenderer=KE;rt.Lexer=oi;rt.lexer=oi.lex;rt.Tokenizer=om;rt.Hooks=Ud;rt.parse=rt;rt.options;rt.setOptions;rt.use;rt.walkTokens;rt.parseInline;ii.parse;oi.lex;/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const O$=/[&<>"']/,Gpe=new RegExp(O$.source,"g"),I$=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Kpe=new RegExp(I$.source,"g"),Ype={"&":"&","<":"<",">":">",'"':""","'":"'"},Y_=t=>Ype[t];function X_(t,e){if(e){if(O$.test(t))return t.replace(Gpe,Y_)}else if(I$.test(t))return t.replace(Kpe,Y_);return t}/* + */const L$=/[&<>"']/,Jpe=new RegExp(L$.source,"g"),N$=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Qpe=new RegExp(N$.source,"g"),efe={"&":"&","<":"<",">":">",'"':""","'":"'"},X_=t=>efe[t];function q_(t,e){if(e){if(L$.test(t))return t.replace(Jpe,X_)}else if(N$.test(t))return t.replace(Qpe,X_);return t}/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const Xpe=pm(Nh),Dv=new Xpe({hr:"---",codeBlockStyle:"fenced",headingStyle:"atx",emDelimiter:"*"});Dv.addRule("link2",{filter:(t,e)=>e.linkStyle==="inlined"&&t.nodeName==="A"&&!!t.getAttribute("href"),replacement:function(t,e){const n=e,r=n.getAttribute("href");if(!r)return"";const o=db(n.getAttribute("title"));return o?`[${t}](${r} "${o}")`:`[${t}](${r})`}});Dv.addRule("img2",{filter:"img",replacement:(t,e)=>{const n=e,r=n.getAttribute("src")||"";if(!r)return"";const o=db(n.getAttribute("alt")),i=db(n.getAttribute("title"));return i?`![${o}](${r} "${i}")`:`![${o}](${r})`}});const qpe="data-code-block-language";Dv.addRule("code2",{filter:(t,e)=>e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild!==null&&t.firstChild.nodeName==="CODE",replacement:function(t,e,n){const r=e.firstChild.getAttribute(qpe),o=e.firstChild.textContent,i=n.fence.charAt(0);let s=3;const l=new RegExp("^"+i+"{3,}","gm");let a;for(;a=l.exec(o);)a[0].length>=s&&(s=a[0].length+1);const u=Zpe(i,s);return` + */const tfe=pm(Nh),Pv=new tfe({hr:"---",codeBlockStyle:"fenced",headingStyle:"atx",emDelimiter:"*"});Pv.addRule("link2",{filter:(t,e)=>e.linkStyle==="inlined"&&t.nodeName==="A"&&!!t.getAttribute("href"),replacement:function(t,e){const n=e,r=n.getAttribute("href");if(!r)return"";const o=pb(n.getAttribute("title"));return o?`[${t}](${r} "${o}")`:`[${t}](${r})`}});Pv.addRule("img2",{filter:"img",replacement:(t,e)=>{const n=e,r=n.getAttribute("src")||"";if(!r)return"";const o=pb(n.getAttribute("alt")),i=pb(n.getAttribute("title"));return i?`![${o}](${r} "${i}")`:`![${o}](${r})`}});const nfe="data-code-block-language";Pv.addRule("code2",{filter:(t,e)=>e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild!==null&&t.firstChild.nodeName==="CODE",replacement:function(t,e,n){const r=e.firstChild.getAttribute(nfe),o=e.firstChild.textContent,i=n.fence.charAt(0);let s=3;const l=new RegExp("^"+i+"{3,}","gm");let a;for(;a=l.exec(o);)a[0].length>=s&&(s=a[0].length+1);const u=rfe(i,s);return` ${u}${r} ${o.replace(/\n$/,"")} ${u} -`}});function db(t){return(t==null?void 0:t.replace(/(\n+\s*)+/g,` -`))||""}rt.use({renderer:{code:(t,e,n)=>{var o;const r=(o=(e||"").match(/^\S*/))==null?void 0:o[0];return t=t.replace(/\n$/,""),n||(t=X_(t,!0)),r?`
    ${t}
    +`}});function pb(t){return(t==null?void 0:t.replace(/(\n+\s*)+/g,` +`))||""}rt.use({renderer:{code:(t,e,n)=>{var o;const r=(o=(e||"").match(/^\S*/))==null?void 0:o[0];return t=t.replace(/\n$/,""),n||(t=q_(t,!0)),r?`
    ${t}
    `:`
    ${t}
    -`}}});function L$(t){return Dv.turndown(t)}function N$(t){return rt(t,{gfm:!0})}function Zpe(t,e){return Array(e+1).join(t)}/* +`}}});function $$(t){return Pv.turndown(t)}function D$(t){return rt(t,{gfm:!0})}function rfe(t,e){return Array(e+1).join(t)}/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */function q_(t){return Array.isArray(t)}function KE(t){return typeof t=="string"||t instanceof String}function Z_(t){return!!t&&typeof t=="object"&&t.constructor===Object}function Ph(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if(q_(t)&&q_(e)){if(t.length!==e.length)return!1;for(let n=0;n{const{type:e}=t;return e==="Assets"?V.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 28 28",children:[V.jsx("path",{d:"M21.875 28h-15.75c-3.413 0-6.125-2.713-6.125-6.125v-15.75c0-3.413 2.712-6.125 6.125-6.125h15.75c3.412 0 6.125 2.712 6.125 6.125v15.75c0 3.412-2.713 6.125-6.125 6.125zM6.125 1.75c-2.45 0-4.375 1.925-4.375 4.375v15.75c0 2.45 1.925 4.375 4.375 4.375h15.75c2.45 0 4.375-1.925 4.375-4.375v-15.75c0-2.45-1.925-4.375-4.375-4.375h-15.75z"}),V.jsx("path",{d:"M21.088 23.537h-11.988c-0.35 0-0.612-0.175-0.787-0.525s-0.088-0.7 0.088-0.962l8.225-9.713c0.175-0.175 0.438-0.35 0.7-0.35s0.525 0.175 0.7 0.35l5.25 7.525c0.088 0.087 0.088 0.175 0.088 0.262 0.438 1.225 0.087 2.012-0.175 2.45-0.613 0.875-1.925 0.963-2.1 0.963zM11.025 21.787h10.15c0.175 0 0.612-0.088 0.7-0.262 0.088-0.088 0.088-0.35 0-0.7l-4.55-6.475-6.3 7.438z"}),V.jsx("path",{d:"M9.1 13.737c-2.1 0-3.85-1.75-3.85-3.85s1.75-3.85 3.85-3.85 3.85 1.75 3.85 3.85-1.663 3.85-3.85 3.85zM9.1 7.788c-1.138 0-2.1 0.875-2.1 2.1s0.962 2.1 2.1 2.1 2.1-0.962 2.1-2.1-0.875-2.1-2.1-2.1z"})]}):e==="Contents"?V.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 28 28",children:[V.jsx("path",{d:"M21.875 28h-15.75c-3.413 0-6.125-2.713-6.125-6.125v-15.75c0-3.413 2.712-6.125 6.125-6.125h15.75c3.412 0 6.125 2.712 6.125 6.125v15.75c0 3.412-2.713 6.125-6.125 6.125zM6.125 1.75c-2.45 0-4.375 1.925-4.375 4.375v15.75c0 2.45 1.925 4.375 4.375 4.375h15.75c2.45 0 4.375-1.925 4.375-4.375v-15.75c0-2.45-1.925-4.375-4.375-4.375h-15.75z"}),V.jsx("path",{d:"M13.125 12.25h-5.775c-1.575 0-2.888-1.313-2.888-2.888v-2.013c0-1.575 1.313-2.888 2.888-2.888h5.775c1.575 0 2.887 1.313 2.887 2.888v2.013c0 1.575-1.312 2.888-2.887 2.888zM7.35 6.212c-0.613 0-1.138 0.525-1.138 1.138v2.012c0 0.612 0.525 1.138 1.138 1.138h5.775c0.612 0 1.138-0.525 1.138-1.138v-2.013c0-0.612-0.525-1.138-1.138-1.138h-5.775z"}),V.jsx("path",{d:"M22.662 16.713h-17.325c-0.525 0-0.875-0.35-0.875-0.875s0.35-0.875 0.875-0.875h17.237c0.525 0 0.875 0.35 0.875 0.875s-0.35 0.875-0.787 0.875z"}),V.jsx("path",{d:"M15.138 21.262h-9.8c-0.525 0-0.875-0.35-0.875-0.875s0.35-0.875 0.875-0.875h9.713c0.525 0 0.875 0.35 0.875 0.875s-0.35 0.875-0.787 0.875z"})]}):e==="Comment"?V.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",children:V.jsx("path",{d:"M20.016 15.984v-12h-16.031v14.016l2.016-2.016h14.016zM20.016 2.016c1.078 0 1.969 0.891 1.969 1.969v12c0 1.078-0.891 2.016-1.969 2.016h-14.016l-3.984 3.984v-18c0-1.078 0.891-1.969 1.969-1.969h16.031z"})}):e==="Check"?V.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 -960 960 960",children:V.jsx("path",{d:"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"})}):e==="Cancel"?V.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 -960 960 960",children:V.jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})}):e==="Edit"?V.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",children:V.jsx("path",{d:"M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"})}):e==="Preview"?V.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"200 200 724 724",children:[V.jsx("path",{d:"M545 793.6H243.8c-11 0-20-9-20-20V250.4c0-11 9-20 20-20h432.4c11 0 20 9 20 20v131.8c0 11 9 20 20 20s20-9 20-20V250.4c0-33.1-26.9-60-60-60H243.8c-33.1 0-60 26.9-60 60v523.2c0 33.1 26.9 60 60 60H545c11 0 20-9 20-20s-8.9-20-20-20z"}),V.jsx("path",{d:"M834.6 789.8l-88.8-91.7c23.4-28.7 37.5-65.4 37.5-105.3 0-92.1-74.9-167-167-167s-167 74.9-167 167 74.9 167 167 167c37.8 0 72.7-12.6 100.7-33.9l89 91.8c3.9 4 9.1 6 14.3 6 5 0 10.1-1.9 14-5.7 7.8-7.6 8-20.3 0.3-28.2z m-218.4-69.9c-70 0-127-57-127-127s57-127 127-127 127 57 127 127-57 127-127 127zM565 382.2c0-11-9-20-20-20H308.7c-11 0-20 9-20 20s9 20 20 20H545c11.1 0 20-9 20-20zM443.5 493.5c0-11-9-20-20-20H308.7c-11 0-20 9-20 20s9 20 20 20h114.8c11.1 0 20-8.9 20-20zM308.7 584.8c-11 0-20 9-20 20s9 20 20 20h61.7c11 0 20-9 20-20s-9-20-20-20h-61.7z"})]}):V.jsx("span",{style:{height:"16px",lineHeight:"16px"},children:e})},Jpe=({node:t})=>{const e=sp(zh),n=t.attrs.contentId,r=t.attrs.contentTitle,o=t.attrs.schemaName,i=e.options.onEditContent;return V.jsxs("div",{className:"squidex-editor-content-link",children:[V.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>i(o,n),children:V.jsx(Or,{type:"Contents"})}),V.jsx("div",{className:"squidex-editor-content-schema",children:o}),V.jsx("div",{className:"squidex-editor-content-name",children:r})]})};var Qpe=Object.defineProperty,efe=Object.getOwnPropertyDescriptor,$$=(t,e,n,r)=>{for(var o=r>1?void 0:r?efe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Qpe(e,n,o),o};let zh=class extends Dn{constructor(e){super({...e,disableExtraAttributes:!0});lt(this,"ReactComponent",Jpe)}get name(){return"contentLink"}createTags(){return[ke.InlineNode,ke.Media]}createNodeSpec(){return{inline:!0,attrs:{contentId:{default:""},contentTitle:{default:""},schemaName:{default:""}},toDOM:e=>["a",{href:`${this.options.baseUrl}/api/content/${this.options.appName}/${e.attrs.schemaName}/${e.attrs.contentId}`},e.attrs.contentTitle],parseDOM:[{tag:"a[href]",getAttrs:e=>{const n=e.getAttribute("href");if(!n)return!1;const r=upe(n,this.options.baseUrl,this.options.appName);return r?{contentId:r.id,contentTitle:e.innerText,schemaName:r.schemaName}:!1},priority:1e5}]}}addContent(e,n){return this.store.commands.insertNode.original(this.type,{attrs:{contentId:e.id,contentTitle:e.title,schemaName:e.schemaName},selection:n})}};$$([le({})],zh.prototype,"addContent",1);zh=$$([Ne({defaultOptions:{},staticKeys:["appName","baseUrl","onEditContent"]})],zh);const tfe=t=>{const{appName:e,baseUrl:n,onEditNode:r,onEditAsset:o,node:i,getPosition:s}=t,l=cpe(i.attrs.src,n,e);return V.jsxs("div",{style:{position:"relative"},className:"squidex-editor-image-view",children:[V.jsx("img",{className:"squidex-editor-image-element",src:i.attrs.src}),V.jsxs("div",{className:"squidex-editor-image-buttons",children:[V.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>r({node:i,getPos:s}),children:V.jsx(Or,{type:"Edit"})}),l&&V.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>o(l.id),children:V.jsx(Or,{type:"Assets"})})]}),l&&V.jsx("div",{className:"squidex-editor-image-info",children:"Asset"})]})};/* + */const Or=t=>{const{type:e}=t;return e==="Assets"?V.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 28 28",children:[V.jsx("path",{d:"M21.875 28h-15.75c-3.413 0-6.125-2.713-6.125-6.125v-15.75c0-3.413 2.712-6.125 6.125-6.125h15.75c3.412 0 6.125 2.712 6.125 6.125v15.75c0 3.412-2.713 6.125-6.125 6.125zM6.125 1.75c-2.45 0-4.375 1.925-4.375 4.375v15.75c0 2.45 1.925 4.375 4.375 4.375h15.75c2.45 0 4.375-1.925 4.375-4.375v-15.75c0-2.45-1.925-4.375-4.375-4.375h-15.75z"}),V.jsx("path",{d:"M21.088 23.537h-11.988c-0.35 0-0.612-0.175-0.787-0.525s-0.088-0.7 0.088-0.962l8.225-9.713c0.175-0.175 0.438-0.35 0.7-0.35s0.525 0.175 0.7 0.35l5.25 7.525c0.088 0.087 0.088 0.175 0.088 0.262 0.438 1.225 0.087 2.012-0.175 2.45-0.613 0.875-1.925 0.963-2.1 0.963zM11.025 21.787h10.15c0.175 0 0.612-0.088 0.7-0.262 0.088-0.088 0.088-0.35 0-0.7l-4.55-6.475-6.3 7.438z"}),V.jsx("path",{d:"M9.1 13.737c-2.1 0-3.85-1.75-3.85-3.85s1.75-3.85 3.85-3.85 3.85 1.75 3.85 3.85-1.663 3.85-3.85 3.85zM9.1 7.788c-1.138 0-2.1 0.875-2.1 2.1s0.962 2.1 2.1 2.1 2.1-0.962 2.1-2.1-0.875-2.1-2.1-2.1z"})]}):e==="Contents"?V.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 28 28",children:[V.jsx("path",{d:"M21.875 28h-15.75c-3.413 0-6.125-2.713-6.125-6.125v-15.75c0-3.413 2.712-6.125 6.125-6.125h15.75c3.412 0 6.125 2.712 6.125 6.125v15.75c0 3.412-2.713 6.125-6.125 6.125zM6.125 1.75c-2.45 0-4.375 1.925-4.375 4.375v15.75c0 2.45 1.925 4.375 4.375 4.375h15.75c2.45 0 4.375-1.925 4.375-4.375v-15.75c0-2.45-1.925-4.375-4.375-4.375h-15.75z"}),V.jsx("path",{d:"M13.125 12.25h-5.775c-1.575 0-2.888-1.313-2.888-2.888v-2.013c0-1.575 1.313-2.888 2.888-2.888h5.775c1.575 0 2.887 1.313 2.887 2.888v2.013c0 1.575-1.312 2.888-2.887 2.888zM7.35 6.212c-0.613 0-1.138 0.525-1.138 1.138v2.012c0 0.612 0.525 1.138 1.138 1.138h5.775c0.612 0 1.138-0.525 1.138-1.138v-2.013c0-0.612-0.525-1.138-1.138-1.138h-5.775z"}),V.jsx("path",{d:"M22.662 16.713h-17.325c-0.525 0-0.875-0.35-0.875-0.875s0.35-0.875 0.875-0.875h17.237c0.525 0 0.875 0.35 0.875 0.875s-0.35 0.875-0.787 0.875z"}),V.jsx("path",{d:"M15.138 21.262h-9.8c-0.525 0-0.875-0.35-0.875-0.875s0.35-0.875 0.875-0.875h9.713c0.525 0 0.875 0.35 0.875 0.875s-0.35 0.875-0.787 0.875z"})]}):e==="Comment"?V.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",children:V.jsx("path",{d:"M20.016 15.984v-12h-16.031v14.016l2.016-2.016h14.016zM20.016 2.016c1.078 0 1.969 0.891 1.969 1.969v12c0 1.078-0.891 2.016-1.969 2.016h-14.016l-3.984 3.984v-18c0-1.078 0.891-1.969 1.969-1.969h16.031z"})}):e==="Check"?V.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 -960 960 960",children:V.jsx("path",{d:"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"})}):e==="Cancel"?V.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 -960 960 960",children:V.jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})}):e==="Edit"?V.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",children:V.jsx("path",{d:"M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"})}):e==="Preview"?V.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"200 200 724 724",children:[V.jsx("path",{d:"M545 793.6H243.8c-11 0-20-9-20-20V250.4c0-11 9-20 20-20h432.4c11 0 20 9 20 20v131.8c0 11 9 20 20 20s20-9 20-20V250.4c0-33.1-26.9-60-60-60H243.8c-33.1 0-60 26.9-60 60v523.2c0 33.1 26.9 60 60 60H545c11 0 20-9 20-20s-8.9-20-20-20z"}),V.jsx("path",{d:"M834.6 789.8l-88.8-91.7c23.4-28.7 37.5-65.4 37.5-105.3 0-92.1-74.9-167-167-167s-167 74.9-167 167 74.9 167 167 167c37.8 0 72.7-12.6 100.7-33.9l89 91.8c3.9 4 9.1 6 14.3 6 5 0 10.1-1.9 14-5.7 7.8-7.6 8-20.3 0.3-28.2z m-218.4-69.9c-70 0-127-57-127-127s57-127 127-127 127 57 127 127-57 127-127 127zM565 382.2c0-11-9-20-20-20H308.7c-11 0-20 9-20 20s9 20 20 20H545c11.1 0 20-9 20-20zM443.5 493.5c0-11-9-20-20-20H308.7c-11 0-20 9-20 20s9 20 20 20h114.8c11.1 0 20-8.9 20-20zM308.7 584.8c-11 0-20 9-20 20s9 20 20 20h61.7c11 0 20-9 20-20s-9-20-20-20h-61.7z"})]}):V.jsx("span",{style:{height:"16px",lineHeight:"16px"},children:e})},ofe=({node:t})=>{const e=sp(zh),n=t.attrs.contentId,r=t.attrs.contentTitle,o=t.attrs.schemaName,i=e.options.onEditContent;return V.jsxs("div",{className:"squidex-editor-content-link",children:[V.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>i(o,n),children:V.jsx(Or,{type:"Contents"})}),V.jsx("div",{className:"squidex-editor-content-schema",children:o}),V.jsx("div",{className:"squidex-editor-content-name",children:r})]})};var ife=Object.defineProperty,sfe=Object.getOwnPropertyDescriptor,P$=(t,e,n,r)=>{for(var o=r>1?void 0:r?sfe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&ife(e,n,o),o};let zh=class extends Dn{constructor(e){super({...e,disableExtraAttributes:!0});lt(this,"ReactComponent",ofe)}get name(){return"contentLink"}createTags(){return[ke.InlineNode,ke.Media]}createNodeSpec(){return{inline:!0,attrs:{contentId:{default:""},contentTitle:{default:""},schemaName:{default:""}},toDOM:e=>["a",{href:`${this.options.baseUrl}/api/content/${this.options.appName}/${e.attrs.schemaName}/${e.attrs.contentId}`},e.attrs.contentTitle],parseDOM:[{tag:"a[href]",getAttrs:e=>{const n=e.getAttribute("href");if(!n)return!1;const r=mpe(n,this.options.baseUrl,this.options.appName);return r?{contentId:r.id,contentTitle:e.innerText,schemaName:r.schemaName}:!1},priority:1e5}]}}addContent(e,n){return this.store.commands.insertNode.original(this.type,{attrs:{contentId:e.id,contentTitle:e.title,schemaName:e.schemaName},selection:n})}};P$([le({})],zh.prototype,"addContent",1);zh=P$([Ne({defaultOptions:{},staticKeys:["appName","baseUrl","onEditContent"]})],zh);const afe=t=>{const{appName:e,baseUrl:n,onEditNode:r,onEditAsset:o,node:i,getPosition:s}=t,l=gpe(i.attrs.src,n,e);return V.jsxs("div",{style:{position:"relative"},className:"squidex-editor-image-view",children:[V.jsx("img",{className:"squidex-editor-image-element",src:i.attrs.src}),V.jsxs("div",{className:"squidex-editor-image-buttons",children:[V.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>r({node:i,getPos:s}),children:V.jsx(Or,{type:"Edit"})}),l&&V.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>o(l.id),children:V.jsx(Or,{type:"Assets"})})]}),l&&V.jsx("div",{className:"squidex-editor-image-info",children:"Asset"})]})};/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */class nfe extends ft{get name(){return"htmlCopy"}createPlugin(){const e=this.options.mode==="Html";return{props:{clipboardTextParser:e?void 0:o=>{const i=document.createElement("div");return i.innerHTML=N$(o),Za.fromSchema(this.store.schema).parseSlice(i)},clipboardTextSerializer:o=>{const s=Vr.fromSchema(this.store.schema).serializeFragment(o.content),l=document.createElement("div");l.append(s);let a=l.innerHTML;return e||(a=L$(a)),a}}}}}/* + */class lfe extends ft{get name(){return"htmlCopy"}createPlugin(){const e=this.options.mode==="Html";return{props:{clipboardTextParser:e?void 0:o=>{const i=document.createElement("div");return i.innerHTML=D$(o),Za.fromSchema(this.store.schema).parseSlice(i)},clipboardTextSerializer:o=>{const s=Vr.fromSchema(this.store.schema).serializeFragment(o.content),l=document.createElement("div");l.append(s);let a=l.innerHTML;return e||(a=$$(a)),a}}}}}/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const rfe=t=>{const{mode:e,onChange:n,value:r}=t,{setContent:o,getState:i}=to(),{getMarkdown:s,getHTML:l}=ap(),a=P.useRef(null),u=P.useRef(!1),c=P.useRef(0),d=GJ(),{doc:h}=i();return P.useEffect(()=>{c.current+=1},[d]),P.useEffect(()=>{u.current=J_(r),Ph(a.current,r)||(a.current=r,o(r||""),c.current=-1)},[o,r]),P.useEffect(()=>{if(!n)return;function p(){switch(e){case"Markdown":return s({doc:h});case"Html":return l({doc:h});default:return h}}if(c.current<=0)return;let f=p();if(KE(f)&&(f=ofe(f)),a.current===f)return;const g=J_(f);!u.current&&!g?n(void 0):n(f),a.current=f,u.current=g},[h,e,l,s,n]),null};function J_(t){return!!t&&(!KE(t)||Uh.length>0)}function ofe(t){return t=t.trim(),t&&t.length>0&&ife.indexOf(t)>=0&&(t=""),t}const ife=["

    ",'

    ','

    '],sfe=({node:t,getPosition:e,view:n})=>{const r=P.useCallback(o=>{const i=n.state.tr.setNodeAttribute(e(),"html",o.target.value);n.dispatch(i)},[e,n]);return V.jsxs("div",{className:"squidex-editor-html",children:[V.jsx("div",{className:"squidex-editor-html-label",children:"Plain HTML"}),V.jsx("textarea",{spellCheck:"false",value:t.attrs.html,onChange:r})]})};var afe=Object.defineProperty,lfe=Object.getOwnPropertyDescriptor,D$=(t,e,n,r)=>{for(var o=r>1?void 0:r?lfe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&afe(e,n,o),o};let am=class extends Dn{constructor(){super({disableExtraAttributes:!0});lt(this,"ReactComponent",sfe)}get name(){return"plainHtml"}createTags(){return[ke.Block,ke.TextBlock,ke.FormattingNode]}createNodeSpec(){return{attrs:{html:{default:""}},toDOM:e=>{const n=e.attrs.html;return["div",{class:"__editor_html"},...cfe(n)]},parseDOM:[{tag:"div[class~=__editor_html]",getAttrs:e=>({html:e.innerHTML}),priority:1e4}]}}insertPlainHtml(e){return this.store.commands.insertNode.original(this.type,{attrs:{content:""},selection:e})}};D$([le({})],am.prototype,"insertPlainHtml",1);am=D$([Ne({defaultOptions:{}})],am);function cfe(t){if(!t)return[""];const e=document.createElement("div");return e.innerHTML=t,P$(e)}function ufe(t){const e={};for(let n=0;n{const e=P.useRef(null);return P.useEffect(()=>{const n=window.requestAnimationFrame(()=>{var r;(r=e.current)==null||r.focus()});return()=>{window.cancelAnimationFrame(n)}},[]),V.jsx("input",{className:"squidex-editor-input",ref:e,...t})};/* + */const cfe=t=>{const{mode:e,onChange:n,value:r}=t,{setContent:o,getState:i}=to(),{getMarkdown:s,getHTML:l}=ap(),a=D.useRef(null),u=D.useRef(!1),c=D.useRef(0),d=YJ(),{doc:h}=i();return D.useEffect(()=>{c.current+=1},[d]),D.useEffect(()=>{u.current=Q_(r),Ph(a.current,r)||(a.current=r,o(r||""),c.current=-1)},[o,r]),D.useEffect(()=>{if(!n)return;function p(){switch(e){case"Markdown":return s({doc:h});case"Html":return l({doc:h});default:return h}}if(c.current<=0)return;let f=p();if(YE(f)&&(f=ufe(f)),a.current===f)return;const g=Q_(f);!u.current&&!g?n(void 0):n(f),a.current=f,u.current=g},[h,e,l,s,n]),null};function Q_(t){return!!t&&(!YE(t)||Uh.length>0)}function ufe(t){return t=t.trim(),t&&t.length>0&&dfe.indexOf(t)>=0&&(t=""),t}const dfe=["

    ",'

    ','

    '],hfe=({node:t,getPosition:e,view:n})=>{const r=D.useCallback(o=>{const i=n.state.tr.setNodeAttribute(e(),"html",o.target.value);n.dispatch(i)},[e,n]);return V.jsxs("div",{className:"squidex-editor-html",children:[V.jsx("div",{className:"squidex-editor-html-label",children:"Plain HTML"}),V.jsx("textarea",{spellCheck:"false",value:t.attrs.html,onChange:r})]})};var pfe=Object.defineProperty,ffe=Object.getOwnPropertyDescriptor,z$=(t,e,n,r)=>{for(var o=r>1?void 0:r?ffe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&pfe(e,n,o),o};let am=class extends Dn{constructor(){super({disableExtraAttributes:!0});lt(this,"ReactComponent",hfe)}get name(){return"plainHtml"}createTags(){return[ke.Block,ke.TextBlock,ke.FormattingNode]}createNodeSpec(){return{attrs:{html:{default:""}},toDOM:e=>{const n=e.attrs.html;return["div",{class:"__editor_html"},...gfe(n)]},parseDOM:[{tag:"div[class~=__editor_html]",getAttrs:e=>({html:e.innerHTML}),priority:1e4}]}}insertPlainHtml(e){return this.store.commands.insertNode.original(this.type,{attrs:{content:""},selection:e})}};z$([le({})],am.prototype,"insertPlainHtml",1);am=z$([Ne({defaultOptions:{}})],am);function gfe(t){if(!t)return[""];const e=document.createElement("div");return e.innerHTML=t,F$(e)}function mfe(t){const e={};for(let n=0;n{const e=D.useRef(null);return D.useEffect(()=>{const n=window.requestAnimationFrame(()=>{var r;(r=e.current)==null||r.focus()});return()=>{window.cancelAnimationFrame(n)}},[]),V.jsx("input",{className:"squidex-editor-input",ref:e,...t})};/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const F$=t=>{const{children:e,title:n}=t;return V.jsxs("div",{className:"squidex-editor-modal-wrapper",children:[V.jsx("div",{className:"squidex-editor-modal-backdrop"}),V.jsxs("div",{className:"squidex-editor-modal-window",children:[n&&V.jsx("div",{className:"squidex-editor-modal-title",children:n}),V.jsx("div",{className:"squidex-editor-modal-body",children:e})]})]})},dfe=t=>{const{onSelectAIText:e}=t,n=vu(),r=P.useCallback(async()=>{const o=await e();hfe(o)&&o.length>0&&n.insertText(o),n.run()},[n,e]);return V.jsx(kt,{commandName:"addImage",enabled:!0,onSelect:r,label:"Add AI generated Text",icon:V.jsx(Or,{type:"AI"})})};function hfe(t){return typeof t=="string"||t instanceof String}const pfe=t=>{const{onSelectAssets:e}=t,n=vu(),r=P.useCallback(async()=>{const o=await e();for(const i of o){if(i.mimeType.startsWith("image/")){const s={src:i.src,alt:i.alt,title:i.fileName};n.insertImage(s)}else n.insertText(i.fileName,{marks:{link:{href:i.src}}});n.insertText(" ")}n.run()},[n,e]);return V.jsx(kt,{commandName:"addImage",enabled:!0,onSelect:r,label:"Add Asset",icon:V.jsx(Or,{type:"Assets"})})},ffe=t=>{const{onSelectContents:e}=t,n=vu(),r=P.useCallback(async()=>{const o=await e();for(const i of o)n.addContent(i);n.run()},[n,e]);return V.jsx(kt,{commandName:"addContent",enabled:!0,onSelect:r,label:"Add Content",icon:V.jsx(Or,{type:"Contents"})})},gfe=()=>{const t=vu(),e=P.useCallback(async()=>{t.insertPlainHtml().run()},[t]);return V.jsx(kt,{commandName:"addImage",enabled:!0,onSelect:e,label:"Add HTML",icon:V.jsx(Or,{type:"HTML"})})},mfe=t=>{const{onAnnotationCreate:e}=t,{selection:n}=to({autoUpdate:!0}).getState(),r=P.useCallback(async()=>{const{from:o,to:i}=n;e({from:o,to:i})},[e,n]);return V.jsx(kt,{commandName:"addComment",enabled:!0,onSelect:r,label:"Create Comment",icon:V.jsx(Or,{type:"Comment"})})};/* + */const H$=t=>{const{children:e,title:n}=t;return V.jsxs("div",{className:"squidex-editor-modal-wrapper",children:[V.jsx("div",{className:"squidex-editor-modal-backdrop"}),V.jsxs("div",{className:"squidex-editor-modal-window",children:[n&&V.jsx("div",{className:"squidex-editor-modal-title",children:n}),V.jsx("div",{className:"squidex-editor-modal-body",children:e})]})]})},vfe=t=>{const{onSelectAIText:e}=t,n=vu(),r=D.useCallback(async()=>{const o=await e();yfe(o)&&o.length>0&&n.insertText(o),n.run()},[n,e]);return V.jsx(kt,{commandName:"addImage",enabled:!0,onSelect:r,label:"Add AI generated Text",icon:V.jsx(Or,{type:"AI"})})};function yfe(t){return typeof t=="string"||t instanceof String}const bfe=t=>{const{onSelectAssets:e}=t,n=vu(),r=D.useCallback(async()=>{const o=await e();for(const i of o){if(i.mimeType.startsWith("image/")){const s={src:i.src,alt:i.alt,title:i.fileName};n.insertImage(s)}else n.insertText(i.fileName,{marks:{link:{href:i.src}}});n.insertText(" ")}n.run()},[n,e]);return V.jsx(kt,{commandName:"addImage",enabled:!0,onSelect:r,label:"Add Asset",icon:V.jsx(Or,{type:"Assets"})})},wfe=t=>{const{onSelectContents:e}=t,n=vu(),r=D.useCallback(async()=>{const o=await e();for(const i of o)n.addContent(i);n.run()},[n,e]);return V.jsx(kt,{commandName:"addContent",enabled:!0,onSelect:r,label:"Add Content",icon:V.jsx(Or,{type:"Contents"})})},xfe=()=>{const t=vu(),e=D.useCallback(async()=>{t.insertPlainHtml().run()},[t]);return V.jsx(kt,{commandName:"addImage",enabled:!0,onSelect:e,label:"Add HTML",icon:V.jsx(Or,{type:"HTML"})})},kfe=t=>{const{onAnnotationCreate:e}=t,{selection:n}=to({autoUpdate:!0}).getState(),r=D.useCallback(async()=>{const{from:o,to:i}=n;e({from:o,to:i})},[e,n]);return V.jsx(kt,{commandName:"addComment",enabled:!0,onSelect:r,label:"Create Comment",icon:V.jsx(Or,{type:"Comment"})})};/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const vfe=t=>{const{annotations:e,onAnnotationsFocus:n,onAnnotationsUpdate:r}=t,o=un(),i=P.useRef(Q_),s=P.useRef(Q_),l=ape();return P.useEffect(()=>{i.current=e||[]},[e]),P.useEffect(()=>{const a=setTimeout(()=>{const u=l.selected;Ph(s.current,u)||(s.current=u,n==null||n(u))},200);return()=>{clearTimeout(a)}},[n,l.selected]),P.useEffect(()=>{const a=setTimeout(()=>{const u=l.available;Ph(i.current,u)||(i.current=u,r==null||r(u))},200);return()=>{clearTimeout(a)}},[r,l.available]),P.useEffect(()=>{o.setAnnotations(e||[])},[e,o]),null},Q_=[],yfe=t=>{const{attrs:e,...n}=t,{setClassName:r}=un(),o=P.useCallback(()=>{r(e.className)},[e.className,r]),i=hr().className(e);return V.jsx(nk,{...n,commandName:"toggleClass",active:i,attrs:e,enabled:!0,onSelect:o,label:(e==null?void 0:e.className)||"No Class"})},bfe=t=>{const{removeClassName:e}=un(),n=P.useCallback(()=>{e()},[e]),r=!hr().className();return V.jsx(nk,{...t,commandName:"removeClass",active:r,attrs:{},enabled:!0,onSelect:n,label:"No Class"})},wfe=()=>{const t=sp(iu);return!t.options.classNames||t.options.classNames.length===0?null:V.jsxs(KN,{"aria-label":"Class Name",icon:V.jsx("span",{style:{height:"14px",lineHeight:"14px",fontSize:"14px"},children:"Class"}),children:[V.jsx(bfe,{}),t.options.classNames.map(e=>V.jsx(yfe,{attrs:{className:e}},e))]})},xfe=()=>{const t=sp(Gs),e=$J(),n=B_(300,()=>t.getWordCount(e),[e]),r=B_(300,()=>t.getCharacterCount(e),[e]);return V.jsxs("div",{className:"squidex-editor-counter",children:["Words: ",V.jsx("strong",{children:n}),", Characters: ",V.jsx("strong",{children:r})]})},B$=t=>{const{onEdit:e}=t,n=vu(),o=hr().link(),i=mx(),s=P.useCallback(()=>{n.removeLink().focus().run()},[n]);return V.jsxs(V.Fragment,{children:[V.jsx(kt,{commandName:"updateLink",enabled:!i.empty,label:"Add or Edit Link",onSelect:e,icon:"link"}),V.jsx(kt,{commandName:"removeLink",enabled:o,label:"Remove Link",onSelect:s,icon:"linkUnlink"})]})},kfe=t=>{const{onClose:e}=t,n=vu(),r=LJ(!0).link(),o=(r==null?void 0:r.href)??"",i=mx(),[s,l,a]=b$("");P.useEffect(()=>{l(o)},[o,i,l]);const u=P.useCallback(()=>{const h=a.current;h?n.updateLink({href:h,auto:!1}):n.removeLink(),n.focus(i.to).run(),e()},[n,a,e,i.to]),c=P.useCallback(h=>{l(h.target.value)},[l]),d=P.useCallback(h=>{const{code:p}=h;p==="Enter"&&u(),p==="Escape"&&e()},[e,u]);return V.jsxs(F$,{title:"Change Link",children:[V.jsx(z$,{value:s,onChange:c,onKeyDown:d,placeholder:"Enter Link..."}),V.jsxs(Fr,{children:[V.jsx(kt,{commandName:"submitLink",enabled:!0,onSelect:u,icon:V.jsx(Or,{type:"Check"})}),V.jsx(kt,{commandName:"cancelLink",enabled:!0,onSelect:e,icon:V.jsx(Or,{type:"Cancel"})})]})]})};var su={},YE={},H$={exports:{}};(function(t,e){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var o=function(c,d,h){if(typeof c!="string"){o.original?o.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(h=d),o.modules[c]||(o.payloads[c]=h,o.modules[c]=null)};o.modules={},o.payloads={};var i=function(c,d,h){if(typeof d=="string"){var p=a(c,d);if(p!=null)return h&&h(),p}else if(Object.prototype.toString.call(d)==="[object Array]"){for(var f=[],g=0,m=d.length;ga.length)&&(l=a.length),l-=s.length;var u=a.indexOf(s,l);return u!==-1&&u===l}),String.prototype.repeat||i(String.prototype,"repeat",function(s){for(var l="",a=this;s>0;)s&1&&(l+=a),(s>>=1)&&(a+=a);return l}),String.prototype.includes||i(String.prototype,"includes",function(s,l){return this.indexOf(s,l)!=-1}),Object.assign||(Object.assign=function(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var l=Object(s),a=1;a>>0,u=arguments[1],c=u>>0,d=c<0?Math.max(a+c,0):Math.min(c,a),h=arguments[2],p=h===void 0?a:h>>0,f=p<0?Math.max(a+p,0):Math.min(p,a);d0;)a&1&&(u+=l),(a>>=1)&&(l+=l);return u};var i=/^\s\s*/,s=/\s\s*$/;r.stringTrimLeft=function(l){return l.replace(i,"")},r.stringTrimRight=function(l){return l.replace(s,"")},r.copyObject=function(l){var a={};for(var u in l)a[u]=l[u];return a},r.copyArray=function(l){for(var a=[],u=0,c=l.length;u65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,r,o){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var i=typeof navigator=="object"?navigator:{},s=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),l=i.userAgent||"",a=i.appName||"";r.isWin=s=="win",r.isMac=s=="mac",r.isLinux=s=="linux",r.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((l.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((l.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=l.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(l.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(l.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(l.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(l.split(" Edge/")[1])||void 0,r.isAIR=l.indexOf("AdobeAIR")>=0,r.isAndroid=l.indexOf("Android")>=0,r.isChromeOS=l.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(l)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,r,o){var i=n("./useragent"),s="http://www.w3.org/1999/xhtml";r.buildDom=function h(p,f,g){if(typeof p=="string"&&p){var m=document.createTextNode(p);return f&&f.appendChild(m),m}if(!Array.isArray(p))return p&&p.appendChild&&f&&f.appendChild(p),p;if(typeof p[0]!="string"||!p[0]){for(var v=[],y=0;y"u")){if(a){if(f)u();else if(f===!1)return a.push([h,p])}if(!l){var g=f;!f||!f.getRootNode?g=document:(g=f.getRootNode(),(!g||g==f)&&(g=document));var m=g.ownerDocument||g;if(p&&r.hasCssString(p,g))return null;p&&(h+=` + */const Efe=t=>{const{annotations:e,onAnnotationsFocus:n,onAnnotationsUpdate:r}=t,o=un(),i=D.useRef(eR),s=D.useRef(eR),l=dpe();return D.useEffect(()=>{i.current=e||[]},[e]),D.useEffect(()=>{const a=setTimeout(()=>{const u=l.selected;Ph(s.current,u)||(s.current=u,n==null||n(u))},200);return()=>{clearTimeout(a)}},[n,l.selected]),D.useEffect(()=>{const a=setTimeout(()=>{const u=l.available;Ph(i.current,u)||(i.current=u,r==null||r(u))},200);return()=>{clearTimeout(a)}},[r,l.available]),D.useEffect(()=>{o.setAnnotations(e||[])},[e,o]),null},eR=[],Sfe=t=>{const{attrs:e,...n}=t,{setClassName:r}=un(),o=D.useCallback(()=>{r(e.className)},[e.className,r]),i=hr().className(e);return V.jsx(rk,{...n,commandName:"toggleClass",active:i,attrs:e,enabled:!0,onSelect:o,label:(e==null?void 0:e.className)||"No Class"})},Cfe=t=>{const{removeClassName:e}=un(),n=D.useCallback(()=>{e()},[e]),r=!hr().className();return V.jsx(rk,{...t,commandName:"removeClass",active:r,attrs:{},enabled:!0,onSelect:n,label:"No Class"})},Tfe=()=>{const t=sp(iu);return!t.options.classNames||t.options.classNames.length===0?null:V.jsxs(YN,{"aria-label":"Class Name",icon:V.jsx("span",{style:{height:"14px",lineHeight:"14px",fontSize:"14px"},children:"Class"}),children:[V.jsx(Cfe,{}),t.options.classNames.map(e=>V.jsx(Sfe,{attrs:{className:e}},e))]})},Afe=()=>{const t=sp(Gs),e=PJ(),n=H_(300,()=>t.getWordCount(e),[e]),r=H_(300,()=>t.getCharacterCount(e),[e]);return V.jsxs("div",{children:["Words: ",V.jsx("strong",{children:n}),", Characters: ",V.jsx("strong",{children:r})]})},U$=t=>{const{onEdit:e}=t,n=vu(),o=hr().link(),i=qm(),s=D.useCallback(()=>{n.removeLink().focus().run()},[n]);return V.jsxs(V.Fragment,{children:[V.jsx(kt,{commandName:"updateLink",enabled:!i.empty,label:"Add or Edit Link",onSelect:e,icon:"link"}),V.jsx(kt,{commandName:"removeLink",enabled:o,label:"Remove Link",onSelect:s,icon:"linkUnlink"})]})},_fe=t=>{const{onClose:e}=t,n=vu(),r=$J(!0).link(),o=(r==null?void 0:r.href)??"",i=qm(),[s,l,a]=x$("");D.useEffect(()=>{l(o)},[o,i,l]);const u=D.useCallback(()=>{const h=a.current;h?n.updateLink({href:h,auto:!1}):n.removeLink(),n.focus(i.to).run(),e()},[n,a,e,i.to]),c=D.useCallback(h=>{l(h.target.value)},[l]),d=D.useCallback(h=>{const{code:p}=h;p==="Enter"&&u(),p==="Escape"&&e()},[e,u]);return V.jsxs(H$,{title:"Change Link",children:[V.jsx(B$,{value:s,onChange:c,onKeyDown:d,placeholder:"Enter Link..."}),V.jsxs(Fr,{children:[V.jsx(kt,{commandName:"submitLink",enabled:!0,onSelect:u,icon:V.jsx(Or,{type:"Check"})}),V.jsx(kt,{commandName:"cancelLink",enabled:!0,onSelect:e,icon:V.jsx(Or,{type:"Cancel"})})]})]})};var su={},XE={},W$={exports:{}};(function(t,e){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var o=function(c,d,h){if(typeof c!="string"){o.original?o.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(h=d),o.modules[c]||(o.payloads[c]=h,o.modules[c]=null)};o.modules={},o.payloads={};var i=function(c,d,h){if(typeof d=="string"){var p=a(c,d);if(p!=null)return h&&h(),p}else if(Object.prototype.toString.call(d)==="[object Array]"){for(var f=[],g=0,m=d.length;ga.length)&&(l=a.length),l-=s.length;var u=a.indexOf(s,l);return u!==-1&&u===l}),String.prototype.repeat||i(String.prototype,"repeat",function(s){for(var l="",a=this;s>0;)s&1&&(l+=a),(s>>=1)&&(a+=a);return l}),String.prototype.includes||i(String.prototype,"includes",function(s,l){return this.indexOf(s,l)!=-1}),Object.assign||(Object.assign=function(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var l=Object(s),a=1;a>>0,u=arguments[1],c=u>>0,d=c<0?Math.max(a+c,0):Math.min(c,a),h=arguments[2],p=h===void 0?a:h>>0,f=p<0?Math.max(a+p,0):Math.min(p,a);d0;)a&1&&(u+=l),(a>>=1)&&(l+=l);return u};var i=/^\s\s*/,s=/\s\s*$/;r.stringTrimLeft=function(l){return l.replace(i,"")},r.stringTrimRight=function(l){return l.replace(s,"")},r.copyObject=function(l){var a={};for(var u in l)a[u]=l[u];return a},r.copyArray=function(l){for(var a=[],u=0,c=l.length;u65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,r,o){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var i=typeof navigator=="object"?navigator:{},s=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),l=i.userAgent||"",a=i.appName||"";r.isWin=s=="win",r.isMac=s=="mac",r.isLinux=s=="linux",r.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((l.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((l.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=l.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(l.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(l.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(l.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(l.split(" Edge/")[1])||void 0,r.isAIR=l.indexOf("AdobeAIR")>=0,r.isAndroid=l.indexOf("Android")>=0,r.isChromeOS=l.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(l)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,r,o){var i=n("./useragent"),s="http://www.w3.org/1999/xhtml";r.buildDom=function h(p,f,g){if(typeof p=="string"&&p){var m=document.createTextNode(p);return f&&f.appendChild(m),m}if(!Array.isArray(p))return p&&p.appendChild&&f&&f.appendChild(p),p;if(typeof p[0]!="string"||!p[0]){for(var v=[],y=0;y"u")){if(a){if(f)u();else if(f===!1)return a.push([h,p])}if(!l){var g=f;!f||!f.getRootNode?g=document:(g=f.getRootNode(),(!g||g==f)&&(g=document));var m=g.ownerDocument||g;if(p&&r.hasCssString(p,g))return null;p&&(h+=` /*# sourceURL=ace/css/`+p+" */");var v=r.createElement("style");v.appendChild(m.createTextNode(h)),p&&(v.id=p),g==m&&(g=r.getDocumentHead(m)),g.insertBefore(v,g.firstChild)}}}if(r.importCssString=c,r.importCssStylsheet=function(h,p){r.buildDom(["link",{rel:"stylesheet",href:h}],r.getDocumentHead(p))},r.scrollbarWidth=function(h){var p=r.createElement("ace_inner");p.style.width="100%",p.style.minWidth="0px",p.style.height="200px",p.style.display="block";var f=r.createElement("ace_outer"),g=f.style;g.position="absolute",g.left="-10000px",g.overflow="hidden",g.width="200px",g.minWidth="0px",g.height="150px",g.display="block",f.appendChild(p);var m=h&&h.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(f);var v=p.offsetWidth;g.overflow="scroll";var y=p.offsetWidth;return v===y&&(y=f.clientWidth),m.removeChild(f),v-y},r.computedStyle=function(h,p){return window.getComputedStyle(h,"")||{}},r.setStyle=function(h,p,f){h[p]!==f&&(h[p]=f)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=i.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,i.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var d=document.createElement("div");r.HI_DPI&&d.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!i.isEdge&&typeof d.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),d=null}r.HAS_CSS_TRANSFORMS?r.translate=function(h,p,f){h.style.transform="translate("+Math.round(p)+"px, "+Math.round(f)+"px)"}:r.translate=function(h,p,f){h.style.top=Math.round(f)+"px",h.style.left=Math.round(p)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,r,o){/* * based on code from: * @@ -5312,26 +5316,26 @@ ${u} ========================================================================== - @license */var i=n("./oop"),s=function(){var l={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};l.PRINTABLE_KEYS[173]="-";var a,u;for(u in l.FUNCTION_KEYS)a=l.FUNCTION_KEYS[u].toLowerCase(),l[a]=parseInt(u,10);for(u in l.PRINTABLE_KEYS)a=l.PRINTABLE_KEYS[u].toLowerCase(),l[a]=parseInt(u,10);return i.mixin(l,l.MODIFIER_KEYS),i.mixin(l,l.PRINTABLE_KEYS),i.mixin(l,l.FUNCTION_KEYS),l.enter=l.return,l.escape=l.esc,l.del=l.delete,function(){for(var c=["cmd","ctrl","alt","shift"],d=Math.pow(2,c.length);d--;)l.KEY_MODS[d]=c.filter(function(h){return d&l.KEY_MODS[h]}).join("-")+"-"}(),l.KEY_MODS[0]="",l.KEY_MODS[-1]="input-",l}();i.mixin(r,s),r.default=r,r.keyCodeToString=function(l){var a=s[l];return typeof a!="string"&&(a=String.fromCharCode(l)),a.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,o){var i=n("./keys"),s=n("./useragent"),l=null,a=0,u;function c(){u=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return u={passive:!1},!0}})}catch{}}function d(){return u==null&&c(),u}function h(b,w,k){this.elem=b,this.type=w,this.callback=k}h.prototype.destroy=function(){f(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var p=r.addListener=function(b,w,k,x){b.addEventListener(w,k,d()),x&&x.$toDestroy.push(new h(b,w,k))},f=r.removeListener=function(b,w,k){b.removeEventListener(w,k,d())};r.stopEvent=function(b){return r.stopPropagation(b),r.preventDefault(b),!1},r.stopPropagation=function(b){b.stopPropagation&&b.stopPropagation()},r.preventDefault=function(b){b.preventDefault&&b.preventDefault()},r.getButton=function(b){return b.type=="dblclick"?0:b.type=="contextmenu"||s.isMac&&b.ctrlKey&&!b.altKey&&!b.shiftKey?2:b.button},r.capture=function(b,w,k){var x=b&&b.ownerDocument||document;function S(A){w&&w(A),k&&k(A),f(x,"mousemove",w),f(x,"mouseup",S),f(x,"dragstart",S)}return p(x,"mousemove",w),p(x,"mouseup",S),p(x,"dragstart",S),S},r.addMouseWheelListener=function(b,w,k){p(b,"wheel",function(x){var S=.15,A=x.deltaX||0,C=x.deltaY||0;switch(x.deltaMode){case x.DOM_DELTA_PIXEL:x.wheelX=A*S,x.wheelY=C*S;break;case x.DOM_DELTA_LINE:var O=15;x.wheelX=A*O,x.wheelY=C*O;break;case x.DOM_DELTA_PAGE:var R=150;x.wheelX=A*R,x.wheelY=C*R;break}w(x)},k)},r.addMultiMouseDownListener=function(b,w,k,x,S){var A=0,C,O,R,_={2:"dblclick",3:"tripleclick",4:"quadclick"};function T(E){if(r.getButton(E)!==0?A=0:E.detail>1?(A++,A>4&&(A=1)):A=1,s.isIE){var M=Math.abs(E.clientX-C)>5||Math.abs(E.clientY-O)>5;(!R||M)&&(A=1),R&&clearTimeout(R),R=setTimeout(function(){R=null},w[A-1]||600),A==1&&(C=E.clientX,O=E.clientY)}if(E._clicks=A,k[x]("mousedown",E),A>4)A=0;else if(A>1)return k[x](_[A],E)}Array.isArray(b)||(b=[b]),b.forEach(function(E){p(E,"mousedown",T,S)})};function g(b){return 0|(b.ctrlKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.metaKey?8:0)}r.getModifierString=function(b){return i.KEY_MODS[g(b)]};function m(b,w,k){var x=g(w);if(!s.isMac&&l){if(w.getModifierState&&(w.getModifierState("OS")||w.getModifierState("Win"))&&(x|=8),l.altGr)if((3&x)!=3)l.altGr=0;else return;if(k===18||k===17){var S=w.location;if(k===17&&S===1)l[k]==1&&(a=w.timeStamp);else if(k===18&&x===3&&S===2){var A=w.timeStamp-a;A<50&&(l.altGr=!0)}}}if(k in i.MODIFIER_KEYS&&(k=-1),!(!x&&k===13&&w.location===3&&(b(w,x,-k),w.defaultPrevented))){if(s.isChromeOS&&x&8){if(b(w,x,k),w.defaultPrevented)return;x&=-9}return!x&&!(k in i.FUNCTION_KEYS)&&!(k in i.PRINTABLE_KEYS)?!1:b(w,x,k)}}r.addCommandKeyListener=function(b,w,k){var x=null;p(b,"keydown",function(S){l[S.keyCode]=(l[S.keyCode]||0)+1;var A=m(w,S,S.keyCode);return x=S.defaultPrevented,A},k),p(b,"keypress",function(S){x&&(S.ctrlKey||S.altKey||S.shiftKey||S.metaKey)&&(r.stopEvent(S),x=null)},k),p(b,"keyup",function(S){l[S.keyCode]=null},k),l||(v(),p(window,"focus",v))};function v(){l=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!s.isOldIE){var y=1;r.nextTick=function(b,w){w=w||window;var k="zero-timeout-message-"+y++,x=function(S){S.data==k&&(r.stopPropagation(S),f(w,"message",x),b())};p(w,"message",x),w.postMessage(k,"*")}}r.$idleBlocked=!1,r.onIdle=function(b,w){return setTimeout(function k(){r.$idleBlocked?setTimeout(k,100):b()},w)},r.$idleBlockId=null,r.blockIdle=function(b){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},b||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(b){setTimeout(b,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,o){var i;o.exports={lineMode:!1,pasteCancelled:function(){return i&&i>Date.now()-50?!0:i=!1},cancel:function(){i=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(n,r,o){var i=n("../lib/event"),s=n("../config").nls,l=n("../lib/useragent"),a=n("../lib/dom"),u=n("../lib/lang"),c=n("../clipboard"),d=l.isChrome<18,h=l.isIE,p=l.isChrome>63,f=400,g=n("../lib/keys"),m=g.KEY_MODS,v=l.isIOS,y=v?/\s/:/\n/,b=l.isMobile,w;w=function(k,x){var S=a.createElement("textarea");S.className="ace_text-input",S.setAttribute("wrap","off"),S.setAttribute("autocorrect","off"),S.setAttribute("autocapitalize","off"),S.setAttribute("spellcheck","false"),S.style.opacity="0",k.insertBefore(S,k.firstChild);var A=!1,C=!1,O=!1,R=!1,_="";b||(S.style.fontSize="1px");var T=!1,E=!1,M="",I=0,N=0,L=0,$=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,F=0;try{var U=document.activeElement===S}catch{}this.setNumberOfExtraLines=function(q){if($=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,q<0){F=0;return}F=q},this.setAriaOptions=function(q){if(q.activeDescendant?(S.setAttribute("aria-haspopup","true"),S.setAttribute("aria-autocomplete",q.inline?"both":"list"),S.setAttribute("aria-activedescendant",q.activeDescendant)):(S.setAttribute("aria-haspopup","false"),S.setAttribute("aria-autocomplete","both"),S.removeAttribute("aria-activedescendant")),q.role&&S.setAttribute("role",q.role),q.setLabel&&(S.setAttribute("aria-roledescription",s("editor")),x.session)){var ue=x.session.selection.cursor.row;S.setAttribute("aria-label",s("Cursor at row $0",[ue+1]))}},this.setAriaOptions({role:"textbox"}),i.addListener(S,"blur",function(q){E||(x.onBlur(q),U=!1)},x),i.addListener(S,"focus",function(q){if(!E){if(U=!0,l.isEdge)try{if(!document.hasFocus())return}catch{}x.onFocus(q),l.isEdge?setTimeout(B):B()}},x),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:x.renderer.enableKeyboardAccessibility}),_||p||this.$focusScroll=="browser")return S.focus({preventScroll:!0});var q=S.style.top;S.style.position="fixed",S.style.top="0px";try{var ue=S.getBoundingClientRect().top!=0}catch{return}var me=[];if(ue)for(var ie=S.parentElement;ie&&ie.nodeType==1;)me.push(ie),ie.setAttribute("ace_nocontext","true"),!ie.parentElement&&ie.getRootNode?ie=ie.getRootNode().host:ie=ie.parentElement;S.focus({preventScroll:!0}),ue&&me.forEach(function(Ce){Ce.removeAttribute("ace_nocontext")}),setTimeout(function(){S.style.position="",S.style.top=="0px"&&(S.style.top=q)},0)},this.blur=function(){S.blur()},this.isFocused=function(){return U},x.on("beforeEndOperation",function(){var q=x.curOp,ue=q&&q.command&&q.command.name;if(ue!="insertstring"){var me=ue&&(q.docChanged||q.selectionChanged);O&&me&&(M=S.value="",bt()),B()}});var W=function(q,ue){for(var me=ue,ie=1;ie<=q-$&&ie<2*F+1;ie++)me+=x.session.getLine(q-ie).length+1;return me},B=v?function(q){if(!(!U||A&&!q||R)){q||(q="");var ue=` + @license */var i=n("./oop"),s=function(){var l={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};l.PRINTABLE_KEYS[173]="-";var a,u;for(u in l.FUNCTION_KEYS)a=l.FUNCTION_KEYS[u].toLowerCase(),l[a]=parseInt(u,10);for(u in l.PRINTABLE_KEYS)a=l.PRINTABLE_KEYS[u].toLowerCase(),l[a]=parseInt(u,10);return i.mixin(l,l.MODIFIER_KEYS),i.mixin(l,l.PRINTABLE_KEYS),i.mixin(l,l.FUNCTION_KEYS),l.enter=l.return,l.escape=l.esc,l.del=l.delete,function(){for(var c=["cmd","ctrl","alt","shift"],d=Math.pow(2,c.length);d--;)l.KEY_MODS[d]=c.filter(function(h){return d&l.KEY_MODS[h]}).join("-")+"-"}(),l.KEY_MODS[0]="",l.KEY_MODS[-1]="input-",l}();i.mixin(r,s),r.default=r,r.keyCodeToString=function(l){var a=s[l];return typeof a!="string"&&(a=String.fromCharCode(l)),a.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,o){var i=n("./keys"),s=n("./useragent"),l=null,a=0,u;function c(){u=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return u={passive:!1},!0}})}catch{}}function d(){return u==null&&c(),u}function h(b,w,k){this.elem=b,this.type=w,this.callback=k}h.prototype.destroy=function(){f(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var p=r.addListener=function(b,w,k,x){b.addEventListener(w,k,d()),x&&x.$toDestroy.push(new h(b,w,k))},f=r.removeListener=function(b,w,k){b.removeEventListener(w,k,d())};r.stopEvent=function(b){return r.stopPropagation(b),r.preventDefault(b),!1},r.stopPropagation=function(b){b.stopPropagation&&b.stopPropagation()},r.preventDefault=function(b){b.preventDefault&&b.preventDefault()},r.getButton=function(b){return b.type=="dblclick"?0:b.type=="contextmenu"||s.isMac&&b.ctrlKey&&!b.altKey&&!b.shiftKey?2:b.button},r.capture=function(b,w,k){var x=b&&b.ownerDocument||document;function S(A){w&&w(A),k&&k(A),f(x,"mousemove",w),f(x,"mouseup",S),f(x,"dragstart",S)}return p(x,"mousemove",w),p(x,"mouseup",S),p(x,"dragstart",S),S},r.addMouseWheelListener=function(b,w,k){p(b,"wheel",function(x){var S=.15,A=x.deltaX||0,C=x.deltaY||0;switch(x.deltaMode){case x.DOM_DELTA_PIXEL:x.wheelX=A*S,x.wheelY=C*S;break;case x.DOM_DELTA_LINE:var O=15;x.wheelX=A*O,x.wheelY=C*O;break;case x.DOM_DELTA_PAGE:var R=150;x.wheelX=A*R,x.wheelY=C*R;break}w(x)},k)},r.addMultiMouseDownListener=function(b,w,k,x,S){var A=0,C,O,R,_={2:"dblclick",3:"tripleclick",4:"quadclick"};function T(E){if(r.getButton(E)!==0?A=0:E.detail>1?(A++,A>4&&(A=1)):A=1,s.isIE){var M=Math.abs(E.clientX-C)>5||Math.abs(E.clientY-O)>5;(!R||M)&&(A=1),R&&clearTimeout(R),R=setTimeout(function(){R=null},w[A-1]||600),A==1&&(C=E.clientX,O=E.clientY)}if(E._clicks=A,k[x]("mousedown",E),A>4)A=0;else if(A>1)return k[x](_[A],E)}Array.isArray(b)||(b=[b]),b.forEach(function(E){p(E,"mousedown",T,S)})};function g(b){return 0|(b.ctrlKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.metaKey?8:0)}r.getModifierString=function(b){return i.KEY_MODS[g(b)]};function m(b,w,k){var x=g(w);if(!s.isMac&&l){if(w.getModifierState&&(w.getModifierState("OS")||w.getModifierState("Win"))&&(x|=8),l.altGr)if((3&x)!=3)l.altGr=0;else return;if(k===18||k===17){var S=w.location;if(k===17&&S===1)l[k]==1&&(a=w.timeStamp);else if(k===18&&x===3&&S===2){var A=w.timeStamp-a;A<50&&(l.altGr=!0)}}}if(k in i.MODIFIER_KEYS&&(k=-1),!(!x&&k===13&&w.location===3&&(b(w,x,-k),w.defaultPrevented))){if(s.isChromeOS&&x&8){if(b(w,x,k),w.defaultPrevented)return;x&=-9}return!x&&!(k in i.FUNCTION_KEYS)&&!(k in i.PRINTABLE_KEYS)?!1:b(w,x,k)}}r.addCommandKeyListener=function(b,w,k){var x=null;p(b,"keydown",function(S){l[S.keyCode]=(l[S.keyCode]||0)+1;var A=m(w,S,S.keyCode);return x=S.defaultPrevented,A},k),p(b,"keypress",function(S){x&&(S.ctrlKey||S.altKey||S.shiftKey||S.metaKey)&&(r.stopEvent(S),x=null)},k),p(b,"keyup",function(S){l[S.keyCode]=null},k),l||(v(),p(window,"focus",v))};function v(){l=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!s.isOldIE){var y=1;r.nextTick=function(b,w){w=w||window;var k="zero-timeout-message-"+y++,x=function(S){S.data==k&&(r.stopPropagation(S),f(w,"message",x),b())};p(w,"message",x),w.postMessage(k,"*")}}r.$idleBlocked=!1,r.onIdle=function(b,w){return setTimeout(function k(){r.$idleBlocked?setTimeout(k,100):b()},w)},r.$idleBlockId=null,r.blockIdle=function(b){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},b||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(b){setTimeout(b,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,o){var i;o.exports={lineMode:!1,pasteCancelled:function(){return i&&i>Date.now()-50?!0:i=!1},cancel:function(){i=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(n,r,o){var i=n("../lib/event"),s=n("../config").nls,l=n("../lib/useragent"),a=n("../lib/dom"),u=n("../lib/lang"),c=n("../clipboard"),d=l.isChrome<18,h=l.isIE,p=l.isChrome>63,f=400,g=n("../lib/keys"),m=g.KEY_MODS,v=l.isIOS,y=v?/\s/:/\n/,b=l.isMobile,w;w=function(k,x){var S=a.createElement("textarea");S.className="ace_text-input",S.setAttribute("wrap","off"),S.setAttribute("autocorrect","off"),S.setAttribute("autocapitalize","off"),S.setAttribute("spellcheck","false"),S.style.opacity="0",k.insertBefore(S,k.firstChild);var A=!1,C=!1,O=!1,R=!1,_="";b||(S.style.fontSize="1px");var T=!1,E=!1,M="",I=0,N=0,L=0,$=Number.MAX_SAFE_INTEGER,P=Number.MIN_SAFE_INTEGER,F=0;try{var H=document.activeElement===S}catch{}this.setNumberOfExtraLines=function(q){if($=Number.MAX_SAFE_INTEGER,P=Number.MIN_SAFE_INTEGER,q<0){F=0;return}F=q},this.setAriaOptions=function(q){if(q.activeDescendant?(S.setAttribute("aria-haspopup","true"),S.setAttribute("aria-autocomplete",q.inline?"both":"list"),S.setAttribute("aria-activedescendant",q.activeDescendant)):(S.setAttribute("aria-haspopup","false"),S.setAttribute("aria-autocomplete","both"),S.removeAttribute("aria-activedescendant")),q.role&&S.setAttribute("role",q.role),q.setLabel&&(S.setAttribute("aria-roledescription",s("editor")),x.session)){var ue=x.session.selection.cursor.row;S.setAttribute("aria-label",s("Cursor at row $0",[ue+1]))}},this.setAriaOptions({role:"textbox"}),i.addListener(S,"blur",function(q){E||(x.onBlur(q),H=!1)},x),i.addListener(S,"focus",function(q){if(!E){if(H=!0,l.isEdge)try{if(!document.hasFocus())return}catch{}x.onFocus(q),l.isEdge?setTimeout(B):B()}},x),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:x.renderer.enableKeyboardAccessibility}),_||p||this.$focusScroll=="browser")return S.focus({preventScroll:!0});var q=S.style.top;S.style.position="fixed",S.style.top="0px";try{var ue=S.getBoundingClientRect().top!=0}catch{return}var me=[];if(ue)for(var ie=S.parentElement;ie&&ie.nodeType==1;)me.push(ie),ie.setAttribute("ace_nocontext","true"),!ie.parentElement&&ie.getRootNode?ie=ie.getRootNode().host:ie=ie.parentElement;S.focus({preventScroll:!0}),ue&&me.forEach(function(Ce){Ce.removeAttribute("ace_nocontext")}),setTimeout(function(){S.style.position="",S.style.top=="0px"&&(S.style.top=q)},0)},this.blur=function(){S.blur()},this.isFocused=function(){return H},x.on("beforeEndOperation",function(){var q=x.curOp,ue=q&&q.command&&q.command.name;if(ue!="insertstring"){var me=ue&&(q.docChanged||q.selectionChanged);O&&me&&(M=S.value="",bt()),B()}});var W=function(q,ue){for(var me=ue,ie=1;ie<=q-$&&ie<2*F+1;ie++)me+=x.session.getLine(q-ie).length+1;return me},B=v?function(q){if(!(!H||A&&!q||R)){q||(q="");var ue=` ab`+q+`cde fg -`;ue!=S.value&&(S.value=M=ue);var me=4,ie=4+(q.length||(x.selection.isEmpty()?0:1));(I!=me||N!=ie)&&S.setSelectionRange(me,ie),I=me,N=ie}}:function(){if(!(O||R)&&!(!U&&!X)){O=!0;var q=0,ue=0,me="";if(x.session){var ie=x.selection,Ce=ie.getRange(),Xe=ie.cursor.row;Xe===D+1?($=D+1,D=$+2*F):Xe===$-1?(D=$-1,$=D-2*F):(Xe<$-1||Xe>D+1)&&($=Xe>F?Xe-F:0,D=Xe>F?Xe+F:2*F);for(var Ke=[],et=$;et<=D;et++)Ke.push(x.session.getLine(et));if(me=Ke.join(` +`;ue!=S.value&&(S.value=M=ue);var me=4,ie=4+(q.length||(x.selection.isEmpty()?0:1));(I!=me||N!=ie)&&S.setSelectionRange(me,ie),I=me,N=ie}}:function(){if(!(O||R)&&!(!H&&!X)){O=!0;var q=0,ue=0,me="";if(x.session){var ie=x.selection,Ce=ie.getRange(),Xe=ie.cursor.row;Xe===P+1?($=P+1,P=$+2*F):Xe===$-1?(P=$-1,$=P-2*F):(Xe<$-1||Xe>P+1)&&($=Xe>F?Xe-F:0,P=Xe>F?Xe+F:2*F);for(var Ke=[],et=$;et<=P;et++)Ke.push(x.session.getLine(et));if(me=Ke.join(` `),q=W(Ce.start.row,Ce.start.column),ue=W(Ce.end.row,Ce.end.column),Ce.start.row<$){var tt=x.session.getLine($-1);q=Ce.start.row<$-1?0:q,ue+=tt.length+1,me=tt+` -`+me}else if(Ce.end.row>D){var ze=x.session.getLine(D+1);ue=Ce.end.row>D+1?ze.length:Ce.end.column,ue+=me.length+1,me=me+` +`+me}else if(Ce.end.row>P){var ze=x.session.getLine(P+1);ue=Ce.end.row>P+1?ze.length:Ce.end.column,ue+=me.length+1,me=me+` `+ze}else b&&Xe>0&&(me=` `+me,ue+=1,q+=1);me.length>f&&(q=M.length&&q.value===M&&M&&q.selectionEnd!==N},G=function(q){O||(A?A=!1:H(S)?(x.selectAll(),B()):b&&S.selectionStart!=I&&B())},Y=null;this.setInputHandler=function(q){Y=q},this.getInputHandler=function(){return Y};var X=!1,Z=function(q,ue){if(X&&(X=!1),C)return B(),q&&x.onPaste(q),C=!1,"";for(var me=S.selectionStart,ie=S.selectionEnd,Ce=I,Xe=M.length-N,Ke=q,et=q.length-me,tt=q.length-ie,ze=0;Ce>0&&M[ze]==q[ze];)ze++,Ce--;for(Ke=Ke.slice(ze),ze=1;Xe>0&&M.length-ze>I-1&&M[M.length-ze]==q[q.length-ze];)ze++,Xe--;et-=ze-1,tt-=ze-1;var jt=Ke.length-ze+1;if(jt<0&&(Ce=-jt,jt=0),Ke=Ke.slice(0,jt),!ue&&!Ke&&!et&&!Ce&&!Xe&&!tt)return"";R=!0;var Co=!1;return l.isAndroid&&Ke==". "&&(Ke=" ",Co=!0),Ke&&!Ce&&!Xe&&!et&&!tt||T?x.onTextInput(Ke):x.onTextInput(Ke,{extendLeft:Ce,extendRight:Xe,restoreStart:et,restoreEnd:tt}),R=!1,M=q,I=me,N=ie,L=tt,Co?` +`;jt!=M&&(S.value=M=jt,I=N=jt.length)}if(X&&(I=S.selectionStart,N=S.selectionEnd),N!=ue||I!=q||S.selectionEnd!=N)try{S.setSelectionRange(q,ue),I=q,N=ue}catch{}O=!1}};this.resetSelection=B,H&&x.onFocus();var U=function(q){return q.selectionStart===0&&q.selectionEnd>=M.length&&q.value===M&&M&&q.selectionEnd!==N},G=function(q){O||(A?A=!1:U(S)?(x.selectAll(),B()):b&&S.selectionStart!=I&&B())},Y=null;this.setInputHandler=function(q){Y=q},this.getInputHandler=function(){return Y};var X=!1,Z=function(q,ue){if(X&&(X=!1),C)return B(),q&&x.onPaste(q),C=!1,"";for(var me=S.selectionStart,ie=S.selectionEnd,Ce=I,Xe=M.length-N,Ke=q,et=q.length-me,tt=q.length-ie,ze=0;Ce>0&&M[ze]==q[ze];)ze++,Ce--;for(Ke=Ke.slice(ze),ze=1;Xe>0&&M.length-ze>I-1&&M[M.length-ze]==q[q.length-ze];)ze++,Xe--;et-=ze-1,tt-=ze-1;var jt=Ke.length-ze+1;if(jt<0&&(Ce=-jt,jt=0),Ke=Ke.slice(0,jt),!ue&&!Ke&&!et&&!Ce&&!Xe&&!tt)return"";R=!0;var To=!1;return l.isAndroid&&Ke==". "&&(Ke=" ",To=!0),Ke&&!Ce&&!Xe&&!et&&!tt||T?x.onTextInput(Ke):x.onTextInput(Ke,{extendLeft:Ce,extendRight:Xe,restoreStart:et,restoreEnd:tt}),R=!1,M=q,I=me,N=ie,L=tt,To?` `:Ke},te=function(q){if(O)return Ot();if(q&&q.inputType){if(q.inputType=="historyUndo")return x.execCommand("undo");if(q.inputType=="historyRedo")return x.execCommand("redo")}var ue=S.value,me=Z(ue,!0);(ue.length>f+100||y.test(me)||b&&I<1&&I==N)&&B()},de=function(q,ue,me){var ie=q.clipboardData||window.clipboardData;if(!(!ie||d)){var Ce=h||me?"Text":"text/plain";try{return ue?ie.setData(Ce,ue)!==!1:ie.getData(Ce)}catch(Xe){if(!me)return de(Xe,ue,!0)}}},Ie=function(q,ue){var me=x.getCopyText();if(!me)return i.preventDefault(q);de(q,me)?(v&&(B(me),A=me,setTimeout(function(){A=!1},10)),ue?x.onCut():x.onCopy(),i.preventDefault(q)):(A=!0,S.value=me,S.select(),setTimeout(function(){A=!1,B(),ue?x.onCut():x.onCopy()}))},ve=function(q){Ie(q,!0)},_e=function(q){Ie(q,!1)},Se=function(q){var ue=de(q);c.pasteCancelled()||(typeof ue=="string"?(ue&&x.onPaste(ue,q),l.isIE&&setTimeout(B),i.preventDefault(q)):(S.value="",C=!0))};i.addCommandKeyListener(S,function(q,ue,me){if(!O)return x.onCommandKey(q,ue,me)},x),i.addListener(S,"select",G,x),i.addListener(S,"input",te,x),i.addListener(S,"cut",ve,x),i.addListener(S,"copy",_e,x),i.addListener(S,"paste",Se,x),(!("oncut"in S)||!("oncopy"in S)||!("onpaste"in S))&&i.addListener(k,"keydown",function(q){if(!(l.isMac&&!q.metaKey||!q.ctrlKey))switch(q.keyCode){case 67:_e(q);break;case 86:Se(q);break;case 88:ve(q);break}},x);var mt=function(q){if(!(O||!x.onCompositionStart||x.$readOnly)&&(O={},!T)){q.data&&(O.useTextareaForIME=!1),setTimeout(Ot,0),x._signal("compositionStart"),x.on("mousedown",Xn);var ue=x.getSelectionRange();ue.end.row=ue.start.row,ue.end.column=ue.start.column,O.markerRange=ue,O.selectionStart=I,x.onCompositionStart(O),O.useTextareaForIME?(M=S.value="",I=0,N=0):(S.msGetInputContext&&(O.context=S.msGetInputContext()),S.getInputContext&&(O.context=S.getInputContext()))}},Ot=function(){if(!(!O||!x.onCompositionUpdate||x.$readOnly)){if(T)return Xn();if(O.useTextareaForIME)x.onCompositionUpdate(S.value);else{var q=S.value;Z(q),O.markerRange&&(O.context&&(O.markerRange.start.column=O.selectionStart=O.context.compositionStartOffset),O.markerRange.end.column=O.markerRange.start.column+N-O.selectionStart+L)}}},bt=function(q){!x.onCompositionEnd||x.$readOnly||(O=!1,x.onCompositionEnd(),x.off("mousedown",Xn),q&&te())};function Xn(){E=!0,S.blur(),S.focus(),E=!1}var It=u.delayedCall(Ot,50).schedule.bind(null,null);function Cn(q){q.keyCode==27&&S.value.lengthN&&M[tt]==` `?ze=g.end:etN&&M.slice(0,tt).split(` -`).length>2?ze=g.down:tt>N&&M[tt-1]==" "?(ze=g.right,jt=m.option):(tt>N||tt==N&&N!=I&&et==tt)&&(ze=g.right),et!==tt&&(jt|=m.shift),ze){var Co=ue.onCommandKey({},jt,ze);if(!Co&&ue.commands){ze=g.keyCodeToString(ze);var ua=ue.commands.findKeyCommand(jt,ze);ua&&ue.execCommand(ua)}I=et,N=tt,B("")}}};document.addEventListener("selectionchange",Xe),ue.on("destroy",function(){document.removeEventListener("selectionchange",Xe)})}this.destroy=function(){S.parentElement&&S.parentElement.removeChild(S)}},r.TextInput=w,r.$setUserAgentForTests=function(k,x){b=k,v=x}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,o){var i=n("../lib/useragent"),s=0,l=550,a=function(){function d(h){h.$clickSelection=null;var p=h.editor;p.setDefaultHandler("mousedown",this.onMouseDown.bind(h)),p.setDefaultHandler("dblclick",this.onDoubleClick.bind(h)),p.setDefaultHandler("tripleclick",this.onTripleClick.bind(h)),p.setDefaultHandler("quadclick",this.onQuadClick.bind(h)),p.setDefaultHandler("mousewheel",this.onMouseWheel.bind(h));var f=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];f.forEach(function(g){h[g]=this[g]},this),h.selectByLines=this.extendSelectionBy.bind(h,"getLineRange"),h.selectByWords=this.extendSelectionBy.bind(h,"getWordRange")}return d.prototype.onMouseDown=function(h){var p=h.inSelection(),f=h.getDocumentPosition();this.mousedownEvent=h;var g=this.editor,m=h.getButton();if(m!==0){var v=g.getSelectionRange(),y=v.isEmpty();(y||m==1)&&g.selection.moveToPosition(f),m==2&&(g.textInput.onContextMenu(h.domEvent),i.isMozilla||h.preventDefault());return}if(this.mousedownEvent.time=Date.now(),p&&!g.isFocused()&&(g.focus(),this.$focusTimeout&&!this.$clickSelection&&!g.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(h);return}return this.captureMouse(h),this.startSelect(f,h.domEvent._clicks>1),h.preventDefault()},d.prototype.startSelect=function(h,p){h=h||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var f=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?f.selection.selectToPosition(h):p||f.selection.moveToPosition(h),p||this.select(),f.setStyle("ace_selecting"),this.setState("select"))},d.prototype.select=function(){var h,p=this.editor,f=p.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(f);if(g==-1)h=this.$clickSelection.end;else if(g==1)h=this.$clickSelection.start;else{var m=c(this.$clickSelection,f);f=m.cursor,h=m.anchor}p.selection.setSelectionAnchor(h.row,h.column)}p.selection.selectToPosition(f),p.renderer.scrollCursorIntoView()},d.prototype.extendSelectionBy=function(h){var p,f=this.editor,g=f.renderer.screenToTextCoordinates(this.x,this.y),m=f.selection[h](g.row,g.column);if(this.$clickSelection){var v=this.$clickSelection.comparePoint(m.start),y=this.$clickSelection.comparePoint(m.end);if(v==-1&&y<=0)p=this.$clickSelection.end,(m.end.row!=g.row||m.end.column!=g.column)&&(g=m.start);else if(y==1&&v>=0)p=this.$clickSelection.start,(m.start.row!=g.row||m.start.column!=g.column)&&(g=m.end);else if(v==-1&&y==1)g=m.end,p=m.start;else{var b=c(this.$clickSelection,g);g=b.cursor,p=b.anchor}f.selection.setSelectionAnchor(p.row,p.column)}f.selection.selectToPosition(g),f.renderer.scrollCursorIntoView()},d.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},d.prototype.focusWait=function(){var h=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),p=Date.now();(h>s||p-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},d.prototype.onDoubleClick=function(h){var p=h.getDocumentPosition(),f=this.editor,g=f.session,m=g.getBracketRange(p);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=f.selection.getWordRange(p.row,p.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},d.prototype.onTripleClick=function(h){var p=h.getDocumentPosition(),f=this.editor;this.setState("selectByLines");var g=f.getSelectionRange();g.isMultiLine()&&g.contains(p.row,p.column)?(this.$clickSelection=f.selection.getLineRange(g.start.row),this.$clickSelection.end=f.selection.getLineRange(g.end.row).end):this.$clickSelection=f.selection.getLineRange(p.row),this.select()},d.prototype.onQuadClick=function(h){var p=this.editor;p.selectAll(),this.$clickSelection=p.getSelectionRange(),this.setState("selectAll")},d.prototype.onMouseWheel=function(h){if(!h.getAccelKey()){h.getShiftKey()&&h.wheelY&&!h.wheelX&&(h.wheelX=h.wheelY,h.wheelY=0);var p=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var f=this.$lastScroll,g=h.domEvent.timeStamp,m=g-f.t,v=m?h.wheelX/m:f.vx,y=m?h.wheelY/m:f.vy;m=1&&p.renderer.isScrollableBy(h.wheelX*h.speed,0)&&(w=!0),b<=1&&p.renderer.isScrollableBy(0,h.wheelY*h.speed)&&(w=!0),w)f.allowed=g;else if(g-f.allowedl.clientHeight;a||s.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(n,r,o){var i=this&&this.__extends||function(){var g=function(m,v){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,b){y.__proto__=b}||function(y,b){for(var w in b)Object.prototype.hasOwnProperty.call(b,w)&&(y[w]=b[w])},g(m,v)};return function(m,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");g(m,v);function y(){this.constructor=m}m.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}(),s=this&&this.__values||function(g){var m=typeof Symbol=="function"&&Symbol.iterator,v=m&&g[m],y=0;if(v)return v.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&y>=g.length&&(g=void 0),{value:g&&g[y++],done:!g}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},l=n("./lib/dom");n("./lib/event");var a=n("./range").Range,u=n("./lib/scroll").preventParentScroll,c="ace_tooltip",d=function(){function g(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return g.prototype.$init=function(){return this.$element=l.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},g.prototype.getElement=function(){return this.$element||this.$init()},g.prototype.setText=function(m){this.getElement().textContent=m},g.prototype.setHtml=function(m){this.getElement().innerHTML=m},g.prototype.setPosition=function(m,v){this.getElement().style.left=m+"px",this.getElement().style.top=v+"px"},g.prototype.setClassName=function(m){l.addCssClass(this.getElement(),m)},g.prototype.setTheme=function(m){this.$element.className=c+" "+(m.isDark?"ace_dark ":"")+(m.cssClass||"")},g.prototype.show=function(m,v,y){m!=null&&this.setText(m),v!=null&&y!=null&&this.setPosition(v,y),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},g.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},g.prototype.getHeight=function(){return this.getElement().offsetHeight},g.prototype.getWidth=function(){return this.getElement().offsetWidth},g.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},g}(),h=function(){function g(){this.popups=[]}return g.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},g.prototype.removePopup=function(m){var v=this.popups.indexOf(m);v!==-1&&(this.popups.splice(v,1),this.updatePopups())},g.prototype.updatePopups=function(){var m,v,y,b;this.popups.sort(function(_,T){return T.priority-_.priority});var w=[];try{for(var k=s(this.popups),x=k.next();!x.done;x=k.next()){var S=x.value,A=!0;try{for(var C=(y=void 0,s(w)),O=C.next();!O.done;O=C.next()){var R=O.value;if(this.doPopupsOverlap(R,S)){A=!1;break}}}catch(_){y={error:_}}finally{try{O&&!O.done&&(b=C.return)&&b.call(C)}finally{if(y)throw y.error}}A?w.push(S):S.hide()}}catch(_){m={error:_}}finally{try{x&&!x.done&&(v=k.return)&&v.call(k)}finally{if(m)throw m.error}}},g.prototype.doPopupsOverlap=function(m,v){var y=m.getElement().getBoundingClientRect(),b=v.getElement().getBoundingClientRect();return y.leftb.left&&y.topb.top},g}(),p=new h;r.popupManager=p,r.Tooltip=d;var f=function(g){i(m,g);function m(v){v===void 0&&(v=document.body);var y=g.call(this,v)||this;y.timeout=void 0,y.lastT=0,y.idleTime=350,y.lastEvent=void 0,y.onMouseOut=y.onMouseOut.bind(y),y.onMouseMove=y.onMouseMove.bind(y),y.waitForHover=y.waitForHover.bind(y),y.hide=y.hide.bind(y);var b=y.getElement();return b.style.whiteSpace="pre-wrap",b.style.pointerEvents="auto",b.addEventListener("mouseout",y.onMouseOut),b.tabIndex=-1,b.addEventListener("blur",(function(){b.contains(document.activeElement)||this.hide()}).bind(y)),b.addEventListener("wheel",u),y}return m.prototype.addToEditor=function(v){v.on("mousemove",this.onMouseMove),v.on("mousedown",this.hide),v.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(v){v.off("mousemove",this.onMouseMove),v.off("mousedown",this.hide),v.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(v,y){this.lastEvent=v,this.lastT=Date.now();var b=y.$mouseHandler.isMousePressed;if(this.isOpen){var w=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(w.row,w.column)||b||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||b||(this.lastEvent=v,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var v=Date.now()-this.lastT;if(this.idleTime-v>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-v);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(v){var y=v.editor,b=v.getDocumentPosition(),w=y.session.getLine(b.row);if(b.column==w.length){var k=y.renderer.pixelToScreenCoordinates(v.clientX,v.clientY),x=y.session.documentToScreenPosition(b.row,b.column);if(x.column!=k.column||x.row!=k.row)return!0}return!1},m.prototype.setDataProvider=function(v){this.$gatherData=v},m.prototype.showForRange=function(v,y,b,w){var k=10;if(!(w&&w!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var x=v.renderer;this.isOpen||(p.addPopup(this),this.$registerCloseEvents(),this.setTheme(x.theme)),this.isOpen=!0,this.addMarker(y,v.session),this.range=a.fromPoints(y.start,y.end);var S=x.textToScreenCoordinates(y.start.row,y.start.column),A=x.scroller.getBoundingClientRect();S.pageX=p.length&&(p=void 0),{value:p&&p[m++],done:!p}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},l=n("../lib/dom"),a=n("../lib/event"),u=n("../tooltip").Tooltip,c=n("../config").nls;function d(p){var f=p.editor,g=f.renderer.$gutterLayer,m=new h(f);p.editor.setDefaultHandler("guttermousedown",function(x){if(!(!f.isFocused()||x.getButton()!=0)){var S=g.getRegion(x);if(S!="foldWidgets"){var A=x.getDocumentPosition().row,C=f.session.selection;if(x.getShiftKey())C.selectTo(A,0);else{if(x.domEvent.detail==2)return f.selectAll(),x.preventDefault();p.$clickSelection=f.selection.getLineRange(A)}return p.setState("selectByLines"),p.captureMouse(x),x.preventDefault()}}});var v,y;function b(){var x=y.getDocumentPosition().row,S=f.session.getLength();if(x==S){var A=f.renderer.pixelToScreenCoordinates(0,y.y).row,C=y.$pos;if(A>f.session.documentToScreenRow(C.row,C.column))return w()}if(m.showTooltip(x),!!m.isOpen)if(f.on("mousewheel",w),p.$tooltipFollowsMouse)k(y);else{var O=y.getGutterRow(),R=g.$lines.get(O);if(R){var _=R.element.querySelector(".ace_gutter_annotation"),T=_.getBoundingClientRect(),E=m.getElement().style;E.left=T.right+"px",E.top=T.bottom+"px"}else k(y)}}function w(){v&&(v=clearTimeout(v)),m.isOpen&&(m.hideTooltip(),f.off("mousewheel",w))}function k(x){m.setPosition(x.x,x.y)}p.editor.setDefaultHandler("guttermousemove",function(x){var S=x.domEvent.target||x.domEvent.srcElement;if(l.hasCssClass(S,"ace_fold-widget"))return w();m.isOpen&&p.$tooltipFollowsMouse&&k(x),y=x,!v&&(v=setTimeout(function(){v=null,y&&!p.isMousePressed?b():w()},50))}),a.addListener(f.renderer.$gutter,"mouseout",function(x){y=null,!(!m.isOpen||v)&&(v=setTimeout(function(){v=null,w()},50))},f),f.on("changeSession",w),f.on("input",w)}r.GutterHandler=d;var h=function(p){i(f,p);function f(g){var m=p.call(this,g.container)||this;return m.editor=g,m}return f.prototype.setPosition=function(g,m){var v=window.innerWidth||document.documentElement.clientWidth,y=window.innerHeight||document.documentElement.clientHeight,b=this.getWidth(),w=this.getHeight();g+=15,m+=15,g+b>v&&(g-=g+b-v),m+w>y&&(m-=20+w),u.prototype.setPosition.call(this,g,m)},Object.defineProperty(f,"annotationLabels",{get:function(){return{error:{singular:c("error"),plural:c("errors")},warning:{singular:c("warning"),plural:c("warnings")},info:{singular:c("information message"),plural:c("information messages")}}},enumerable:!1,configurable:!0}),f.prototype.showTooltip=function(g){var m=this.editor.renderer.$gutterLayer,v=m.$annotations[g],y;v?y={text:Array.from(v.text),type:Array.from(v.type)}:y={text:[],type:[]};var b=m.session.getFoldLine(g);if(b&&m.$showFoldedAnnotations){for(var w={error:[],warning:[],info:[]},k,x=g+1;x<=b.end.row;x++)if(m.$annotations[x])for(var S=0;S ").concat(y.text[x]);O[y.type[x].replace("_fold","")].push(_)}var T=[].concat(O.error,O.warning,O.info).join("
    ");this.setHtml(T),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},f.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},f.annotationsToSummaryString=function(g){var m,v,y=[],b=["error","warning","info"];try{for(var w=s(b),k=w.next();!k.done;k=w.next()){var x=k.value;if(g[x].length){var S=g[x].length===1?f.annotationLabels[x].singular:f.annotationLabels[x].plural;y.push("".concat(g[x].length," ").concat(S))}}}catch(A){m={error:A}}finally{try{k&&!k.done&&(v=w.return)&&v.call(w)}finally{if(m)throw m.error}}return y.join(", ")},f}(u);r.GutterTooltip=h}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,o){var i=n("../lib/event"),s=n("../lib/useragent"),l=function(){function a(u,c){this.speed,this.wheelX,this.wheelY,this.domEvent=u,this.editor=c,this.x=this.clientX=u.clientX,this.y=this.clientY=u.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var u=this.getDocumentPosition().row,c=this.editor.session.documentToScreenRow(u,0),d=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return c-d},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var u=this.editor,c=u.getSelectionRange();if(c.isEmpty())this.$inSelection=!1;else{var d=this.getDocumentPosition();this.$inSelection=c.contains(d.row,d.column)}return this.$inSelection},a.prototype.getButton=function(){return i.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return s.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();r.MouseEvent=l}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,o){var i=n("../lib/dom"),s=n("../lib/event"),l=n("../lib/useragent"),a=200,u=200,c=5;function d(p){var f=p.editor,g=i.createElement("div");g.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",g.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(W){p[W]=this[W]},this),f.on("mousedown",this.onMouseDown.bind(p));var v=f.container,y,b,w,k,x,S,A=0,C,O,R,_,T;this.onDragStart=function(W){if(this.cancelDrag||!v.draggable){var B=this;return setTimeout(function(){B.startSelect(),B.captureMouse(W)},0),W.preventDefault()}x=f.getSelectionRange();var H=W.dataTransfer;H.effectAllowed=f.getReadOnly()?"copy":"copyMove",f.container.appendChild(g),H.setDragImage&&H.setDragImage(g,0,0),setTimeout(function(){f.container.removeChild(g)}),H.clearData(),H.setData("Text",f.session.getTextRange()),O=!0,this.setState("drag")},this.onDragEnd=function(W){if(v.draggable=!1,O=!1,this.setState(null),!f.getReadOnly()){var B=W.dataTransfer.dropEffect;!C&&B=="move"&&f.session.remove(f.getSelectionRange()),f.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(W){if(!(f.getReadOnly()||!F(W.dataTransfer)))return b=W.clientX,w=W.clientY,y||N(),A++,W.dataTransfer.dropEffect=C=U(W),s.preventDefault(W)},this.onDragOver=function(W){if(!(f.getReadOnly()||!F(W.dataTransfer)))return b=W.clientX,w=W.clientY,y||(N(),A++),$!==null&&($=null),W.dataTransfer.dropEffect=C=U(W),s.preventDefault(W)},this.onDragLeave=function(W){if(A--,A<=0&&y)return L(),C=null,s.preventDefault(W)},this.onDrop=function(W){if(S){var B=W.dataTransfer;if(O)switch(C){case"move":x.contains(S.row,S.column)?x={start:S,end:S}:x=f.moveText(x,S);break;case"copy":x=f.moveText(x,S,!0);break}else{var H=B.getData("Text");x={start:S,end:f.session.insert(S,H)},f.focus(),C=null}return L(),s.preventDefault(W)}},s.addListener(v,"dragstart",this.onDragStart.bind(p),f),s.addListener(v,"dragend",this.onDragEnd.bind(p),f),s.addListener(v,"dragenter",this.onDragEnter.bind(p),f),s.addListener(v,"dragover",this.onDragOver.bind(p),f),s.addListener(v,"dragleave",this.onDragLeave.bind(p),f),s.addListener(v,"drop",this.onDrop.bind(p),f);function E(W,B){var H=Date.now(),G=!B||W.row!=B.row,Y=!B||W.column!=B.column;if(!_||G||Y)f.moveCursorToPosition(W),_=H,T={x:b,y:w};else{var X=h(T.x,T.y,b,w);X>c?_=null:H-_>=u&&(f.renderer.scrollCursorIntoView(),_=null)}}function M(W,B){var H=Date.now(),G=f.renderer.layerConfig.lineHeight,Y=f.renderer.layerConfig.characterWidth,X=f.renderer.scroller.getBoundingClientRect(),Z={x:{left:b-X.left,right:X.right-b},y:{top:w-X.top,bottom:X.bottom-w}},te=Math.min(Z.x.left,Z.x.right),de=Math.min(Z.y.top,Z.y.bottom),Ie={row:W.row,column:W.column};te/Y<=2&&(Ie.column+=Z.x.left=a&&f.renderer.scrollCursorIntoView(Ie):R=H:R=null}function I(){var W=S;S=f.renderer.screenToTextCoordinates(b,w),E(S,W),M(S,W)}function N(){x=f.selection.toOrientedRange(),y=f.session.addMarker(x,"ace_selection",f.getSelectionStyle()),f.clearSelection(),f.isFocused()&&f.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),I(),k=setInterval(I,20),A=0,s.addListener(document,"mousemove",D)}function L(){clearInterval(k),f.session.removeMarker(y),y=null,f.selection.fromOrientedRange(x),f.isFocused()&&!O&&f.$resetCursorStyle(),x=null,S=null,A=0,R=null,_=null,s.removeListener(document,"mousemove",D)}var $=null;function D(){$==null&&($=setTimeout(function(){$!=null&&y&&L()},20))}function F(W){var B=W.types;return!B||Array.prototype.some.call(B,function(H){return H=="text/plain"||H=="Text"})}function U(W){var B=["copy","copymove","all","uninitialized"],H=["move","copymove","linkmove","all","uninitialized"],G=l.isMac?W.altKey:W.ctrlKey,Y="uninitialized";try{Y=W.dataTransfer.effectAllowed.toLowerCase()}catch{}var X="none";return G&&B.indexOf(Y)>=0?X="copy":H.indexOf(Y)>=0?X="move":B.indexOf(Y)>=0&&(X="copy"),X}}(function(){this.dragWait=function(){var p=Date.now()-this.mousedownEvent.time;p>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var p=this.editor.container;p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(p){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var p=this.editor,f=p.container;f.draggable=!0,p.renderer.$cursorLayer.setBlinking(!1),p.setStyle("ace_dragging");var g=l.isWin?"default":"move";p.renderer.setCursorStyle(g),this.setState("dragReady")},this.onMouseDrag=function(p){var f=this.editor.container;if(l.isIE&&this.state=="dragReady"){var g=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>3&&f.dragDrop()}if(this.state==="dragWait"){var g=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>0&&(f.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(p){if(this.$dragEnabled){this.mousedownEvent=p;var f=this.editor,g=p.inSelection(),m=p.getButton(),v=p.domEvent.detail||1;if(v===1&&m===0&&g){if(p.editor.inMultiSelectMode&&(p.getAccelKey()||p.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=p.domEvent.target||p.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),f.getDragDelay()){if(l.isWebKit){this.cancelDrag=!0;var b=f.container;b.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(p,this.onMouseDrag.bind(this)),p.defaultPrevented=!0}}}}).call(d.prototype);function h(p,f,g,m){return Math.sqrt(Math.pow(g-p,2)+Math.pow(m-f,2))}r.DragdropHandler=d}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,o){var i=n("./mouse_event").MouseEvent,s=n("../lib/event"),l=n("../lib/dom");r.addTouchListeners=function(a,u){var c="scroll",d,h,p,f,g,m,v=0,y,b=0,w=0,k=0,x,S;function A(){var E=window.navigator&&window.navigator.clipboard,M=!1,I=function(){var L=u.getCopyText(),$=u.session.getUndoManager().hasUndo();S.replaceChild(l.buildDom(M?["span",!L&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],L&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],L&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],E&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],$&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),S.firstChild)},N=function(L){var $=L.target.getAttribute("action");if($=="more"||!M)return M=!M,I();$=="paste"?E.readText().then(function(D){u.execCommand($,D)}):$&&(($=="cut"||$=="copy")&&(E?E.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand($)),S.firstChild.style.display="none",M=!1,$!="openCommandPalette"&&u.focus()};S=l.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(L){c="menu",L.stopPropagation(),L.preventDefault(),u.textInput.focus()},ontouchend:function(L){L.stopPropagation(),L.preventDefault(),N(L)},onclick:N},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function C(){S||A();var E=u.selection.cursor,M=u.renderer.textToScreenCoordinates(E.row,E.column),I=u.renderer.textToScreenCoordinates(0,0).pageX,N=u.renderer.scrollLeft,L=u.container.getBoundingClientRect();S.style.top=M.pageY-L.top-3+"px",M.pageX-L.left=2?u.selection.getLineRange(y.row):u.session.getBracketRange(y);E&&!E.isEmpty()?u.selection.setRange(E):u.selection.selectWord(),c="wait"}s.addListener(a,"contextmenu",function(E){if(x){var M=u.textInput.getElement();M.focus()}},u),s.addListener(a,"touchstart",function(E){var M=E.touches;if(g||M.length>1){clearTimeout(g),g=null,p=-1,c="zoom";return}x=u.$mouseHandler.isMousePressed=!0;var I=u.renderer.layerConfig.lineHeight,N=u.renderer.layerConfig.lineHeight,L=E.timeStamp;f=L;var $=M[0],D=$.clientX,F=$.clientY;Math.abs(d-D)+Math.abs(h-F)>I&&(p=-1),d=E.clientX=D,h=E.clientY=F,w=k=0;var U=new i(E,u);if(y=U.getDocumentPosition(),L-p<500&&M.length==1&&!v)b++,E.preventDefault(),E.button=0,_();else{b=0;var W=u.selection.cursor,B=u.selection.isEmpty()?W:u.selection.anchor,H=u.renderer.$cursorLayer.getPixelPosition(W,!0),G=u.renderer.$cursorLayer.getPixelPosition(B,!0),Y=u.renderer.scroller.getBoundingClientRect(),X=u.renderer.layerConfig.offset,Z=u.renderer.scrollLeft,te=function(ve,_e){return ve=ve/N,_e=_e/I-.75,ve*ve+_e*_e};if(E.clientXIe?"cursor":"anchor"),Ie<3.5?c="anchor":de<3.5?c="cursor":c="scroll",g=setTimeout(R,450)}p=L},u),s.addListener(a,"touchend",function(E){x=u.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),c=="zoom"?(c="",v=0):g?(u.selection.moveToPosition(y),v=0,C()):c=="scroll"?(T(),O()):C(),clearTimeout(g),g=null},u),s.addListener(a,"touchmove",function(E){g&&(clearTimeout(g),g=null);var M=E.touches;if(!(M.length>1||c=="zoom")){var I=M[0],N=d-I.clientX,L=h-I.clientY;if(c=="wait")if(N*N+L*L>4)c="cursor";else return E.preventDefault();d=I.clientX,h=I.clientY,E.clientX=I.clientX,E.clientY=I.clientY;var $=E.timeStamp,D=$-f;if(f=$,c=="scroll"){var F=new i(E,u);F.speed=1,F.wheelX=N,F.wheelY=L,10*Math.abs(N)0)if(Ie==16){for(Se=_e;Se-1){for(Se=_e;Se=0&&G[bt]==x;bt--)B[bt]=i}}}function D(W,B,H){if(!(s=W){for(X=Y+1;X=W;)X++;for(Z=Y,te=X-1;Z=B.length||(X=H[G-1])!=m&&X!=v||(Z=B[G+1])!=m&&Z!=v?y:(l&&(Z=v),Z==X?Z:y);case A:return X=G>0?H[G-1]:b,X==m&&G+10&&H[G-1]==m)return m;if(l)return y;for(de=G+1,te=B.length;de=1425&&Ie<=2303||Ie==64286;if(X=B[de],ve&&(X==g||X==k))return g}return G<1||(X=B[G-1])==b?y:H[G-1];case b:return l=!1,a=!0,i;case w:return u=!0,y;case R:case _:case E:case M:case T:l=!1;case I:return y}}function U(W){var B=W.charCodeAt(0),H=B>>8;return H==0?B>191?f:N[B]:H==5?/[\u0591-\u05f4]/.test(W)?g:f:H==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(W)?O:/[\u0660-\u0669\u066b-\u066c]/.test(W)?v:B==1642?C:/[\u06f0-\u06f9]/.test(W)?m:k:H==32&&B<=8287?L[B&255]:H==254&&B>=65136?k:y}r.L=f,r.R=g,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(W,B,H){if(W.length<2)return{};var G=W.split(""),Y=new Array(G.length),X=new Array(G.length),Z=[];i=H?p:h,$(G,Z,G.length,B);for(var te=0;tek&&B[te]0&&G[te-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(G[te])&&(Z[te-1]=Z[te]=r.R_H,te++);G[G.length-1]===r.DOT&&(Z[G.length-1]=r.B),G[0]==="‫"&&(Z[0]=r.RLE);for(var te=0;te2?ze=g.down:tt>N&&M[tt-1]==" "?(ze=g.right,jt=m.option):(tt>N||tt==N&&N!=I&&et==tt)&&(ze=g.right),et!==tt&&(jt|=m.shift),ze){var To=ue.onCommandKey({},jt,ze);if(!To&&ue.commands){ze=g.keyCodeToString(ze);var ua=ue.commands.findKeyCommand(jt,ze);ua&&ue.execCommand(ua)}I=et,N=tt,B("")}}};document.addEventListener("selectionchange",Xe),ue.on("destroy",function(){document.removeEventListener("selectionchange",Xe)})}this.destroy=function(){S.parentElement&&S.parentElement.removeChild(S)}},r.TextInput=w,r.$setUserAgentForTests=function(k,x){b=k,v=x}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,o){var i=n("../lib/useragent"),s=0,l=550,a=function(){function d(h){h.$clickSelection=null;var p=h.editor;p.setDefaultHandler("mousedown",this.onMouseDown.bind(h)),p.setDefaultHandler("dblclick",this.onDoubleClick.bind(h)),p.setDefaultHandler("tripleclick",this.onTripleClick.bind(h)),p.setDefaultHandler("quadclick",this.onQuadClick.bind(h)),p.setDefaultHandler("mousewheel",this.onMouseWheel.bind(h));var f=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];f.forEach(function(g){h[g]=this[g]},this),h.selectByLines=this.extendSelectionBy.bind(h,"getLineRange"),h.selectByWords=this.extendSelectionBy.bind(h,"getWordRange")}return d.prototype.onMouseDown=function(h){var p=h.inSelection(),f=h.getDocumentPosition();this.mousedownEvent=h;var g=this.editor,m=h.getButton();if(m!==0){var v=g.getSelectionRange(),y=v.isEmpty();(y||m==1)&&g.selection.moveToPosition(f),m==2&&(g.textInput.onContextMenu(h.domEvent),i.isMozilla||h.preventDefault());return}if(this.mousedownEvent.time=Date.now(),p&&!g.isFocused()&&(g.focus(),this.$focusTimeout&&!this.$clickSelection&&!g.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(h);return}return this.captureMouse(h),this.startSelect(f,h.domEvent._clicks>1),h.preventDefault()},d.prototype.startSelect=function(h,p){h=h||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var f=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?f.selection.selectToPosition(h):p||f.selection.moveToPosition(h),p||this.select(),f.setStyle("ace_selecting"),this.setState("select"))},d.prototype.select=function(){var h,p=this.editor,f=p.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(f);if(g==-1)h=this.$clickSelection.end;else if(g==1)h=this.$clickSelection.start;else{var m=c(this.$clickSelection,f);f=m.cursor,h=m.anchor}p.selection.setSelectionAnchor(h.row,h.column)}p.selection.selectToPosition(f),p.renderer.scrollCursorIntoView()},d.prototype.extendSelectionBy=function(h){var p,f=this.editor,g=f.renderer.screenToTextCoordinates(this.x,this.y),m=f.selection[h](g.row,g.column);if(this.$clickSelection){var v=this.$clickSelection.comparePoint(m.start),y=this.$clickSelection.comparePoint(m.end);if(v==-1&&y<=0)p=this.$clickSelection.end,(m.end.row!=g.row||m.end.column!=g.column)&&(g=m.start);else if(y==1&&v>=0)p=this.$clickSelection.start,(m.start.row!=g.row||m.start.column!=g.column)&&(g=m.end);else if(v==-1&&y==1)g=m.end,p=m.start;else{var b=c(this.$clickSelection,g);g=b.cursor,p=b.anchor}f.selection.setSelectionAnchor(p.row,p.column)}f.selection.selectToPosition(g),f.renderer.scrollCursorIntoView()},d.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},d.prototype.focusWait=function(){var h=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),p=Date.now();(h>s||p-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},d.prototype.onDoubleClick=function(h){var p=h.getDocumentPosition(),f=this.editor,g=f.session,m=g.getBracketRange(p);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=f.selection.getWordRange(p.row,p.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},d.prototype.onTripleClick=function(h){var p=h.getDocumentPosition(),f=this.editor;this.setState("selectByLines");var g=f.getSelectionRange();g.isMultiLine()&&g.contains(p.row,p.column)?(this.$clickSelection=f.selection.getLineRange(g.start.row),this.$clickSelection.end=f.selection.getLineRange(g.end.row).end):this.$clickSelection=f.selection.getLineRange(p.row),this.select()},d.prototype.onQuadClick=function(h){var p=this.editor;p.selectAll(),this.$clickSelection=p.getSelectionRange(),this.setState("selectAll")},d.prototype.onMouseWheel=function(h){if(!h.getAccelKey()){h.getShiftKey()&&h.wheelY&&!h.wheelX&&(h.wheelX=h.wheelY,h.wheelY=0);var p=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var f=this.$lastScroll,g=h.domEvent.timeStamp,m=g-f.t,v=m?h.wheelX/m:f.vx,y=m?h.wheelY/m:f.vy;m=1&&p.renderer.isScrollableBy(h.wheelX*h.speed,0)&&(w=!0),b<=1&&p.renderer.isScrollableBy(0,h.wheelY*h.speed)&&(w=!0),w)f.allowed=g;else if(g-f.allowedl.clientHeight;a||s.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(n,r,o){var i=this&&this.__extends||function(){var g=function(m,v){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,b){y.__proto__=b}||function(y,b){for(var w in b)Object.prototype.hasOwnProperty.call(b,w)&&(y[w]=b[w])},g(m,v)};return function(m,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");g(m,v);function y(){this.constructor=m}m.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}(),s=this&&this.__values||function(g){var m=typeof Symbol=="function"&&Symbol.iterator,v=m&&g[m],y=0;if(v)return v.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&y>=g.length&&(g=void 0),{value:g&&g[y++],done:!g}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},l=n("./lib/dom");n("./lib/event");var a=n("./range").Range,u=n("./lib/scroll").preventParentScroll,c="ace_tooltip",d=function(){function g(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return g.prototype.$init=function(){return this.$element=l.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},g.prototype.getElement=function(){return this.$element||this.$init()},g.prototype.setText=function(m){this.getElement().textContent=m},g.prototype.setHtml=function(m){this.getElement().innerHTML=m},g.prototype.setPosition=function(m,v){this.getElement().style.left=m+"px",this.getElement().style.top=v+"px"},g.prototype.setClassName=function(m){l.addCssClass(this.getElement(),m)},g.prototype.setTheme=function(m){this.$element.className=c+" "+(m.isDark?"ace_dark ":"")+(m.cssClass||"")},g.prototype.show=function(m,v,y){m!=null&&this.setText(m),v!=null&&y!=null&&this.setPosition(v,y),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},g.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},g.prototype.getHeight=function(){return this.getElement().offsetHeight},g.prototype.getWidth=function(){return this.getElement().offsetWidth},g.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},g}(),h=function(){function g(){this.popups=[]}return g.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},g.prototype.removePopup=function(m){var v=this.popups.indexOf(m);v!==-1&&(this.popups.splice(v,1),this.updatePopups())},g.prototype.updatePopups=function(){var m,v,y,b;this.popups.sort(function(_,T){return T.priority-_.priority});var w=[];try{for(var k=s(this.popups),x=k.next();!x.done;x=k.next()){var S=x.value,A=!0;try{for(var C=(y=void 0,s(w)),O=C.next();!O.done;O=C.next()){var R=O.value;if(this.doPopupsOverlap(R,S)){A=!1;break}}}catch(_){y={error:_}}finally{try{O&&!O.done&&(b=C.return)&&b.call(C)}finally{if(y)throw y.error}}A?w.push(S):S.hide()}}catch(_){m={error:_}}finally{try{x&&!x.done&&(v=k.return)&&v.call(k)}finally{if(m)throw m.error}}},g.prototype.doPopupsOverlap=function(m,v){var y=m.getElement().getBoundingClientRect(),b=v.getElement().getBoundingClientRect();return y.leftb.left&&y.topb.top},g}(),p=new h;r.popupManager=p,r.Tooltip=d;var f=function(g){i(m,g);function m(v){v===void 0&&(v=document.body);var y=g.call(this,v)||this;y.timeout=void 0,y.lastT=0,y.idleTime=350,y.lastEvent=void 0,y.onMouseOut=y.onMouseOut.bind(y),y.onMouseMove=y.onMouseMove.bind(y),y.waitForHover=y.waitForHover.bind(y),y.hide=y.hide.bind(y);var b=y.getElement();return b.style.whiteSpace="pre-wrap",b.style.pointerEvents="auto",b.addEventListener("mouseout",y.onMouseOut),b.tabIndex=-1,b.addEventListener("blur",(function(){b.contains(document.activeElement)||this.hide()}).bind(y)),b.addEventListener("wheel",u),y}return m.prototype.addToEditor=function(v){v.on("mousemove",this.onMouseMove),v.on("mousedown",this.hide),v.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(v){v.off("mousemove",this.onMouseMove),v.off("mousedown",this.hide),v.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(v,y){this.lastEvent=v,this.lastT=Date.now();var b=y.$mouseHandler.isMousePressed;if(this.isOpen){var w=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(w.row,w.column)||b||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||b||(this.lastEvent=v,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var v=Date.now()-this.lastT;if(this.idleTime-v>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-v);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(v){var y=v.editor,b=v.getDocumentPosition(),w=y.session.getLine(b.row);if(b.column==w.length){var k=y.renderer.pixelToScreenCoordinates(v.clientX,v.clientY),x=y.session.documentToScreenPosition(b.row,b.column);if(x.column!=k.column||x.row!=k.row)return!0}return!1},m.prototype.setDataProvider=function(v){this.$gatherData=v},m.prototype.showForRange=function(v,y,b,w){var k=10;if(!(w&&w!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var x=v.renderer;this.isOpen||(p.addPopup(this),this.$registerCloseEvents(),this.setTheme(x.theme)),this.isOpen=!0,this.addMarker(y,v.session),this.range=a.fromPoints(y.start,y.end);var S=x.textToScreenCoordinates(y.start.row,y.start.column),A=x.scroller.getBoundingClientRect();S.pageX=p.length&&(p=void 0),{value:p&&p[m++],done:!p}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},l=n("../lib/dom"),a=n("../lib/event"),u=n("../tooltip").Tooltip,c=n("../config").nls;function d(p){var f=p.editor,g=f.renderer.$gutterLayer,m=new h(f);p.editor.setDefaultHandler("guttermousedown",function(x){if(!(!f.isFocused()||x.getButton()!=0)){var S=g.getRegion(x);if(S!="foldWidgets"){var A=x.getDocumentPosition().row,C=f.session.selection;if(x.getShiftKey())C.selectTo(A,0);else{if(x.domEvent.detail==2)return f.selectAll(),x.preventDefault();p.$clickSelection=f.selection.getLineRange(A)}return p.setState("selectByLines"),p.captureMouse(x),x.preventDefault()}}});var v,y;function b(){var x=y.getDocumentPosition().row,S=f.session.getLength();if(x==S){var A=f.renderer.pixelToScreenCoordinates(0,y.y).row,C=y.$pos;if(A>f.session.documentToScreenRow(C.row,C.column))return w()}if(m.showTooltip(x),!!m.isOpen)if(f.on("mousewheel",w),p.$tooltipFollowsMouse)k(y);else{var O=y.getGutterRow(),R=g.$lines.get(O);if(R){var _=R.element.querySelector(".ace_gutter_annotation"),T=_.getBoundingClientRect(),E=m.getElement().style;E.left=T.right+"px",E.top=T.bottom+"px"}else k(y)}}function w(){v&&(v=clearTimeout(v)),m.isOpen&&(m.hideTooltip(),f.off("mousewheel",w))}function k(x){m.setPosition(x.x,x.y)}p.editor.setDefaultHandler("guttermousemove",function(x){var S=x.domEvent.target||x.domEvent.srcElement;if(l.hasCssClass(S,"ace_fold-widget"))return w();m.isOpen&&p.$tooltipFollowsMouse&&k(x),y=x,!v&&(v=setTimeout(function(){v=null,y&&!p.isMousePressed?b():w()},50))}),a.addListener(f.renderer.$gutter,"mouseout",function(x){y=null,!(!m.isOpen||v)&&(v=setTimeout(function(){v=null,w()},50))},f),f.on("changeSession",w),f.on("input",w)}r.GutterHandler=d;var h=function(p){i(f,p);function f(g){var m=p.call(this,g.container)||this;return m.editor=g,m}return f.prototype.setPosition=function(g,m){var v=window.innerWidth||document.documentElement.clientWidth,y=window.innerHeight||document.documentElement.clientHeight,b=this.getWidth(),w=this.getHeight();g+=15,m+=15,g+b>v&&(g-=g+b-v),m+w>y&&(m-=20+w),u.prototype.setPosition.call(this,g,m)},Object.defineProperty(f,"annotationLabels",{get:function(){return{error:{singular:c("error"),plural:c("errors")},warning:{singular:c("warning"),plural:c("warnings")},info:{singular:c("information message"),plural:c("information messages")}}},enumerable:!1,configurable:!0}),f.prototype.showTooltip=function(g){var m=this.editor.renderer.$gutterLayer,v=m.$annotations[g],y;v?y={text:Array.from(v.text),type:Array.from(v.type)}:y={text:[],type:[]};var b=m.session.getFoldLine(g);if(b&&m.$showFoldedAnnotations){for(var w={error:[],warning:[],info:[]},k,x=g+1;x<=b.end.row;x++)if(m.$annotations[x])for(var S=0;S ").concat(y.text[x]);O[y.type[x].replace("_fold","")].push(_)}var T=[].concat(O.error,O.warning,O.info).join("
    ");this.setHtml(T),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},f.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},f.annotationsToSummaryString=function(g){var m,v,y=[],b=["error","warning","info"];try{for(var w=s(b),k=w.next();!k.done;k=w.next()){var x=k.value;if(g[x].length){var S=g[x].length===1?f.annotationLabels[x].singular:f.annotationLabels[x].plural;y.push("".concat(g[x].length," ").concat(S))}}}catch(A){m={error:A}}finally{try{k&&!k.done&&(v=w.return)&&v.call(w)}finally{if(m)throw m.error}}return y.join(", ")},f}(u);r.GutterTooltip=h}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,o){var i=n("../lib/event"),s=n("../lib/useragent"),l=function(){function a(u,c){this.speed,this.wheelX,this.wheelY,this.domEvent=u,this.editor=c,this.x=this.clientX=u.clientX,this.y=this.clientY=u.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var u=this.getDocumentPosition().row,c=this.editor.session.documentToScreenRow(u,0),d=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return c-d},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var u=this.editor,c=u.getSelectionRange();if(c.isEmpty())this.$inSelection=!1;else{var d=this.getDocumentPosition();this.$inSelection=c.contains(d.row,d.column)}return this.$inSelection},a.prototype.getButton=function(){return i.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return s.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();r.MouseEvent=l}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,o){var i=n("../lib/dom"),s=n("../lib/event"),l=n("../lib/useragent"),a=200,u=200,c=5;function d(p){var f=p.editor,g=i.createElement("div");g.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",g.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(W){p[W]=this[W]},this),f.on("mousedown",this.onMouseDown.bind(p));var v=f.container,y,b,w,k,x,S,A=0,C,O,R,_,T;this.onDragStart=function(W){if(this.cancelDrag||!v.draggable){var B=this;return setTimeout(function(){B.startSelect(),B.captureMouse(W)},0),W.preventDefault()}x=f.getSelectionRange();var U=W.dataTransfer;U.effectAllowed=f.getReadOnly()?"copy":"copyMove",f.container.appendChild(g),U.setDragImage&&U.setDragImage(g,0,0),setTimeout(function(){f.container.removeChild(g)}),U.clearData(),U.setData("Text",f.session.getTextRange()),O=!0,this.setState("drag")},this.onDragEnd=function(W){if(v.draggable=!1,O=!1,this.setState(null),!f.getReadOnly()){var B=W.dataTransfer.dropEffect;!C&&B=="move"&&f.session.remove(f.getSelectionRange()),f.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(W){if(!(f.getReadOnly()||!F(W.dataTransfer)))return b=W.clientX,w=W.clientY,y||N(),A++,W.dataTransfer.dropEffect=C=H(W),s.preventDefault(W)},this.onDragOver=function(W){if(!(f.getReadOnly()||!F(W.dataTransfer)))return b=W.clientX,w=W.clientY,y||(N(),A++),$!==null&&($=null),W.dataTransfer.dropEffect=C=H(W),s.preventDefault(W)},this.onDragLeave=function(W){if(A--,A<=0&&y)return L(),C=null,s.preventDefault(W)},this.onDrop=function(W){if(S){var B=W.dataTransfer;if(O)switch(C){case"move":x.contains(S.row,S.column)?x={start:S,end:S}:x=f.moveText(x,S);break;case"copy":x=f.moveText(x,S,!0);break}else{var U=B.getData("Text");x={start:S,end:f.session.insert(S,U)},f.focus(),C=null}return L(),s.preventDefault(W)}},s.addListener(v,"dragstart",this.onDragStart.bind(p),f),s.addListener(v,"dragend",this.onDragEnd.bind(p),f),s.addListener(v,"dragenter",this.onDragEnter.bind(p),f),s.addListener(v,"dragover",this.onDragOver.bind(p),f),s.addListener(v,"dragleave",this.onDragLeave.bind(p),f),s.addListener(v,"drop",this.onDrop.bind(p),f);function E(W,B){var U=Date.now(),G=!B||W.row!=B.row,Y=!B||W.column!=B.column;if(!_||G||Y)f.moveCursorToPosition(W),_=U,T={x:b,y:w};else{var X=h(T.x,T.y,b,w);X>c?_=null:U-_>=u&&(f.renderer.scrollCursorIntoView(),_=null)}}function M(W,B){var U=Date.now(),G=f.renderer.layerConfig.lineHeight,Y=f.renderer.layerConfig.characterWidth,X=f.renderer.scroller.getBoundingClientRect(),Z={x:{left:b-X.left,right:X.right-b},y:{top:w-X.top,bottom:X.bottom-w}},te=Math.min(Z.x.left,Z.x.right),de=Math.min(Z.y.top,Z.y.bottom),Ie={row:W.row,column:W.column};te/Y<=2&&(Ie.column+=Z.x.left=a&&f.renderer.scrollCursorIntoView(Ie):R=U:R=null}function I(){var W=S;S=f.renderer.screenToTextCoordinates(b,w),E(S,W),M(S,W)}function N(){x=f.selection.toOrientedRange(),y=f.session.addMarker(x,"ace_selection",f.getSelectionStyle()),f.clearSelection(),f.isFocused()&&f.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),I(),k=setInterval(I,20),A=0,s.addListener(document,"mousemove",P)}function L(){clearInterval(k),f.session.removeMarker(y),y=null,f.selection.fromOrientedRange(x),f.isFocused()&&!O&&f.$resetCursorStyle(),x=null,S=null,A=0,R=null,_=null,s.removeListener(document,"mousemove",P)}var $=null;function P(){$==null&&($=setTimeout(function(){$!=null&&y&&L()},20))}function F(W){var B=W.types;return!B||Array.prototype.some.call(B,function(U){return U=="text/plain"||U=="Text"})}function H(W){var B=["copy","copymove","all","uninitialized"],U=["move","copymove","linkmove","all","uninitialized"],G=l.isMac?W.altKey:W.ctrlKey,Y="uninitialized";try{Y=W.dataTransfer.effectAllowed.toLowerCase()}catch{}var X="none";return G&&B.indexOf(Y)>=0?X="copy":U.indexOf(Y)>=0?X="move":B.indexOf(Y)>=0&&(X="copy"),X}}(function(){this.dragWait=function(){var p=Date.now()-this.mousedownEvent.time;p>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var p=this.editor.container;p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(p){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var p=this.editor,f=p.container;f.draggable=!0,p.renderer.$cursorLayer.setBlinking(!1),p.setStyle("ace_dragging");var g=l.isWin?"default":"move";p.renderer.setCursorStyle(g),this.setState("dragReady")},this.onMouseDrag=function(p){var f=this.editor.container;if(l.isIE&&this.state=="dragReady"){var g=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>3&&f.dragDrop()}if(this.state==="dragWait"){var g=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>0&&(f.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(p){if(this.$dragEnabled){this.mousedownEvent=p;var f=this.editor,g=p.inSelection(),m=p.getButton(),v=p.domEvent.detail||1;if(v===1&&m===0&&g){if(p.editor.inMultiSelectMode&&(p.getAccelKey()||p.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=p.domEvent.target||p.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),f.getDragDelay()){if(l.isWebKit){this.cancelDrag=!0;var b=f.container;b.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(p,this.onMouseDrag.bind(this)),p.defaultPrevented=!0}}}}).call(d.prototype);function h(p,f,g,m){return Math.sqrt(Math.pow(g-p,2)+Math.pow(m-f,2))}r.DragdropHandler=d}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,o){var i=n("./mouse_event").MouseEvent,s=n("../lib/event"),l=n("../lib/dom");r.addTouchListeners=function(a,u){var c="scroll",d,h,p,f,g,m,v=0,y,b=0,w=0,k=0,x,S;function A(){var E=window.navigator&&window.navigator.clipboard,M=!1,I=function(){var L=u.getCopyText(),$=u.session.getUndoManager().hasUndo();S.replaceChild(l.buildDom(M?["span",!L&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],L&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],L&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],E&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],$&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),S.firstChild)},N=function(L){var $=L.target.getAttribute("action");if($=="more"||!M)return M=!M,I();$=="paste"?E.readText().then(function(P){u.execCommand($,P)}):$&&(($=="cut"||$=="copy")&&(E?E.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand($)),S.firstChild.style.display="none",M=!1,$!="openCommandPalette"&&u.focus()};S=l.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(L){c="menu",L.stopPropagation(),L.preventDefault(),u.textInput.focus()},ontouchend:function(L){L.stopPropagation(),L.preventDefault(),N(L)},onclick:N},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function C(){S||A();var E=u.selection.cursor,M=u.renderer.textToScreenCoordinates(E.row,E.column),I=u.renderer.textToScreenCoordinates(0,0).pageX,N=u.renderer.scrollLeft,L=u.container.getBoundingClientRect();S.style.top=M.pageY-L.top-3+"px",M.pageX-L.left=2?u.selection.getLineRange(y.row):u.session.getBracketRange(y);E&&!E.isEmpty()?u.selection.setRange(E):u.selection.selectWord(),c="wait"}s.addListener(a,"contextmenu",function(E){if(x){var M=u.textInput.getElement();M.focus()}},u),s.addListener(a,"touchstart",function(E){var M=E.touches;if(g||M.length>1){clearTimeout(g),g=null,p=-1,c="zoom";return}x=u.$mouseHandler.isMousePressed=!0;var I=u.renderer.layerConfig.lineHeight,N=u.renderer.layerConfig.lineHeight,L=E.timeStamp;f=L;var $=M[0],P=$.clientX,F=$.clientY;Math.abs(d-P)+Math.abs(h-F)>I&&(p=-1),d=E.clientX=P,h=E.clientY=F,w=k=0;var H=new i(E,u);if(y=H.getDocumentPosition(),L-p<500&&M.length==1&&!v)b++,E.preventDefault(),E.button=0,_();else{b=0;var W=u.selection.cursor,B=u.selection.isEmpty()?W:u.selection.anchor,U=u.renderer.$cursorLayer.getPixelPosition(W,!0),G=u.renderer.$cursorLayer.getPixelPosition(B,!0),Y=u.renderer.scroller.getBoundingClientRect(),X=u.renderer.layerConfig.offset,Z=u.renderer.scrollLeft,te=function(ve,_e){return ve=ve/N,_e=_e/I-.75,ve*ve+_e*_e};if(E.clientXIe?"cursor":"anchor"),Ie<3.5?c="anchor":de<3.5?c="cursor":c="scroll",g=setTimeout(R,450)}p=L},u),s.addListener(a,"touchend",function(E){x=u.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),c=="zoom"?(c="",v=0):g?(u.selection.moveToPosition(y),v=0,C()):c=="scroll"?(T(),O()):C(),clearTimeout(g),g=null},u),s.addListener(a,"touchmove",function(E){g&&(clearTimeout(g),g=null);var M=E.touches;if(!(M.length>1||c=="zoom")){var I=M[0],N=d-I.clientX,L=h-I.clientY;if(c=="wait")if(N*N+L*L>4)c="cursor";else return E.preventDefault();d=I.clientX,h=I.clientY,E.clientX=I.clientX,E.clientY=I.clientY;var $=E.timeStamp,P=$-f;if(f=$,c=="scroll"){var F=new i(E,u);F.speed=1,F.wheelX=N,F.wheelY=L,10*Math.abs(N)0)if(Ie==16){for(Se=_e;Se-1){for(Se=_e;Se=0&&G[bt]==x;bt--)B[bt]=i}}}function P(W,B,U){if(!(s=W){for(X=Y+1;X=W;)X++;for(Z=Y,te=X-1;Z=B.length||(X=U[G-1])!=m&&X!=v||(Z=B[G+1])!=m&&Z!=v?y:(l&&(Z=v),Z==X?Z:y);case A:return X=G>0?U[G-1]:b,X==m&&G+10&&U[G-1]==m)return m;if(l)return y;for(de=G+1,te=B.length;de=1425&&Ie<=2303||Ie==64286;if(X=B[de],ve&&(X==g||X==k))return g}return G<1||(X=B[G-1])==b?y:U[G-1];case b:return l=!1,a=!0,i;case w:return u=!0,y;case R:case _:case E:case M:case T:l=!1;case I:return y}}function H(W){var B=W.charCodeAt(0),U=B>>8;return U==0?B>191?f:N[B]:U==5?/[\u0591-\u05f4]/.test(W)?g:f:U==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(W)?O:/[\u0660-\u0669\u066b-\u066c]/.test(W)?v:B==1642?C:/[\u06f0-\u06f9]/.test(W)?m:k:U==32&&B<=8287?L[B&255]:U==254&&B>=65136?k:y}r.L=f,r.R=g,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(W,B,U){if(W.length<2)return{};var G=W.split(""),Y=new Array(G.length),X=new Array(G.length),Z=[];i=U?p:h,$(G,Z,G.length,B);for(var te=0;tek&&B[te]0&&G[te-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(G[te])&&(Z[te-1]=Z[te]=r.R_H,te++);G[G.length-1]===r.DOT&&(Z[G.length-1]=r.B),G[0]==="‫"&&(Z[0]=r.RLE);for(var te=0;te=0&&(c=this.session.$docRowCache[h])}return c},u.prototype.getSplitIndex=function(){var c=0,d=this.session.$screenRowCache;if(d.length)for(var h,p=this.session.$getRowCacheIndex(d,this.currentRow);this.currentRow-c>0&&(h=this.session.$getRowCacheIndex(d,this.currentRow-c-1),h===p);)p=h,c++;else c=this.currentRow;return c},u.prototype.updateRowLine=function(c,d){c===void 0&&(c=this.getDocumentRow());var h=c===this.session.getLength()-1,p=h?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(c),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var f=this.session.$wrapData[c];f&&(d===void 0&&(d=this.getSplitIndex()),d>0&&f.length?(this.wrapIndent=f.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=dd?this.session.getOverwrite()?c:c-1:d,p=i.getVisualFromLogicalIdx(h,this.bidiMap),f=this.bidiMap.bidiLevels,g=0;!this.session.getOverwrite()&&c<=d&&f[p]%2!==0&&p++;for(var m=0;md&&f[p]%2===0&&(g+=this.charWidths[f[p]]),this.wrapIndent&&(g+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(g+=this.rtlLineOffset),g},u.prototype.getSelections=function(c,d){var h=this.bidiMap,p=h.bidiLevels,f,g=[],m=0,v=Math.min(c,d)-this.wrapIndent,y=Math.max(c,d)-this.wrapIndent,b=!1,w=!1,k=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var x,S=0;S=v&&xp+m/2;){if(p+=m,f===g.length-1){m=0;break}m=this.charWidths[g[++f]]}return f>0&&g[f-1]%2!==0&&g[f]%2===0?(h0&&g[f-1]%2===0&&g[f]%2!==0?d=1+(h>p?this.bidiMap.logicalFromVisual[f]:this.bidiMap.logicalFromVisual[f-1]):this.isRtlDir&&f===g.length-1&&m===0&&g[f-1]%2===0||!this.isRtlDir&&f===0&&g[f]%2!==0?d=1+this.bidiMap.logicalFromVisual[f]:(f>0&&g[f-1]%2!==0&&m!==0&&f--,d=this.bidiMap.logicalFromVisual[f]),d===0&&this.isRtlDir&&d++,d+this.wrapIndent},u}();r.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,o){var i=n("./lib/oop"),s=n("./lib/lang"),l=n("./lib/event_emitter").EventEmitter,a=n("./range").Range,u=function(){function c(d){this.session=d,this.doc=d.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var h=this;this.cursor.on("change",function(p){h.$cursorChanged=!0,h.$silent||h._emit("changeCursor"),!h.$isEmpty&&!h.$silent&&h._emit("changeSelection"),!h.$keepDesiredColumnOnChange&&p.old.column!=p.value.column&&(h.$desiredColumn=null)}),this.anchor.on("change",function(){h.$anchorChanged=!0,!h.$isEmpty&&!h.$silent&&h._emit("changeSelection")})}return c.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},c.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},c.prototype.getCursor=function(){return this.lead.getPosition()},c.prototype.setAnchor=function(d,h){this.$isEmpty=!1,this.anchor.setPosition(d,h)},c.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},c.prototype.getSelectionLead=function(){return this.lead.getPosition()},c.prototype.isBackwards=function(){var d=this.anchor,h=this.lead;return d.row>h.row||d.row==h.row&&d.column>h.column},c.prototype.getRange=function(){var d=this.anchor,h=this.lead;return this.$isEmpty?a.fromPoints(h,h):this.isBackwards()?a.fromPoints(h,d):a.fromPoints(d,h)},c.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},c.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},c.prototype.setRange=function(d,h){var p=h?d.end:d.start,f=h?d.start:d.end;this.$setSelection(p.row,p.column,f.row,f.column)},c.prototype.$setSelection=function(d,h,p,f){if(!this.$silent){var g=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(d,h),this.cursor.setPosition(p,f),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||g!=this.$isEmpty||m)&&this._emit("changeSelection")}},c.prototype.$moveSelection=function(d){var h=this.lead;this.$isEmpty&&this.setSelectionAnchor(h.row,h.column),d.call(this)},c.prototype.selectTo=function(d,h){this.$moveSelection(function(){this.moveCursorTo(d,h)})},c.prototype.selectToPosition=function(d){this.$moveSelection(function(){this.moveCursorToPosition(d)})},c.prototype.moveTo=function(d,h){this.clearSelection(),this.moveCursorTo(d,h)},c.prototype.moveToPosition=function(d){this.clearSelection(),this.moveCursorToPosition(d)},c.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},c.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},c.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},c.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},c.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},c.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},c.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},c.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},c.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},c.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},c.prototype.getWordRange=function(d,h){if(typeof h>"u"){var p=d||this.lead;d=p.row,h=p.column}return this.session.getWordRange(d,h)},c.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},c.prototype.selectAWord=function(){var d=this.getCursor(),h=this.session.getAWordRange(d.row,d.column);this.setSelectionRange(h)},c.prototype.getLineRange=function(d,h){var p=typeof d=="number"?d:this.lead.row,f,g=this.session.getFoldLine(p);return g?(p=g.start.row,f=g.end.row):f=p,h===!0?new a(p,0,f,this.session.getLine(f).length):new a(p,0,f+1,0)},c.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},c.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},c.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},c.prototype.wouldMoveIntoSoftTab=function(d,h,p){var f=d.column,g=d.column+h;return p<0&&(f=d.column-h,g=d.column),this.session.isTabStop(d)&&this.doc.getLine(d.row).slice(f,g).split(" ").length-1==h},c.prototype.moveCursorLeft=function(){var d=this.lead.getPosition(),h;if(h=this.session.getFoldAt(d.row,d.column,-1))this.moveCursorTo(h.start.row,h.start.column);else if(d.column===0)d.row>0&&this.moveCursorTo(d.row-1,this.doc.getLine(d.row-1).length);else{var p=this.session.getTabSize();this.wouldMoveIntoSoftTab(d,p,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-p):this.moveCursorBy(0,-1)}},c.prototype.moveCursorRight=function(){var d=this.lead.getPosition(),h;if(h=this.session.getFoldAt(d.row,d.column,1))this.moveCursorTo(h.end.row,h.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(h.column=f)}}this.moveCursorTo(h.row,h.column)},c.prototype.moveCursorFileEnd=function(){var d=this.doc.getLength()-1,h=this.doc.getLine(d).length;this.moveCursorTo(d,h)},c.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},c.prototype.moveCursorLongWordRight=function(){var d=this.lead.row,h=this.lead.column,p=this.doc.getLine(d),f=p.substring(h);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var g=this.session.getFoldAt(d,h,1);if(g){this.moveCursorTo(g.end.row,g.end.column);return}if(this.session.nonTokenRe.exec(f)&&(h+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,f=p.substring(h)),h>=p.length){this.moveCursorTo(d,p.length),this.moveCursorRight(),d0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(g)&&(h-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(d,h)},c.prototype.$shortWordEndIndex=function(d){var h=0,p,f=/\s/,g=this.session.tokenRe;if(g.lastIndex=0,this.session.tokenRe.exec(d))h=this.session.tokenRe.lastIndex;else{for(;(p=d[h])&&f.test(p);)h++;if(h<1){for(g.lastIndex=0;(p=d[h])&&!g.test(p);)if(g.lastIndex=0,h++,f.test(p))if(h>2){h--;break}else{for(;(p=d[h])&&f.test(p);)h++;if(h>2)break}}}return g.lastIndex=0,h},c.prototype.moveCursorShortWordRight=function(){var d=this.lead.row,h=this.lead.column,p=this.doc.getLine(d),f=p.substring(h),g=this.session.getFoldAt(d,h,1);if(g)return this.moveCursorTo(g.end.row,g.end.column);if(h==p.length){var m=this.doc.getLength();do d++,f=this.doc.getLine(d);while(d0&&/^\s*$/.test(f));h=f.length,/\s+$/.test(f)||(f="")}var g=s.stringReverse(f),m=this.$shortWordEndIndex(g);return this.moveCursorTo(d,h-m)},c.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},c.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},c.prototype.moveCursorBy=function(d,h){var p=this.session.documentToScreenPosition(this.lead.row,this.lead.column),f;if(h===0&&(d!==0&&(this.session.$bidiHandler.isBidiRow(p.row,this.lead.row)?(f=this.session.$bidiHandler.getPosLeft(p.column),p.column=Math.round(f/this.session.$bidiHandler.charWidths[0])):f=p.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?p.column=this.$desiredColumn:this.$desiredColumn=p.column),d!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var g=this.session.lineWidgets[this.lead.row];d<0?d-=g.rowsAbove||0:d>0&&(d+=g.rowCount-(g.rowsAbove||0))}var m=this.session.screenToDocumentPosition(p.row+d,p.column,f);d!==0&&h===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+h,h===0)},c.prototype.moveCursorToPosition=function(d){this.moveCursorTo(d.row,d.column)},c.prototype.moveCursorTo=function(d,h,p){var f=this.session.getFoldAt(d,h,1);f&&(d=f.start.row,h=f.start.column),this.$keepDesiredColumnOnChange=!0;var g=this.session.getLine(d);/[\uDC00-\uDFFF]/.test(g.charAt(h))&&g.charAt(h-1)&&(this.lead.row==d&&this.lead.column==h+1?h=h-1:h=h+1),this.lead.setPosition(d,h),this.$keepDesiredColumnOnChange=!1,p||(this.$desiredColumn=null)},c.prototype.moveCursorToScreen=function(d,h,p){var f=this.session.screenToDocumentPosition(d,h);this.moveCursorTo(f.row,f.column,p)},c.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},c.prototype.fromOrientedRange=function(d){this.setSelectionRange(d,d.cursor==d.start),this.$desiredColumn=d.desiredColumn||this.$desiredColumn},c.prototype.toOrientedRange=function(d){var h=this.getRange();return d?(d.start.column=h.start.column,d.start.row=h.start.row,d.end.column=h.end.column,d.end.row=h.end.row):d=h,d.cursor=this.isBackwards()?d.start:d.end,d.desiredColumn=this.$desiredColumn,d},c.prototype.getRangeOfMovements=function(d){var h=this.getCursor();try{d(this);var p=this.getCursor();return a.fromPoints(h,p)}catch{return a.fromPoints(h,h)}finally{this.moveCursorToPosition(h)}},c.prototype.toJSON=function(){if(this.rangeCount)var d=this.ranges.map(function(h){var p=h.clone();return p.isBackwards=h.cursor==h.start,p});else{var d=this.getRange();d.isBackwards=this.isBackwards()}return d},c.prototype.fromJSON=function(d){if(d.start==null)if(this.rangeList&&d.length>1){this.toSingleRange(d[0]);for(var h=d.length;h--;){var p=a.fromPoints(d[h].start,d[h].end);d[h].isBackwards&&(p.cursor=p.start),this.addRange(p,!0)}return}else d=d[0];this.rangeList&&this.toSingleRange(d),this.setSelectionRange(d,d.isBackwards)},c.prototype.isEqual=function(d){if((d.length||this.rangeCount)&&d.length!=this.rangeCount)return!1;if(!d.length||!this.ranges)return this.getRange().isEqual(d);for(var h=this.ranges.length;h--;)if(!this.ranges[h].isEqual(d[h]))return!1;return!0},c}();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,i.implement(u.prototype,l),r.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(n,r,o){var i=n("./lib/report_error").reportError,s=2e3,l=function(){function a(u){this.splitRegex,this.states=u,this.regExps={},this.matchMappings={};for(var c in this.states){for(var d=this.states[c],h=[],p=0,f=this.matchMappings[c]={defaultToken:"text"},g="g",m=[],v=0;v1?y.onMatch=this.$applyToken:y.onMatch=y.token),w>1&&(/\\\d/.test(y.regex)?b=y.regex.replace(/\\([0-9]+)/g,function(k,x){return"\\"+(parseInt(x,10)+p+1)}):(w=1,b=this.removeCapturingGroups(y.regex)),!y.splitRegex&&typeof y.token!="string"&&m.push(y)),f[p]=v,p+=w,h.push(b),y.onMatch||(y.onMatch=null)}}h.length||(f[0]=0,h.push("$")),m.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,g)},this),this.regExps[c]=new RegExp("("+h.join(")|(")+")|($)",g)}}return a.prototype.$setMaxTokenCount=function(u){s=u|0},a.prototype.$applyToken=function(u){var c=this.splitRegex.exec(u).slice(1),d=this.token.apply(this,c);if(typeof d=="string")return[{type:d,value:u}];for(var h=[],p=0,f=d.length;py){var C=u.substring(y,A-S.length);w.type==k?w.value+=C:(w.type&&v.push(w),w={type:k,value:C})}for(var O=0;Os){for(b>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:c,line:u});y1&&d[0]!==h&&d.unshift("#tmp",h),{tokens:v,state:d.length?d:h}},a}();l.prototype.reportError=i,r.Tokenizer=l}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,r,o){var i=n("../lib/deep_copy").deepCopy,s;s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(u,c){if(!c){for(var d in u)this.$rules[d]=u[d];return}for(var d in u){for(var h=u[d],p=0;p=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},l.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},l.prototype.getCurrentTokenRow=function(){return this.$row},l.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,u=this.$tokenIndex,c=a[u].start;if(c!==void 0)return c;for(c=0;u>0;)u-=1,c+=a[u].value.length;return c},l.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},l.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new i(this.$row,u,this.$row,u+a.value.length)},l}();r.TokenIterator=s}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,o){var i=n("../../lib/oop"),s=n("../behaviour").Behaviour,l=n("../../token_iterator").TokenIterator,a=n("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],d,h={},p={'"':'"',"'":"'"},f=function(v){var y=-1;if(v.multiSelect&&(y=v.selection.index,h.rangeCount!=v.multiSelect.rangeCount&&(h={rangeCount:v.multiSelect.rangeCount})),h[y])return d=h[y];d=h[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(v,y,b,w){var k=v.end.row-v.start.row;return{text:b+y+w,selection:[0,v.start.column+1,k,v.end.column+(k?0:1)]}},m;m=function(v){v=v||{},this.add("braces","insertion",function(y,b,w,k,x){var S=w.getCursorPosition(),A=k.doc.getLine(S.row);if(x=="{"){f(w);var C=w.getSelectionRange(),O=k.doc.getTextRange(C);if(O!==""&&O!=="{"&&w.getWrapBehavioursEnabled())return g(C,O,"{","}");if(m.isSaneInsertion(w,k))return/[\]\}\)]/.test(A[S.column])||w.inMultiSelectMode||v.braces?(m.recordAutoInsert(w,k,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(w,k,"{"),{text:"{",selection:[1,1]})}else if(x=="}"){f(w);var R=A.substring(S.column,S.column+1);if(R=="}"){var _=k.$findOpeningBracket("}",{column:S.column+1,row:S.row});if(_!==null&&m.isAutoInsertedClosing(S,A,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(x==` `||x==`\r `){f(w);var T="";m.isMaybeInsertedClosing(S,A)&&(T=a.stringRepeat("}",d.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var R=A.substring(S.column,S.column+1);if(R==="}"){var E=k.findMatchingBracket({row:S.row,column:S.column+1},"}");if(!E)return null;var M=this.$getIndent(k.getLine(E.row))}else if(T)var M=this.$getIndent(A);else{m.clearMaybeInsertedClosing();return}var I=M+k.getTabString();return{text:` `+I+` -`+M+T,selection:[1,I.length,1,I.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(y,b,w,k,x){var S=k.doc.getTextRange(x);if(!x.isMultiLine()&&S=="{"){f(w);var A=k.doc.getLine(x.start.row),C=A.substring(x.end.column,x.end.column+1);if(C=="}")return x.end.column++,x;d.maybeInsertedBrackets--}}),this.add("parens","insertion",function(y,b,w,k,x){if(x=="("){f(w);var S=w.getSelectionRange(),A=k.doc.getTextRange(S);if(A!==""&&w.getWrapBehavioursEnabled())return g(S,A,"(",")");if(m.isSaneInsertion(w,k))return m.recordAutoInsert(w,k,")"),{text:"()",selection:[1,1]}}else if(x==")"){f(w);var C=w.getCursorPosition(),O=k.doc.getLine(C.row),R=O.substring(C.column,C.column+1);if(R==")"){var _=k.$findOpeningBracket(")",{column:C.column+1,row:C.row});if(_!==null&&m.isAutoInsertedClosing(C,O,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(y,b,w,k,x){var S=k.doc.getTextRange(x);if(!x.isMultiLine()&&S=="("){f(w);var A=k.doc.getLine(x.start.row),C=A.substring(x.start.column+1,x.start.column+2);if(C==")")return x.end.column++,x}}),this.add("brackets","insertion",function(y,b,w,k,x){if(x=="["){f(w);var S=w.getSelectionRange(),A=k.doc.getTextRange(S);if(A!==""&&w.getWrapBehavioursEnabled())return g(S,A,"[","]");if(m.isSaneInsertion(w,k))return m.recordAutoInsert(w,k,"]"),{text:"[]",selection:[1,1]}}else if(x=="]"){f(w);var C=w.getCursorPosition(),O=k.doc.getLine(C.row),R=O.substring(C.column,C.column+1);if(R=="]"){var _=k.$findOpeningBracket("]",{column:C.column+1,row:C.row});if(_!==null&&m.isAutoInsertedClosing(C,O,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(y,b,w,k,x){var S=k.doc.getTextRange(x);if(!x.isMultiLine()&&S=="["){f(w);var A=k.doc.getLine(x.start.row),C=A.substring(x.start.column+1,x.start.column+2);if(C=="]")return x.end.column++,x}}),this.add("string_dquotes","insertion",function(y,b,w,k,x){var S=k.$mode.$quotes||p;if(x.length==1&&S[x]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(x)!=-1)return;f(w);var A=x,C=w.getSelectionRange(),O=k.doc.getTextRange(C);if(O!==""&&(O.length!=1||!S[O])&&w.getWrapBehavioursEnabled())return g(C,O,A,A);if(!O){var R=w.getCursorPosition(),_=k.doc.getLine(R.row),T=_.substring(R.column-1,R.column),E=_.substring(R.column,R.column+1),M=k.getTokenAt(R.row,R.column),I=k.getTokenAt(R.row,R.column+1);if(T=="\\"&&M&&/escape/.test(M.type))return null;var N=M&&/string|escape/.test(M.type),L=!I||/string|escape/.test(I.type),$;if(E==A)$=N!==L,$&&/string\.end/.test(I.type)&&($=!1);else{if(N&&!L||N&&L)return null;var D=k.$mode.tokenRe;D.lastIndex=0;var F=D.test(T);D.lastIndex=0;var U=D.test(E),W=k.$mode.$pairQuotesAfter,B=W&&W[A]&&W[A].test(T);if(!B&&F||U||E&&!/[\s;,.})\]\\]/.test(E))return null;var H=_[R.column-2];if(T==A&&(H==A||D.test(H)))return null;$=!0}return{text:$?A+A:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,b,w,k,x){var S=k.$mode.$quotes||p,A=k.doc.getTextRange(x);if(!x.isMultiLine()&&S.hasOwnProperty(A)){f(w);var C=k.doc.getLine(x.start.row),O=C.substring(x.start.column+1,x.start.column+2);if(O==A)return x.end.column++,x}}),v.closeDocComment!==!1&&this.add("doc comment end","insertion",function(y,b,w,k,x){if(y==="doc-start"&&(x===` +`+M+T,selection:[1,I.length,1,I.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(y,b,w,k,x){var S=k.doc.getTextRange(x);if(!x.isMultiLine()&&S=="{"){f(w);var A=k.doc.getLine(x.start.row),C=A.substring(x.end.column,x.end.column+1);if(C=="}")return x.end.column++,x;d.maybeInsertedBrackets--}}),this.add("parens","insertion",function(y,b,w,k,x){if(x=="("){f(w);var S=w.getSelectionRange(),A=k.doc.getTextRange(S);if(A!==""&&w.getWrapBehavioursEnabled())return g(S,A,"(",")");if(m.isSaneInsertion(w,k))return m.recordAutoInsert(w,k,")"),{text:"()",selection:[1,1]}}else if(x==")"){f(w);var C=w.getCursorPosition(),O=k.doc.getLine(C.row),R=O.substring(C.column,C.column+1);if(R==")"){var _=k.$findOpeningBracket(")",{column:C.column+1,row:C.row});if(_!==null&&m.isAutoInsertedClosing(C,O,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(y,b,w,k,x){var S=k.doc.getTextRange(x);if(!x.isMultiLine()&&S=="("){f(w);var A=k.doc.getLine(x.start.row),C=A.substring(x.start.column+1,x.start.column+2);if(C==")")return x.end.column++,x}}),this.add("brackets","insertion",function(y,b,w,k,x){if(x=="["){f(w);var S=w.getSelectionRange(),A=k.doc.getTextRange(S);if(A!==""&&w.getWrapBehavioursEnabled())return g(S,A,"[","]");if(m.isSaneInsertion(w,k))return m.recordAutoInsert(w,k,"]"),{text:"[]",selection:[1,1]}}else if(x=="]"){f(w);var C=w.getCursorPosition(),O=k.doc.getLine(C.row),R=O.substring(C.column,C.column+1);if(R=="]"){var _=k.$findOpeningBracket("]",{column:C.column+1,row:C.row});if(_!==null&&m.isAutoInsertedClosing(C,O,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(y,b,w,k,x){var S=k.doc.getTextRange(x);if(!x.isMultiLine()&&S=="["){f(w);var A=k.doc.getLine(x.start.row),C=A.substring(x.start.column+1,x.start.column+2);if(C=="]")return x.end.column++,x}}),this.add("string_dquotes","insertion",function(y,b,w,k,x){var S=k.$mode.$quotes||p;if(x.length==1&&S[x]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(x)!=-1)return;f(w);var A=x,C=w.getSelectionRange(),O=k.doc.getTextRange(C);if(O!==""&&(O.length!=1||!S[O])&&w.getWrapBehavioursEnabled())return g(C,O,A,A);if(!O){var R=w.getCursorPosition(),_=k.doc.getLine(R.row),T=_.substring(R.column-1,R.column),E=_.substring(R.column,R.column+1),M=k.getTokenAt(R.row,R.column),I=k.getTokenAt(R.row,R.column+1);if(T=="\\"&&M&&/escape/.test(M.type))return null;var N=M&&/string|escape/.test(M.type),L=!I||/string|escape/.test(I.type),$;if(E==A)$=N!==L,$&&/string\.end/.test(I.type)&&($=!1);else{if(N&&!L||N&&L)return null;var P=k.$mode.tokenRe;P.lastIndex=0;var F=P.test(T);P.lastIndex=0;var H=P.test(E),W=k.$mode.$pairQuotesAfter,B=W&&W[A]&&W[A].test(T);if(!B&&F||H||E&&!/[\s;,.})\]\\]/.test(E))return null;var U=_[R.column-2];if(T==A&&(U==A||P.test(U)))return null;$=!0}return{text:$?A+A:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,b,w,k,x){var S=k.$mode.$quotes||p,A=k.doc.getTextRange(x);if(!x.isMultiLine()&&S.hasOwnProperty(A)){f(w);var C=k.doc.getLine(x.start.row),O=C.substring(x.start.column+1,x.start.column+2);if(O==A)return x.end.column++,x}}),v.closeDocComment!==!1&&this.add("doc comment end","insertion",function(y,b,w,k,x){if(y==="doc-start"&&(x===` `||x===`\r -`)&&w.selection.isEmpty()){var S=w.getCursorPosition(),A=k.doc.getLine(S.row),C=k.doc.getLine(S.row+1),O=this.$getIndent(A);if(/\s*\*/.test(C))return/^\s*\*/.test(A)?{text:x+O+"* ",selection:[1,3+O.length,1,3+O.length]}:{text:x+O+" * ",selection:[1,3+O.length,1,3+O.length]};if(/\/\*\*/.test(A.substring(0,S.column)))return{text:x+O+" * "+x+" "+O+"*/",selection:[1,4+O.length,1,4+O.length]}}})},m.isSaneInsertion=function(v,y){var b=v.getCursorPosition(),w=new l(y,b.row,b.column);if(!this.$matchTokenType(w.getCurrentToken()||"text",u)){if(/[)}\]]/.test(v.session.getLine(b.row)[b.column]))return!0;var k=new l(y,b.row,b.column+1);if(!this.$matchTokenType(k.getCurrentToken()||"text",u))return!1}return w.stepForward(),w.getCurrentTokenRow()!==b.row||this.$matchTokenType(w.getCurrentToken()||"text",c)},m.$matchTokenType=function(v,y){return y.indexOf(v.type||v)>-1},m.recordAutoInsert=function(v,y,b){var w=v.getCursorPosition(),k=y.doc.getLine(w.row);this.isAutoInsertedClosing(w,k,d.autoInsertedLineEnd[0])||(d.autoInsertedBrackets=0),d.autoInsertedRow=w.row,d.autoInsertedLineEnd=b+k.substr(w.column),d.autoInsertedBrackets++},m.recordMaybeInsert=function(v,y,b){var w=v.getCursorPosition(),k=y.doc.getLine(w.row);this.isMaybeInsertedClosing(w,k)||(d.maybeInsertedBrackets=0),d.maybeInsertedRow=w.row,d.maybeInsertedLineStart=k.substr(0,w.column)+b,d.maybeInsertedLineEnd=k.substr(w.column),d.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(v,y,b){return d.autoInsertedBrackets>0&&v.row===d.autoInsertedRow&&b===d.autoInsertedLineEnd[0]&&y.substr(v.column)===d.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(v,y){return d.maybeInsertedBrackets>0&&v.row===d.maybeInsertedRow&&y.substr(v.column)===d.maybeInsertedLineEnd&&y.substr(0,v.column)==d.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){d.autoInsertedLineEnd=d.autoInsertedLineEnd.substr(1),d.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){d&&(d.maybeInsertedBrackets=0,d.maybeInsertedRow=-1)},i.inherits(m,s),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(n,r,o){for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],s=0,l=[],a=0;a2?H%x!=x-1:H%x==0}}else{if(!this.blockComment)return!1;var A=this.blockComment.start,C=this.blockComment.end,O=new RegExp("^(\\s*)(?:"+c.escapeRegExp(A)+")"),R=new RegExp("(?:"+c.escapeRegExp(C)+")\\s*$"),_=function($,D){E($,D)||(!b||/\S/.test($))&&(y.insertInLine({row:D,column:$.length},C),y.insertInLine({row:D,column:k},A))},T=function($,D){var F;(F=$.match(R))&&y.removeInLine(D,$.length-F[0].length,$.length),(F=$.match(O))&&y.removeInLine(D,F[1].length,F[0].length)},E=function($,D){if(O.test($))return!0;for(var F=g.getTokens(D),U=0;U$.length&&(L=$.length)}),k==1/0&&(k=L,b=!1,w=!1),S&&k%x!=0&&(k=Math.floor(k/x)*x),N(w?T:_)},this.toggleBlockComment=function(f,g,m,v){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var b=new d(g,v.row,v.column),w=b.getCurrentToken();g.selection;var k=g.selection.toOrientedRange(),x,S;if(w&&/comment/.test(w.type)){for(var A,C;w&&/comment/.test(w.type);){var O=w.value.indexOf(y.start);if(O!=-1){var R=b.getCurrentTokenRow(),_=b.getCurrentTokenColumn()+O;A=new h(R,_,R,_+y.start.length);break}w=b.stepBackward()}for(var b=new d(g,v.row,v.column),w=b.getCurrentToken();w&&/comment/.test(w.type);){var O=w.value.indexOf(y.end);if(O!=-1){var R=b.getCurrentTokenRow(),_=b.getCurrentTokenColumn()+O;C=new h(R,_,R,_+y.end.length);break}w=b.stepForward()}C&&g.remove(C),A&&(g.remove(A),x=A.start.row,S=-y.start.length)}else S=y.start.length,x=m.start.row,g.insert(m.end,y.end),g.insert(m.start,y.start);k.start.row==x&&(k.start.column+=S),k.end.row==x&&(k.end.column+=S),g.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(f,g,m){return this.$getIndent(g)},this.checkOutdent=function(f,g,m){return!1},this.autoOutdent=function(f,g,m){},this.$getIndent=function(f){return f.match(/^\s*/)[0]},this.createWorker=function(f){return null},this.createModeDelegates=function(f){this.$embeds=[],this.$modes={};for(var g in f)if(f[g]){var m=f[g],v=m.prototype.$id,y=i.$modes[v];y||(i.$modes[v]=y=new m),i.$modes[g]||(i.$modes[g]=y),this.$embeds.push(g),this.$modes[g]=y}for(var b=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],w=function(x){(function(S){var A=b[x],C=S[A];S[b[x]]=function(){return this.$delegator(A,arguments,C)}})(k)},k=this,g=0;gthis.row)){var h=u(d,{row:this.row,column:this.column},this.$insertRight);this.setPosition(h.row,h.column,!0)}},c.prototype.setPosition=function(d,h,p){var f;if(p?f={row:d,column:h}:f=this.$clipPositionToDocument(d,h),!(this.row==f.row&&this.column==f.column)){var g={row:this.row,column:this.column};this.row=f.row,this.column=f.column,this._signal("change",{old:g,value:f})}},c.prototype.detach=function(){this.document.off("change",this.$onChange)},c.prototype.attach=function(d){this.document=d||this.document,this.document.on("change",this.$onChange)},c.prototype.$clipPositionToDocument=function(d,h){var p={};return d>=this.document.getLength()?(p.row=Math.max(0,this.document.getLength()-1),p.column=this.document.getLine(p.row).length):d<0?(p.row=0,p.column=0):(p.row=d,p.column=Math.min(this.document.getLine(p.row).length,Math.max(0,h))),h<0&&(p.column=0),p},c}();l.prototype.$insertRight=!1,i.implement(l.prototype,s);function a(c,d,h){var p=h?c.column<=d.column:c.column-1},m.recordAutoInsert=function(v,y,b){var w=v.getCursorPosition(),k=y.doc.getLine(w.row);this.isAutoInsertedClosing(w,k,d.autoInsertedLineEnd[0])||(d.autoInsertedBrackets=0),d.autoInsertedRow=w.row,d.autoInsertedLineEnd=b+k.substr(w.column),d.autoInsertedBrackets++},m.recordMaybeInsert=function(v,y,b){var w=v.getCursorPosition(),k=y.doc.getLine(w.row);this.isMaybeInsertedClosing(w,k)||(d.maybeInsertedBrackets=0),d.maybeInsertedRow=w.row,d.maybeInsertedLineStart=k.substr(0,w.column)+b,d.maybeInsertedLineEnd=k.substr(w.column),d.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(v,y,b){return d.autoInsertedBrackets>0&&v.row===d.autoInsertedRow&&b===d.autoInsertedLineEnd[0]&&y.substr(v.column)===d.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(v,y){return d.maybeInsertedBrackets>0&&v.row===d.maybeInsertedRow&&y.substr(v.column)===d.maybeInsertedLineEnd&&y.substr(0,v.column)==d.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){d.autoInsertedLineEnd=d.autoInsertedLineEnd.substr(1),d.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){d&&(d.maybeInsertedBrackets=0,d.maybeInsertedRow=-1)},i.inherits(m,s),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(n,r,o){for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],s=0,l=[],a=0;a2?U%x!=x-1:U%x==0}}else{if(!this.blockComment)return!1;var A=this.blockComment.start,C=this.blockComment.end,O=new RegExp("^(\\s*)(?:"+c.escapeRegExp(A)+")"),R=new RegExp("(?:"+c.escapeRegExp(C)+")\\s*$"),_=function($,P){E($,P)||(!b||/\S/.test($))&&(y.insertInLine({row:P,column:$.length},C),y.insertInLine({row:P,column:k},A))},T=function($,P){var F;(F=$.match(R))&&y.removeInLine(P,$.length-F[0].length,$.length),(F=$.match(O))&&y.removeInLine(P,F[1].length,F[0].length)},E=function($,P){if(O.test($))return!0;for(var F=g.getTokens(P),H=0;H$.length&&(L=$.length)}),k==1/0&&(k=L,b=!1,w=!1),S&&k%x!=0&&(k=Math.floor(k/x)*x),N(w?T:_)},this.toggleBlockComment=function(f,g,m,v){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var b=new d(g,v.row,v.column),w=b.getCurrentToken();g.selection;var k=g.selection.toOrientedRange(),x,S;if(w&&/comment/.test(w.type)){for(var A,C;w&&/comment/.test(w.type);){var O=w.value.indexOf(y.start);if(O!=-1){var R=b.getCurrentTokenRow(),_=b.getCurrentTokenColumn()+O;A=new h(R,_,R,_+y.start.length);break}w=b.stepBackward()}for(var b=new d(g,v.row,v.column),w=b.getCurrentToken();w&&/comment/.test(w.type);){var O=w.value.indexOf(y.end);if(O!=-1){var R=b.getCurrentTokenRow(),_=b.getCurrentTokenColumn()+O;C=new h(R,_,R,_+y.end.length);break}w=b.stepForward()}C&&g.remove(C),A&&(g.remove(A),x=A.start.row,S=-y.start.length)}else S=y.start.length,x=m.start.row,g.insert(m.end,y.end),g.insert(m.start,y.start);k.start.row==x&&(k.start.column+=S),k.end.row==x&&(k.end.column+=S),g.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(f,g,m){return this.$getIndent(g)},this.checkOutdent=function(f,g,m){return!1},this.autoOutdent=function(f,g,m){},this.$getIndent=function(f){return f.match(/^\s*/)[0]},this.createWorker=function(f){return null},this.createModeDelegates=function(f){this.$embeds=[],this.$modes={};for(var g in f)if(f[g]){var m=f[g],v=m.prototype.$id,y=i.$modes[v];y||(i.$modes[v]=y=new m),i.$modes[g]||(i.$modes[g]=y),this.$embeds.push(g),this.$modes[g]=y}for(var b=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],w=function(x){(function(S){var A=b[x],C=S[A];S[b[x]]=function(){return this.$delegator(A,arguments,C)}})(k)},k=this,g=0;gthis.row)){var h=u(d,{row:this.row,column:this.column},this.$insertRight);this.setPosition(h.row,h.column,!0)}},c.prototype.setPosition=function(d,h,p){var f;if(p?f={row:d,column:h}:f=this.$clipPositionToDocument(d,h),!(this.row==f.row&&this.column==f.column)){var g={row:this.row,column:this.column};this.row=f.row,this.column=f.column,this._signal("change",{old:g,value:f})}},c.prototype.detach=function(){this.document.off("change",this.$onChange)},c.prototype.attach=function(d){this.document=d||this.document,this.document.on("change",this.$onChange)},c.prototype.$clipPositionToDocument=function(d,h){var p={};return d>=this.document.getLength()?(p.row=Math.max(0,this.document.getLength()-1),p.column=this.document.getLine(p.row).length):d<0?(p.row=0,p.column=0):(p.row=d,p.column=Math.min(this.document.getLine(p.row).length,Math.max(0,h))),h<0&&(p.column=0),p},c}();l.prototype.$insertRight=!1,i.implement(l.prototype,s);function a(c,d,h){var p=h?c.column<=d.column:c.column"+k.end.row+":"+k.end.column}function p(k,x){var S=k.action=="insert",A=x.action=="insert";if(S&&A)if(a(x.start,k.end)>=0)m(x,k,-1);else if(a(x.start,k.start)<=0)m(k,x,1);else return null;else if(S&&!A)if(a(x.start,k.end)>=0)m(x,k,-1);else if(a(x.end,k.start)<=0)m(k,x,-1);else return null;else if(!S&&A)if(a(x.start,k.start)>=0)m(x,k,1);else if(a(x.start,k.start)<=0)m(k,x,1);else return null;else if(!S&&!A)if(a(x.start,k.start)>=0)m(x,k,1);else if(a(x.end,k.start)<=0)m(k,x,-1);else return null;return[x,k]}function f(k,x){for(var S=k.length;S--;)for(var A=0;A=0?m(k,x,-1):(a(k.start,x.start)<=0||m(k,l.fromPoints(x.start,k.start),-1),m(x,k,1));else if(!S&&A)a(x.start,k.end)>=0?m(x,k,-1):(a(x.start,k.start)<=0||m(x,l.fromPoints(k.start,x.start),-1),m(k,x,1));else if(!S&&!A)if(a(x.start,k.end)>=0)m(x,k,-1);else if(a(x.end,k.start)<=0)m(k,x,-1);else{var C,O;return a(k.start,x.start)<0&&(C=k,k=y(k,x.start)),a(k.end,x.end)>0&&(O=y(k,x.end)),v(x.end,k.start,k.end,-1),O&&!C&&(k.lines=O.lines,k.start=O.start,k.end=O.end,O=k),[x,C,O].filter(Boolean)}return[x,k]}function m(k,x,S){v(k.start,x.start,x.end,S),v(k.end,x.start,x.end,S)}function v(k,x,S,A){k.row==(A==1?x:S).row&&(k.column+=A*(S.column-x.column)),k.row+=A*(S.row-x.row)}function y(k,x){var S=k.lines,A=k.end;k.end=u(x);var C=k.end.row-k.start.row,O=S.splice(C,S.length),R=C?x.column:x.column-k.start.column;S.push(O[0].substring(0,R)),O[0]=O[0].substr(R);var _={start:u(x),end:A,lines:O,action:k.action};return _}function b(k,x){x=c(x);for(var S=k.length;S--;){for(var A=k[S],C=0;Cthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(u,c){return-u.range.compareEnd(c.start.row,c.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},l.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},l.prototype.walk=function(a,u,c){var d=0,h=this.folds,p,f,g,m=!0;u==null&&(u=this.end.row,c=this.end.column);for(var v=0;v0)){var m=s(u,f.start);return g===0?c&&m!==0?-p-2:p:m>0||m===0&&!c?p:-p-1}}return-p-1},a.prototype.add=function(u){var c=!u.isEmpty(),d=this.pointIndex(u.start,c);d<0&&(d=-d-1);var h=this.pointIndex(u.end,c,d);return h<0?h=-h-1:h++,this.ranges.splice(d,h-d,u)},a.prototype.addList=function(u){for(var c=[],d=u.length;d--;)c.push.apply(c,this.add(u[d]));return c},a.prototype.substractPoint=function(u){var c=this.pointIndex(u);if(c>=0)return this.ranges.splice(c,1)},a.prototype.merge=function(){var u=[],c=this.ranges;c=c.sort(function(g,m){return s(g.start,m.start)});for(var d=c[0],h,p=1;p=0},a.prototype.containsPoint=function(u){return this.pointIndex(u)>=0},a.prototype.rangeAtPoint=function(u){var c=this.pointIndex(u);if(c>=0)return this.ranges[c]},a.prototype.clipRows=function(u,c){var d=this.ranges;if(d[0].start.row>c||d[d.length-1].start.row=h)break}if(u.action=="insert")for(var y=p-h,b=-c.column+d.column;gh)break;if(v.start.row==h&&v.start.column>=c.column&&(v.start.column==c.column&&this.$bias<=0||(v.start.column+=b,v.start.row+=y)),v.end.row==h&&v.end.column>=c.column){if(v.end.column==c.column&&this.$bias<0)continue;v.end.column==c.column&&b>0&&gv.start.column&&v.end.column==f[g+1].start.column&&(v.end.column-=b),v.end.column+=b,v.end.row+=y}}else for(var y=h-p,b=c.column-d.column;gp)break;v.end.rowc.column)&&(v.end.column=c.column,v.end.row=c.row):(v.end.column+=b,v.end.row+=y):v.end.row>p&&(v.end.row+=y),v.start.rowc.column)&&(v.start.column=c.column,v.start.row=c.row):(v.start.column+=b,v.start.row+=y):v.start.row>p&&(v.start.row+=y)}if(y!=0&&g=d)return g;if(g.end.row>d)return null}return null},this.getNextFoldLine=function(d,h){var p=this.$foldData,f=0;for(h&&(f=p.indexOf(h)),f==-1&&(f=0),f;f=d)return g}return null},this.getFoldedRowCount=function(d,h){for(var p=this.$foldData,f=h-d+1,g=0;g=h){y=d?f-=h-y:f=0);break}else v>=d&&(y>=d?f-=v-y:f-=v-d+1)}return f},this.$addFoldLine=function(d){return this.$foldData.push(d),this.$foldData.sort(function(h,p){return h.start.row-p.start.row}),d},this.addFold=function(d,h){var p=this.$foldData,f=!1,g;d instanceof l?g=d:(g=new l(h,d),g.collapseChildren=h.collapseChildren),this.$clipRangeToDocument(g.range);var m=g.start.row,v=g.start.column,y=g.end.row,b=g.end.column,w=this.getFoldAt(m,v,1),k=this.getFoldAt(y,b,-1);if(w&&k==w)return w.addSubFold(g);w&&!w.range.isStart(m,v)&&this.removeFold(w),k&&!k.range.isEnd(y,b)&&this.removeFold(k);var x=this.getFoldsInRange(g.range);x.length>0&&(this.removeFolds(x),g.collapseChildren||x.forEach(function(O){g.addSubFold(O)}));for(var S=0;S0&&this.foldAll(d.start.row+1,d.end.row,d.collapseChildren-1),d.subFolds=[]},this.expandFolds=function(d){d.forEach(function(h){this.expandFold(h)},this)},this.unfold=function(d,h){var p,f;if(d==null)p=new i(0,0,this.getLength(),0),h==null&&(h=!0);else if(typeof d=="number")p=new i(d,0,d,this.getLine(d).length);else if("row"in d)p=i.fromPoints(d,d);else{if(Array.isArray(d))return f=[],d.forEach(function(m){f=f.concat(this.unfold(m))},this),f;p=d}f=this.getFoldsInRangeList(p);for(var g=f;f.length==1&&i.comparePoints(f[0].start,p.start)<0&&i.comparePoints(f[0].end,p.end)>0;)this.expandFolds(f),f=this.getFoldsInRangeList(p);if(h!=!1?this.removeFolds(f):this.expandFolds(f),g.length)return g},this.isRowFolded=function(d,h){return!!this.getFoldLine(d,h)},this.getRowFoldEnd=function(d,h){var p=this.getFoldLine(d,h);return p?p.end.row:d},this.getRowFoldStart=function(d,h){var p=this.getFoldLine(d,h);return p?p.start.row:d},this.getFoldDisplayLine=function(d,h,p,f,g){f==null&&(f=d.start.row),g==null&&(g=0),h==null&&(h=d.end.row),p==null&&(p=this.getLine(h).length);var m=this.doc,v="";return d.walk(function(y,b,w,k){if(!(bb)break;while(g&&v.test(g.type)&&!/^comment.start/.test(g.type));g=f.stepBackward()}else g=f.getCurrentToken();return y.end.row=f.getCurrentTokenRow(),y.end.column=f.getCurrentTokenColumn(),/^comment.end/.test(g.type)||(y.end.column+=g.value.length-2),y}},this.foldAll=function(d,h,p,f){p==null&&(p=1e5);var g=this.foldWidgets;if(g){h=h||this.getLength(),d=d||0;for(var m=d;m=d&&(m=v.end.row,v.collapseChildren=p,this.addFold("...",v))}}},this.foldToLevel=function(d){for(this.foldAll();d-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var d=this;this.foldAll(null,null,null,function(h){for(var p=d.getTokens(h),f=0;f=0;){var m=p[f];if(m==null&&(m=p[f]=this.getFoldWidget(f)),m=="start"){var v=this.getFoldWidgetRange(f);if(g||(g=v),v&&v.end.row>=d)break}f--}return{range:f!==-1&&v,firstRange:g}},this.onFoldWidgetClick=function(d,h){h instanceof u&&(h=h.domEvent);var p={children:h.shiftKey,all:h.ctrlKey||h.metaKey,siblings:h.altKey},f=this.$toggleFoldWidget(d,p);if(!f){var g=h.target||h.srcElement;g&&/ace_fold-widget/.test(g.className)&&(g.className+=" ace_invalid")}},this.$toggleFoldWidget=function(d,h){if(this.getFoldWidget){var p=this.getFoldWidget(d),f=this.getLine(d),g=p==="end"?-1:1,m=this.getFoldAt(d,g===-1?0:f.length,g);if(m)return h.children||h.all?this.removeFold(m):this.expandFold(m),m;var v=this.getFoldWidgetRange(d,!0);if(v&&!v.isMultiLine()&&(m=this.getFoldAt(v.start.row,v.start.column,1),m&&v.isEqual(m.range)))return this.removeFold(m),m;if(h.siblings){var y=this.getParentFoldRangeData(d);if(y.range)var b=y.range.start.row+1,w=y.range.end.row;this.foldAll(b,w,h.all?1e4:0)}else h.children?(w=v?v.end.row:this.getLength(),this.foldAll(d+1,w,h.all?1e4:0)):v&&(h.all&&(v.collapseChildren=1e4),this.addFold("...",v));return v}},this.toggleFoldWidget=function(d){var h=this.selection.getCursor().row;h=this.getRowFoldStart(h);var p=this.$toggleFoldWidget(h,{});if(!p){var f=this.getParentFoldRangeData(h,!0);if(p=f.range||f.firstRange,p){h=p.start.row;var g=this.getFoldAt(h,this.getLine(h).length,1);g?this.removeFold(g):this.addFold("...",p)}}},this.updateFoldWidgets=function(d){var h=d.start.row,p=d.end.row-h;if(p===0)this.foldWidgets[h]=null;else if(d.action=="remove")this.foldWidgets.splice(h,p+1,null);else{var f=Array(p+1);f.unshift(h,1),this.foldWidgets.splice.apply(this.foldWidgets,f)}},this.tokenizerUpdateFoldWidgets=function(d){var h=d.data;h.first!=h.last&&this.foldWidgets.length>h.first&&this.foldWidgets.splice(h.first,this.foldWidgets.length)}}r.Folding=c}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,r,o){var i=n("../token_iterator").TokenIterator,s=n("../range").Range;function l(){this.findMatchingBracket=function(a,u){if(a.column==0)return null;var c=u||this.getLine(a.row).charAt(a.column-1);if(c=="")return null;var d=c.match(/([\(\[\{])|([\)\]\}])/);return d?d[1]?this.$findClosingBracket(d[1],a):this.$findOpeningBracket(d[2],a):null},this.getBracketRange=function(a){var u=this.getLine(a.row),c=!0,d,h=u.charAt(a.column-1),p=h&&h.match(/([\(\[\{])|([\)\]\}])/);if(p||(h=u.charAt(a.column),a={row:a.row,column:a.column+1},p=h&&h.match(/([\(\[\{])|([\)\]\}])/),c=!1),!p)return null;if(p[1]){var f=this.$findClosingBracket(p[1],a);if(!f)return null;d=s.fromPoints(a,f),c||(d.end.column++,d.start.column--),d.cursor=d.end}else{var f=this.$findOpeningBracket(p[2],a);if(!f)return null;d=s.fromPoints(f,a),c||(d.start.column++,d.end.column--),d.cursor=d.start}return d},this.getMatchingBracketRanges=function(a,u){var c=this.getLine(a.row),d=/([\(\[\{])|([\)\]\}])/,h=!u&&c.charAt(a.column-1),p=h&&h.match(d);if(p||(h=(u===void 0||u)&&c.charAt(a.column),a={row:a.row,column:a.column+1},p=h&&h.match(d)),!p)return null;var f=new s(a.row,a.column-1,a.row,a.column),g=p[1]?this.$findClosingBracket(p[1],a):this.$findOpeningBracket(p[2],a);if(!g)return[f];var m=new s(g.row,g.column,g.row,g.column+1);return[f,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,u,c){var d=this.$brackets[a],h=1,p=new i(this,u.row,u.column),f=p.getCurrentToken();if(f||(f=p.stepForward()),!!f){c||(c=new RegExp("(\\.?"+f.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var g=u.column-p.getCurrentTokenColumn()-2,m=f.value;;){for(;g>=0;){var v=m.charAt(g);if(v==d){if(h-=1,h==0)return{row:p.getCurrentTokenRow(),column:g+p.getCurrentTokenColumn()}}else v==a&&(h+=1);g-=1}do f=p.stepBackward();while(f&&!c.test(f.type));if(f==null)break;m=f.value,g=m.length-1}return null}},this.$findClosingBracket=function(a,u,c){var d=this.$brackets[a],h=1,p=new i(this,u.row,u.column),f=p.getCurrentToken();if(f||(f=p.stepForward()),!!f){c||(c=new RegExp("(\\.?"+f.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var g=u.column-p.getCurrentTokenColumn();;){for(var m=f.value,v=m.length;g"?d=!0:u.type.indexOf("tag-name")!==-1&&(c=!0));while(u&&!c);return u},this.$findClosingTag=function(a,u){var c,d=u.value,h=u.value,p=0,f=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);u=a.stepForward();var g=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length),m=!1;do if(c=u,u=a.stepForward(),u){if(u.value===">"&&!m){var v=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);m=!0}if(u.type.indexOf("tag-name")!==-1){if(d=u.value,h===d){if(c.value==="<")p++;else if(c.value==="")var w=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(h===d&&u.value==="/>"&&(p--,p<0))var y=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),b=y,w=b,v=new s(g.end.row,g.end.column,g.end.row,g.end.column+1)}while(u&&p>=0);if(f&&v&&y&&w&&g&&b)return{openTag:new s(f.start.row,f.start.column,v.end.row,v.end.column),closeTag:new s(y.start.row,y.start.column,w.end.row,w.end.column),openTagName:g,closeTagName:b}},this.$findOpeningTag=function(a,u){var c=a.getCurrentToken(),d=u.value,h=0,p=a.getCurrentTokenRow(),f=a.getCurrentTokenColumn(),g=f+2,m=new s(p,f,p,g);a.stepForward();var v=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length);if(u=a.stepForward(),!(!u||u.value!==">")){var y=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(u=c,p=a.getCurrentTokenRow(),f=a.getCurrentTokenColumn(),g=f+u.value.length,c=a.stepBackward(),u){if(u.type.indexOf("tag-name")!==-1){if(d===u.value)if(c.value==="<"){if(h++,h>0){var b=new s(p,f,p,g),w=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do u=a.stepForward();while(u&&u.value!==">");var k=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else c.value===""){for(var x=0,S=c;S;){if(S.type.indexOf("tag-name")!==-1&&S.value===d){h--;break}else if(S.value==="<")break;S=a.stepBackward(),x++}for(var A=0;AE&&(this.$docRowCache.splice(E,T),this.$screenRowCache.splice(E,T))},R.prototype.$getRowCacheIndex=function(_,T){for(var E=0,M=_.length-1;E<=M;){var I=E+M>>1,N=_[I];if(T>N)E=I+1;else if(T=T));N++);return M=E[N],M?(M.index=N,M.start=I-M.value.length,M):null},R.prototype.setUndoManager=function(_){if(this.$undoManager=_,this.$informUndoManager&&this.$informUndoManager.cancel(),_){var T=this;_.addSession(this),this.$syncInformUndoManager=function(){T.$informUndoManager.cancel(),T.mergeUndoDeltas=!1},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},R.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},R.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},R.prototype.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):" "},R.prototype.setUseSoftTabs=function(_){this.setOption("useSoftTabs",_)},R.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},R.prototype.setTabSize=function(_){this.setOption("tabSize",_)},R.prototype.getTabSize=function(){return this.$tabSize},R.prototype.isTabStop=function(_){return this.$useSoftTabs&&_.column%this.$tabSize===0},R.prototype.setNavigateWithinSoftTabs=function(_){this.setOption("navigateWithinSoftTabs",_)},R.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},R.prototype.setOverwrite=function(_){this.setOption("overwrite",_)},R.prototype.getOverwrite=function(){return this.$overwrite},R.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},R.prototype.addGutterDecoration=function(_,T){this.$decorations[_]||(this.$decorations[_]=""),this.$decorations[_]+=" "+T,this._signal("changeBreakpoint",{})},R.prototype.removeGutterDecoration=function(_,T){this.$decorations[_]=(this.$decorations[_]||"").replace(" "+T,""),this._signal("changeBreakpoint",{})},R.prototype.getBreakpoints=function(){return this.$breakpoints},R.prototype.setBreakpoints=function(_){this.$breakpoints=[];for(var T=0;T<_.length;T++)this.$breakpoints[_[T]]="ace_breakpoint";this._signal("changeBreakpoint",{})},R.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},R.prototype.setBreakpoint=function(_,T){T===void 0&&(T="ace_breakpoint"),T?this.$breakpoints[_]=T:delete this.$breakpoints[_],this._signal("changeBreakpoint",{})},R.prototype.clearBreakpoint=function(_){delete this.$breakpoints[_],this._signal("changeBreakpoint",{})},R.prototype.addMarker=function(_,T,E,M){var I=this.$markerId++,N={range:_,type:E||"line",renderer:typeof E=="function"?E:null,clazz:T,inFront:!!M,id:I};return M?(this.$frontMarkers[I]=N,this._signal("changeFrontMarker")):(this.$backMarkers[I]=N,this._signal("changeBackMarker")),I},R.prototype.addDynamicMarker=function(_,T){if(_.update){var E=this.$markerId++;return _.id=E,_.inFront=!!T,T?(this.$frontMarkers[E]=_,this._signal("changeFrontMarker")):(this.$backMarkers[E]=_,this._signal("changeBackMarker")),_}},R.prototype.removeMarker=function(_){var T=this.$frontMarkers[_]||this.$backMarkers[_];if(T){var E=T.inFront?this.$frontMarkers:this.$backMarkers;delete E[_],this._signal(T.inFront?"changeFrontMarker":"changeBackMarker")}},R.prototype.getMarkers=function(_){return _?this.$frontMarkers:this.$backMarkers},R.prototype.highlight=function(_){if(!this.$searchHighlight){var T=new g(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(T)}this.$searchHighlight.setRegexp(_)},R.prototype.highlightLines=function(_,T,E,M){typeof T!="number"&&(E=T,T=_),E||(E="ace_step");var I=new h(_,0,T,1/0);return I.id=this.addMarker(I,E,"fullLine",M),I},R.prototype.setAnnotations=function(_){this.$annotations=_,this._signal("changeAnnotation",{})},R.prototype.getAnnotations=function(){return this.$annotations||[]},R.prototype.clearAnnotations=function(){this.setAnnotations([])},R.prototype.$detectNewLine=function(_){var T=_.match(/^.*?(\r?\n)/m);T?this.$autoNewLine=T[1]:this.$autoNewLine=` -`},R.prototype.getWordRange=function(_,T){var E=this.getLine(_),M=!1;if(T>0&&(M=!!E.charAt(T-1).match(this.tokenRe)),M||(M=!!E.charAt(T).match(this.tokenRe)),M)var I=this.tokenRe;else if(/^\s+$/.test(E.slice(T-1,T+1)))var I=/\s/;else var I=this.nonTokenRe;var N=T;if(N>0){do N--;while(N>=0&&E.charAt(N).match(I));N++}for(var L=T;L_&&(_=T.screenWidth)}),this.lineWidgetWidth=_},R.prototype.$computeWidth=function(_){if(this.$modified||_){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var T=this.doc.getAllLines(),E=this.$rowLengthCache,M=0,I=0,N=this.$foldData[I],L=N?N.start.row:1/0,$=T.length,D=0;D<$;D++){if(D>L){if(D=N.end.row+1,D>=$)break;N=this.$foldData[I++],L=N?N.start.row:1/0}E[D]==null&&(E[D]=this.$getStringScreenWidth(T[D])[0]),E[D]>M&&(M=E[D])}this.screenWidth=M}},R.prototype.getLine=function(_){return this.doc.getLine(_)},R.prototype.getLines=function(_,T){return this.doc.getLines(_,T)},R.prototype.getLength=function(){return this.doc.getLength()},R.prototype.getTextRange=function(_){return this.doc.getTextRange(_||this.selection.getRange())},R.prototype.insert=function(_,T){return this.doc.insert(_,T)},R.prototype.remove=function(_){return this.doc.remove(_)},R.prototype.removeFullLines=function(_,T){return this.doc.removeFullLines(_,T)},R.prototype.undoChanges=function(_,T){if(_.length){this.$fromUndo=!0;for(var E=_.length-1;E!=-1;E--){var M=_[E];M.action=="insert"||M.action=="remove"?this.doc.revertDelta(M):M.folds&&this.addFolds(M.folds)}!T&&this.$undoSelect&&(_.selectionBefore?this.selection.fromJSON(_.selectionBefore):this.selection.setRange(this.$getUndoSelection(_,!0))),this.$fromUndo=!1}},R.prototype.redoChanges=function(_,T){if(_.length){this.$fromUndo=!0;for(var E=0;E<_.length;E++){var M=_[E];(M.action=="insert"||M.action=="remove")&&this.doc.$safeApplyDelta(M)}!T&&this.$undoSelect&&(_.selectionAfter?this.selection.fromJSON(_.selectionAfter):this.selection.setRange(this.$getUndoSelection(_,!1))),this.$fromUndo=!1}},R.prototype.setUndoSelect=function(_){this.$undoSelect=_},R.prototype.$getUndoSelection=function(_,T){function E($){return T?$.action!=="insert":$.action==="insert"}for(var M,I,N=0;N<_.length;N++){var L=_[N];if(L.start){if(!M){E(L)?M=h.fromPoints(L.start,L.end):M=h.fromPoints(L.start,L.start);continue}E(L)?(I=L.start,M.compare(I.row,I.column)==-1&&M.setStart(I),I=L.end,M.compare(I.row,I.column)==1&&M.setEnd(I)):(I=L.start,M.compare(I.row,I.column)==-1&&(M=h.fromPoints(L.start,L.start)))}}return M},R.prototype.replace=function(_,T){return this.doc.replace(_,T)},R.prototype.moveText=function(_,T,E){var M=this.getTextRange(_),I=this.getFoldsInRange(_),N=h.fromPoints(T,T);if(!E){this.remove(_);var L=_.start.row-_.end.row,$=L?-_.end.column:_.start.column-_.end.column;$&&(N.start.row==_.end.row&&N.start.column>_.end.column&&(N.start.column+=$),N.end.row==_.end.row&&N.end.column>_.end.column&&(N.end.column+=$)),L&&N.start.row>=_.end.row&&(N.start.row+=L,N.end.row+=L)}if(N.end=this.insert(N.start,M),I.length){var D=_.start,F=N.start,L=F.row-D.row,$=F.column-D.column;this.addFolds(I.map(function(B){return B=B.clone(),B.start.row==D.row&&(B.start.column+=$),B.end.row==D.row&&(B.end.column+=$),B.start.row+=L,B.end.row+=L,B}))}return N},R.prototype.indentRows=function(_,T,E){E=E.replace(/\t/g,this.getTabString());for(var M=_;M<=T;M++)this.doc.insertInLine({row:M,column:0},E)},R.prototype.outdentRows=function(_){for(var T=_.collapseRows(),E=new h(0,0,0,0),M=this.getTabSize(),I=T.start.row;I<=T.end.row;++I){var N=this.getLine(I);E.start.row=I,E.end.row=I;for(var L=0;L0){var M=this.getRowFoldEnd(T+E);if(M>this.doc.getLength()-1)return 0;var I=M-T}else{_=this.$clipRowToDocument(_),T=this.$clipRowToDocument(T);var I=T-_+1}var N=new h(_,0,T,Number.MAX_VALUE),L=this.getFoldsInRange(N).map(function(D){return D=D.clone(),D.start.row+=I,D.end.row+=I,D}),$=E==0?this.doc.getLines(_,T):this.doc.removeFullLines(_,T);return this.doc.insertFullLines(_+I,$),L.length&&this.addFolds(L),I},R.prototype.moveLinesUp=function(_,T){return this.$moveLines(_,T,-1)},R.prototype.moveLinesDown=function(_,T){return this.$moveLines(_,T,1)},R.prototype.duplicateLines=function(_,T){return this.$moveLines(_,T,0)},R.prototype.$clipRowToDocument=function(_){return Math.max(0,Math.min(_,this.doc.getLength()-1))},R.prototype.$clipColumnToRow=function(_,T){return T<0?0:Math.min(this.doc.getLine(_).length,T)},R.prototype.$clipPositionToDocument=function(_,T){if(T=Math.max(0,T),_<0)_=0,T=0;else{var E=this.doc.getLength();_>=E?(_=E-1,T=this.doc.getLine(E-1).length):T=Math.min(this.doc.getLine(_).length,T)}return{row:_,column:T}},R.prototype.$clipRangeToDocument=function(_){_.start.row<0?(_.start.row=0,_.start.column=0):_.start.column=this.$clipColumnToRow(_.start.row,_.start.column);var T=this.doc.getLength()-1;return _.end.row>T?(_.end.row=T,_.end.column=this.doc.getLine(T).length):_.end.column=this.$clipColumnToRow(_.end.row,_.end.column),_},R.prototype.setUseWrapMode=function(_){if(_!=this.$useWrapMode){if(this.$useWrapMode=_,this.$modified=!0,this.$resetRowCache(0),_){var T=this.getLength();this.$wrapData=Array(T),this.$updateWrapData(0,T-1)}this._signal("changeWrapMode")}},R.prototype.getUseWrapMode=function(){return this.$useWrapMode},R.prototype.setWrapLimitRange=function(_,T){(this.$wrapLimitRange.min!==_||this.$wrapLimitRange.max!==T)&&(this.$wrapLimitRange={min:_,max:T},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},R.prototype.adjustWrapLimit=function(_,T){var E=this.$wrapLimitRange;E.max<0&&(E={min:T,max:T});var M=this.$constrainWrapLimit(_,E.min,E.max);return M!=this.$wrapLimit&&M>1?(this.$wrapLimit=M,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},R.prototype.$constrainWrapLimit=function(_,T,E){return T&&(_=Math.max(T,_)),E&&(_=Math.min(E,_)),_},R.prototype.getWrapLimit=function(){return this.$wrapLimit},R.prototype.setWrapLimit=function(_){this.setWrapLimitRange(_,_)},R.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},R.prototype.$updateInternalDataOnChange=function(_){var T=this.$useWrapMode,E=_.action,M=_.start,I=_.end,N=M.row,L=I.row,$=L-N,D=null;if(this.$updating=!0,$!=0)if(E==="remove"){this[T?"$wrapData":"$rowLengthCache"].splice(N,$);var F=this.$foldData;D=this.getFoldsInRange(_),this.removeFolds(D);var U=this.getFoldLine(I.row),W=0;if(U){U.addRemoveChars(I.row,I.column,M.column-I.column),U.shiftRow(-$);var B=this.getFoldLine(N);B&&B!==U&&(B.merge(U),U=B),W=F.indexOf(U)+1}for(W;W=I.row&&U.shiftRow(-$)}L=N}else{var H=Array($);H.unshift(N,0);var G=T?this.$wrapData:this.$rowLengthCache;G.splice.apply(G,H);var F=this.$foldData,U=this.getFoldLine(N),W=0;if(U){var Y=U.range.compareInside(M.row,M.column);Y==0?(U=U.split(M.row,M.column),U&&(U.shiftRow($),U.addRemoveChars(L,0,I.column-M.column))):Y==-1&&(U.addRemoveChars(N,0,I.column-M.column),U.shiftRow($)),W=F.indexOf(U)+1}for(W;W=N&&U.shiftRow($)}}else{$=Math.abs(_.start.column-_.end.column),E==="remove"&&(D=this.getFoldsInRange(_),this.removeFolds(D),$=-$);var U=this.getFoldLine(N);U&&U.addRemoveChars(N,M.column,$)}return T&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,T?this.$updateWrapData(N,L):this.$updateRowLengthCache(N,L),D},R.prototype.$updateRowLengthCache=function(_,T){this.$rowLengthCache[_]=null,this.$rowLengthCache[T]=null},R.prototype.$updateWrapData=function(_,T){var E=this.doc.getAllLines(),M=this.getTabSize(),I=this.$wrapData,N=this.$wrapLimit,L,$,D=_;for(T=Math.min(T,E.length-1);D<=T;)$=this.getFoldLine(D,$),$?(L=[],$.walk((function(F,U,W,B){var H;if(F!=null){H=this.$getDisplayTokens(F,L.length),H[0]=w;for(var G=1;GT-B;){var H=N+T-B;if(_[H-1]>=S&&_[H]>=S){W(H);continue}if(_[H]==w||_[H]==k){for(H;H!=N-1&&_[H]!=w;H--);if(H>N){W(H);continue}for(H=N+T,H;H<_.length&&_[H]==k;H++);if(H==_.length)break;W(H);continue}for(var G=Math.max(H-(T-(T>>2)),N-1);H>G&&_[H]G&&_[H]G&&_[H]==x;)H--}else for(;H>G&&_[H]G){W(++H);continue}H=N+T,_[H]==b&&H--,W(H-B)}return M},R.prototype.$getDisplayTokens=function(_,T){var E=[],M;T=T||0;for(var I=0;I<_.length;I++){var N=_.charCodeAt(I);if(N==9){M=this.getScreenTabSize(E.length+T),E.push(A);for(var L=1;L39&&N<48||N>57&&N<64?E.push(x):N>=4352&&O(N)?E.push(y,b):E.push(y)}return E},R.prototype.$getStringScreenWidth=function(_,T,E){if(T==0)return[0,0];T==null&&(T=1/0),E=E||0;var M,I;for(I=0;I<_.length&&(M=_.charCodeAt(I),M==9?E+=this.getScreenTabSize(E):M>=4352&&O(M)?E+=2:E+=1,!(E>T));I++);return[E,I]},R.prototype.getRowLength=function(_){var T=1;return this.lineWidgets&&(T+=this.lineWidgets[_]&&this.lineWidgets[_].rowCount||0),!this.$useWrapMode||!this.$wrapData[_]?T:this.$wrapData[_].length+T},R.prototype.getRowLineCount=function(_){return!this.$useWrapMode||!this.$wrapData[_]?1:this.$wrapData[_].length+1},R.prototype.getRowWrapIndent=function(_){if(this.$useWrapMode){var T=this.screenToDocumentPosition(_,Number.MAX_VALUE),E=this.$wrapData[T.row];return E.length&&E[0]=0)var $=F[U],I=this.$docRowCache[U],B=_>F[W-1];else var B=!W;for(var H=this.getLength()-1,G=this.getNextFoldLine(I),Y=G?G.start.row:1/0;$<=_&&(D=this.getRowLength(I),!($+D>_||I>=H));)$+=D,I++,I>Y&&(I=G.end.row+1,G=this.getNextFoldLine(I,G),Y=G?G.start.row:1/0),B&&(this.$docRowCache.push(I),this.$screenRowCache.push($));if(G&&G.start.row<=I)M=this.getFoldDisplayLine(G),I=G.start.row;else{if($+D<=_||I>H)return{row:H,column:this.getLine(H).length};M=this.getLine(I),G=null}var X=0,Z=Math.floor(_-$);if(this.$useWrapMode){var te=this.$wrapData[I];te&&(L=te[Z],Z>0&&te.length&&(X=te.indent,N=te[Z-1]||te[te.length-1],M=M.substring(N)))}return E!==void 0&&this.$bidiHandler.isBidiRow($+Z,I,Z)&&(T=this.$bidiHandler.offsetToCol(E)),N+=this.$getStringScreenWidth(M,T-X)[1],this.$useWrapMode&&N>=L&&(N=L-1),G?G.idxToPosition(N):{row:I,column:N}},R.prototype.documentToScreenPosition=function(_,T){if(typeof T>"u")var E=this.$clipPositionToDocument(_.row,_.column);else E=this.$clipPositionToDocument(_,T);_=E.row,T=E.column;var M=0,I=null,N=null;N=this.getFoldAt(_,T,1),N&&(_=N.start.row,T=N.start.column);var L,$=0,D=this.$docRowCache,F=this.$getRowCacheIndex(D,_),U=D.length;if(U&&F>=0)var $=D[F],M=this.$screenRowCache[F],W=_>D[U-1];else var W=!U;for(var B=this.getNextFoldLine($),H=B?B.start.row:1/0;$<_;){if($>=H){if(L=B.end.row+1,L>_)break;B=this.getNextFoldLine(L,B),H=B?B.start.row:1/0}else L=$+1;M+=this.getRowLength($),$=L,W&&(this.$docRowCache.push($),this.$screenRowCache.push(M))}var G="";B&&$>=H?(G=this.getFoldDisplayLine(B,_,T),I=B.start.row):(G=this.getLine(_).substring(0,T),I=_);var Y=0;if(this.$useWrapMode){var X=this.$wrapData[I];if(X){for(var Z=0;G.length>=X[Z];)M++,Z++;G=G.substring(X[Z-1]||0,G.length),Y=Z>0?X.indent:0}}return this.lineWidgets&&this.lineWidgets[$]&&this.lineWidgets[$].rowsAbove&&(M+=this.lineWidgets[$].rowsAbove),{row:M,column:Y+this.$getStringScreenWidth(G)[0]}},R.prototype.documentToScreenColumn=function(_,T){return this.documentToScreenPosition(_,T).column},R.prototype.documentToScreenRow=function(_,T){return this.documentToScreenPosition(_,T).row},R.prototype.getScreenLength=function(){var _=0,T=null;if(this.$useWrapMode)for(var I=this.$wrapData.length,N=0,M=0,T=this.$foldData[M++],L=T?T.start.row:1/0;NL&&(N=T.end.row+1,T=this.$foldData[M++],L=T?T.start.row:1/0)}else{_=this.getLength();for(var E=this.$foldData,M=0;ME));N++);return[M,N]})},R.prototype.getPrecedingCharacter=function(){var _=this.selection.getCursor();if(_.column===0)return _.row===0?"":this.doc.getNewLineCharacter();var T=this.getLine(_.row);return T[_.column-1]},R.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},R}();v.$uid=0,v.prototype.$modes=a.$modes,v.prototype.getValue=v.prototype.toString,v.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},v.prototype.$overwrite=!1,v.prototype.$mode=null,v.prototype.$modeId=null,v.prototype.$scrollTop=0,v.prototype.$scrollLeft=0,v.prototype.$wrapLimit=80,v.prototype.$useWrapMode=!1,v.prototype.$wrapLimitRange={min:null,max:null},v.prototype.lineWidgets=null,v.prototype.isFullWidth=O,i.implement(v.prototype,u);var y=1,b=2,w=3,k=4,x=9,S=10,A=11,C=12;function O(R){return R<4352?!1:R>=4352&&R<=4447||R>=4515&&R<=4519||R>=4602&&R<=4607||R>=9001&&R<=9002||R>=11904&&R<=11929||R>=11931&&R<=12019||R>=12032&&R<=12245||R>=12272&&R<=12283||R>=12288&&R<=12350||R>=12353&&R<=12438||R>=12441&&R<=12543||R>=12549&&R<=12589||R>=12593&&R<=12686||R>=12688&&R<=12730||R>=12736&&R<=12771||R>=12784&&R<=12830||R>=12832&&R<=12871||R>=12880&&R<=13054||R>=13056&&R<=19903||R>=19968&&R<=42124||R>=42128&&R<=42182||R>=43360&&R<=43388||R>=44032&&R<=55203||R>=55216&&R<=55238||R>=55243&&R<=55291||R>=63744&&R<=64255||R>=65040&&R<=65049||R>=65072&&R<=65106||R>=65108&&R<=65126||R>=65128&&R<=65131||R>=65281&&R<=65376||R>=65504&&R<=65510}n("./edit_session/folding").Folding.call(v.prototype),n("./edit_session/bracket_match").BracketMatch.call(v.prototype),a.defineOptions(v.prototype,"session",{wrap:{set:function(R){if(!R||R=="off"?R=!1:R=="free"?R=!0:R=="printMargin"?R=-1:typeof R=="string"&&(R=parseInt(R,10)||!1),this.$wrap!=R)if(this.$wrap=R,!R)this.setUseWrapMode(!1);else{var _=typeof R=="number"?R:null;this.setWrapLimitRange(_,_),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(R){R=R=="auto"?this.$mode.type!="text":R!="text",R!=this.$wrapAsCode&&(this.$wrapAsCode=R,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(R){this.$useWorker=R,this.$stopWorker(),R&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(R){R=parseInt(R),R>0&&this.$tabSize!==R&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=R,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(R){this.setFoldStyle(R)},handlesSet:!0},overwrite:{set:function(R){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(R){this.doc.setNewLineMode(R)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(R){this.setMode(R)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=v}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,r,o){var i=n("./lib/lang"),s=n("./lib/oop"),l=n("./range").Range,a=function(){function c(){this.$options={}}return c.prototype.set=function(d){return s.mixin(this.$options,d),this},c.prototype.getOptions=function(){return i.copyObject(this.$options)},c.prototype.setOptions=function(d){this.$options=d},c.prototype.find=function(d){var h=this.$options,p=this.$matchIterator(d,h);if(!p)return!1;var f=null;return p.forEach(function(g,m,v,y){return f=new l(g,m,v,y),m==y&&h.start&&h.start.start&&h.skipCurrent!=!1&&f.isEqual(h.start)?(f=null,!1):!0}),f},c.prototype.findAll=function(d){var h=this.$options;if(!h.needle)return[];this.$assembleRegExp(h);var p=h.range,f=p?d.getLines(p.start.row,p.end.row):d.doc.getAllLines(),g=[],m=h.re;if(h.$isMultiLine){var v=m.length,y=f.length-v,b;e:for(var w=m.offset||0;w<=y;w++){for(var k=0;kA||(g.push(b=new l(w,A,w+v-1,C)),v>2&&(w=w+v-2))}}else for(var O=0;OE&&g[k].end.row==M;)k--;for(g=g.slice(O,k+1),O=0,k=g.length;O0&&(M=!!E.charAt(T-1).match(this.tokenRe)),M||(M=!!E.charAt(T).match(this.tokenRe)),M)var I=this.tokenRe;else if(/^\s+$/.test(E.slice(T-1,T+1)))var I=/\s/;else var I=this.nonTokenRe;var N=T;if(N>0){do N--;while(N>=0&&E.charAt(N).match(I));N++}for(var L=T;L_&&(_=T.screenWidth)}),this.lineWidgetWidth=_},R.prototype.$computeWidth=function(_){if(this.$modified||_){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var T=this.doc.getAllLines(),E=this.$rowLengthCache,M=0,I=0,N=this.$foldData[I],L=N?N.start.row:1/0,$=T.length,P=0;P<$;P++){if(P>L){if(P=N.end.row+1,P>=$)break;N=this.$foldData[I++],L=N?N.start.row:1/0}E[P]==null&&(E[P]=this.$getStringScreenWidth(T[P])[0]),E[P]>M&&(M=E[P])}this.screenWidth=M}},R.prototype.getLine=function(_){return this.doc.getLine(_)},R.prototype.getLines=function(_,T){return this.doc.getLines(_,T)},R.prototype.getLength=function(){return this.doc.getLength()},R.prototype.getTextRange=function(_){return this.doc.getTextRange(_||this.selection.getRange())},R.prototype.insert=function(_,T){return this.doc.insert(_,T)},R.prototype.remove=function(_){return this.doc.remove(_)},R.prototype.removeFullLines=function(_,T){return this.doc.removeFullLines(_,T)},R.prototype.undoChanges=function(_,T){if(_.length){this.$fromUndo=!0;for(var E=_.length-1;E!=-1;E--){var M=_[E];M.action=="insert"||M.action=="remove"?this.doc.revertDelta(M):M.folds&&this.addFolds(M.folds)}!T&&this.$undoSelect&&(_.selectionBefore?this.selection.fromJSON(_.selectionBefore):this.selection.setRange(this.$getUndoSelection(_,!0))),this.$fromUndo=!1}},R.prototype.redoChanges=function(_,T){if(_.length){this.$fromUndo=!0;for(var E=0;E<_.length;E++){var M=_[E];(M.action=="insert"||M.action=="remove")&&this.doc.$safeApplyDelta(M)}!T&&this.$undoSelect&&(_.selectionAfter?this.selection.fromJSON(_.selectionAfter):this.selection.setRange(this.$getUndoSelection(_,!1))),this.$fromUndo=!1}},R.prototype.setUndoSelect=function(_){this.$undoSelect=_},R.prototype.$getUndoSelection=function(_,T){function E($){return T?$.action!=="insert":$.action==="insert"}for(var M,I,N=0;N<_.length;N++){var L=_[N];if(L.start){if(!M){E(L)?M=h.fromPoints(L.start,L.end):M=h.fromPoints(L.start,L.start);continue}E(L)?(I=L.start,M.compare(I.row,I.column)==-1&&M.setStart(I),I=L.end,M.compare(I.row,I.column)==1&&M.setEnd(I)):(I=L.start,M.compare(I.row,I.column)==-1&&(M=h.fromPoints(L.start,L.start)))}}return M},R.prototype.replace=function(_,T){return this.doc.replace(_,T)},R.prototype.moveText=function(_,T,E){var M=this.getTextRange(_),I=this.getFoldsInRange(_),N=h.fromPoints(T,T);if(!E){this.remove(_);var L=_.start.row-_.end.row,$=L?-_.end.column:_.start.column-_.end.column;$&&(N.start.row==_.end.row&&N.start.column>_.end.column&&(N.start.column+=$),N.end.row==_.end.row&&N.end.column>_.end.column&&(N.end.column+=$)),L&&N.start.row>=_.end.row&&(N.start.row+=L,N.end.row+=L)}if(N.end=this.insert(N.start,M),I.length){var P=_.start,F=N.start,L=F.row-P.row,$=F.column-P.column;this.addFolds(I.map(function(B){return B=B.clone(),B.start.row==P.row&&(B.start.column+=$),B.end.row==P.row&&(B.end.column+=$),B.start.row+=L,B.end.row+=L,B}))}return N},R.prototype.indentRows=function(_,T,E){E=E.replace(/\t/g,this.getTabString());for(var M=_;M<=T;M++)this.doc.insertInLine({row:M,column:0},E)},R.prototype.outdentRows=function(_){for(var T=_.collapseRows(),E=new h(0,0,0,0),M=this.getTabSize(),I=T.start.row;I<=T.end.row;++I){var N=this.getLine(I);E.start.row=I,E.end.row=I;for(var L=0;L0){var M=this.getRowFoldEnd(T+E);if(M>this.doc.getLength()-1)return 0;var I=M-T}else{_=this.$clipRowToDocument(_),T=this.$clipRowToDocument(T);var I=T-_+1}var N=new h(_,0,T,Number.MAX_VALUE),L=this.getFoldsInRange(N).map(function(P){return P=P.clone(),P.start.row+=I,P.end.row+=I,P}),$=E==0?this.doc.getLines(_,T):this.doc.removeFullLines(_,T);return this.doc.insertFullLines(_+I,$),L.length&&this.addFolds(L),I},R.prototype.moveLinesUp=function(_,T){return this.$moveLines(_,T,-1)},R.prototype.moveLinesDown=function(_,T){return this.$moveLines(_,T,1)},R.prototype.duplicateLines=function(_,T){return this.$moveLines(_,T,0)},R.prototype.$clipRowToDocument=function(_){return Math.max(0,Math.min(_,this.doc.getLength()-1))},R.prototype.$clipColumnToRow=function(_,T){return T<0?0:Math.min(this.doc.getLine(_).length,T)},R.prototype.$clipPositionToDocument=function(_,T){if(T=Math.max(0,T),_<0)_=0,T=0;else{var E=this.doc.getLength();_>=E?(_=E-1,T=this.doc.getLine(E-1).length):T=Math.min(this.doc.getLine(_).length,T)}return{row:_,column:T}},R.prototype.$clipRangeToDocument=function(_){_.start.row<0?(_.start.row=0,_.start.column=0):_.start.column=this.$clipColumnToRow(_.start.row,_.start.column);var T=this.doc.getLength()-1;return _.end.row>T?(_.end.row=T,_.end.column=this.doc.getLine(T).length):_.end.column=this.$clipColumnToRow(_.end.row,_.end.column),_},R.prototype.setUseWrapMode=function(_){if(_!=this.$useWrapMode){if(this.$useWrapMode=_,this.$modified=!0,this.$resetRowCache(0),_){var T=this.getLength();this.$wrapData=Array(T),this.$updateWrapData(0,T-1)}this._signal("changeWrapMode")}},R.prototype.getUseWrapMode=function(){return this.$useWrapMode},R.prototype.setWrapLimitRange=function(_,T){(this.$wrapLimitRange.min!==_||this.$wrapLimitRange.max!==T)&&(this.$wrapLimitRange={min:_,max:T},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},R.prototype.adjustWrapLimit=function(_,T){var E=this.$wrapLimitRange;E.max<0&&(E={min:T,max:T});var M=this.$constrainWrapLimit(_,E.min,E.max);return M!=this.$wrapLimit&&M>1?(this.$wrapLimit=M,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},R.prototype.$constrainWrapLimit=function(_,T,E){return T&&(_=Math.max(T,_)),E&&(_=Math.min(E,_)),_},R.prototype.getWrapLimit=function(){return this.$wrapLimit},R.prototype.setWrapLimit=function(_){this.setWrapLimitRange(_,_)},R.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},R.prototype.$updateInternalDataOnChange=function(_){var T=this.$useWrapMode,E=_.action,M=_.start,I=_.end,N=M.row,L=I.row,$=L-N,P=null;if(this.$updating=!0,$!=0)if(E==="remove"){this[T?"$wrapData":"$rowLengthCache"].splice(N,$);var F=this.$foldData;P=this.getFoldsInRange(_),this.removeFolds(P);var H=this.getFoldLine(I.row),W=0;if(H){H.addRemoveChars(I.row,I.column,M.column-I.column),H.shiftRow(-$);var B=this.getFoldLine(N);B&&B!==H&&(B.merge(H),H=B),W=F.indexOf(H)+1}for(W;W=I.row&&H.shiftRow(-$)}L=N}else{var U=Array($);U.unshift(N,0);var G=T?this.$wrapData:this.$rowLengthCache;G.splice.apply(G,U);var F=this.$foldData,H=this.getFoldLine(N),W=0;if(H){var Y=H.range.compareInside(M.row,M.column);Y==0?(H=H.split(M.row,M.column),H&&(H.shiftRow($),H.addRemoveChars(L,0,I.column-M.column))):Y==-1&&(H.addRemoveChars(N,0,I.column-M.column),H.shiftRow($)),W=F.indexOf(H)+1}for(W;W=N&&H.shiftRow($)}}else{$=Math.abs(_.start.column-_.end.column),E==="remove"&&(P=this.getFoldsInRange(_),this.removeFolds(P),$=-$);var H=this.getFoldLine(N);H&&H.addRemoveChars(N,M.column,$)}return T&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,T?this.$updateWrapData(N,L):this.$updateRowLengthCache(N,L),P},R.prototype.$updateRowLengthCache=function(_,T){this.$rowLengthCache[_]=null,this.$rowLengthCache[T]=null},R.prototype.$updateWrapData=function(_,T){var E=this.doc.getAllLines(),M=this.getTabSize(),I=this.$wrapData,N=this.$wrapLimit,L,$,P=_;for(T=Math.min(T,E.length-1);P<=T;)$=this.getFoldLine(P,$),$?(L=[],$.walk((function(F,H,W,B){var U;if(F!=null){U=this.$getDisplayTokens(F,L.length),U[0]=w;for(var G=1;GT-B;){var U=N+T-B;if(_[U-1]>=S&&_[U]>=S){W(U);continue}if(_[U]==w||_[U]==k){for(U;U!=N-1&&_[U]!=w;U--);if(U>N){W(U);continue}for(U=N+T,U;U<_.length&&_[U]==k;U++);if(U==_.length)break;W(U);continue}for(var G=Math.max(U-(T-(T>>2)),N-1);U>G&&_[U]G&&_[U]G&&_[U]==x;)U--}else for(;U>G&&_[U]G){W(++U);continue}U=N+T,_[U]==b&&U--,W(U-B)}return M},R.prototype.$getDisplayTokens=function(_,T){var E=[],M;T=T||0;for(var I=0;I<_.length;I++){var N=_.charCodeAt(I);if(N==9){M=this.getScreenTabSize(E.length+T),E.push(A);for(var L=1;L39&&N<48||N>57&&N<64?E.push(x):N>=4352&&O(N)?E.push(y,b):E.push(y)}return E},R.prototype.$getStringScreenWidth=function(_,T,E){if(T==0)return[0,0];T==null&&(T=1/0),E=E||0;var M,I;for(I=0;I<_.length&&(M=_.charCodeAt(I),M==9?E+=this.getScreenTabSize(E):M>=4352&&O(M)?E+=2:E+=1,!(E>T));I++);return[E,I]},R.prototype.getRowLength=function(_){var T=1;return this.lineWidgets&&(T+=this.lineWidgets[_]&&this.lineWidgets[_].rowCount||0),!this.$useWrapMode||!this.$wrapData[_]?T:this.$wrapData[_].length+T},R.prototype.getRowLineCount=function(_){return!this.$useWrapMode||!this.$wrapData[_]?1:this.$wrapData[_].length+1},R.prototype.getRowWrapIndent=function(_){if(this.$useWrapMode){var T=this.screenToDocumentPosition(_,Number.MAX_VALUE),E=this.$wrapData[T.row];return E.length&&E[0]=0)var $=F[H],I=this.$docRowCache[H],B=_>F[W-1];else var B=!W;for(var U=this.getLength()-1,G=this.getNextFoldLine(I),Y=G?G.start.row:1/0;$<=_&&(P=this.getRowLength(I),!($+P>_||I>=U));)$+=P,I++,I>Y&&(I=G.end.row+1,G=this.getNextFoldLine(I,G),Y=G?G.start.row:1/0),B&&(this.$docRowCache.push(I),this.$screenRowCache.push($));if(G&&G.start.row<=I)M=this.getFoldDisplayLine(G),I=G.start.row;else{if($+P<=_||I>U)return{row:U,column:this.getLine(U).length};M=this.getLine(I),G=null}var X=0,Z=Math.floor(_-$);if(this.$useWrapMode){var te=this.$wrapData[I];te&&(L=te[Z],Z>0&&te.length&&(X=te.indent,N=te[Z-1]||te[te.length-1],M=M.substring(N)))}return E!==void 0&&this.$bidiHandler.isBidiRow($+Z,I,Z)&&(T=this.$bidiHandler.offsetToCol(E)),N+=this.$getStringScreenWidth(M,T-X)[1],this.$useWrapMode&&N>=L&&(N=L-1),G?G.idxToPosition(N):{row:I,column:N}},R.prototype.documentToScreenPosition=function(_,T){if(typeof T>"u")var E=this.$clipPositionToDocument(_.row,_.column);else E=this.$clipPositionToDocument(_,T);_=E.row,T=E.column;var M=0,I=null,N=null;N=this.getFoldAt(_,T,1),N&&(_=N.start.row,T=N.start.column);var L,$=0,P=this.$docRowCache,F=this.$getRowCacheIndex(P,_),H=P.length;if(H&&F>=0)var $=P[F],M=this.$screenRowCache[F],W=_>P[H-1];else var W=!H;for(var B=this.getNextFoldLine($),U=B?B.start.row:1/0;$<_;){if($>=U){if(L=B.end.row+1,L>_)break;B=this.getNextFoldLine(L,B),U=B?B.start.row:1/0}else L=$+1;M+=this.getRowLength($),$=L,W&&(this.$docRowCache.push($),this.$screenRowCache.push(M))}var G="";B&&$>=U?(G=this.getFoldDisplayLine(B,_,T),I=B.start.row):(G=this.getLine(_).substring(0,T),I=_);var Y=0;if(this.$useWrapMode){var X=this.$wrapData[I];if(X){for(var Z=0;G.length>=X[Z];)M++,Z++;G=G.substring(X[Z-1]||0,G.length),Y=Z>0?X.indent:0}}return this.lineWidgets&&this.lineWidgets[$]&&this.lineWidgets[$].rowsAbove&&(M+=this.lineWidgets[$].rowsAbove),{row:M,column:Y+this.$getStringScreenWidth(G)[0]}},R.prototype.documentToScreenColumn=function(_,T){return this.documentToScreenPosition(_,T).column},R.prototype.documentToScreenRow=function(_,T){return this.documentToScreenPosition(_,T).row},R.prototype.getScreenLength=function(){var _=0,T=null;if(this.$useWrapMode)for(var I=this.$wrapData.length,N=0,M=0,T=this.$foldData[M++],L=T?T.start.row:1/0;NL&&(N=T.end.row+1,T=this.$foldData[M++],L=T?T.start.row:1/0)}else{_=this.getLength();for(var E=this.$foldData,M=0;ME));N++);return[M,N]})},R.prototype.getPrecedingCharacter=function(){var _=this.selection.getCursor();if(_.column===0)return _.row===0?"":this.doc.getNewLineCharacter();var T=this.getLine(_.row);return T[_.column-1]},R.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},R}();v.$uid=0,v.prototype.$modes=a.$modes,v.prototype.getValue=v.prototype.toString,v.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},v.prototype.$overwrite=!1,v.prototype.$mode=null,v.prototype.$modeId=null,v.prototype.$scrollTop=0,v.prototype.$scrollLeft=0,v.prototype.$wrapLimit=80,v.prototype.$useWrapMode=!1,v.prototype.$wrapLimitRange={min:null,max:null},v.prototype.lineWidgets=null,v.prototype.isFullWidth=O,i.implement(v.prototype,u);var y=1,b=2,w=3,k=4,x=9,S=10,A=11,C=12;function O(R){return R<4352?!1:R>=4352&&R<=4447||R>=4515&&R<=4519||R>=4602&&R<=4607||R>=9001&&R<=9002||R>=11904&&R<=11929||R>=11931&&R<=12019||R>=12032&&R<=12245||R>=12272&&R<=12283||R>=12288&&R<=12350||R>=12353&&R<=12438||R>=12441&&R<=12543||R>=12549&&R<=12589||R>=12593&&R<=12686||R>=12688&&R<=12730||R>=12736&&R<=12771||R>=12784&&R<=12830||R>=12832&&R<=12871||R>=12880&&R<=13054||R>=13056&&R<=19903||R>=19968&&R<=42124||R>=42128&&R<=42182||R>=43360&&R<=43388||R>=44032&&R<=55203||R>=55216&&R<=55238||R>=55243&&R<=55291||R>=63744&&R<=64255||R>=65040&&R<=65049||R>=65072&&R<=65106||R>=65108&&R<=65126||R>=65128&&R<=65131||R>=65281&&R<=65376||R>=65504&&R<=65510}n("./edit_session/folding").Folding.call(v.prototype),n("./edit_session/bracket_match").BracketMatch.call(v.prototype),a.defineOptions(v.prototype,"session",{wrap:{set:function(R){if(!R||R=="off"?R=!1:R=="free"?R=!0:R=="printMargin"?R=-1:typeof R=="string"&&(R=parseInt(R,10)||!1),this.$wrap!=R)if(this.$wrap=R,!R)this.setUseWrapMode(!1);else{var _=typeof R=="number"?R:null;this.setWrapLimitRange(_,_),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(R){R=R=="auto"?this.$mode.type!="text":R!="text",R!=this.$wrapAsCode&&(this.$wrapAsCode=R,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(R){this.$useWorker=R,this.$stopWorker(),R&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(R){R=parseInt(R),R>0&&this.$tabSize!==R&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=R,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(R){this.setFoldStyle(R)},handlesSet:!0},overwrite:{set:function(R){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(R){this.doc.setNewLineMode(R)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(R){this.setMode(R)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=v}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,r,o){var i=n("./lib/lang"),s=n("./lib/oop"),l=n("./range").Range,a=function(){function c(){this.$options={}}return c.prototype.set=function(d){return s.mixin(this.$options,d),this},c.prototype.getOptions=function(){return i.copyObject(this.$options)},c.prototype.setOptions=function(d){this.$options=d},c.prototype.find=function(d){var h=this.$options,p=this.$matchIterator(d,h);if(!p)return!1;var f=null;return p.forEach(function(g,m,v,y){return f=new l(g,m,v,y),m==y&&h.start&&h.start.start&&h.skipCurrent!=!1&&f.isEqual(h.start)?(f=null,!1):!0}),f},c.prototype.findAll=function(d){var h=this.$options;if(!h.needle)return[];this.$assembleRegExp(h);var p=h.range,f=p?d.getLines(p.start.row,p.end.row):d.doc.getAllLines(),g=[],m=h.re;if(h.$isMultiLine){var v=m.length,y=f.length-v,b;e:for(var w=m.offset||0;w<=y;w++){for(var k=0;kA||(g.push(b=new l(w,A,w+v-1,C)),v>2&&(w=w+v-2))}}else for(var O=0;OE&&g[k].end.row==M;)k--;for(g=g.slice(O,k+1),O=0,k=g.length;O=b;C--)if(S(C,Number.MAX_VALUE,A))return;if(h.wrap!=!1){for(C=w,b=y.row;C>=b;C--)if(S(C,Number.MAX_VALUE,A))return}}};else var k=function(C){var O=y.row;if(!S(O,y.column,C)){for(O=O+1;O<=w;O++)if(S(O,0,C))return;if(h.wrap!=!1){for(O=b,w=y.row;O<=w;O++)if(S(O,0,C))return}}};if(h.$isMultiLine)var x=p.length,S=function(A,C,O){var R=f?A-x+1:A;if(!(R<0||R+x>d.getLength())){var _=d.getLine(R),T=_.search(p[0]);if(!(!f&&TC)&&O(R,T,R+x-1,M))return!0}}};else if(f)var S=function(C,O,R){var _=d.getLine(C),T=[],E,M=0;for(p.lastIndex=0;E=p.exec(_);){var I=E[0].length;if(M=E.index,!I){if(M>=_.length)break;p.lastIndex=M+=i.skipEmptyMatch(_,M,m)}if(E.index+I>O)break;T.push(E.index,I)}for(var N=T.length-1;N>=0;N-=2){var L=T[N-1],I=T[N];if(R(C,L,C,L+I))return!0}};else var S=function(C,O,R){var _=d.getLine(C),T,E;for(p.lastIndex=O;E=p.exec(_);){var M=E[0].length;if(T=E.index,R(C,T,C,T+M))return!0;if(!M&&(p.lastIndex=T+=i.skipEmptyMatch(_,T,m),T>=_.length))return!1}};return{forEach:k}},c}();function u(c,d){var h=i.supportsLookbehind();function p(v,y){y===void 0&&(y=!0);var b=h&&d.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return b.test(v)||d.regExp?h&&d.$supportsUnicodeFlag?y?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var f=Array.from(c),g=f[0],m=f[f.length-1];return p(g)+c+p(m,!1)}r.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,o){var i=this&&this.__extends||function(){var h=function(p,f){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,m){g.__proto__=m}||function(g,m){for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(g[v]=m[v])},h(p,f)};return function(p,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");h(p,f);function g(){this.constructor=p}p.prototype=f===null?Object.create(f):(g.prototype=f.prototype,new g)}}(),s=n("../lib/keys"),l=n("../lib/useragent"),a=s.KEY_MODS,u=function(){function h(p,f){this.$init(p,f,!1)}return h.prototype.$init=function(p,f,g){this.platform=f||(l.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(p),this.$singleCommand=g},h.prototype.addCommand=function(p){this.commands[p.name]&&this.removeCommand(p),this.commands[p.name]=p,p.bindKey&&this._buildKeyHash(p)},h.prototype.removeCommand=function(p,f){var g=p&&(typeof p=="string"?p:p.name);p=this.commands[g],f||delete this.commands[g];var m=this.commandKeyBinding;for(var v in m){var y=m[v];if(y==p)delete m[v];else if(Array.isArray(y)){var b=y.indexOf(p);b!=-1&&(y.splice(b,1),y.length==1&&(m[v]=y[0]))}}},h.prototype.bindKey=function(p,f,g){if(typeof p=="object"&&p&&(g==null&&(g=p.position),p=p[this.platform]),!!p){if(typeof f=="function")return this.addCommand({exec:f,bindKey:p,name:f.name||p});p.split("|").forEach(function(m){var v="";if(m.indexOf(" ")!=-1){var y=m.split(/\s+/);m=y.pop(),y.forEach(function(k){var x=this.parseKeys(k),S=a[x.hashId]+x.key;v+=(v?" ":"")+S,this._addCommandToBinding(v,"chainKeys")},this),v+=" "}var b=this.parseKeys(m),w=a[b.hashId]+b.key;this._addCommandToBinding(v+w,f,g)},this)}},h.prototype._addCommandToBinding=function(p,f,g){var m=this.commandKeyBinding,v;if(!f)delete m[p];else if(!m[p]||this.$singleCommand)m[p]=f;else{Array.isArray(m[p])?(v=m[p].indexOf(f))!=-1&&m[p].splice(v,1):m[p]=[m[p]],typeof g!="number"&&(g=c(f));var y=m[p];for(v=0;vg)break}y.splice(v,0,f)}},h.prototype.addCommands=function(p){p&&Object.keys(p).forEach(function(f){var g=p[f];if(g){if(typeof g=="string")return this.bindKey(g,f);typeof g=="function"&&(g={exec:g}),typeof g=="object"&&(g.name||(g.name=f),this.addCommand(g))}},this)},h.prototype.removeCommands=function(p){Object.keys(p).forEach(function(f){this.removeCommand(p[f])},this)},h.prototype.bindKeys=function(p){Object.keys(p).forEach(function(f){this.bindKey(f,p[f])},this)},h.prototype._buildKeyHash=function(p){this.bindKey(p.bindKey,p)},h.prototype.parseKeys=function(p){var f=p.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(w){return w}),g=f.pop(),m=s[g];if(s.FUNCTION_KEYS[m])g=s.FUNCTION_KEYS[m].toLowerCase();else if(f.length){if(f.length==1&&f[0]=="shift")return{key:g.toUpperCase(),hashId:-1}}else return{key:g,hashId:-1};for(var v=0,y=f.length;y--;){var b=s.KEY_MODS[f[y]];if(b==null)return typeof console<"u"&&console.error("invalid modifier "+f[y]+" in "+p),!1;v|=b}return{key:g,hashId:v}},h.prototype.findKeyCommand=function(p,f){var g=a[p]+f;return this.commandKeyBinding[g]},h.prototype.handleKeyboard=function(p,f,g,m){if(!(m<0)){var v=a[f]+g,y=this.commandKeyBinding[v];return p.$keyChain&&(p.$keyChain+=" "+v,y=this.commandKeyBinding[p.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(p.$keyChain=p.$keyChain||v,{command:"null"}):(p.$keyChain&&((!f||f==4)&&g.length==1?p.$keyChain=p.$keyChain.slice(0,-v.length-1):(f==-1||m>0)&&(p.$keyChain="")),{command:y})}},h.prototype.getStatusText=function(p,f){return f.$keyChain||""},h}();function c(h){return typeof h=="object"&&h.bindKey&&h.bindKey.position||(h.isDefault?-100:0)}var d=function(h){i(p,h);function p(f,g){var m=h.call(this,f,g)||this;return m.$singleCommand=!0,m}return p}(u);d.call=function(h,p,f){u.prototype.$init.call(h,p,f,!0)},u.call=function(h,p,f){u.prototype.$init.call(h,p,f,!1)},r.HashHandler=d,r.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,r,o){var i=this&&this.__extends||function(){var c=function(d,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,f){p.__proto__=f}||function(p,f){for(var g in f)Object.prototype.hasOwnProperty.call(f,g)&&(p[g]=f[g])},c(d,h)};return function(d,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");c(d,h);function p(){this.constructor=d}d.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}}(),s=n("../lib/oop"),l=n("../keyboard/hash_handler").MultiHashHandler,a=n("../lib/event_emitter").EventEmitter,u=function(c){i(d,c);function d(h,p){var f=c.call(this,p,h)||this;return f.byName=f.commands,f.setDefaultHandler("exec",function(g){return g.args?g.command.exec(g.editor,g.args,g.event,!1):g.command.exec(g.editor,{},g.event,!0)}),f}return d.prototype.exec=function(h,p,f){if(Array.isArray(h)){for(var g=h.length;g--;)if(this.exec(h[g],p,f))return!0;return!1}if(typeof h=="string"&&(h=this.commands[h]),!h||p&&p.$readOnly&&!h.readOnly||this.$checkCommandState!=!1&&h.isAvailable&&!h.isAvailable(p))return!1;var m={editor:p,command:h,args:f};return m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1},d.prototype.toggleRecording=function(h){if(!this.$inReplay)return h&&h._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(p){this.macro.push([p.command,p.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},d.prototype.replay=function(h){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(h);try{this.$inReplay=!0,this.macro.forEach(function(p){typeof p=="string"?this.exec(p,h):this.exec(p[0],h,p[1])},this)}finally{this.$inReplay=!1}}},d.prototype.trimMacro=function(h){return h.map(function(p){return typeof p[0]!="string"&&(p[0]=p[0].name),p[1]||(p=p[0]),p})},d}(l);s.implement(u.prototype,a),r.CommandManager=u}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,r,o){var i=n("../lib/lang"),s=n("../config"),l=n("../range").Range;function a(c,d){return{win:c,mac:d}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(c){s.loadModule("ace/ext/settings_menu",function(d){d.init(c),c.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(c){s.loadModule("ace/ext/error_marker",function(d){d.showErrorMarker(c,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(c){s.loadModule("ace/ext/error_marker",function(d){d.showErrorMarker(c,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(c){c.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(c){c.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(c,d){typeof d=="number"&&!isNaN(d)&&c.gotoLine(d),c.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(c){c.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(c){c.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(c){c.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(c){c.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(c){c.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(c){c.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(c){c.session.foldAll(),c.session.unfold(c.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(c){c.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(c){c.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(c){c.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(c){s.loadModule("ace/ext/searchbox",function(d){d.Search(c)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(c){c.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(c){c.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(c){c.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(c){c.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(c,d){c.navigateUp(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(c){c.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(c){c.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(c){c.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(c,d){c.navigateDown(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(c){c.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(c){c.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(c){c.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(c){c.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(c,d){c.navigateLeft(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(c){c.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(c){c.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(c){c.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(c){c.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(c,d){c.navigateRight(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(c){c.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(c){c.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(c){c.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(c){c.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(c){c.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(c){c.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(c){c.renderer.scrollBy(0,-2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(c){c.renderer.scrollBy(0,2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(c){c.commands.toggleRecording(c)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(c){c.commands.replay(c)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(c){c.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(c){c.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(c){c.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(c){},readOnly:!0},{name:"cut",description:"Cut",exec:function(c){var d=c.$copyWithEmptySelection&&c.selection.isEmpty(),h=d?c.selection.getLineRange():c.selection.getRange();c._emit("cut",h),h.isEmpty()||c.session.remove(h),c.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(c,d){c.$handlePaste(d)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(c){c.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(c){c.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(c){c.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(c){c.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(c){c.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(c){c.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(c){c.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(c){s.loadModule("ace/ext/searchbox",function(d){d.Search(c,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(c){c.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(c){c.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(c){c.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(c){c.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(c){c.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(c){c.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(c){c.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(c){c.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(c){if(c.selection.isEmpty())c.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(c){c.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(c){c.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(c){var d=c.selection.getRange();d.start.column=0,c.session.remove(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(c){var d=c.selection.getRange();d.end.column=Number.MAX_VALUE,c.session.remove(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(c){c.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(c){c.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(c){c.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(c){c.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(c){c.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(c){c.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(c,d){c.insert(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(c,d){c.insert(i.stringRepeat(d.text||"",d.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(c){c.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(c){c.transposeLetters()},multiSelectAction:function(c){c.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(c){c.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(c){c.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(c){c.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(c){var d=c.selection.getRange();d.start.column=d.end.column=0,d.end.row++,c.selection.setRange(d,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(c){c.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(c){for(var d=c.selection.isBackwards(),h=d?c.selection.getSelectionLead():c.selection.getSelectionAnchor(),p=d?c.selection.getSelectionAnchor():c.selection.getSelectionLead(),f=c.session.doc.getLine(h.row).length,g=c.session.doc.getTextRange(c.selection.getRange()),m=g.replace(/\n\s*/," ").length,v=c.session.doc.getLine(h.row),y=h.row+1;y<=p.row+1;y++){var b=i.stringTrimLeft(i.stringTrimRight(c.session.doc.getLine(y)));b.length!==0&&(b=" "+b),v+=b}p.row+10?(c.selection.moveCursorTo(h.row,h.column),c.selection.selectTo(h.row,h.column+m)):(f=c.session.doc.getLine(h.row).length>f?f+1:f,c.selection.moveCursorTo(h.row,f))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(c){var d=c.session.doc.getLength()-1,h=c.session.doc.getLine(d).length,p=c.selection.rangeList.ranges,f=[];p.length<1&&(p=[c.selection.getRange()]);for(var g=0;gu[c].column&&c++,p.unshift(c,0),u.splice.apply(u,p),this.$updateRows()}}},l.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var u=!0;a.forEach(function(c,d){if(c)for(u=!1,c.row=d;c.$oldWidget;)c.$oldWidget.row=d,c=c.$oldWidget}),u&&(this.session.lineWidgets=null)}},l.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[a.row];return u&&(a.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},l.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var u=this.editor.renderer;a.html&&!a.el&&(a.el=i.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=i.createElement("div"),a.el.textContent=a.text),a.el&&(i.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&i.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",u.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/u.layerConfig.lineHeight);var c=this.session.getFoldAt(a.row,0);if(a.$fold=c,c){var d=this.session.lineWidgets;a.row==c.end.row&&!d[c.start.row]?d[c.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(a),a},l.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[a.row];if(u==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;u;){if(u.$oldWidget==a){u.$oldWidget=a.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},l.prototype.getWidgetsAtRow=function(a){for(var u=this.session.lineWidgets,c=u&&u[a],d=[];c;)d.push(c),c=c.$oldWidget;return d},l.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},l.prototype.measureWidgets=function(a,u){var c=this.session._changedWidgets,d=u.layerConfig;if(!(!c||!c.length)){for(var h=1/0,p=0;p0&&!d[h];)h--;this.firstRow=c.firstRow,this.lastRow=c.lastRow,u.$cursorLayer.config=c;for(var f=h;f<=p;f++){var g=d[f];if(!(!g||!g.el)){if(g.hidden){g.el.style.top=-100-(g.pixelHeight||0)+"px";continue}g._inDocument||(g._inDocument=!0,u.container.appendChild(g.el));var m=u.$cursorLayer.getPixelPosition({row:f,column:0},!0).top;g.coverLine||(m+=c.lineHeight*this.session.getRowLineCount(g.row)),g.el.style.top=m-c.offset+"px";var v=g.coverGutter?0:u.gutterWidth;g.fixedWidth||(v-=u.scrollLeft),g.el.style.left=v+"px",g.fullWidth&&g.screenWidth&&(g.el.style.minWidth=c.width+2*c.padding+"px"),g.fixedWidth?g.el.style.right=u.scrollBar.getWidth()+"px":g.el.style.right=""}}}},l}();r.LineWidgets=s}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,r,o){var i=n("../lib/keys"),s=n("../mouse/default_gutter_handler").GutterTooltip,l=function(){function u(c){this.editor=c,this.gutterLayer=c.renderer.$gutterLayer,this.element=c.renderer.$gutter,this.lines=c.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new s(this.editor)}return u.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},u.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},u.prototype.$onGutterKeyDown=function(c){if(this.annotationTooltip.isOpen){c.preventDefault(),c.keyCode===i.escape&&this.annotationTooltip.hideTooltip();return}if(c.target===this.element){if(c.keyCode!=i.enter)return;c.preventDefault();var d=this.editor.getCursorPosition().row;this.editor.isRowVisible(d)||this.editor.scrollToLine(d,!0,!0),setTimeout((function(){var h=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),p=this.$findNearestFoldWidget(h),f=this.$findNearestAnnotation(h);if(!(p===null&&f===null)){if(p===null&&f!==null){this.activeRowIndex=f,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(p!==null&&f===null){this.activeRowIndex=p,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(f-h)0||c+d=0&&this.$isFoldWidgetVisible(c-d))return c-d;if(c+d<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(c+d))return c+d}return null},u.prototype.$findNearestAnnotation=function(c){if(this.$isAnnotationVisible(c))return c;for(var d=0;c-d>0||c+d=0&&this.$isAnnotationVisible(c-d))return c-d;if(c+d<=this.lines.getLength()-1&&this.$isAnnotationVisible(c+d))return c+d}return null},u.prototype.$focusFoldWidget=function(c){if(c!=null){var d=this.$getFoldWidget(c);d.classList.add(this.editor.renderer.keyboardFocusClassName),d.focus()}},u.prototype.$focusAnnotation=function(c){if(c!=null){var d=this.$getAnnotation(c);d.classList.add(this.editor.renderer.keyboardFocusClassName),d.focus()}},u.prototype.$blurFoldWidget=function(c){var d=this.$getFoldWidget(c);d.classList.remove(this.editor.renderer.keyboardFocusClassName),d.blur()},u.prototype.$blurAnnotation=function(c){var d=this.$getAnnotation(c);d.classList.remove(this.editor.renderer.keyboardFocusClassName),d.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isFoldWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var c=this.activeRowIndex;c0;)if(c--,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var c=this.activeRowIndex;c=T.length&&(T=void 0),{value:T&&T[I++],done:!T}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")},s=n("./lib/oop"),l=n("./lib/dom"),a=n("./lib/lang"),u=n("./lib/useragent"),c=n("./keyboard/textinput").TextInput,d=n("./mouse/mouse_handler").MouseHandler,h=n("./mouse/fold_handler").FoldHandler,p=n("./keyboard/keybinding").KeyBinding,f=n("./edit_session").EditSession,g=n("./search").Search,m=n("./range").Range,v=n("./lib/event_emitter").EventEmitter,y=n("./commands/command_manager").CommandManager,b=n("./commands/default_commands").commands,w=n("./config"),k=n("./token_iterator").TokenIterator,x=n("./line_widgets").LineWidgets,S=n("./keyboard/gutter_handler").GutterKeyboardHandler,A=n("./config").nls,C=n("./clipboard"),O=n("./lib/keys"),R=function(){function T(E,M,I){this.session,this.$toDestroy=[];var N=E.getContainerElement();this.container=N,this.renderer=E,this.id="editor"+ ++T.$uid,this.commands=new y(u.isMac?"mac":"win",b),typeof document=="object"&&(this.textInput=new c(E.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new d(this),new h(this)),this.keyBinding=new p(this),this.$search=new g().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(L,$){$._$emitInputEvent.schedule(31)}),this.setSession(M||I&&I.session||new f("")),w.resetOptions(this),I&&this.setOptions(I),w._signal("editor",this)}return T.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.delayedCall(this.endOperation.bind(this,!0)),this.on("change",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}).bind(this),!0),this.on("changeSelection",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}).bind(this),!0)},T.prototype.startOperation=function(E){if(this.curOp){if(!E||this.curOp.command)return;this.prevOp=this.curOp}E||(this.previousCommand=null,E={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:E.command||{},args:E.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},T.prototype.endOperation=function(E){if(this.curOp&&this.session){if(E&&E.returnValue===!1||!this.session)return this.curOp=null;if(E==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var M=this.curOp.command,I=M&&M.scrollIntoView;if(I){switch(I){case"center-animate":I="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var N=this.selection.getRange(),L=this.renderer.layerConfig;(N.start.row>=L.lastRow||N.end.row<=L.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}I=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var $=this.selection.toJSON();this.curOp.selectionAfter=$,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection($),this.prevOp=this.curOp,this.curOp=null}},T.prototype.$historyTracker=function(E){if(this.$mergeUndoDeltas){var M=this.prevOp,I=this.$mergeableCommands,N=M.command&&E.command.name==M.command.name;if(E.command.name=="insertstring"){var L=E.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),N=N&&this.mergeNextCommand&&(!/\s/.test(L)||/\s/.test(M.args)),this.mergeNextCommand=!0}else N=N&&I.indexOf(E.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(N=!1),N?this.session.mergeUndoDeltas=!0:I.indexOf(E.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},T.prototype.setKeyboardHandler=function(E,M){if(E&&typeof E=="string"&&E!="ace"){this.$keybindingId=E;var I=this;w.loadModule(["keybinding",E],function(N){I.$keybindingId==E&&I.keyBinding.setKeyboardHandler(N&&N.handler),M&&M()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(E),M&&M()},T.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},T.prototype.setSession=function(E){if(this.session!=E){this.curOp&&this.endOperation(),this.curOp={};var M=this.session;if(M){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var I=this.session.getSelection();I.off("changeCursor",this.$onCursorChange),I.off("changeSelection",this.$onSelectionChange)}this.session=E,E?(this.$onDocumentChange=this.onDocumentChange.bind(this),E.on("change",this.$onDocumentChange),this.renderer.setSession(E),this.$onChangeMode=this.onChangeMode.bind(this),E.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),E.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),E.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),E.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),E.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),E.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=E.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(E)),this._signal("changeSession",{session:E,oldSession:M}),this.curOp=null,M&&M._signal("changeEditor",{oldEditor:this}),E&&E._signal("changeEditor",{editor:this}),E&&!E.destroyed&&E.bgTokenizer.scheduleStart()}},T.prototype.getSession=function(){return this.session},T.prototype.setValue=function(E,M){return this.session.doc.setValue(E),M?M==1?this.navigateFileEnd():M==-1&&this.navigateFileStart():this.selectAll(),E},T.prototype.getValue=function(){return this.session.getValue()},T.prototype.getSelection=function(){return this.selection},T.prototype.resize=function(E){this.renderer.onResize(E)},T.prototype.setTheme=function(E,M){this.renderer.setTheme(E,M)},T.prototype.getTheme=function(){return this.renderer.getTheme()},T.prototype.setStyle=function(E){this.renderer.setStyle(E)},T.prototype.unsetStyle=function(E){this.renderer.unsetStyle(E)},T.prototype.getFontSize=function(){return this.getOption("fontSize")||l.computedStyle(this.container).fontSize},T.prototype.setFontSize=function(E){this.setOption("fontSize",E)},T.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var E=this;this.$highlightPending=!0,setTimeout(function(){E.$highlightPending=!1;var M=E.session;if(!(!M||M.destroyed)){M.$bracketHighlight&&(M.$bracketHighlight.markerIds.forEach(function(B){M.removeMarker(B)}),M.$bracketHighlight=null);var I=E.getCursorPosition(),N=E.getKeyboardHandler(),L=N&&N.$getDirectionForHighlight&&N.$getDirectionForHighlight(E),$=M.getMatchingBracketRanges(I,L);if(!$){var D=new k(M,I.row,I.column),F=D.getCurrentToken();if(F&&/\b(?:tag-open|tag-name)/.test(F.type)){var U=M.getMatchingTags(I);U&&($=[U.openTagName,U.closeTagName])}}if(!$&&M.$mode.getMatching&&($=M.$mode.getMatching(E.session)),!$){E.getHighlightIndentGuides()&&E.renderer.$textLayer.$highlightIndentGuide();return}var W="ace_bracket";Array.isArray($)?$.length==1&&(W="ace_error_bracket"):$=[$],$.length==2&&(m.comparePoints($[0].end,$[1].start)==0?$=[m.fromPoints($[0].start,$[1].end)]:m.comparePoints($[0].start,$[1].end)==0&&($=[m.fromPoints($[1].start,$[0].end)])),M.$bracketHighlight={ranges:$,markerIds:$.map(function(B){return M.addMarker(B,W,"text")})},E.getHighlightIndentGuides()&&E.renderer.$textLayer.$highlightIndentGuide()}},50)}},T.prototype.focus=function(){this.textInput.focus()},T.prototype.isFocused=function(){return this.textInput.isFocused()},T.prototype.blur=function(){this.textInput.blur()},T.prototype.onFocus=function(E){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",E))},T.prototype.onBlur=function(E){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",E))},T.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},T.prototype.onDocumentChange=function(E){var M=this.session.$useWrapMode,I=E.start.row==E.end.row?E.end.row:1/0;this.renderer.updateLines(E.start.row,I,M),this._signal("change",E),this.$cursorChange()},T.prototype.onTokenizerUpdate=function(E){var M=E.data;this.renderer.updateLines(M.first,M.last)},T.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},T.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},T.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},T.prototype.$updateHighlightActiveLine=function(){var E=this.getSession(),M;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(M=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(M=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(M=!1)),E.$highlightLineMarker&&!M)E.removeMarker(E.$highlightLineMarker.id),E.$highlightLineMarker=null;else if(!E.$highlightLineMarker&&M){var I=new m(M.row,M.column,M.row,1/0);I.id=E.addMarker(I,"ace_active-line","screenLine"),E.$highlightLineMarker=I}else M&&(E.$highlightLineMarker.start.row=M.row,E.$highlightLineMarker.end.row=M.row,E.$highlightLineMarker.start.column=M.column,E._signal("changeBackMarker"))},T.prototype.onSelectionChange=function(E){var M=this.session;if(M.$selectionMarker&&M.removeMarker(M.$selectionMarker),M.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var I=this.selection.getRange(),N=this.getSelectionStyle();M.$selectionMarker=M.addMarker(I,"ace_selection",N)}var L=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(L),this._signal("changeSelection")},T.prototype.$getSelectionHighLightRegexp=function(){var E=this.session,M=this.getSelectionRange();if(!(M.isEmpty()||M.isMultiLine())){var I=M.start.column,N=M.end.column,L=E.getLine(M.start.row),$=L.substring(I,N);if(!($.length>5e3||!/[\w\d]/.test($))){var D=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:$}),F=L.substring(I-1,N+1);if(D.test(F))return D}}},T.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},T.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},T.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},T.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},T.prototype.onChangeMode=function(E){this.renderer.updateText(),this._emit("changeMode",E)},T.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},T.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},T.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},T.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},T.prototype.getCopyText=function(){var E=this.getSelectedText(),M=this.session.doc.getNewLineCharacter(),I=!1;if(!E&&this.$copyWithEmptySelection){I=!0;for(var N=this.selection.getAllRanges(),L=0;Lu[c].column&&c++,p.unshift(c,0),u.splice.apply(u,p),this.$updateRows()}}},l.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var u=!0;a.forEach(function(c,d){if(c)for(u=!1,c.row=d;c.$oldWidget;)c.$oldWidget.row=d,c=c.$oldWidget}),u&&(this.session.lineWidgets=null)}},l.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[a.row];return u&&(a.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},l.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var u=this.editor.renderer;a.html&&!a.el&&(a.el=i.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=i.createElement("div"),a.el.textContent=a.text),a.el&&(i.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&i.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",u.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/u.layerConfig.lineHeight);var c=this.session.getFoldAt(a.row,0);if(a.$fold=c,c){var d=this.session.lineWidgets;a.row==c.end.row&&!d[c.start.row]?d[c.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(a),a},l.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[a.row];if(u==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;u;){if(u.$oldWidget==a){u.$oldWidget=a.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},l.prototype.getWidgetsAtRow=function(a){for(var u=this.session.lineWidgets,c=u&&u[a],d=[];c;)d.push(c),c=c.$oldWidget;return d},l.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},l.prototype.measureWidgets=function(a,u){var c=this.session._changedWidgets,d=u.layerConfig;if(!(!c||!c.length)){for(var h=1/0,p=0;p0&&!d[h];)h--;this.firstRow=c.firstRow,this.lastRow=c.lastRow,u.$cursorLayer.config=c;for(var f=h;f<=p;f++){var g=d[f];if(!(!g||!g.el)){if(g.hidden){g.el.style.top=-100-(g.pixelHeight||0)+"px";continue}g._inDocument||(g._inDocument=!0,u.container.appendChild(g.el));var m=u.$cursorLayer.getPixelPosition({row:f,column:0},!0).top;g.coverLine||(m+=c.lineHeight*this.session.getRowLineCount(g.row)),g.el.style.top=m-c.offset+"px";var v=g.coverGutter?0:u.gutterWidth;g.fixedWidth||(v-=u.scrollLeft),g.el.style.left=v+"px",g.fullWidth&&g.screenWidth&&(g.el.style.minWidth=c.width+2*c.padding+"px"),g.fixedWidth?g.el.style.right=u.scrollBar.getWidth()+"px":g.el.style.right=""}}}},l}();r.LineWidgets=s}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,r,o){var i=n("../lib/keys"),s=n("../mouse/default_gutter_handler").GutterTooltip,l=function(){function u(c){this.editor=c,this.gutterLayer=c.renderer.$gutterLayer,this.element=c.renderer.$gutter,this.lines=c.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new s(this.editor)}return u.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},u.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},u.prototype.$onGutterKeyDown=function(c){if(this.annotationTooltip.isOpen){c.preventDefault(),c.keyCode===i.escape&&this.annotationTooltip.hideTooltip();return}if(c.target===this.element){if(c.keyCode!=i.enter)return;c.preventDefault();var d=this.editor.getCursorPosition().row;this.editor.isRowVisible(d)||this.editor.scrollToLine(d,!0,!0),setTimeout((function(){var h=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),p=this.$findNearestFoldWidget(h),f=this.$findNearestAnnotation(h);if(!(p===null&&f===null)){if(p===null&&f!==null){this.activeRowIndex=f,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(p!==null&&f===null){this.activeRowIndex=p,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(f-h)0||c+d=0&&this.$isFoldWidgetVisible(c-d))return c-d;if(c+d<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(c+d))return c+d}return null},u.prototype.$findNearestAnnotation=function(c){if(this.$isAnnotationVisible(c))return c;for(var d=0;c-d>0||c+d=0&&this.$isAnnotationVisible(c-d))return c-d;if(c+d<=this.lines.getLength()-1&&this.$isAnnotationVisible(c+d))return c+d}return null},u.prototype.$focusFoldWidget=function(c){if(c!=null){var d=this.$getFoldWidget(c);d.classList.add(this.editor.renderer.keyboardFocusClassName),d.focus()}},u.prototype.$focusAnnotation=function(c){if(c!=null){var d=this.$getAnnotation(c);d.classList.add(this.editor.renderer.keyboardFocusClassName),d.focus()}},u.prototype.$blurFoldWidget=function(c){var d=this.$getFoldWidget(c);d.classList.remove(this.editor.renderer.keyboardFocusClassName),d.blur()},u.prototype.$blurAnnotation=function(c){var d=this.$getAnnotation(c);d.classList.remove(this.editor.renderer.keyboardFocusClassName),d.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isFoldWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var c=this.activeRowIndex;c0;)if(c--,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var c=this.activeRowIndex;c=T.length&&(T=void 0),{value:T&&T[I++],done:!T}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")},s=n("./lib/oop"),l=n("./lib/dom"),a=n("./lib/lang"),u=n("./lib/useragent"),c=n("./keyboard/textinput").TextInput,d=n("./mouse/mouse_handler").MouseHandler,h=n("./mouse/fold_handler").FoldHandler,p=n("./keyboard/keybinding").KeyBinding,f=n("./edit_session").EditSession,g=n("./search").Search,m=n("./range").Range,v=n("./lib/event_emitter").EventEmitter,y=n("./commands/command_manager").CommandManager,b=n("./commands/default_commands").commands,w=n("./config"),k=n("./token_iterator").TokenIterator,x=n("./line_widgets").LineWidgets,S=n("./keyboard/gutter_handler").GutterKeyboardHandler,A=n("./config").nls,C=n("./clipboard"),O=n("./lib/keys"),R=function(){function T(E,M,I){this.session,this.$toDestroy=[];var N=E.getContainerElement();this.container=N,this.renderer=E,this.id="editor"+ ++T.$uid,this.commands=new y(u.isMac?"mac":"win",b),typeof document=="object"&&(this.textInput=new c(E.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new d(this),new h(this)),this.keyBinding=new p(this),this.$search=new g().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(L,$){$._$emitInputEvent.schedule(31)}),this.setSession(M||I&&I.session||new f("")),w.resetOptions(this),I&&this.setOptions(I),w._signal("editor",this)}return T.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.delayedCall(this.endOperation.bind(this,!0)),this.on("change",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}).bind(this),!0),this.on("changeSelection",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}).bind(this),!0)},T.prototype.startOperation=function(E){if(this.curOp){if(!E||this.curOp.command)return;this.prevOp=this.curOp}E||(this.previousCommand=null,E={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:E.command||{},args:E.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},T.prototype.endOperation=function(E){if(this.curOp&&this.session){if(E&&E.returnValue===!1||!this.session)return this.curOp=null;if(E==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var M=this.curOp.command,I=M&&M.scrollIntoView;if(I){switch(I){case"center-animate":I="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var N=this.selection.getRange(),L=this.renderer.layerConfig;(N.start.row>=L.lastRow||N.end.row<=L.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}I=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var $=this.selection.toJSON();this.curOp.selectionAfter=$,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection($),this.prevOp=this.curOp,this.curOp=null}},T.prototype.$historyTracker=function(E){if(this.$mergeUndoDeltas){var M=this.prevOp,I=this.$mergeableCommands,N=M.command&&E.command.name==M.command.name;if(E.command.name=="insertstring"){var L=E.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),N=N&&this.mergeNextCommand&&(!/\s/.test(L)||/\s/.test(M.args)),this.mergeNextCommand=!0}else N=N&&I.indexOf(E.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(N=!1),N?this.session.mergeUndoDeltas=!0:I.indexOf(E.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},T.prototype.setKeyboardHandler=function(E,M){if(E&&typeof E=="string"&&E!="ace"){this.$keybindingId=E;var I=this;w.loadModule(["keybinding",E],function(N){I.$keybindingId==E&&I.keyBinding.setKeyboardHandler(N&&N.handler),M&&M()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(E),M&&M()},T.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},T.prototype.setSession=function(E){if(this.session!=E){this.curOp&&this.endOperation(),this.curOp={};var M=this.session;if(M){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var I=this.session.getSelection();I.off("changeCursor",this.$onCursorChange),I.off("changeSelection",this.$onSelectionChange)}this.session=E,E?(this.$onDocumentChange=this.onDocumentChange.bind(this),E.on("change",this.$onDocumentChange),this.renderer.setSession(E),this.$onChangeMode=this.onChangeMode.bind(this),E.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),E.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),E.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),E.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),E.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),E.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=E.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(E)),this._signal("changeSession",{session:E,oldSession:M}),this.curOp=null,M&&M._signal("changeEditor",{oldEditor:this}),E&&E._signal("changeEditor",{editor:this}),E&&!E.destroyed&&E.bgTokenizer.scheduleStart()}},T.prototype.getSession=function(){return this.session},T.prototype.setValue=function(E,M){return this.session.doc.setValue(E),M?M==1?this.navigateFileEnd():M==-1&&this.navigateFileStart():this.selectAll(),E},T.prototype.getValue=function(){return this.session.getValue()},T.prototype.getSelection=function(){return this.selection},T.prototype.resize=function(E){this.renderer.onResize(E)},T.prototype.setTheme=function(E,M){this.renderer.setTheme(E,M)},T.prototype.getTheme=function(){return this.renderer.getTheme()},T.prototype.setStyle=function(E){this.renderer.setStyle(E)},T.prototype.unsetStyle=function(E){this.renderer.unsetStyle(E)},T.prototype.getFontSize=function(){return this.getOption("fontSize")||l.computedStyle(this.container).fontSize},T.prototype.setFontSize=function(E){this.setOption("fontSize",E)},T.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var E=this;this.$highlightPending=!0,setTimeout(function(){E.$highlightPending=!1;var M=E.session;if(!(!M||M.destroyed)){M.$bracketHighlight&&(M.$bracketHighlight.markerIds.forEach(function(B){M.removeMarker(B)}),M.$bracketHighlight=null);var I=E.getCursorPosition(),N=E.getKeyboardHandler(),L=N&&N.$getDirectionForHighlight&&N.$getDirectionForHighlight(E),$=M.getMatchingBracketRanges(I,L);if(!$){var P=new k(M,I.row,I.column),F=P.getCurrentToken();if(F&&/\b(?:tag-open|tag-name)/.test(F.type)){var H=M.getMatchingTags(I);H&&($=[H.openTagName,H.closeTagName])}}if(!$&&M.$mode.getMatching&&($=M.$mode.getMatching(E.session)),!$){E.getHighlightIndentGuides()&&E.renderer.$textLayer.$highlightIndentGuide();return}var W="ace_bracket";Array.isArray($)?$.length==1&&(W="ace_error_bracket"):$=[$],$.length==2&&(m.comparePoints($[0].end,$[1].start)==0?$=[m.fromPoints($[0].start,$[1].end)]:m.comparePoints($[0].start,$[1].end)==0&&($=[m.fromPoints($[1].start,$[0].end)])),M.$bracketHighlight={ranges:$,markerIds:$.map(function(B){return M.addMarker(B,W,"text")})},E.getHighlightIndentGuides()&&E.renderer.$textLayer.$highlightIndentGuide()}},50)}},T.prototype.focus=function(){this.textInput.focus()},T.prototype.isFocused=function(){return this.textInput.isFocused()},T.prototype.blur=function(){this.textInput.blur()},T.prototype.onFocus=function(E){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",E))},T.prototype.onBlur=function(E){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",E))},T.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},T.prototype.onDocumentChange=function(E){var M=this.session.$useWrapMode,I=E.start.row==E.end.row?E.end.row:1/0;this.renderer.updateLines(E.start.row,I,M),this._signal("change",E),this.$cursorChange()},T.prototype.onTokenizerUpdate=function(E){var M=E.data;this.renderer.updateLines(M.first,M.last)},T.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},T.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},T.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},T.prototype.$updateHighlightActiveLine=function(){var E=this.getSession(),M;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(M=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(M=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(M=!1)),E.$highlightLineMarker&&!M)E.removeMarker(E.$highlightLineMarker.id),E.$highlightLineMarker=null;else if(!E.$highlightLineMarker&&M){var I=new m(M.row,M.column,M.row,1/0);I.id=E.addMarker(I,"ace_active-line","screenLine"),E.$highlightLineMarker=I}else M&&(E.$highlightLineMarker.start.row=M.row,E.$highlightLineMarker.end.row=M.row,E.$highlightLineMarker.start.column=M.column,E._signal("changeBackMarker"))},T.prototype.onSelectionChange=function(E){var M=this.session;if(M.$selectionMarker&&M.removeMarker(M.$selectionMarker),M.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var I=this.selection.getRange(),N=this.getSelectionStyle();M.$selectionMarker=M.addMarker(I,"ace_selection",N)}var L=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(L),this._signal("changeSelection")},T.prototype.$getSelectionHighLightRegexp=function(){var E=this.session,M=this.getSelectionRange();if(!(M.isEmpty()||M.isMultiLine())){var I=M.start.column,N=M.end.column,L=E.getLine(M.start.row),$=L.substring(I,N);if(!($.length>5e3||!/[\w\d]/.test($))){var P=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:$}),F=L.substring(I-1,N+1);if(P.test(F))return P}}},T.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},T.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},T.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},T.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},T.prototype.onChangeMode=function(E){this.renderer.updateText(),this._emit("changeMode",E)},T.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},T.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},T.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},T.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},T.prototype.getCopyText=function(){var E=this.getSelectedText(),M=this.session.doc.getNewLineCharacter(),I=!1;if(!E&&this.$copyWithEmptySelection){I=!0;for(var N=this.selection.getAllRanges(),L=0;LB.search(/\S|$/)){var F=B.substr(L.column).search(/\S|$/);I.doc.removeInLine(L.row,L.column,L.column+F)}}this.clearSelection();var U=L.column,W=I.getState(L.row),B=I.getLine(L.row),H=N.checkOutdent(W,B,E);if(I.insert(L,E),$&&$.selection&&($.selection.length==2?this.selection.setSelectionRange(new m(L.row,U+$.selection[0],L.row,U+$.selection[1])):this.selection.setSelectionRange(new m(L.row+$.selection[0],$.selection[1],L.row+$.selection[2],$.selection[3]))),this.$enableAutoIndent){if(I.getDocument().isNewLine(E)){var G=N.getNextLineIndent(W,B.slice(0,L.column),I.getTabString());I.insert({row:L.row+1,column:0},G)}H&&N.autoOutdent(W,I,L.row)}},T.prototype.autoIndent=function(){for(var E=this.session,M=E.getMode(),I=this.selection.isEmpty()?[new m(0,0,E.doc.getLength()-1,0)]:this.selection.getAllRanges(),N="",L="",$="",D=E.getTabString(),F=0;F0&&(N=E.getState(B-1),L=E.getLine(B-1),$=M.getNextLineIndent(N,L,D));var H=E.getLine(B),G=M.$getIndent(H);if($!==G){if(G.length>0){var Y=new m(B,0,B,G.length);E.remove(Y)}$.length>0&&E.insert({row:B,column:0},$)}M.autoOutdent(N,E,B)}},T.prototype.onTextInput=function(E,M){if(!M)return this.keyBinding.onTextInput(E);this.startOperation({command:{name:"insertstring"}});var I=this.applyComposition.bind(this,E,M);this.selection.rangeCount?this.forEachSelection(I):I(),this.endOperation()},T.prototype.applyComposition=function(E,M){if(M.extendLeft||M.extendRight){var I=this.selection.getRange();I.start.column-=M.extendLeft,I.end.column+=M.extendRight,I.start.column<0&&(I.start.row--,I.start.column+=this.session.getLine(I.start.row).length+1),this.selection.setRange(I),!E&&!I.isEmpty()&&this.remove()}if((E||!this.selection.isEmpty())&&this.insert(E,!0),M.restoreStart||M.restoreEnd){var I=this.selection.getRange();I.start.column-=M.restoreStart,I.end.column-=M.restoreEnd,this.selection.setRange(I)}},T.prototype.onCommandKey=function(E,M,I){return this.keyBinding.onCommandKey(E,M,I)},T.prototype.setOverwrite=function(E){this.session.setOverwrite(E)},T.prototype.getOverwrite=function(){return this.session.getOverwrite()},T.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},T.prototype.setScrollSpeed=function(E){this.setOption("scrollSpeed",E)},T.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},T.prototype.setDragDelay=function(E){this.setOption("dragDelay",E)},T.prototype.getDragDelay=function(){return this.getOption("dragDelay")},T.prototype.setSelectionStyle=function(E){this.setOption("selectionStyle",E)},T.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},T.prototype.setHighlightActiveLine=function(E){this.setOption("highlightActiveLine",E)},T.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},T.prototype.setHighlightGutterLine=function(E){this.setOption("highlightGutterLine",E)},T.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},T.prototype.setHighlightSelectedWord=function(E){this.setOption("highlightSelectedWord",E)},T.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},T.prototype.setAnimatedScroll=function(E){this.renderer.setAnimatedScroll(E)},T.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},T.prototype.setShowInvisibles=function(E){this.renderer.setShowInvisibles(E)},T.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},T.prototype.setDisplayIndentGuides=function(E){this.renderer.setDisplayIndentGuides(E)},T.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},T.prototype.setHighlightIndentGuides=function(E){this.renderer.setHighlightIndentGuides(E)},T.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},T.prototype.setShowPrintMargin=function(E){this.renderer.setShowPrintMargin(E)},T.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},T.prototype.setPrintMarginColumn=function(E){this.renderer.setPrintMarginColumn(E)},T.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},T.prototype.setReadOnly=function(E){this.setOption("readOnly",E)},T.prototype.getReadOnly=function(){return this.getOption("readOnly")},T.prototype.setBehavioursEnabled=function(E){this.setOption("behavioursEnabled",E)},T.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},T.prototype.setWrapBehavioursEnabled=function(E){this.setOption("wrapBehavioursEnabled",E)},T.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},T.prototype.setShowFoldWidgets=function(E){this.setOption("showFoldWidgets",E)},T.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},T.prototype.setFadeFoldWidgets=function(E){this.setOption("fadeFoldWidgets",E)},T.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},T.prototype.remove=function(E){this.selection.isEmpty()&&(E=="left"?this.selection.selectLeft():this.selection.selectRight());var M=this.getSelectionRange();if(this.getBehavioursEnabled()){var I=this.session,N=I.getState(M.start.row),L=I.getMode().transformAction(N,"deletion",this,I,M);if(M.end.column===0){var $=I.getTextRange(M);if($[$.length-1]==` -`){var D=I.getLine(M.end.row);/^\s+$/.test(D)&&(M.end.column=D.length)}}L&&(M=L)}this.session.remove(M),this.clearSelection()},T.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},T.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},T.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},T.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var E=this.getSelectionRange();E.start.column==E.end.column&&E.start.row==E.end.row&&(E.end.column=0,E.end.row++),this.session.remove(E),this.clearSelection()},T.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var E=this.getCursorPosition();this.insert(` -`),this.moveCursorToPosition(E)},T.prototype.setGhostText=function(E,M){this.session.widgetManager||(this.session.widgetManager=new x(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(E,M)},T.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},T.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var E=this.getCursorPosition(),M=E.column;if(M!==0){var I=this.session.getLine(E.row),N,L;MF.toLowerCase()?1:0});for(var L=new m(0,0,0,0),N=E.first;N<=E.last;N++){var $=M.getLine(N);L.start.row=N,L.end.row=N,L.end.column=$.length,M.replace(L,I[N-E.first])}},T.prototype.toggleCommentLines=function(){var E=this.session.getState(this.getCursorPosition().row),M=this.$getSelectedRows();this.session.getMode().toggleCommentLines(E,this.session,M.first,M.last)},T.prototype.toggleBlockComment=function(){var E=this.getCursorPosition(),M=this.session.getState(E.row),I=this.getSelectionRange();this.session.getMode().toggleBlockComment(M,this.session,I,E)},T.prototype.getNumberAt=function(E,M){var I=/[\-]?[0-9]+(?:\.[0-9]+)?/g;I.lastIndex=0;for(var N=this.session.getLine(E);I.lastIndex=M){var $={value:L[0],start:L.index,end:L.index+L[0].length};return $}}return null},T.prototype.modifyNumber=function(E){var M=this.selection.getCursor().row,I=this.selection.getCursor().column,N=new m(M,I-1,M,I),L=this.session.getTextRange(N);if(!isNaN(parseFloat(L))&&isFinite(L)){var $=this.getNumberAt(M,I);if($){var D=$.value.indexOf(".")>=0?$.start+$.value.indexOf(".")+1:$.end,F=$.start+$.value.length-D,U=parseFloat($.value);U*=Math.pow(10,F),D!==$.end&&I=D&&$<=F&&(I=de,U.selection.clearSelection(),U.moveCursorTo(E,D+N),U.selection.selectTo(E,F+N)),D=F});for(var W=this.$toggleWordPairs,B,H=0;H=F&&D<=U&&G.match(/((?:https?|ftp):\/\/[\S]+)/)){W=G.replace(/[\s:.,'";}\]]+$/,"");break}F=U}}catch(Y){I={error:Y}}finally{try{H&&!H.done&&(N=B.return)&&N.call(B)}finally{if(I)throw I.error}}return W},T.prototype.openLink=function(){var E=this.selection.getCursor(),M=this.findLinkAt(E.row,E.column);return M&&window.open(M,"_blank"),M!=null},T.prototype.removeLines=function(){var E=this.$getSelectedRows();this.session.removeFullLines(E.first,E.last),this.clearSelection()},T.prototype.duplicateSelection=function(){var E=this.selection,M=this.session,I=E.getRange(),N=E.isBackwards();if(I.isEmpty()){var L=I.start.row;M.duplicateLines(L,L)}else{var $=N?I.start:I.end,D=M.insert($,M.getTextRange(I));I.start=$,I.end=D,E.setSelectionRange(I,N)}},T.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},T.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},T.prototype.moveText=function(E,M,I){return this.session.moveText(E,M,I)},T.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},T.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},T.prototype.$moveLines=function(E,M){var I,N,L=this.selection;if(!L.inMultiSelectMode||this.inVirtualSelectionMode){var $=L.toOrientedRange();I=this.$getSelectedRows($),N=this.session.$moveLines(I.first,I.last,M?0:E),M&&E==-1&&(N=0),$.moveBy(N,0),L.fromOrientedRange($)}else{var D=L.rangeList.ranges;L.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var F=0,U=0,W=D.length,B=0;BY+1)break;Y=X.last}for(B--,F=this.session.$moveLines(G,Y,M?0:E),M&&E==-1&&(H=B+1);H<=B;)D[H].moveBy(F,0),H++;M||(F=0),U+=F}L.fromOrientedRange(L.ranges[0]),L.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},T.prototype.$getSelectedRows=function(E){return E=(E||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(E.start.row),last:this.session.getRowFoldEnd(E.end.row)}},T.prototype.onCompositionStart=function(E){this.renderer.showComposition(E)},T.prototype.onCompositionUpdate=function(E){this.renderer.setCompositionText(E)},T.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},T.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},T.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},T.prototype.isRowVisible=function(E){return E>=this.getFirstVisibleRow()&&E<=this.getLastVisibleRow()},T.prototype.isRowFullyVisible=function(E){return E>=this.renderer.getFirstFullyVisibleRow()&&E<=this.renderer.getLastFullyVisibleRow()},T.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},T.prototype.$moveByPage=function(E,M){var I=this.renderer,N=this.renderer.layerConfig,L=E*Math.floor(N.height/N.lineHeight);M===!0?this.selection.$moveSelection(function(){this.moveCursorBy(L,0)}):M===!1&&(this.selection.moveCursorBy(L,0),this.selection.clearSelection());var $=I.scrollTop;I.scrollBy(0,L*N.lineHeight),M!=null&&I.scrollCursorIntoView(null,.5),I.animateScrolling($)},T.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},T.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},T.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},T.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},T.prototype.scrollPageDown=function(){this.$moveByPage(1)},T.prototype.scrollPageUp=function(){this.$moveByPage(-1)},T.prototype.scrollToRow=function(E){this.renderer.scrollToRow(E)},T.prototype.scrollToLine=function(E,M,I,N){this.renderer.scrollToLine(E,M,I,N)},T.prototype.centerSelection=function(){var E=this.getSelectionRange(),M={row:Math.floor(E.start.row+(E.end.row-E.start.row)/2),column:Math.floor(E.start.column+(E.end.column-E.start.column)/2)};this.renderer.alignCursor(M,.5)},T.prototype.getCursorPosition=function(){return this.selection.getCursor()},T.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},T.prototype.getSelectionRange=function(){return this.selection.getRange()},T.prototype.selectAll=function(){this.selection.selectAll()},T.prototype.clearSelection=function(){this.selection.clearSelection()},T.prototype.moveCursorTo=function(E,M){this.selection.moveCursorTo(E,M)},T.prototype.moveCursorToPosition=function(E){this.selection.moveCursorToPosition(E)},T.prototype.jumpToMatching=function(E,M){var I=this.getCursorPosition(),N=new k(this.session,I.row,I.column),L=N.getCurrentToken(),$=0;L&&L.type.indexOf("tag-name")!==-1&&(L=N.stepBackward());var D=L||N.stepForward();if(D){var F,U=!1,W={},B=I.column-D.start,H,G={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(D.value.match(/[{}()\[\]]/g)){for(;B1?W[D.value]++:L.value==="=0;--$)this.$tryReplace(I[$],E)&&N++;return this.selection.setSelectionRange(L),N},T.prototype.$tryReplace=function(E,M){var I=this.session.getTextRange(E);return M=this.$search.replace(I,M),M!==null?(E.end=this.session.replace(E,M),E):null},T.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},T.prototype.find=function(E,M,I){M||(M={}),typeof E=="string"||E instanceof RegExp?M.needle=E:typeof E=="object"&&s.mixin(M,E);var N=this.selection.getRange();M.needle==null&&(E=this.session.getTextRange(N)||this.$search.$options.needle,E||(N=this.session.getWordRange(N.start.row,N.start.column),E=this.session.getTextRange(N)),this.$search.set({needle:E})),this.$search.set(M),M.start||this.$search.set({start:N});var L=this.$search.find(this.session);if(M.preventScroll)return L;if(L)return this.revealRange(L,I),L;M.backwards?N.start=N.end:N.end=N.start,this.selection.setRange(N)},T.prototype.findNext=function(E,M){this.find({skipCurrent:!0,backwards:!1},E,M)},T.prototype.findPrevious=function(E,M){this.find(E,{skipCurrent:!0,backwards:!0},M)},T.prototype.revealRange=function(E,M){this.session.unfold(E),this.selection.setSelectionRange(E);var I=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(E.start,E.end,.5),M!==!1&&this.renderer.animateScrolling(I)},T.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},T.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},T.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(E){E.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},T.prototype.setAutoScrollEditorIntoView=function(E){if(E){var M,I=this,N=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var L=this.$scrollAnchor;L.style.cssText="position:absolute",this.container.insertBefore(L,this.container.firstChild);var $=this.on("changeSelection",function(){N=!0}),D=this.renderer.on("beforeRender",function(){N&&(M=I.renderer.container.getBoundingClientRect())}),F=this.renderer.on("afterRender",function(){if(N&&M&&(I.isFocused()||I.searchBox&&I.searchBox.isFocused())){var U=I.renderer,W=U.$cursorLayer.$pixelPos,B=U.layerConfig,H=W.top-B.offset;W.top>=0&&H+M.top<0?N=!0:W.topwindow.innerHeight?N=!1:N=null,N!=null&&(L.style.top=H+"px",L.style.left=W.left+"px",L.style.height=B.lineHeight+"px",L.scrollIntoView(N)),N=M=null}});this.setAutoScrollEditorIntoView=function(U){U||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",$),this.renderer.off("afterRender",F),this.renderer.off("beforeRender",D))}}},T.prototype.$resetCursorStyle=function(){var E=this.$cursorStyle||"ace",M=this.renderer.$cursorLayer;M&&(M.setSmoothBlinking(/smooth/.test(E)),M.isBlinking=!this.$readOnly&&E!="wide",l.setCssClass(M.element,"ace_slim-cursors",/slim/.test(E)))},T.prototype.prompt=function(E,M,I){var N=this;w.loadModule("ace/ext/prompt",function(L){L.prompt(N,E,M,I)})},T}();R.$uid=0,R.prototype.curOp=null,R.prototype.prevOp={},R.prototype.$mergeableCommands=["backspace","del","insertstring"],R.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],s.implement(R.prototype,v),w.defineOptions(R.prototype,"editor",{selectionStyle:{set:function(T){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:T})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(T){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(T){this.textInput.setReadOnly(T),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(T){this.textInput.setCopyWithEmptySelection(T)},initialValue:!1},cursorStyle:{set:function(T){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(T){this.setAutoScrollEditorIntoView(T)}},keyboardHandler:{set:function(T){this.setKeyboardHandler(T)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(T){this.session.setValue(T)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(T){this.setSession(T)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(T){this.renderer.$gutterLayer.setShowLineNumbers(T),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),T&&this.$relativeLineNumbers?_.attach(this):_.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(T){this.$showLineNumbers&&T?_.attach(this):_.detach(this)}},placeholder:{set:function(T){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var E=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(E&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),l.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!E&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),l.addCssClass(this.container,"ace_hasPlaceholder");var M=l.createElement("div");M.className="ace_placeholder",M.textContent=this.$placeholder||"",this.renderer.placeholderNode=M,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!E&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(T){var E={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(N){N.blur(),N.renderer.scroller.focus()},readOnly:!0},M=function(N){if(N.target==this.renderer.scroller&&N.keyCode===O.enter){N.preventDefault();var L=this.getCursorPosition().row;this.isRowVisible(L)||this.scrollToLine(L,!0,!0),this.focus()}},I;T?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",A("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",A("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",M.bind(this)),this.commands.addCommand(E),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",A("editor")),this.renderer.$gutter.setAttribute("aria-label",A("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),I||(I=new S(this)),I.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",M.bind(this)),this.commands.removeCommand(E),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),I&&I.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var _={getText:function(T,E){return(Math.abs(T.selection.lead.row-E)||E+1+(E<9?"·":""))+""},getWidth:function(T,E,M){return Math.max(E.toString().length,(M.lastRow+1).toString().length,2)*M.characterWidth},update:function(T,E){E.renderer.$loop.schedule(E.renderer.CHANGE_GUTTER)},attach:function(T){T.renderer.$gutterLayer.$renderer=this,T.on("changeSelection",this.update),this.update(null,T)},detach:function(T){T.renderer.$gutterLayer.$renderer==this&&(T.renderer.$gutterLayer.$renderer=null),T.off("changeSelection",this.update),this.update(null,T)}};r.Editor=R}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,r,o){var i=n("../lib/dom"),s=function(){function l(a,u){this.element=a,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return l.prototype.moveContainer=function(a){i.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},l.prototype.pageChanged=function(a,u){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},l.prototype.computeLineTop=function(a,u,c){var d=u.firstRowScreen*u.lineHeight,h=Math.floor(d/this.canvasHeight),p=c.documentToScreenRow(a,0)*u.lineHeight;return p-h*this.canvasHeight},l.prototype.computeLineHeight=function(a,u,c){return u.lineHeight*c.getRowLineCount(a)},l.prototype.getLength=function(){return this.cells.length},l.prototype.get=function(a){return this.cells[a]},l.prototype.shift=function(){this.$cacheCell(this.cells.shift())},l.prototype.pop=function(){this.$cacheCell(this.cells.pop())},l.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var u=i.createFragment(this.element),c=0;cb&&(x=y.end.row+1,y=g.getNextFoldLine(x,y),b=y?y.start.row:1/0),x>v){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}w=this.$lines.get(++k),w?w.row=x:(w=this.$lines.createCell(x,f,this.session,h),this.$lines.push(w)),this.$renderCell(w,f,y,x),x++}this._signal("afterRender"),this.$updateGutterWidth(f)},p.prototype.$updateGutterWidth=function(f){var g=this.session,m=g.gutterRenderer||this.$renderer,v=g.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||g.$useWrapMode)&&(y=g.getLength()+v-1);var b=m?m.getWidth(g,y,f):y.toString().length*f.characterWidth,w=this.$padding||this.$computePadding();b+=w.left+w.right,b!==this.gutterWidth&&!isNaN(b)&&(this.gutterWidth=b,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",b))},p.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var f=this.session.selection.getCursor();this.$cursorRow!==f.row&&(this.$cursorRow=f.row)}},p.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var f=this.session.selection.cursor.row;if(this.$cursorRow=f,!(this.$cursorCell&&this.$cursorCell.row==f)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var g=this.$lines.cells;this.$cursorCell=null;for(var m=0;m=this.$cursorRow){if(v.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(m>0&&y&&y.start.row==g[m-1].row)v=g[m-1];else break}v.element.className="ace_gutter-active-line "+v.element.className,this.$cursorCell=v;break}}}}},p.prototype.scrollLines=function(f){var g=this.config;if(this.config=f,this.$updateCursorRow(),this.$lines.pageChanged(g,f))return this.update(f);this.$lines.moveContainer(f);var m=Math.min(f.lastRow+f.gutterOffset,this.session.getLength()-1),v=this.oldLastRow;if(this.oldLastRow=m,!g||v0;y--)this.$lines.shift();if(v>m)for(var y=this.session.getFoldedRowCount(m+1,v);y>0;y--)this.$lines.pop();f.firstRowv&&this.$lines.push(this.$renderLines(f,v+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(f)},p.prototype.$renderLines=function(f,g,m){for(var v=[],y=g,b=this.session.getNextFoldLine(y),w=b?b.start.row:1/0;y>w&&(y=b.end.row+1,b=this.session.getNextFoldLine(y,b),w=b?b.start.row:1/0),!(y>m);){var k=this.$lines.createCell(y,f,this.session,h);this.$renderCell(k,f,b,y),v.push(k),y++}return v},p.prototype.$renderCell=function(f,g,m,v){var y=f.element,b=this.session,w=y.childNodes[0],k=y.childNodes[1],x=y.childNodes[2],S=x.firstChild,A=b.$firstLineNumber,C=b.$breakpoints,O=b.$decorations,R=b.gutterRenderer||this.$renderer,_=this.$showFoldWidgets&&b.foldWidgets,T=m?m.start.row:Number.MAX_VALUE,E=g.lineHeight+"px",M=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",I=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",N=(R?R.getText(b,v):v+A).toString();if(this.$highlightGutterLine&&(v==this.$cursorRow||m&&v=T&&this.$cursorRow<=m.end.row)&&(M+="ace_gutter-active-line ",this.$cursorCell!=f&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=f)),C[v]&&(M+=C[v]),O[v]&&(M+=O[v]),this.$annotations[v]&&v!==T&&(M+=this.$annotations[v].className),_){var L=_[v];L==null&&(L=_[v]=b.getFoldWidget(v))}if(L){var $="ace_fold-widget ace_"+L,D=L=="start"&&v==T&&vm.right-g.right)return"foldWidgets"},p}();d.prototype.$fixedWidth=!1,d.prototype.$highlightGutterLine=!0,d.prototype.$renderer="",d.prototype.$showLineNumbers=!0,d.prototype.$showFoldWidgets=!0,s.implement(d.prototype,a);function h(p){var f=document.createTextNode("");p.appendChild(f);var g=i.createElement("span");p.appendChild(g);var m=i.createElement("span");p.appendChild(m);var v=i.createElement("span");return m.appendChild(v),p}r.Gutter=d}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,r,o){var i=n("../range").Range,s=n("../lib/dom"),l=function(){function u(c){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",c.appendChild(this.element)}return u.prototype.setPadding=function(c){this.$padding=c},u.prototype.setSession=function(c){this.session=c},u.prototype.setMarkers=function(c){this.markers=c},u.prototype.elt=function(c,d){var h=this.i!=-1&&this.element.childNodes[this.i];h?this.i++:(h=document.createElement("div"),this.element.appendChild(h),this.i=-1),h.style.cssText=d,h.className=c},u.prototype.update=function(c){if(c){this.config=c,this.i=0;var d;for(var h in this.markers){var p=this.markers[h];if(!p.range){p.update(d,this,this.session,c);continue}var f=p.range.clipRows(c.firstRow,c.lastRow);if(!f.isEmpty())if(f=f.toScreenRange(this.session),p.renderer){var g=this.$getTop(f.start.row,c),m=this.$padding+f.start.column*c.characterWidth;p.renderer(d,f,m,g,c)}else p.type=="fullLine"?this.drawFullLineMarker(d,f,p.clazz,c):p.type=="screenLine"?this.drawScreenLineMarker(d,f,p.clazz,c):f.isMultiLine()?p.type=="text"?this.drawTextMarker(d,f,p.clazz,c):this.drawMultiLineMarker(d,f,p.clazz,c):this.drawSingleLineMarker(d,f,p.clazz+" ace_start ace_br15",c)}if(this.i!=-1)for(;this.ik,y==v),p,y==v?0:1,f)},u.prototype.drawMultiLineMarker=function(c,d,h,p,f){var g=this.$padding,m=p.lineHeight,v=this.$getTop(d.start.row,p),y=g+d.start.column*p.characterWidth;if(f=f||"",this.session.$bidiHandler.isBidiRow(d.start.row)){var b=d.clone();b.end.row=b.start.row,b.end.column=this.session.getLine(b.start.row).length,this.drawBidiSingleLineMarker(c,b,h+" ace_br1 ace_start",p,null,f)}else this.elt(h+" ace_br1 ace_start","height:"+m+"px;right:0;top:"+v+"px;left:"+y+"px;"+(f||""));if(this.session.$bidiHandler.isBidiRow(d.end.row)){var b=d.clone();b.start.row=b.end.row,b.start.column=0,this.drawBidiSingleLineMarker(c,b,h+" ace_br12",p,null,f)}else{v=this.$getTop(d.end.row,p);var w=d.end.column*p.characterWidth;this.elt(h+" ace_br12","height:"+m+"px;width:"+w+"px;top:"+v+"px;left:"+g+"px;"+(f||""))}if(m=(d.end.row-d.start.row-1)*p.lineHeight,!(m<=0)){v=this.$getTop(d.start.row+1,p);var k=(d.start.column?1:0)|(d.end.column?0:8);this.elt(h+(k?" ace_br"+k:""),"height:"+m+"px;right:0;top:"+v+"px;left:"+g+"px;"+(f||""))}},u.prototype.drawSingleLineMarker=function(c,d,h,p,f,g){if(this.session.$bidiHandler.isBidiRow(d.start.row))return this.drawBidiSingleLineMarker(c,d,h,p,f,g);var m=p.lineHeight,v=(d.end.column+(f||0)-d.start.column)*p.characterWidth,y=this.$getTop(d.start.row,p),b=this.$padding+d.start.column*p.characterWidth;this.elt(h,"height:"+m+"px;width:"+v+"px;top:"+y+"px;left:"+b+"px;"+(g||""))},u.prototype.drawBidiSingleLineMarker=function(c,d,h,p,f,g){var m=p.lineHeight,v=this.$getTop(d.start.row,p),y=this.$padding,b=this.session.$bidiHandler.getSelections(d.start.column,d.end.column);b.forEach(function(w){this.elt(h,"height:"+m+"px;width:"+(w.width+(f||0))+"px;top:"+v+"px;left:"+(y+w.left)+"px;"+(g||""))},this)},u.prototype.drawFullLineMarker=function(c,d,h,p,f){var g=this.$getTop(d.start.row,p),m=p.lineHeight;d.start.row!=d.end.row&&(m+=this.$getTop(d.end.row,p)-g),this.elt(h,"height:"+m+"px;top:"+g+"px;left:0;right:0;"+(f||""))},u.prototype.drawScreenLineMarker=function(c,d,h,p,f){var g=this.$getTop(d.start.row,p),m=p.lineHeight;this.elt(h,"height:"+m+"px;top:"+g+"px;left:0;right:0;"+(f||""))},u}();l.prototype.$padding=0;function a(u,c,d,h){return(u?1:0)|(c?2:0)|(d?4:0)|(h?8:0)}r.Marker=l}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,r,o){var i=new Set(["text","rparen","lparen"]);r.isTextToken=function(s){return i.has(s)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/dom"),l=n("../lib/lang"),a=n("./lines").Lines,u=n("../lib/event_emitter").EventEmitter,c=n("../config").nls,d=n("./text_util").isTextToken,h=function(){function p(f){this.dom=s,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",f.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return p.prototype.$updateEolChar=function(){var f=this.session.doc,g=f.getNewLineCharacter()==` +`){var B=I.getLine(L.row);if(L.column>B.search(/\S|$/)){var F=B.substr(L.column).search(/\S|$/);I.doc.removeInLine(L.row,L.column,L.column+F)}}this.clearSelection();var H=L.column,W=I.getState(L.row),B=I.getLine(L.row),U=N.checkOutdent(W,B,E);if(I.insert(L,E),$&&$.selection&&($.selection.length==2?this.selection.setSelectionRange(new m(L.row,H+$.selection[0],L.row,H+$.selection[1])):this.selection.setSelectionRange(new m(L.row+$.selection[0],$.selection[1],L.row+$.selection[2],$.selection[3]))),this.$enableAutoIndent){if(I.getDocument().isNewLine(E)){var G=N.getNextLineIndent(W,B.slice(0,L.column),I.getTabString());I.insert({row:L.row+1,column:0},G)}U&&N.autoOutdent(W,I,L.row)}},T.prototype.autoIndent=function(){for(var E=this.session,M=E.getMode(),I=this.selection.isEmpty()?[new m(0,0,E.doc.getLength()-1,0)]:this.selection.getAllRanges(),N="",L="",$="",P=E.getTabString(),F=0;F0&&(N=E.getState(B-1),L=E.getLine(B-1),$=M.getNextLineIndent(N,L,P));var U=E.getLine(B),G=M.$getIndent(U);if($!==G){if(G.length>0){var Y=new m(B,0,B,G.length);E.remove(Y)}$.length>0&&E.insert({row:B,column:0},$)}M.autoOutdent(N,E,B)}},T.prototype.onTextInput=function(E,M){if(!M)return this.keyBinding.onTextInput(E);this.startOperation({command:{name:"insertstring"}});var I=this.applyComposition.bind(this,E,M);this.selection.rangeCount?this.forEachSelection(I):I(),this.endOperation()},T.prototype.applyComposition=function(E,M){if(M.extendLeft||M.extendRight){var I=this.selection.getRange();I.start.column-=M.extendLeft,I.end.column+=M.extendRight,I.start.column<0&&(I.start.row--,I.start.column+=this.session.getLine(I.start.row).length+1),this.selection.setRange(I),!E&&!I.isEmpty()&&this.remove()}if((E||!this.selection.isEmpty())&&this.insert(E,!0),M.restoreStart||M.restoreEnd){var I=this.selection.getRange();I.start.column-=M.restoreStart,I.end.column-=M.restoreEnd,this.selection.setRange(I)}},T.prototype.onCommandKey=function(E,M,I){return this.keyBinding.onCommandKey(E,M,I)},T.prototype.setOverwrite=function(E){this.session.setOverwrite(E)},T.prototype.getOverwrite=function(){return this.session.getOverwrite()},T.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},T.prototype.setScrollSpeed=function(E){this.setOption("scrollSpeed",E)},T.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},T.prototype.setDragDelay=function(E){this.setOption("dragDelay",E)},T.prototype.getDragDelay=function(){return this.getOption("dragDelay")},T.prototype.setSelectionStyle=function(E){this.setOption("selectionStyle",E)},T.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},T.prototype.setHighlightActiveLine=function(E){this.setOption("highlightActiveLine",E)},T.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},T.prototype.setHighlightGutterLine=function(E){this.setOption("highlightGutterLine",E)},T.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},T.prototype.setHighlightSelectedWord=function(E){this.setOption("highlightSelectedWord",E)},T.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},T.prototype.setAnimatedScroll=function(E){this.renderer.setAnimatedScroll(E)},T.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},T.prototype.setShowInvisibles=function(E){this.renderer.setShowInvisibles(E)},T.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},T.prototype.setDisplayIndentGuides=function(E){this.renderer.setDisplayIndentGuides(E)},T.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},T.prototype.setHighlightIndentGuides=function(E){this.renderer.setHighlightIndentGuides(E)},T.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},T.prototype.setShowPrintMargin=function(E){this.renderer.setShowPrintMargin(E)},T.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},T.prototype.setPrintMarginColumn=function(E){this.renderer.setPrintMarginColumn(E)},T.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},T.prototype.setReadOnly=function(E){this.setOption("readOnly",E)},T.prototype.getReadOnly=function(){return this.getOption("readOnly")},T.prototype.setBehavioursEnabled=function(E){this.setOption("behavioursEnabled",E)},T.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},T.prototype.setWrapBehavioursEnabled=function(E){this.setOption("wrapBehavioursEnabled",E)},T.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},T.prototype.setShowFoldWidgets=function(E){this.setOption("showFoldWidgets",E)},T.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},T.prototype.setFadeFoldWidgets=function(E){this.setOption("fadeFoldWidgets",E)},T.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},T.prototype.remove=function(E){this.selection.isEmpty()&&(E=="left"?this.selection.selectLeft():this.selection.selectRight());var M=this.getSelectionRange();if(this.getBehavioursEnabled()){var I=this.session,N=I.getState(M.start.row),L=I.getMode().transformAction(N,"deletion",this,I,M);if(M.end.column===0){var $=I.getTextRange(M);if($[$.length-1]==` +`){var P=I.getLine(M.end.row);/^\s+$/.test(P)&&(M.end.column=P.length)}}L&&(M=L)}this.session.remove(M),this.clearSelection()},T.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},T.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},T.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},T.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var E=this.getSelectionRange();E.start.column==E.end.column&&E.start.row==E.end.row&&(E.end.column=0,E.end.row++),this.session.remove(E),this.clearSelection()},T.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var E=this.getCursorPosition();this.insert(` +`),this.moveCursorToPosition(E)},T.prototype.setGhostText=function(E,M){this.session.widgetManager||(this.session.widgetManager=new x(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(E,M)},T.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},T.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var E=this.getCursorPosition(),M=E.column;if(M!==0){var I=this.session.getLine(E.row),N,L;MF.toLowerCase()?1:0});for(var L=new m(0,0,0,0),N=E.first;N<=E.last;N++){var $=M.getLine(N);L.start.row=N,L.end.row=N,L.end.column=$.length,M.replace(L,I[N-E.first])}},T.prototype.toggleCommentLines=function(){var E=this.session.getState(this.getCursorPosition().row),M=this.$getSelectedRows();this.session.getMode().toggleCommentLines(E,this.session,M.first,M.last)},T.prototype.toggleBlockComment=function(){var E=this.getCursorPosition(),M=this.session.getState(E.row),I=this.getSelectionRange();this.session.getMode().toggleBlockComment(M,this.session,I,E)},T.prototype.getNumberAt=function(E,M){var I=/[\-]?[0-9]+(?:\.[0-9]+)?/g;I.lastIndex=0;for(var N=this.session.getLine(E);I.lastIndex=M){var $={value:L[0],start:L.index,end:L.index+L[0].length};return $}}return null},T.prototype.modifyNumber=function(E){var M=this.selection.getCursor().row,I=this.selection.getCursor().column,N=new m(M,I-1,M,I),L=this.session.getTextRange(N);if(!isNaN(parseFloat(L))&&isFinite(L)){var $=this.getNumberAt(M,I);if($){var P=$.value.indexOf(".")>=0?$.start+$.value.indexOf(".")+1:$.end,F=$.start+$.value.length-P,H=parseFloat($.value);H*=Math.pow(10,F),P!==$.end&&I=P&&$<=F&&(I=de,H.selection.clearSelection(),H.moveCursorTo(E,P+N),H.selection.selectTo(E,F+N)),P=F});for(var W=this.$toggleWordPairs,B,U=0;U=F&&P<=H&&G.match(/((?:https?|ftp):\/\/[\S]+)/)){W=G.replace(/[\s:.,'";}\]]+$/,"");break}F=H}}catch(Y){I={error:Y}}finally{try{U&&!U.done&&(N=B.return)&&N.call(B)}finally{if(I)throw I.error}}return W},T.prototype.openLink=function(){var E=this.selection.getCursor(),M=this.findLinkAt(E.row,E.column);return M&&window.open(M,"_blank"),M!=null},T.prototype.removeLines=function(){var E=this.$getSelectedRows();this.session.removeFullLines(E.first,E.last),this.clearSelection()},T.prototype.duplicateSelection=function(){var E=this.selection,M=this.session,I=E.getRange(),N=E.isBackwards();if(I.isEmpty()){var L=I.start.row;M.duplicateLines(L,L)}else{var $=N?I.start:I.end,P=M.insert($,M.getTextRange(I));I.start=$,I.end=P,E.setSelectionRange(I,N)}},T.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},T.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},T.prototype.moveText=function(E,M,I){return this.session.moveText(E,M,I)},T.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},T.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},T.prototype.$moveLines=function(E,M){var I,N,L=this.selection;if(!L.inMultiSelectMode||this.inVirtualSelectionMode){var $=L.toOrientedRange();I=this.$getSelectedRows($),N=this.session.$moveLines(I.first,I.last,M?0:E),M&&E==-1&&(N=0),$.moveBy(N,0),L.fromOrientedRange($)}else{var P=L.rangeList.ranges;L.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var F=0,H=0,W=P.length,B=0;BY+1)break;Y=X.last}for(B--,F=this.session.$moveLines(G,Y,M?0:E),M&&E==-1&&(U=B+1);U<=B;)P[U].moveBy(F,0),U++;M||(F=0),H+=F}L.fromOrientedRange(L.ranges[0]),L.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},T.prototype.$getSelectedRows=function(E){return E=(E||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(E.start.row),last:this.session.getRowFoldEnd(E.end.row)}},T.prototype.onCompositionStart=function(E){this.renderer.showComposition(E)},T.prototype.onCompositionUpdate=function(E){this.renderer.setCompositionText(E)},T.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},T.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},T.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},T.prototype.isRowVisible=function(E){return E>=this.getFirstVisibleRow()&&E<=this.getLastVisibleRow()},T.prototype.isRowFullyVisible=function(E){return E>=this.renderer.getFirstFullyVisibleRow()&&E<=this.renderer.getLastFullyVisibleRow()},T.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},T.prototype.$moveByPage=function(E,M){var I=this.renderer,N=this.renderer.layerConfig,L=E*Math.floor(N.height/N.lineHeight);M===!0?this.selection.$moveSelection(function(){this.moveCursorBy(L,0)}):M===!1&&(this.selection.moveCursorBy(L,0),this.selection.clearSelection());var $=I.scrollTop;I.scrollBy(0,L*N.lineHeight),M!=null&&I.scrollCursorIntoView(null,.5),I.animateScrolling($)},T.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},T.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},T.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},T.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},T.prototype.scrollPageDown=function(){this.$moveByPage(1)},T.prototype.scrollPageUp=function(){this.$moveByPage(-1)},T.prototype.scrollToRow=function(E){this.renderer.scrollToRow(E)},T.prototype.scrollToLine=function(E,M,I,N){this.renderer.scrollToLine(E,M,I,N)},T.prototype.centerSelection=function(){var E=this.getSelectionRange(),M={row:Math.floor(E.start.row+(E.end.row-E.start.row)/2),column:Math.floor(E.start.column+(E.end.column-E.start.column)/2)};this.renderer.alignCursor(M,.5)},T.prototype.getCursorPosition=function(){return this.selection.getCursor()},T.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},T.prototype.getSelectionRange=function(){return this.selection.getRange()},T.prototype.selectAll=function(){this.selection.selectAll()},T.prototype.clearSelection=function(){this.selection.clearSelection()},T.prototype.moveCursorTo=function(E,M){this.selection.moveCursorTo(E,M)},T.prototype.moveCursorToPosition=function(E){this.selection.moveCursorToPosition(E)},T.prototype.jumpToMatching=function(E,M){var I=this.getCursorPosition(),N=new k(this.session,I.row,I.column),L=N.getCurrentToken(),$=0;L&&L.type.indexOf("tag-name")!==-1&&(L=N.stepBackward());var P=L||N.stepForward();if(P){var F,H=!1,W={},B=I.column-P.start,U,G={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(P.value.match(/[{}()\[\]]/g)){for(;B1?W[P.value]++:L.value==="=0;--$)this.$tryReplace(I[$],E)&&N++;return this.selection.setSelectionRange(L),N},T.prototype.$tryReplace=function(E,M){var I=this.session.getTextRange(E);return M=this.$search.replace(I,M),M!==null?(E.end=this.session.replace(E,M),E):null},T.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},T.prototype.find=function(E,M,I){M||(M={}),typeof E=="string"||E instanceof RegExp?M.needle=E:typeof E=="object"&&s.mixin(M,E);var N=this.selection.getRange();M.needle==null&&(E=this.session.getTextRange(N)||this.$search.$options.needle,E||(N=this.session.getWordRange(N.start.row,N.start.column),E=this.session.getTextRange(N)),this.$search.set({needle:E})),this.$search.set(M),M.start||this.$search.set({start:N});var L=this.$search.find(this.session);if(M.preventScroll)return L;if(L)return this.revealRange(L,I),L;M.backwards?N.start=N.end:N.end=N.start,this.selection.setRange(N)},T.prototype.findNext=function(E,M){this.find({skipCurrent:!0,backwards:!1},E,M)},T.prototype.findPrevious=function(E,M){this.find(E,{skipCurrent:!0,backwards:!0},M)},T.prototype.revealRange=function(E,M){this.session.unfold(E),this.selection.setSelectionRange(E);var I=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(E.start,E.end,.5),M!==!1&&this.renderer.animateScrolling(I)},T.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},T.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},T.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(E){E.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},T.prototype.setAutoScrollEditorIntoView=function(E){if(E){var M,I=this,N=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var L=this.$scrollAnchor;L.style.cssText="position:absolute",this.container.insertBefore(L,this.container.firstChild);var $=this.on("changeSelection",function(){N=!0}),P=this.renderer.on("beforeRender",function(){N&&(M=I.renderer.container.getBoundingClientRect())}),F=this.renderer.on("afterRender",function(){if(N&&M&&(I.isFocused()||I.searchBox&&I.searchBox.isFocused())){var H=I.renderer,W=H.$cursorLayer.$pixelPos,B=H.layerConfig,U=W.top-B.offset;W.top>=0&&U+M.top<0?N=!0:W.topwindow.innerHeight?N=!1:N=null,N!=null&&(L.style.top=U+"px",L.style.left=W.left+"px",L.style.height=B.lineHeight+"px",L.scrollIntoView(N)),N=M=null}});this.setAutoScrollEditorIntoView=function(H){H||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",$),this.renderer.off("afterRender",F),this.renderer.off("beforeRender",P))}}},T.prototype.$resetCursorStyle=function(){var E=this.$cursorStyle||"ace",M=this.renderer.$cursorLayer;M&&(M.setSmoothBlinking(/smooth/.test(E)),M.isBlinking=!this.$readOnly&&E!="wide",l.setCssClass(M.element,"ace_slim-cursors",/slim/.test(E)))},T.prototype.prompt=function(E,M,I){var N=this;w.loadModule("ace/ext/prompt",function(L){L.prompt(N,E,M,I)})},T}();R.$uid=0,R.prototype.curOp=null,R.prototype.prevOp={},R.prototype.$mergeableCommands=["backspace","del","insertstring"],R.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],s.implement(R.prototype,v),w.defineOptions(R.prototype,"editor",{selectionStyle:{set:function(T){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:T})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(T){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(T){this.textInput.setReadOnly(T),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(T){this.textInput.setCopyWithEmptySelection(T)},initialValue:!1},cursorStyle:{set:function(T){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(T){this.setAutoScrollEditorIntoView(T)}},keyboardHandler:{set:function(T){this.setKeyboardHandler(T)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(T){this.session.setValue(T)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(T){this.setSession(T)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(T){this.renderer.$gutterLayer.setShowLineNumbers(T),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),T&&this.$relativeLineNumbers?_.attach(this):_.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(T){this.$showLineNumbers&&T?_.attach(this):_.detach(this)}},placeholder:{set:function(T){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var E=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(E&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),l.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!E&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),l.addCssClass(this.container,"ace_hasPlaceholder");var M=l.createElement("div");M.className="ace_placeholder",M.textContent=this.$placeholder||"",this.renderer.placeholderNode=M,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!E&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(T){var E={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(N){N.blur(),N.renderer.scroller.focus()},readOnly:!0},M=function(N){if(N.target==this.renderer.scroller&&N.keyCode===O.enter){N.preventDefault();var L=this.getCursorPosition().row;this.isRowVisible(L)||this.scrollToLine(L,!0,!0),this.focus()}},I;T?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",A("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",A("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",M.bind(this)),this.commands.addCommand(E),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",A("editor")),this.renderer.$gutter.setAttribute("aria-label",A("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),I||(I=new S(this)),I.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",M.bind(this)),this.commands.removeCommand(E),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),I&&I.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var _={getText:function(T,E){return(Math.abs(T.selection.lead.row-E)||E+1+(E<9?"·":""))+""},getWidth:function(T,E,M){return Math.max(E.toString().length,(M.lastRow+1).toString().length,2)*M.characterWidth},update:function(T,E){E.renderer.$loop.schedule(E.renderer.CHANGE_GUTTER)},attach:function(T){T.renderer.$gutterLayer.$renderer=this,T.on("changeSelection",this.update),this.update(null,T)},detach:function(T){T.renderer.$gutterLayer.$renderer==this&&(T.renderer.$gutterLayer.$renderer=null),T.off("changeSelection",this.update),this.update(null,T)}};r.Editor=R}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,r,o){var i=n("../lib/dom"),s=function(){function l(a,u){this.element=a,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return l.prototype.moveContainer=function(a){i.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},l.prototype.pageChanged=function(a,u){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},l.prototype.computeLineTop=function(a,u,c){var d=u.firstRowScreen*u.lineHeight,h=Math.floor(d/this.canvasHeight),p=c.documentToScreenRow(a,0)*u.lineHeight;return p-h*this.canvasHeight},l.prototype.computeLineHeight=function(a,u,c){return u.lineHeight*c.getRowLineCount(a)},l.prototype.getLength=function(){return this.cells.length},l.prototype.get=function(a){return this.cells[a]},l.prototype.shift=function(){this.$cacheCell(this.cells.shift())},l.prototype.pop=function(){this.$cacheCell(this.cells.pop())},l.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var u=i.createFragment(this.element),c=0;cb&&(x=y.end.row+1,y=g.getNextFoldLine(x,y),b=y?y.start.row:1/0),x>v){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}w=this.$lines.get(++k),w?w.row=x:(w=this.$lines.createCell(x,f,this.session,h),this.$lines.push(w)),this.$renderCell(w,f,y,x),x++}this._signal("afterRender"),this.$updateGutterWidth(f)},p.prototype.$updateGutterWidth=function(f){var g=this.session,m=g.gutterRenderer||this.$renderer,v=g.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||g.$useWrapMode)&&(y=g.getLength()+v-1);var b=m?m.getWidth(g,y,f):y.toString().length*f.characterWidth,w=this.$padding||this.$computePadding();b+=w.left+w.right,b!==this.gutterWidth&&!isNaN(b)&&(this.gutterWidth=b,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",b))},p.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var f=this.session.selection.getCursor();this.$cursorRow!==f.row&&(this.$cursorRow=f.row)}},p.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var f=this.session.selection.cursor.row;if(this.$cursorRow=f,!(this.$cursorCell&&this.$cursorCell.row==f)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var g=this.$lines.cells;this.$cursorCell=null;for(var m=0;m=this.$cursorRow){if(v.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(m>0&&y&&y.start.row==g[m-1].row)v=g[m-1];else break}v.element.className="ace_gutter-active-line "+v.element.className,this.$cursorCell=v;break}}}}},p.prototype.scrollLines=function(f){var g=this.config;if(this.config=f,this.$updateCursorRow(),this.$lines.pageChanged(g,f))return this.update(f);this.$lines.moveContainer(f);var m=Math.min(f.lastRow+f.gutterOffset,this.session.getLength()-1),v=this.oldLastRow;if(this.oldLastRow=m,!g||v0;y--)this.$lines.shift();if(v>m)for(var y=this.session.getFoldedRowCount(m+1,v);y>0;y--)this.$lines.pop();f.firstRowv&&this.$lines.push(this.$renderLines(f,v+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(f)},p.prototype.$renderLines=function(f,g,m){for(var v=[],y=g,b=this.session.getNextFoldLine(y),w=b?b.start.row:1/0;y>w&&(y=b.end.row+1,b=this.session.getNextFoldLine(y,b),w=b?b.start.row:1/0),!(y>m);){var k=this.$lines.createCell(y,f,this.session,h);this.$renderCell(k,f,b,y),v.push(k),y++}return v},p.prototype.$renderCell=function(f,g,m,v){var y=f.element,b=this.session,w=y.childNodes[0],k=y.childNodes[1],x=y.childNodes[2],S=x.firstChild,A=b.$firstLineNumber,C=b.$breakpoints,O=b.$decorations,R=b.gutterRenderer||this.$renderer,_=this.$showFoldWidgets&&b.foldWidgets,T=m?m.start.row:Number.MAX_VALUE,E=g.lineHeight+"px",M=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",I=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",N=(R?R.getText(b,v):v+A).toString();if(this.$highlightGutterLine&&(v==this.$cursorRow||m&&v=T&&this.$cursorRow<=m.end.row)&&(M+="ace_gutter-active-line ",this.$cursorCell!=f&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=f)),C[v]&&(M+=C[v]),O[v]&&(M+=O[v]),this.$annotations[v]&&v!==T&&(M+=this.$annotations[v].className),_){var L=_[v];L==null&&(L=_[v]=b.getFoldWidget(v))}if(L){var $="ace_fold-widget ace_"+L,P=L=="start"&&v==T&&vm.right-g.right)return"foldWidgets"},p}();d.prototype.$fixedWidth=!1,d.prototype.$highlightGutterLine=!0,d.prototype.$renderer="",d.prototype.$showLineNumbers=!0,d.prototype.$showFoldWidgets=!0,s.implement(d.prototype,a);function h(p){var f=document.createTextNode("");p.appendChild(f);var g=i.createElement("span");p.appendChild(g);var m=i.createElement("span");p.appendChild(m);var v=i.createElement("span");return m.appendChild(v),p}r.Gutter=d}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,r,o){var i=n("../range").Range,s=n("../lib/dom"),l=function(){function u(c){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",c.appendChild(this.element)}return u.prototype.setPadding=function(c){this.$padding=c},u.prototype.setSession=function(c){this.session=c},u.prototype.setMarkers=function(c){this.markers=c},u.prototype.elt=function(c,d){var h=this.i!=-1&&this.element.childNodes[this.i];h?this.i++:(h=document.createElement("div"),this.element.appendChild(h),this.i=-1),h.style.cssText=d,h.className=c},u.prototype.update=function(c){if(c){this.config=c,this.i=0;var d;for(var h in this.markers){var p=this.markers[h];if(!p.range){p.update(d,this,this.session,c);continue}var f=p.range.clipRows(c.firstRow,c.lastRow);if(!f.isEmpty())if(f=f.toScreenRange(this.session),p.renderer){var g=this.$getTop(f.start.row,c),m=this.$padding+f.start.column*c.characterWidth;p.renderer(d,f,m,g,c)}else p.type=="fullLine"?this.drawFullLineMarker(d,f,p.clazz,c):p.type=="screenLine"?this.drawScreenLineMarker(d,f,p.clazz,c):f.isMultiLine()?p.type=="text"?this.drawTextMarker(d,f,p.clazz,c):this.drawMultiLineMarker(d,f,p.clazz,c):this.drawSingleLineMarker(d,f,p.clazz+" ace_start ace_br15",c)}if(this.i!=-1)for(;this.ik,y==v),p,y==v?0:1,f)},u.prototype.drawMultiLineMarker=function(c,d,h,p,f){var g=this.$padding,m=p.lineHeight,v=this.$getTop(d.start.row,p),y=g+d.start.column*p.characterWidth;if(f=f||"",this.session.$bidiHandler.isBidiRow(d.start.row)){var b=d.clone();b.end.row=b.start.row,b.end.column=this.session.getLine(b.start.row).length,this.drawBidiSingleLineMarker(c,b,h+" ace_br1 ace_start",p,null,f)}else this.elt(h+" ace_br1 ace_start","height:"+m+"px;right:0;top:"+v+"px;left:"+y+"px;"+(f||""));if(this.session.$bidiHandler.isBidiRow(d.end.row)){var b=d.clone();b.start.row=b.end.row,b.start.column=0,this.drawBidiSingleLineMarker(c,b,h+" ace_br12",p,null,f)}else{v=this.$getTop(d.end.row,p);var w=d.end.column*p.characterWidth;this.elt(h+" ace_br12","height:"+m+"px;width:"+w+"px;top:"+v+"px;left:"+g+"px;"+(f||""))}if(m=(d.end.row-d.start.row-1)*p.lineHeight,!(m<=0)){v=this.$getTop(d.start.row+1,p);var k=(d.start.column?1:0)|(d.end.column?0:8);this.elt(h+(k?" ace_br"+k:""),"height:"+m+"px;right:0;top:"+v+"px;left:"+g+"px;"+(f||""))}},u.prototype.drawSingleLineMarker=function(c,d,h,p,f,g){if(this.session.$bidiHandler.isBidiRow(d.start.row))return this.drawBidiSingleLineMarker(c,d,h,p,f,g);var m=p.lineHeight,v=(d.end.column+(f||0)-d.start.column)*p.characterWidth,y=this.$getTop(d.start.row,p),b=this.$padding+d.start.column*p.characterWidth;this.elt(h,"height:"+m+"px;width:"+v+"px;top:"+y+"px;left:"+b+"px;"+(g||""))},u.prototype.drawBidiSingleLineMarker=function(c,d,h,p,f,g){var m=p.lineHeight,v=this.$getTop(d.start.row,p),y=this.$padding,b=this.session.$bidiHandler.getSelections(d.start.column,d.end.column);b.forEach(function(w){this.elt(h,"height:"+m+"px;width:"+(w.width+(f||0))+"px;top:"+v+"px;left:"+(y+w.left)+"px;"+(g||""))},this)},u.prototype.drawFullLineMarker=function(c,d,h,p,f){var g=this.$getTop(d.start.row,p),m=p.lineHeight;d.start.row!=d.end.row&&(m+=this.$getTop(d.end.row,p)-g),this.elt(h,"height:"+m+"px;top:"+g+"px;left:0;right:0;"+(f||""))},u.prototype.drawScreenLineMarker=function(c,d,h,p,f){var g=this.$getTop(d.start.row,p),m=p.lineHeight;this.elt(h,"height:"+m+"px;top:"+g+"px;left:0;right:0;"+(f||""))},u}();l.prototype.$padding=0;function a(u,c,d,h){return(u?1:0)|(c?2:0)|(d?4:0)|(h?8:0)}r.Marker=l}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,r,o){var i=new Set(["text","rparen","lparen"]);r.isTextToken=function(s){return i.has(s)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/dom"),l=n("../lib/lang"),a=n("./lines").Lines,u=n("../lib/event_emitter").EventEmitter,c=n("../config").nls,d=n("./text_util").isTextToken,h=function(){function p(f){this.dom=s,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",f.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return p.prototype.$updateEolChar=function(){var f=this.session.doc,g=f.getNewLineCharacter()==` `&&f.getNewLineMode()!="windows",m=g?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},p.prototype.setPadding=function(f){this.$padding=f,this.element.style.margin="0 "+f+"px"},p.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},p.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},p.prototype.$setFontMetrics=function(f){this.$fontMetrics=f,this.$fontMetrics.on("changeCharacterSize",(function(g){this._signal("changeCharacterSize",g)}).bind(this)),this.$pollSizeChanges()},p.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},p.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},p.prototype.setSession=function(f){this.session=f,f&&this.$computeTabString()},p.prototype.setShowInvisibles=function(f){return this.showInvisibles==f?!1:(this.showInvisibles=f,typeof f=="string"?(this.showSpaces=/tab/i.test(f),this.showTabs=/space/i.test(f),this.showEOL=/eol/i.test(f)):this.showSpaces=this.showTabs=this.showEOL=f,this.$computeTabString(),!0)},p.prototype.setDisplayIndentGuides=function(f){return this.displayIndentGuides==f?!1:(this.displayIndentGuides=f,this.$computeTabString(),!0)},p.prototype.setHighlightIndentGuides=function(f){return this.$highlightIndentGuides===f?!1:(this.$highlightIndentGuides=f,f)},p.prototype.$computeTabString=function(){var f=this.session.getTabSize();this.tabSize=f;for(var g=this.$tabStrings=[0],m=1;mA&&(x=S.end.row+1,S=this.session.getNextFoldLine(x,S),A=S?S.start.row:1/0),!(x>y);){var C=b[w++];if(C){this.dom.removeChildren(C),this.$renderLine(C,x,x==A?S:!1),k&&(C.style.top=this.$lines.computeLineTop(x,f,this.session)+"px");var O=f.lineHeight*this.session.getRowLength(x)+"px";C.style.height!=O&&(k=!0,C.style.height=O)}x++}if(k)for(;w0;y--)this.$lines.shift();if(g.lastRow>f.lastRow)for(var y=this.session.getFoldedRowCount(f.lastRow+1,g.lastRow);y>0;y--)this.$lines.pop();f.firstRowg.lastRow&&this.$lines.push(this.$renderLinesFragment(f,g.lastRow+1,f.lastRow)),this.$highlightIndentGuide()},p.prototype.$renderLinesFragment=function(f,g,m){for(var v=[],y=g,b=this.session.getNextFoldLine(y),w=b?b.start.row:1/0;y>w&&(y=b.end.row+1,b=this.session.getNextFoldLine(y,b),w=b?b.start.row:1/0),!(y>m);){var k=this.$lines.createCell(y,f,this.session),x=k.element;this.dom.removeChildren(x),s.setStyle(x.style,"height",this.$lines.computeLineHeight(y,f,this.session)+"px"),s.setStyle(x.style,"top",this.$lines.computeLineTop(y,f,this.session)+"px"),this.$renderLine(x,y,y==w?b:!1),this.$useLineGroups()?x.className="ace_line_group":x.className="ace_line",v.push(k),y++}return v},p.prototype.update=function(f){this.$lines.moveContainer(f),this.config=f;for(var g=f.firstRow,m=f.lastRow,v=this.$lines;v.getLength();)v.pop();v.push(this.$renderLinesFragment(f,g,m))},p.prototype.$renderToken=function(f,g,m,v){for(var y=this,b=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,w=this.dom.createFragment(this.element),k,x=0;k=b.exec(v);){var S=k[1],A=k[2],C=k[3],O=k[4],R=k[5];if(!(!y.showSpaces&&A)){var _=x!=k.index?v.slice(x,k.index):"";if(x=k.index+k[0].length,_&&w.appendChild(this.dom.createTextNode(_,this.element)),S){var T=y.session.getScreenTabSize(g+k.index);w.appendChild(y.$tabStrings[T].cloneNode(!0)),g+=T-1}else if(A)if(y.showSpaces){var E=this.dom.createElement("span");E.className="ace_invisible ace_invisible_space",E.textContent=l.stringRepeat(y.SPACE_CHAR,A.length),w.appendChild(E)}else w.appendChild(this.dom.createTextNode(A,this.element));else if(C){var E=this.dom.createElement("span");E.className="ace_invisible ace_invisible_space ace_invalid",E.textContent=l.stringRepeat(y.SPACE_CHAR,C.length),w.appendChild(E)}else if(O){g+=1;var E=this.dom.createElement("span");E.style.width=y.config.characterWidth*2+"px",E.className=y.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",E.textContent=y.showSpaces?y.SPACE_CHAR:O,w.appendChild(E)}else if(R){g+=1;var E=this.dom.createElement("span");E.style.width=y.config.characterWidth*2+"px",E.className="ace_cjk",E.textContent=R,w.appendChild(E)}}}if(w.appendChild(this.dom.createTextNode(x?v.slice(x):v,this.element)),d(m.type))f.appendChild(w);else{var M="ace_"+m.type.replace(/\./g," ace_"),E=this.dom.createElement("span");m.type=="fold"&&(E.style.width=m.value.length*this.config.characterWidth+"px",E.setAttribute("title",c("Unfold code"))),E.className=M,E.appendChild(w),f.appendChild(E)}return g+v.length},p.prototype.renderIndentGuide=function(f,g,m){var v=g.search(this.$indentGuideRe);if(v<=0||v>=m)return g;if(g[0]==" "){v-=v%this.tabSize;for(var y=v/this.tabSize,b=0;bb[w].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&f[g.row]!==""&&g.column===f[g.row].length){this.$highlightIndentGuideMarker.dir=1;for(var w=g.row+1;w0){for(var y=0;y=this.$highlightIndentGuideMarker.start+1){if(v.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(v,g)}}else for(var m=f.length-1;m>=0;m--){var v=f[m];if(this.$highlightIndentGuideMarker.end&&v.row=b;)w=this.$renderToken(k,w,S,A.substring(0,b-v)),A=A.substring(b-v),v=b,k=this.$createLineElement(),f.appendChild(k),k.appendChild(this.dom.createTextNode(l.stringRepeat(" ",m.indent),this.element)),y++,w=0,b=m[y]||Number.MAX_VALUE;A.length!=0&&(v+=A.length,w=this.$renderToken(k,w,S,A))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,w,null,"",!0)},p.prototype.$renderSimpleLine=function(f,g){for(var m=0,v=0;vthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(f,m,y,b);m=this.$renderToken(f,m,y,b)}}},p.prototype.$renderOverflowMessage=function(f,g,m,v,y){m&&this.$renderToken(f,g,m,v.slice(0,this.MAX_LINE_LENGTH-g));var b=this.dom.createElement("span");b.className="ace_inline_button ace_keyword ace_toggle_wrap",b.textContent=y?"":"",f.appendChild(b)},p.prototype.$renderLine=function(f,g,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(g)),m)var v=this.$getFoldLineTokens(g,m);else var v=this.session.getTokens(g);var y=f;if(v.length){var b=this.session.getRowSplitData(g);if(b&&b.length){this.$renderWrappedLine(f,v,b);var y=f.lastChild}else{var y=f;this.$useLineGroups()&&(y=this.$createLineElement(),f.appendChild(y)),this.$renderSimpleLine(y,v)}}else this.$useLineGroups()&&(y=this.$createLineElement(),f.appendChild(y));if(this.showEOL&&y){m&&(g=m.end.row);var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_eol",w.textContent=g==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,y.appendChild(w)}},p.prototype.$getFoldLineTokens=function(f,g){var m=this.session,v=[];function y(w,k,x){for(var S=0,A=0;A+w[S].value.lengthx-k&&(C=C.substring(0,x-k)),v.push({type:w[S].type,value:C}),A=k+C.length,S+=1}for(;Ax?v.push({type:w[S].type,value:C.substring(0,x-A)}):v.push(w[S]),A+=C.length,S+=1}}var b=m.getTokens(f);return g.walk(function(w,k,x,S,A){w!=null?v.push({type:"fold",value:w}):(A&&(b=m.getTokens(k)),b.length&&y(b,S,x))},g.end.row,this.session.getLine(g.end.row).length),v},p.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},p}();h.prototype.EOF_CHAR="¶",h.prototype.EOL_CHAR_LF="¬",h.prototype.EOL_CHAR_CRLF="¤",h.prototype.EOL_CHAR=h.prototype.EOL_CHAR_LF,h.prototype.TAB_CHAR="—",h.prototype.SPACE_CHAR="·",h.prototype.$padding=0,h.prototype.MAX_LINE_LENGTH=1e4,h.prototype.showInvisibles=!1,h.prototype.showSpaces=!1,h.prototype.showTabs=!1,h.prototype.showEOL=!1,h.prototype.displayIndentGuides=!0,h.prototype.$highlightIndentGuides=!0,h.prototype.$tabStrings=[],h.prototype.destroy={},h.prototype.onChangeTabSize=h.prototype.$computeTabString,i.implement(h.prototype,u),r.Text=h}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,r,o){var i=n("../lib/dom"),s=function(){function l(a){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return l.prototype.$updateOpacity=function(a){for(var u=this.cursors,c=u.length;c--;)i.setStyle(u[c].style,"opacity",a?"":"0")},l.prototype.$startCssAnimation=function(){for(var a=this.cursors,u=a.length;u--;)a[u].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},l.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},l.prototype.setPadding=function(a){this.$padding=a},l.prototype.setSession=function(a){this.session=a},l.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},l.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},l.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,i.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},l.prototype.addCursor=function(){var a=i.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},l.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},l.prototype.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},l.prototype.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},l.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var u=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),u()},this.blinkInterval),u()}},l.prototype.getPixelPosition=function(a,u){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(a),d=this.$padding+(this.session.$bidiHandler.isBidiRow(c.row,a.row)?this.session.$bidiHandler.getPosLeft(c.column):c.column*this.config.characterWidth),h=(c.row-(u?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:d,top:h}},l.prototype.isCursorInView=function(a,u){return a.top>=0&&a.topa.height+a.offset||p.top<0)&&c>1)){var f=this.cursors[d++]||this.addCursor(),g=f.style;this.drawCursor?this.drawCursor(f,p,a,u[c],this.session):this.isCursorInView(p,a)?(i.setStyle(g,"display","block"),i.translate(f,p.left,p.top),i.setStyle(g,"width",Math.round(a.characterWidth)+"px"),i.setStyle(g,"height",a.lineHeight+"px")):i.setStyle(g,"display","none")}}for(;this.cursors.length>d;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=p,this.restartTimer()},l.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},l.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},l}();s.prototype.$padding=0,s.prototype.drawCursor=null,r.Cursor=s}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,o){var i=this&&this.__extends||function(){var f=function(g,m){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(v[b]=y[b])},f(g,m)};return function(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");f(g,m);function v(){this.constructor=g}g.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)}}(),s=n("./lib/oop"),l=n("./lib/dom"),a=n("./lib/event"),u=n("./lib/event_emitter").EventEmitter,c=32768,d=function(){function f(g,m){this.element=l.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.inner=l.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),g.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return f.prototype.setVisible=function(g){this.element.style.display=g?"":"none",this.isVisible=g,this.coeff=1},f}();s.implement(d.prototype,u);var h=function(f){i(g,f);function g(m,v){var y=f.call(this,m,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,v.$scrollbarWidth=y.width=l.scrollbarWidth(m.ownerDocument),y.inner.style.width=y.element.style.width=(y.width||15)+5+"px",y.$minWidth=0,y}return g.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},g.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},g.prototype.setHeight=function(m){this.element.style.height=m+"px"},g.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>c?(this.coeff=c/m,m=c):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},g.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},g}(d);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var p=function(f){i(g,f);function g(m,v){var y=f.call(this,m,"-h")||this;return y.scrollLeft=0,y.height=v.$scrollbarWidth,y.inner.style.height=y.element.style.height=(y.height||15)+5+"px",y}return g.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},g.prototype.getHeight=function(){return this.isVisible?this.height:0},g.prototype.setWidth=function(m){this.element.style.width=m+"px"},g.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},g.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},g.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},g}(d);r.ScrollBar=h,r.ScrollBarV=h,r.ScrollBarH=p,r.VScrollBar=h,r.HScrollBar=p}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,o){var i=this&&this.__extends||function(){var p=function(f,g){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(m[y]=v[y])},p(f,g)};return function(f,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");p(f,g);function m(){this.constructor=f}f.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)}}(),s=n("./lib/oop"),l=n("./lib/dom"),a=n("./lib/event"),u=n("./lib/event_emitter").EventEmitter;l.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ position: absolute; background: rgba(128, 128, 128, 0.6); @@ -5392,7 +5396,7 @@ ${u} .ace_editor>.ace_sb_grabbed { z-index: 8; background: #000; -}`,"ace_scrollbar.css",!1);var c=function(){function p(f,g){this.element=l.createElement("div"),this.element.className="ace_sb"+g,this.inner=l.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,f.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return p.prototype.setVisible=function(f){this.element.style.display=f?"":"none",this.isVisible=f,this.coeff=1},p}();s.implement(c.prototype,u);var d=function(p){i(f,p);function f(g,m){var v=p.call(this,g,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,v.parent=g,v.width=v.VScrollWidth,v.renderer=m,v.inner.style.width=v.element.style.width=(v.width||15)+"px",v.$minWidth=0,v}return f.prototype.onMouseDown=function(g,m){if(g==="mousedown"&&!(a.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientY,b=function(O){y=O.clientY},w=function(){clearInterval(A)},k=m.clientY,x=this.thumbTop,S=function(){if(y!==void 0){var O=v.scrollTopFromThumbTop(x+y-k);O!==v.scrollTop&&v._emit("scroll",{data:O})}};a.capture(this.inner,b,w);var A=setInterval(S,20);return a.preventDefault(m)}var C=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(C)}),a.preventDefault(m)}},f.prototype.getHeight=function(){return this.height},f.prototype.scrollTopFromThumbTop=function(g){var m=g*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},f.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},f.prototype.setHeight=function(g){this.height=Math.max(0,g),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},f.prototype.setScrollHeight=function(g,m){this.pageHeight===g&&!m||(this.pageHeight=g,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},f.prototype.setScrollTop=function(g){this.scrollTop=g,g<0&&(g=0),this.thumbTop=g*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},f}(c);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var h=function(p){i(f,p);function f(g,m){var v=p.call(this,g,"-h")||this;return v.scrollLeft=0,v.scrollWidth=0,v.height=v.HScrollHeight,v.inner.style.height=v.element.style.height=(v.height||12)+"px",v.renderer=m,v}return f.prototype.onMouseDown=function(g,m){if(g==="mousedown"&&!(a.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientX,b=function(O){y=O.clientX},w=function(){clearInterval(A)},k=m.clientX,x=this.thumbLeft,S=function(){if(y!==void 0){var O=v.scrollLeftFromThumbLeft(x+y-k);O!==v.scrollLeft&&v._emit("scroll",{data:O})}};a.capture(this.inner,b,w);var A=setInterval(S,20);return a.preventDefault(m)}var C=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(C)}),a.preventDefault(m)}},f.prototype.getHeight=function(){return this.isVisible?this.height:0},f.prototype.scrollLeftFromThumbLeft=function(g){var m=g*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},f.prototype.setWidth=function(g){this.width=Math.max(0,g),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},f.prototype.setScrollWidth=function(g,m){this.pageWidth===g&&!m||(this.pageWidth=g,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},f.prototype.setScrollLeft=function(g){this.scrollLeft=g,g<0&&(g=0),this.thumbLeft=g*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},f}(c);h.prototype.setInnerWidth=h.prototype.setScrollWidth,r.ScrollBar=d,r.ScrollBarV=d,r.ScrollBarH=h,r.VScrollBar=d,r.HScrollBar=h}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,r,o){var i=n("./lib/event"),s=function(){function l(a,u){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var c=this;this._flush=function(d){c.pending=!1;var h=c.changes;if(h&&(i.blockIdle(100),c.changes=0,c.onRender(h)),c.changes){if(c.$recursionLimit--<0)return;c.schedule()}else c.$recursionLimit=2}}return l.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},l.prototype.clear=function(a){var u=this.changes;return this.changes=0,u},l}();r.RenderLoop=s}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/dom"),l=n("../lib/lang"),a=n("../lib/event"),u=n("../lib/useragent"),c=n("../lib/event_emitter").EventEmitter,d=512,h=typeof ResizeObserver=="function",p=200,f=function(){function g(m){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=l.stringRepeat("X",d),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()}return g.prototype.$setMeasureNodeStyles=function(m,v){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",u.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=v?"hidden":"visible"},g.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var v=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=v&&v.width===m.width&&v.height===m.height,this._emit("changeCharacterSize",{data:m})}},g.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(v){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},g.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=a.onIdle(function v(){m.checkForSizeChanges(),a.onIdle(v,500)},500)},g.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},g.prototype.$measureSizes=function(m){var v={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/d};return v.width===0||v.height===0?null:v},g.prototype.$measureCharWidth=function(m){this.$main.textContent=l.stringRepeat(m,d);var v=this.$main.getBoundingClientRect();return v.width/d},g.prototype.getCharacterWidth=function(m){var v=this.charSizes[m];return v===void 0&&(v=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),v},g.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},g.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(window.getComputedStyle(m).zoom||1)*this.$getZoom(m.parentElement)},g.prototype.$initTransformMeasureNodes=function(){var m=function(v,y){return["div",{style:"position: absolute;top:"+v+"px;left:"+y+"px;"}]};this.els=s.buildDom([m(0,0),m(p,0),m(0,p),m(p,p)],this.el)},g.prototype.transformCoordinates=function(m,v){if(m){var y=this.$getZoom(this.el);m=x(1/y,m)}function b(D,F,U){var W=D[1]*F[0]-D[0]*F[1];return[(-F[1]*U[0]+F[0]*U[1])/W,(+D[1]*U[0]-D[0]*U[1])/W]}function w(D,F){return[D[0]-F[0],D[1]-F[1]]}function k(D,F){return[D[0]+F[0],D[1]+F[1]]}function x(D,F){return[D*F[0],D*F[1]]}this.els||this.$initTransformMeasureNodes();function S(D){var F=D.getBoundingClientRect();return[F.left,F.top]}var A=S(this.els[0]),C=S(this.els[1]),O=S(this.els[2]),R=S(this.els[3]),_=b(w(R,C),w(R,O),w(k(C,O),k(R,A))),T=x(1+_[0],w(C,A)),E=x(1+_[1],w(O,A));if(v){var M=v,I=_[0]*M[0]/p+_[1]*M[1]/p+1,N=k(x(M[0],T),x(M[1],E));return k(x(1/I/p,N),A)}var L=w(m,A),$=b(w(T,x(_[0],L)),w(E,x(_[1],L)),L);return x(p,$)},g}();f.prototype.$characterSize={width:0,height:0},i.implement(f.prototype,c),r.FontMetrics=f}),ace.define("ace/css/editor-css",["require","exports","module"],function(n,r,o){o.exports=` +}`,"ace_scrollbar.css",!1);var c=function(){function p(f,g){this.element=l.createElement("div"),this.element.className="ace_sb"+g,this.inner=l.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,f.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return p.prototype.setVisible=function(f){this.element.style.display=f?"":"none",this.isVisible=f,this.coeff=1},p}();s.implement(c.prototype,u);var d=function(p){i(f,p);function f(g,m){var v=p.call(this,g,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,v.parent=g,v.width=v.VScrollWidth,v.renderer=m,v.inner.style.width=v.element.style.width=(v.width||15)+"px",v.$minWidth=0,v}return f.prototype.onMouseDown=function(g,m){if(g==="mousedown"&&!(a.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientY,b=function(O){y=O.clientY},w=function(){clearInterval(A)},k=m.clientY,x=this.thumbTop,S=function(){if(y!==void 0){var O=v.scrollTopFromThumbTop(x+y-k);O!==v.scrollTop&&v._emit("scroll",{data:O})}};a.capture(this.inner,b,w);var A=setInterval(S,20);return a.preventDefault(m)}var C=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(C)}),a.preventDefault(m)}},f.prototype.getHeight=function(){return this.height},f.prototype.scrollTopFromThumbTop=function(g){var m=g*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},f.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},f.prototype.setHeight=function(g){this.height=Math.max(0,g),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},f.prototype.setScrollHeight=function(g,m){this.pageHeight===g&&!m||(this.pageHeight=g,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},f.prototype.setScrollTop=function(g){this.scrollTop=g,g<0&&(g=0),this.thumbTop=g*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},f}(c);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var h=function(p){i(f,p);function f(g,m){var v=p.call(this,g,"-h")||this;return v.scrollLeft=0,v.scrollWidth=0,v.height=v.HScrollHeight,v.inner.style.height=v.element.style.height=(v.height||12)+"px",v.renderer=m,v}return f.prototype.onMouseDown=function(g,m){if(g==="mousedown"&&!(a.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientX,b=function(O){y=O.clientX},w=function(){clearInterval(A)},k=m.clientX,x=this.thumbLeft,S=function(){if(y!==void 0){var O=v.scrollLeftFromThumbLeft(x+y-k);O!==v.scrollLeft&&v._emit("scroll",{data:O})}};a.capture(this.inner,b,w);var A=setInterval(S,20);return a.preventDefault(m)}var C=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(C)}),a.preventDefault(m)}},f.prototype.getHeight=function(){return this.isVisible?this.height:0},f.prototype.scrollLeftFromThumbLeft=function(g){var m=g*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},f.prototype.setWidth=function(g){this.width=Math.max(0,g),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},f.prototype.setScrollWidth=function(g,m){this.pageWidth===g&&!m||(this.pageWidth=g,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},f.prototype.setScrollLeft=function(g){this.scrollLeft=g,g<0&&(g=0),this.thumbLeft=g*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},f}(c);h.prototype.setInnerWidth=h.prototype.setScrollWidth,r.ScrollBar=d,r.ScrollBarV=d,r.ScrollBarH=h,r.VScrollBar=d,r.HScrollBar=h}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,r,o){var i=n("./lib/event"),s=function(){function l(a,u){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var c=this;this._flush=function(d){c.pending=!1;var h=c.changes;if(h&&(i.blockIdle(100),c.changes=0,c.onRender(h)),c.changes){if(c.$recursionLimit--<0)return;c.schedule()}else c.$recursionLimit=2}}return l.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},l.prototype.clear=function(a){var u=this.changes;return this.changes=0,u},l}();r.RenderLoop=s}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/dom"),l=n("../lib/lang"),a=n("../lib/event"),u=n("../lib/useragent"),c=n("../lib/event_emitter").EventEmitter,d=512,h=typeof ResizeObserver=="function",p=200,f=function(){function g(m){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=l.stringRepeat("X",d),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()}return g.prototype.$setMeasureNodeStyles=function(m,v){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",u.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=v?"hidden":"visible"},g.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var v=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=v&&v.width===m.width&&v.height===m.height,this._emit("changeCharacterSize",{data:m})}},g.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(v){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},g.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=a.onIdle(function v(){m.checkForSizeChanges(),a.onIdle(v,500)},500)},g.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},g.prototype.$measureSizes=function(m){var v={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/d};return v.width===0||v.height===0?null:v},g.prototype.$measureCharWidth=function(m){this.$main.textContent=l.stringRepeat(m,d);var v=this.$main.getBoundingClientRect();return v.width/d},g.prototype.getCharacterWidth=function(m){var v=this.charSizes[m];return v===void 0&&(v=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),v},g.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},g.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(window.getComputedStyle(m).zoom||1)*this.$getZoom(m.parentElement)},g.prototype.$initTransformMeasureNodes=function(){var m=function(v,y){return["div",{style:"position: absolute;top:"+v+"px;left:"+y+"px;"}]};this.els=s.buildDom([m(0,0),m(p,0),m(0,p),m(p,p)],this.el)},g.prototype.transformCoordinates=function(m,v){if(m){var y=this.$getZoom(this.el);m=x(1/y,m)}function b(P,F,H){var W=P[1]*F[0]-P[0]*F[1];return[(-F[1]*H[0]+F[0]*H[1])/W,(+P[1]*H[0]-P[0]*H[1])/W]}function w(P,F){return[P[0]-F[0],P[1]-F[1]]}function k(P,F){return[P[0]+F[0],P[1]+F[1]]}function x(P,F){return[P*F[0],P*F[1]]}this.els||this.$initTransformMeasureNodes();function S(P){var F=P.getBoundingClientRect();return[F.left,F.top]}var A=S(this.els[0]),C=S(this.els[1]),O=S(this.els[2]),R=S(this.els[3]),_=b(w(R,C),w(R,O),w(k(C,O),k(R,A))),T=x(1+_[0],w(C,A)),E=x(1+_[1],w(O,A));if(v){var M=v,I=_[0]*M[0]/p+_[1]*M[1]/p+1,N=k(x(M[0],T),x(M[1],E));return k(x(1/I/p,N),A)}var L=w(m,A),$=b(w(T,x(_[0],L)),w(E,x(_[1],L)),L);return x(p,$)},g}();f.prototype.$characterSize={width:0,height:0},i.implement(f.prototype,c),r.FontMetrics=f}),ace.define("ace/css/editor-css",["require","exports","module"],function(n,r,o){o.exports=` .ace_br1 {border-top-left-radius : 3px;} .ace_br2 {border-top-right-radius : 3px;} .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} @@ -6049,11 +6053,11 @@ ${u} width:1px; height:1px; overflow:hidden; -}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,r,o){var i=n("../lib/dom"),s=n("../lib/oop"),l=n("../lib/event_emitter").EventEmitter,a=function(){function u(c,d){this.canvas=i.createElement("canvas"),this.renderer=d,this.pixelRatio=1,this.maxHeight=d.layerConfig.maxHeight,this.lineHeight=d.layerConfig.lineHeight,this.canvasHeight=c.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=c.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},c.element.appendChild(this.canvas)}return u.prototype.$updateDecorators=function(c){var d=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(c){this.maxHeight=c.maxHeight,this.lineHeight=c.lineHeight,this.canvasHeight=c.height;var h=(c.lastRow+1)*this.lineHeight;h_.priority?1:0}var g=this.renderer.session.$annotations;if(p.clearRect(0,0,this.canvas.width,this.canvas.height),g){var m={info:1,warning:2,error:3};g.forEach(function(R){R.priority=m[R.type]||null}),g=g.sort(f);for(var v=this.renderer.session.$foldData,y=0;ythis.canvasHeight&&(C=this.canvasHeight-this.halfMinDecorationHeight),x=Math.round(C-this.halfMinDecorationHeight),S=Math.round(C+this.halfMinDecorationHeight)}p.fillStyle=d[g[y].type]||null,p.fillRect(0,k,this.canvasWidth,S-x)}}var O=this.renderer.session.selection.getCursor();if(O){var w=this.compensateFoldRows(O.row,v),k=Math.round((O.row-w)*this.lineHeight*this.heightRatio);p.fillStyle="rgba(0, 0, 0, 0.5)",p.fillRect(0,k,this.canvasWidth,2)}},u.prototype.compensateFoldRows=function(c,d){var h=0;if(d&&d.length>0)for(var p=0;pd[p].start.row&&c=d[p].end.row&&(h+=d[p].end.row-d[p].start.row);return h},u}();s.implement(a.prototype,l),r.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],function(n,r,o){var i=n("./lib/oop"),s=n("./lib/dom"),l=n("./lib/lang"),a=n("./config"),u=n("./layer/gutter").Gutter,c=n("./layer/marker").Marker,d=n("./layer/text").Text,h=n("./layer/cursor").Cursor,p=n("./scrollbar").HScrollBar,f=n("./scrollbar").VScrollBar,g=n("./scrollbar_custom").HScrollBar,m=n("./scrollbar_custom").VScrollBar,v=n("./renderloop").RenderLoop,y=n("./layer/font_metrics").FontMetrics,b=n("./lib/event_emitter").EventEmitter,w=n("./css/editor-css"),k=n("./layer/decorators").Decorator,x=n("./lib/useragent");s.importCssString(w,"ace_editor.css",!1);var S=function(){function A(C,O){var R=this;this.container=C||s.createElement("div"),s.addCssClass(this.container,"ace_editor"),s.HI_DPI&&s.addCssClass(this.container,"ace_hidpi"),this.setTheme(O),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=s.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=s.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=s.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new c(this.content);var _=this.$textLayer=new d(this.content);this.canvas=_.element,this.$markerFront=new c(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new f(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.on("scroll",function(T){R.$scrollAnimation||R.session.setScrollTop(T.data-R.scrollMargin.top)}),this.scrollBarH.on("scroll",function(T){R.$scrollAnimation||R.session.setScrollLeft(T.data-R.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(T){R.updateCharacterSize(),R.onResize(!0,R.gutterWidth,R.$size.width,R.$size.height),R._signal("changeCharacterSize",T)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!x.isIOS,this.$loop=new v(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return A.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),s.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},A.prototype.setSession=function(C){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=C,C&&this.scrollMargin.top&&C.getScrollTop()<=0&&C.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(C),this.$markerBack.setSession(C),this.$markerFront.setSession(C),this.$gutterLayer.setSession(C),this.$textLayer.setSession(C),C&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},A.prototype.updateLines=function(C,O,R){if(O===void 0&&(O=1/0),this.$changedLines?(this.$changedLines.firstRow>C&&(this.$changedLines.firstRow=C),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},A.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},A.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},A.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},A.prototype.updateFull=function(C){C?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},A.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},A.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},A.prototype.onResize=function(C,O,R,_){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=C?1:0;var T=this.container;_||(_=T.clientHeight||T.scrollHeight),R||(R=T.clientWidth||T.scrollWidth);var E=this.$updateCachedSize(C,O,R,_);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!R&&!_)return this.resizing=0;C&&(this.$gutterLayer.$padding=null),C?this.$renderChanges(E|this.$changes,!0):this.$loop.schedule(E|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},A.prototype.$updateCachedSize=function(C,O,R,_){_-=this.$extraHeight||0;var T=0,E=this.$size,M={width:E.width,height:E.height,scrollerHeight:E.scrollerHeight,scrollerWidth:E.scrollerWidth};if(_&&(C||E.height!=_)&&(E.height=_,T|=this.CHANGE_SIZE,E.scrollerHeight=E.height,this.$horizScroll&&(E.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(E.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",T=T|this.CHANGE_SCROLL),R&&(C||E.width!=R)){T|=this.CHANGE_SIZE,E.width=R,O==null&&(O=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=O,s.setStyle(this.scrollBarH.element.style,"left",O+"px"),s.setStyle(this.scroller.style,"left",O+this.margin.left+"px"),E.scrollerWidth=Math.max(0,R-O-this.scrollBarV.getWidth()-this.margin.h),s.setStyle(this.$gutter.style,"left",this.margin.left+"px");var I=this.scrollBarV.getWidth()+"px";s.setStyle(this.scrollBarH.element.style,"right",I),s.setStyle(this.scroller.style,"right",I),s.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(E.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||C)&&(T|=this.CHANGE_FULL)}return E.$dirty=!R||!_,T&&this._signal("resize",M),T},A.prototype.onGutterResize=function(C){var O=this.$showGutter?C:0;O!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,O,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},A.prototype.adjustWrapLimit=function(){var C=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(C/this.characterWidth);return this.session.adjustWrapLimit(O,this.$showPrintMargin&&this.$printMarginColumn)},A.prototype.setAnimatedScroll=function(C){this.setOption("animatedScroll",C)},A.prototype.getAnimatedScroll=function(){return this.$animatedScroll},A.prototype.setShowInvisibles=function(C){this.setOption("showInvisibles",C),this.session.$bidiHandler.setShowInvisibles(C)},A.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},A.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},A.prototype.setDisplayIndentGuides=function(C){this.setOption("displayIndentGuides",C)},A.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},A.prototype.setHighlightIndentGuides=function(C){this.setOption("highlightIndentGuides",C)},A.prototype.setShowPrintMargin=function(C){this.setOption("showPrintMargin",C)},A.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},A.prototype.setPrintMarginColumn=function(C){this.setOption("printMarginColumn",C)},A.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},A.prototype.getShowGutter=function(){return this.getOption("showGutter")},A.prototype.setShowGutter=function(C){return this.setOption("showGutter",C)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.setFadeFoldWidgets=function(C){this.setOption("fadeFoldWidgets",C)},A.prototype.setHighlightGutterLine=function(C){this.setOption("highlightGutterLine",C)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var C=s.createElement("div");C.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",C.appendChild(this.$printMarginEl),this.content.insertBefore(C,this.content.firstChild)}var O=this.$printMarginEl.style;O.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",O.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},A.prototype.getContainerElement=function(){return this.container},A.prototype.getMouseEventTarget=function(){return this.scroller},A.prototype.getTextAreaContainer=function(){return this.container},A.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var C=this.textarea.style,O=this.$composition;if(!this.$keepTextAreaAtCursor&&!O){s.translate(this.textarea,-100,0);return}var R=this.$cursorLayer.$pixelPos;if(R){O&&O.markerRange&&(R=this.$cursorLayer.getPixelPosition(O.markerRange.start,!0));var _=this.layerConfig,T=R.top,E=R.left;T-=_.offset;var M=O&&O.useTextareaForIME||x.isMobile?this.lineHeight:1;if(T<0||T>_.height-M){s.translate(this.textarea,0,0);return}var I=1,N=this.$size.height-M;if(!O)T+=this.lineHeight;else if(O.useTextareaForIME){var L=this.textarea.value;I=this.characterWidth*this.session.$getStringScreenWidth(L)[0]}else T+=this.lineHeight+2;E-=this.scrollLeft,E>this.$size.scrollerWidth-I&&(E=this.$size.scrollerWidth-I),E+=this.gutterWidth+this.margin.left,s.setStyle(C,"height",M+"px"),s.setStyle(C,"width",I+"px"),s.translate(this.textarea,Math.min(E,this.$size.scrollerWidth-I),Math.min(T,N))}}},A.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},A.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},A.prototype.getLastFullyVisibleRow=function(){var C=this.layerConfig,O=C.lastRow,R=this.session.documentToScreenRow(O,0)*C.lineHeight;return R-this.session.getScrollTop()>C.height-C.lineHeight?O-1:O},A.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},A.prototype.setPadding=function(C){this.$padding=C,this.$textLayer.setPadding(C),this.$cursorLayer.setPadding(C),this.$markerFront.setPadding(C),this.$markerBack.setPadding(C),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},A.prototype.setScrollMargin=function(C,O,R,_){var T=this.scrollMargin;T.top=C|0,T.bottom=O|0,T.right=_|0,T.left=R|0,T.v=T.top+T.bottom,T.h=T.left+T.right,T.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-T.top),this.updateFull()},A.prototype.setMargin=function(C,O,R,_){var T=this.margin;T.top=C|0,T.bottom=O|0,T.right=_|0,T.left=R|0,T.v=T.top+T.bottom,T.h=T.left+T.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},A.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},A.prototype.setHScrollBarAlwaysVisible=function(C){this.setOption("hScrollBarAlwaysVisible",C)},A.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},A.prototype.setVScrollBarAlwaysVisible=function(C){this.setOption("vScrollBarAlwaysVisible",C)},A.prototype.$updateScrollBarV=function(){var C=this.layerConfig.maxHeight,O=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(C-=(O-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>C-O&&(C=this.scrollTop+O,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(C+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},A.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},A.prototype.freeze=function(){this.$frozen=!0},A.prototype.unfreeze=function(){this.$frozen=!1},A.prototype.$renderChanges=function(C,O){if(this.$changes&&(C|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!C&&!O){this.$changes|=C;return}if(this.$size.$dirty)return this.$changes|=C,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",C),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var R=this.layerConfig;if(C&this.CHANGE_FULL||C&this.CHANGE_SIZE||C&this.CHANGE_TEXT||C&this.CHANGE_LINES||C&this.CHANGE_SCROLL||C&this.CHANGE_H_SCROLL){if(C|=this.$computeLayerConfig()|this.$loop.clear(),R.firstRow!=this.layerConfig.firstRow&&R.firstRowScreen==this.layerConfig.firstRowScreen){var _=this.scrollTop+(R.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;_>0&&(this.scrollTop=_,C=C|this.CHANGE_SCROLL,C|=this.$computeLayerConfig()|this.$loop.clear())}R=this.layerConfig,this.$updateScrollBarV(),C&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),s.translate(this.content,-this.scrollLeft,-R.offset);var T=R.width+2*this.$padding+"px",E=R.minHeight+"px";s.setStyle(this.content.style,"width",T),s.setStyle(this.content.style,"height",E)}if(C&this.CHANGE_H_SCROLL&&(s.translate(this.content,-this.scrollLeft,-R.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),C&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(R),this.$showGutter&&this.$gutterLayer.update(R),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(R),this.$markerBack.update(R),this.$markerFront.update(R),this.$cursorLayer.update(R),this.$moveTextAreaToCursor(),this._signal("afterRender",C);return}if(C&this.CHANGE_SCROLL){this.$changedLines=null,C&this.CHANGE_TEXT||C&this.CHANGE_LINES?this.$textLayer.update(R):this.$textLayer.scrollLines(R),this.$showGutter&&(C&this.CHANGE_GUTTER||C&this.CHANGE_LINES?this.$gutterLayer.update(R):this.$gutterLayer.scrollLines(R)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(R),this.$markerBack.update(R),this.$markerFront.update(R),this.$cursorLayer.update(R),this.$moveTextAreaToCursor(),this._signal("afterRender",C);return}C&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(R),this.$showGutter&&this.$gutterLayer.update(R),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(R)):C&this.CHANGE_LINES?((this.$updateLines()||C&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(R),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(R)):C&this.CHANGE_TEXT||C&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(R),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(R)):C&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(R),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(R)),C&this.CHANGE_CURSOR&&(this.$cursorLayer.update(R),this.$moveTextAreaToCursor()),C&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(R),C&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(R),this._signal("afterRender",C)},A.prototype.$autosize=function(){var C=this.session.getScreenLength()*this.lineHeight,O=this.$maxLines*this.lineHeight,R=Math.min(O,Math.max((this.$minLines||1)*this.lineHeight,C))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(R+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&R>this.$maxPixelHeight&&(R=this.$maxPixelHeight);var _=R<=2*this.lineHeight,T=!_&&C>O;if(R!=this.desiredHeight||this.$size.height!=this.desiredHeight||T!=this.$vScroll){T!=this.$vScroll&&(this.$vScroll=T,this.scrollBarV.setVisible(T));var E=this.container.clientWidth;this.container.style.height=R+"px",this.$updateCachedSize(!0,this.$gutterWidth,E,R),this.desiredHeight=R,this._signal("autosize")}},A.prototype.$computeLayerConfig=function(){var C=this.session,O=this.$size,R=O.height<=2*this.lineHeight,_=this.session.getScreenLength(),T=_*this.lineHeight,E=this.$getLongestLine(),M=!R&&(this.$hScrollBarAlwaysVisible||O.scrollerWidth-E-2*this.$padding<0),I=this.$horizScroll!==M;I&&(this.$horizScroll=M,this.scrollBarH.setVisible(M));var N=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var L=O.scrollerHeight+this.lineHeight,$=!this.$maxLines&&this.$scrollPastEnd?(O.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;T+=$;var D=this.scrollMargin;this.session.setScrollTop(Math.max(-D.top,Math.min(this.scrollTop,T-O.scrollerHeight+D.bottom))),this.session.setScrollLeft(Math.max(-D.left,Math.min(this.scrollLeft,E+2*this.$padding-O.scrollerWidth+D.right)));var F=!R&&(this.$vScrollBarAlwaysVisible||O.scrollerHeight-T+$<0||this.scrollTop>D.top),U=N!==F;U&&(this.$vScroll=F,this.scrollBarV.setVisible(F));var W=this.scrollTop%this.lineHeight,B=Math.ceil(L/this.lineHeight)-1,H=Math.max(0,Math.round((this.scrollTop-W)/this.lineHeight)),G=H+B,Y,X,Z=this.lineHeight;H=C.screenToDocumentRow(H,0);var te=C.getFoldLine(H);te&&(H=te.start.row),Y=C.documentToScreenRow(H,0),X=C.getRowLength(H)*Z,G=Math.min(C.screenToDocumentRow(G,0),C.getLength()-1),L=O.scrollerHeight+C.getRowLength(G)*Z+X,W=this.scrollTop-Y*Z;var de=0;return(this.layerConfig.width!=E||I)&&(de=this.CHANGE_H_SCROLL),(I||U)&&(de|=this.$updateCachedSize(!0,this.gutterWidth,O.width,O.height),this._signal("scrollbarVisibilityChanged"),U&&(E=this.$getLongestLine())),this.layerConfig={width:E,padding:this.$padding,firstRow:H,firstRowScreen:Y,lastRow:G,lineHeight:Z,characterWidth:this.characterWidth,minHeight:L,maxHeight:T,offset:W,gutterOffset:Z?Math.max(0,Math.ceil((W+O.height-O.scrollerHeight)/Z)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(E-this.$padding),de},A.prototype.$updateLines=function(){if(this.$changedLines){var C=this.$changedLines.firstRow,O=this.$changedLines.lastRow;this.$changedLines=null;var R=this.layerConfig;if(!(C>R.lastRow+1)&&!(Othis.$textLayer.MAX_LINE_LENGTH&&(C=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(C*this.characterWidth))},A.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},A.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},A.prototype.addGutterDecoration=function(C,O){this.$gutterLayer.addGutterDecoration(C,O)},A.prototype.removeGutterDecoration=function(C,O){this.$gutterLayer.removeGutterDecoration(C,O)},A.prototype.updateBreakpoints=function(C){this._rows=C,this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.setAnnotations=function(C){this.$gutterLayer.setAnnotations(C),this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},A.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},A.prototype.showCursor=function(){this.$cursorLayer.showCursor()},A.prototype.scrollSelectionIntoView=function(C,O,R){this.scrollCursorIntoView(C,R),this.scrollCursorIntoView(O,R)},A.prototype.scrollCursorIntoView=function(C,O,R){if(this.$size.scrollerHeight!==0){var _=this.$cursorLayer.getPixelPosition(C),T=_.left,E=_.top,M=R&&R.top||0,I=R&&R.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var N=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;N+M>E?(O&&N+M>E+this.lineHeight&&(E-=O*this.$size.scrollerHeight),E===0&&(E=-this.scrollMargin.top),this.session.setScrollTop(E)):N+this.$size.scrollerHeight-I=1-this.scrollMargin.top||O>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||C<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||C>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},A.prototype.pixelToScreenCoordinates=function(C,O){var R;if(this.$hasCssTransforms){R={top:0,left:0};var _=this.$fontMetrics.transformCoordinates([C,O]);C=_[1]-this.gutterWidth-this.margin.left,O=_[0]}else R=this.scroller.getBoundingClientRect();var T=C+this.scrollLeft-R.left-this.$padding,E=T/this.characterWidth,M=Math.floor((O+this.scrollTop-R.top)/this.lineHeight),I=this.$blockCursor?Math.floor(E):Math.round(E);return{row:M,column:I,side:E-I>0?1:-1,offsetX:T}},A.prototype.screenToTextCoordinates=function(C,O){var R;if(this.$hasCssTransforms){R={top:0,left:0};var _=this.$fontMetrics.transformCoordinates([C,O]);C=_[1]-this.gutterWidth-this.margin.left,O=_[0]}else R=this.scroller.getBoundingClientRect();var T=C+this.scrollLeft-R.left-this.$padding,E=T/this.characterWidth,M=this.$blockCursor?Math.floor(E):Math.round(E),I=Math.floor((O+this.scrollTop-R.top)/this.lineHeight);return this.session.screenToDocumentPosition(I,Math.max(M,0),T)},A.prototype.textToScreenCoordinates=function(C,O){var R=this.scroller.getBoundingClientRect(),_=this.session.documentToScreenPosition(C,O),T=this.$padding+(this.session.$bidiHandler.isBidiRow(_.row,C)?this.session.$bidiHandler.getPosLeft(_.column):Math.round(_.column*this.characterWidth)),E=_.row*this.lineHeight;return{pageX:R.left+T-this.scrollLeft,pageY:R.top+E-this.scrollTop}},A.prototype.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},A.prototype.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},A.prototype.showComposition=function(C){this.$composition=C,C.cssText||(C.cssText=this.textarea.style.cssText),C.useTextareaForIME==null&&(C.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):C.markerId=this.session.addMarker(C.markerRange,"ace_composition_marker","text")},A.prototype.setCompositionText=function(C){var O=this.session.selection.cursor;this.addToken(C,"composition_placeholder",O.row,O.column),this.$moveTextAreaToCursor()},A.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),s.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var C=this.session.selection.cursor;this.removeExtraToken(C.row,C.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},A.prototype.setGhostText=function(C,O){var R=this.session.selection.cursor,_=O||{row:R.row,column:R.column};this.removeGhostText();var T=C.split(` +}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,r,o){var i=n("../lib/dom"),s=n("../lib/oop"),l=n("../lib/event_emitter").EventEmitter,a=function(){function u(c,d){this.canvas=i.createElement("canvas"),this.renderer=d,this.pixelRatio=1,this.maxHeight=d.layerConfig.maxHeight,this.lineHeight=d.layerConfig.lineHeight,this.canvasHeight=c.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=c.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},c.element.appendChild(this.canvas)}return u.prototype.$updateDecorators=function(c){var d=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(c){this.maxHeight=c.maxHeight,this.lineHeight=c.lineHeight,this.canvasHeight=c.height;var h=(c.lastRow+1)*this.lineHeight;h_.priority?1:0}var g=this.renderer.session.$annotations;if(p.clearRect(0,0,this.canvas.width,this.canvas.height),g){var m={info:1,warning:2,error:3};g.forEach(function(R){R.priority=m[R.type]||null}),g=g.sort(f);for(var v=this.renderer.session.$foldData,y=0;ythis.canvasHeight&&(C=this.canvasHeight-this.halfMinDecorationHeight),x=Math.round(C-this.halfMinDecorationHeight),S=Math.round(C+this.halfMinDecorationHeight)}p.fillStyle=d[g[y].type]||null,p.fillRect(0,k,this.canvasWidth,S-x)}}var O=this.renderer.session.selection.getCursor();if(O){var w=this.compensateFoldRows(O.row,v),k=Math.round((O.row-w)*this.lineHeight*this.heightRatio);p.fillStyle="rgba(0, 0, 0, 0.5)",p.fillRect(0,k,this.canvasWidth,2)}},u.prototype.compensateFoldRows=function(c,d){var h=0;if(d&&d.length>0)for(var p=0;pd[p].start.row&&c=d[p].end.row&&(h+=d[p].end.row-d[p].start.row);return h},u}();s.implement(a.prototype,l),r.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],function(n,r,o){var i=n("./lib/oop"),s=n("./lib/dom"),l=n("./lib/lang"),a=n("./config"),u=n("./layer/gutter").Gutter,c=n("./layer/marker").Marker,d=n("./layer/text").Text,h=n("./layer/cursor").Cursor,p=n("./scrollbar").HScrollBar,f=n("./scrollbar").VScrollBar,g=n("./scrollbar_custom").HScrollBar,m=n("./scrollbar_custom").VScrollBar,v=n("./renderloop").RenderLoop,y=n("./layer/font_metrics").FontMetrics,b=n("./lib/event_emitter").EventEmitter,w=n("./css/editor-css"),k=n("./layer/decorators").Decorator,x=n("./lib/useragent");s.importCssString(w,"ace_editor.css",!1);var S=function(){function A(C,O){var R=this;this.container=C||s.createElement("div"),s.addCssClass(this.container,"ace_editor"),s.HI_DPI&&s.addCssClass(this.container,"ace_hidpi"),this.setTheme(O),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=s.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=s.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=s.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new c(this.content);var _=this.$textLayer=new d(this.content);this.canvas=_.element,this.$markerFront=new c(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new f(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.on("scroll",function(T){R.$scrollAnimation||R.session.setScrollTop(T.data-R.scrollMargin.top)}),this.scrollBarH.on("scroll",function(T){R.$scrollAnimation||R.session.setScrollLeft(T.data-R.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(T){R.updateCharacterSize(),R.onResize(!0,R.gutterWidth,R.$size.width,R.$size.height),R._signal("changeCharacterSize",T)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!x.isIOS,this.$loop=new v(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return A.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),s.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},A.prototype.setSession=function(C){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=C,C&&this.scrollMargin.top&&C.getScrollTop()<=0&&C.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(C),this.$markerBack.setSession(C),this.$markerFront.setSession(C),this.$gutterLayer.setSession(C),this.$textLayer.setSession(C),C&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},A.prototype.updateLines=function(C,O,R){if(O===void 0&&(O=1/0),this.$changedLines?(this.$changedLines.firstRow>C&&(this.$changedLines.firstRow=C),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},A.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},A.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},A.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},A.prototype.updateFull=function(C){C?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},A.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},A.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},A.prototype.onResize=function(C,O,R,_){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=C?1:0;var T=this.container;_||(_=T.clientHeight||T.scrollHeight),R||(R=T.clientWidth||T.scrollWidth);var E=this.$updateCachedSize(C,O,R,_);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!R&&!_)return this.resizing=0;C&&(this.$gutterLayer.$padding=null),C?this.$renderChanges(E|this.$changes,!0):this.$loop.schedule(E|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},A.prototype.$updateCachedSize=function(C,O,R,_){_-=this.$extraHeight||0;var T=0,E=this.$size,M={width:E.width,height:E.height,scrollerHeight:E.scrollerHeight,scrollerWidth:E.scrollerWidth};if(_&&(C||E.height!=_)&&(E.height=_,T|=this.CHANGE_SIZE,E.scrollerHeight=E.height,this.$horizScroll&&(E.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(E.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",T=T|this.CHANGE_SCROLL),R&&(C||E.width!=R)){T|=this.CHANGE_SIZE,E.width=R,O==null&&(O=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=O,s.setStyle(this.scrollBarH.element.style,"left",O+"px"),s.setStyle(this.scroller.style,"left",O+this.margin.left+"px"),E.scrollerWidth=Math.max(0,R-O-this.scrollBarV.getWidth()-this.margin.h),s.setStyle(this.$gutter.style,"left",this.margin.left+"px");var I=this.scrollBarV.getWidth()+"px";s.setStyle(this.scrollBarH.element.style,"right",I),s.setStyle(this.scroller.style,"right",I),s.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(E.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||C)&&(T|=this.CHANGE_FULL)}return E.$dirty=!R||!_,T&&this._signal("resize",M),T},A.prototype.onGutterResize=function(C){var O=this.$showGutter?C:0;O!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,O,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},A.prototype.adjustWrapLimit=function(){var C=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(C/this.characterWidth);return this.session.adjustWrapLimit(O,this.$showPrintMargin&&this.$printMarginColumn)},A.prototype.setAnimatedScroll=function(C){this.setOption("animatedScroll",C)},A.prototype.getAnimatedScroll=function(){return this.$animatedScroll},A.prototype.setShowInvisibles=function(C){this.setOption("showInvisibles",C),this.session.$bidiHandler.setShowInvisibles(C)},A.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},A.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},A.prototype.setDisplayIndentGuides=function(C){this.setOption("displayIndentGuides",C)},A.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},A.prototype.setHighlightIndentGuides=function(C){this.setOption("highlightIndentGuides",C)},A.prototype.setShowPrintMargin=function(C){this.setOption("showPrintMargin",C)},A.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},A.prototype.setPrintMarginColumn=function(C){this.setOption("printMarginColumn",C)},A.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},A.prototype.getShowGutter=function(){return this.getOption("showGutter")},A.prototype.setShowGutter=function(C){return this.setOption("showGutter",C)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.setFadeFoldWidgets=function(C){this.setOption("fadeFoldWidgets",C)},A.prototype.setHighlightGutterLine=function(C){this.setOption("highlightGutterLine",C)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var C=s.createElement("div");C.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",C.appendChild(this.$printMarginEl),this.content.insertBefore(C,this.content.firstChild)}var O=this.$printMarginEl.style;O.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",O.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},A.prototype.getContainerElement=function(){return this.container},A.prototype.getMouseEventTarget=function(){return this.scroller},A.prototype.getTextAreaContainer=function(){return this.container},A.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var C=this.textarea.style,O=this.$composition;if(!this.$keepTextAreaAtCursor&&!O){s.translate(this.textarea,-100,0);return}var R=this.$cursorLayer.$pixelPos;if(R){O&&O.markerRange&&(R=this.$cursorLayer.getPixelPosition(O.markerRange.start,!0));var _=this.layerConfig,T=R.top,E=R.left;T-=_.offset;var M=O&&O.useTextareaForIME||x.isMobile?this.lineHeight:1;if(T<0||T>_.height-M){s.translate(this.textarea,0,0);return}var I=1,N=this.$size.height-M;if(!O)T+=this.lineHeight;else if(O.useTextareaForIME){var L=this.textarea.value;I=this.characterWidth*this.session.$getStringScreenWidth(L)[0]}else T+=this.lineHeight+2;E-=this.scrollLeft,E>this.$size.scrollerWidth-I&&(E=this.$size.scrollerWidth-I),E+=this.gutterWidth+this.margin.left,s.setStyle(C,"height",M+"px"),s.setStyle(C,"width",I+"px"),s.translate(this.textarea,Math.min(E,this.$size.scrollerWidth-I),Math.min(T,N))}}},A.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},A.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},A.prototype.getLastFullyVisibleRow=function(){var C=this.layerConfig,O=C.lastRow,R=this.session.documentToScreenRow(O,0)*C.lineHeight;return R-this.session.getScrollTop()>C.height-C.lineHeight?O-1:O},A.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},A.prototype.setPadding=function(C){this.$padding=C,this.$textLayer.setPadding(C),this.$cursorLayer.setPadding(C),this.$markerFront.setPadding(C),this.$markerBack.setPadding(C),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},A.prototype.setScrollMargin=function(C,O,R,_){var T=this.scrollMargin;T.top=C|0,T.bottom=O|0,T.right=_|0,T.left=R|0,T.v=T.top+T.bottom,T.h=T.left+T.right,T.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-T.top),this.updateFull()},A.prototype.setMargin=function(C,O,R,_){var T=this.margin;T.top=C|0,T.bottom=O|0,T.right=_|0,T.left=R|0,T.v=T.top+T.bottom,T.h=T.left+T.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},A.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},A.prototype.setHScrollBarAlwaysVisible=function(C){this.setOption("hScrollBarAlwaysVisible",C)},A.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},A.prototype.setVScrollBarAlwaysVisible=function(C){this.setOption("vScrollBarAlwaysVisible",C)},A.prototype.$updateScrollBarV=function(){var C=this.layerConfig.maxHeight,O=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(C-=(O-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>C-O&&(C=this.scrollTop+O,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(C+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},A.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},A.prototype.freeze=function(){this.$frozen=!0},A.prototype.unfreeze=function(){this.$frozen=!1},A.prototype.$renderChanges=function(C,O){if(this.$changes&&(C|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!C&&!O){this.$changes|=C;return}if(this.$size.$dirty)return this.$changes|=C,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",C),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var R=this.layerConfig;if(C&this.CHANGE_FULL||C&this.CHANGE_SIZE||C&this.CHANGE_TEXT||C&this.CHANGE_LINES||C&this.CHANGE_SCROLL||C&this.CHANGE_H_SCROLL){if(C|=this.$computeLayerConfig()|this.$loop.clear(),R.firstRow!=this.layerConfig.firstRow&&R.firstRowScreen==this.layerConfig.firstRowScreen){var _=this.scrollTop+(R.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;_>0&&(this.scrollTop=_,C=C|this.CHANGE_SCROLL,C|=this.$computeLayerConfig()|this.$loop.clear())}R=this.layerConfig,this.$updateScrollBarV(),C&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),s.translate(this.content,-this.scrollLeft,-R.offset);var T=R.width+2*this.$padding+"px",E=R.minHeight+"px";s.setStyle(this.content.style,"width",T),s.setStyle(this.content.style,"height",E)}if(C&this.CHANGE_H_SCROLL&&(s.translate(this.content,-this.scrollLeft,-R.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),C&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(R),this.$showGutter&&this.$gutterLayer.update(R),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(R),this.$markerBack.update(R),this.$markerFront.update(R),this.$cursorLayer.update(R),this.$moveTextAreaToCursor(),this._signal("afterRender",C);return}if(C&this.CHANGE_SCROLL){this.$changedLines=null,C&this.CHANGE_TEXT||C&this.CHANGE_LINES?this.$textLayer.update(R):this.$textLayer.scrollLines(R),this.$showGutter&&(C&this.CHANGE_GUTTER||C&this.CHANGE_LINES?this.$gutterLayer.update(R):this.$gutterLayer.scrollLines(R)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(R),this.$markerBack.update(R),this.$markerFront.update(R),this.$cursorLayer.update(R),this.$moveTextAreaToCursor(),this._signal("afterRender",C);return}C&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(R),this.$showGutter&&this.$gutterLayer.update(R),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(R)):C&this.CHANGE_LINES?((this.$updateLines()||C&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(R),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(R)):C&this.CHANGE_TEXT||C&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(R),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(R)):C&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(R),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(R)),C&this.CHANGE_CURSOR&&(this.$cursorLayer.update(R),this.$moveTextAreaToCursor()),C&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(R),C&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(R),this._signal("afterRender",C)},A.prototype.$autosize=function(){var C=this.session.getScreenLength()*this.lineHeight,O=this.$maxLines*this.lineHeight,R=Math.min(O,Math.max((this.$minLines||1)*this.lineHeight,C))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(R+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&R>this.$maxPixelHeight&&(R=this.$maxPixelHeight);var _=R<=2*this.lineHeight,T=!_&&C>O;if(R!=this.desiredHeight||this.$size.height!=this.desiredHeight||T!=this.$vScroll){T!=this.$vScroll&&(this.$vScroll=T,this.scrollBarV.setVisible(T));var E=this.container.clientWidth;this.container.style.height=R+"px",this.$updateCachedSize(!0,this.$gutterWidth,E,R),this.desiredHeight=R,this._signal("autosize")}},A.prototype.$computeLayerConfig=function(){var C=this.session,O=this.$size,R=O.height<=2*this.lineHeight,_=this.session.getScreenLength(),T=_*this.lineHeight,E=this.$getLongestLine(),M=!R&&(this.$hScrollBarAlwaysVisible||O.scrollerWidth-E-2*this.$padding<0),I=this.$horizScroll!==M;I&&(this.$horizScroll=M,this.scrollBarH.setVisible(M));var N=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var L=O.scrollerHeight+this.lineHeight,$=!this.$maxLines&&this.$scrollPastEnd?(O.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;T+=$;var P=this.scrollMargin;this.session.setScrollTop(Math.max(-P.top,Math.min(this.scrollTop,T-O.scrollerHeight+P.bottom))),this.session.setScrollLeft(Math.max(-P.left,Math.min(this.scrollLeft,E+2*this.$padding-O.scrollerWidth+P.right)));var F=!R&&(this.$vScrollBarAlwaysVisible||O.scrollerHeight-T+$<0||this.scrollTop>P.top),H=N!==F;H&&(this.$vScroll=F,this.scrollBarV.setVisible(F));var W=this.scrollTop%this.lineHeight,B=Math.ceil(L/this.lineHeight)-1,U=Math.max(0,Math.round((this.scrollTop-W)/this.lineHeight)),G=U+B,Y,X,Z=this.lineHeight;U=C.screenToDocumentRow(U,0);var te=C.getFoldLine(U);te&&(U=te.start.row),Y=C.documentToScreenRow(U,0),X=C.getRowLength(U)*Z,G=Math.min(C.screenToDocumentRow(G,0),C.getLength()-1),L=O.scrollerHeight+C.getRowLength(G)*Z+X,W=this.scrollTop-Y*Z;var de=0;return(this.layerConfig.width!=E||I)&&(de=this.CHANGE_H_SCROLL),(I||H)&&(de|=this.$updateCachedSize(!0,this.gutterWidth,O.width,O.height),this._signal("scrollbarVisibilityChanged"),H&&(E=this.$getLongestLine())),this.layerConfig={width:E,padding:this.$padding,firstRow:U,firstRowScreen:Y,lastRow:G,lineHeight:Z,characterWidth:this.characterWidth,minHeight:L,maxHeight:T,offset:W,gutterOffset:Z?Math.max(0,Math.ceil((W+O.height-O.scrollerHeight)/Z)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(E-this.$padding),de},A.prototype.$updateLines=function(){if(this.$changedLines){var C=this.$changedLines.firstRow,O=this.$changedLines.lastRow;this.$changedLines=null;var R=this.layerConfig;if(!(C>R.lastRow+1)&&!(Othis.$textLayer.MAX_LINE_LENGTH&&(C=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(C*this.characterWidth))},A.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},A.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},A.prototype.addGutterDecoration=function(C,O){this.$gutterLayer.addGutterDecoration(C,O)},A.prototype.removeGutterDecoration=function(C,O){this.$gutterLayer.removeGutterDecoration(C,O)},A.prototype.updateBreakpoints=function(C){this._rows=C,this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.setAnnotations=function(C){this.$gutterLayer.setAnnotations(C),this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},A.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},A.prototype.showCursor=function(){this.$cursorLayer.showCursor()},A.prototype.scrollSelectionIntoView=function(C,O,R){this.scrollCursorIntoView(C,R),this.scrollCursorIntoView(O,R)},A.prototype.scrollCursorIntoView=function(C,O,R){if(this.$size.scrollerHeight!==0){var _=this.$cursorLayer.getPixelPosition(C),T=_.left,E=_.top,M=R&&R.top||0,I=R&&R.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var N=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;N+M>E?(O&&N+M>E+this.lineHeight&&(E-=O*this.$size.scrollerHeight),E===0&&(E=-this.scrollMargin.top),this.session.setScrollTop(E)):N+this.$size.scrollerHeight-I=1-this.scrollMargin.top||O>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||C<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||C>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},A.prototype.pixelToScreenCoordinates=function(C,O){var R;if(this.$hasCssTransforms){R={top:0,left:0};var _=this.$fontMetrics.transformCoordinates([C,O]);C=_[1]-this.gutterWidth-this.margin.left,O=_[0]}else R=this.scroller.getBoundingClientRect();var T=C+this.scrollLeft-R.left-this.$padding,E=T/this.characterWidth,M=Math.floor((O+this.scrollTop-R.top)/this.lineHeight),I=this.$blockCursor?Math.floor(E):Math.round(E);return{row:M,column:I,side:E-I>0?1:-1,offsetX:T}},A.prototype.screenToTextCoordinates=function(C,O){var R;if(this.$hasCssTransforms){R={top:0,left:0};var _=this.$fontMetrics.transformCoordinates([C,O]);C=_[1]-this.gutterWidth-this.margin.left,O=_[0]}else R=this.scroller.getBoundingClientRect();var T=C+this.scrollLeft-R.left-this.$padding,E=T/this.characterWidth,M=this.$blockCursor?Math.floor(E):Math.round(E),I=Math.floor((O+this.scrollTop-R.top)/this.lineHeight);return this.session.screenToDocumentPosition(I,Math.max(M,0),T)},A.prototype.textToScreenCoordinates=function(C,O){var R=this.scroller.getBoundingClientRect(),_=this.session.documentToScreenPosition(C,O),T=this.$padding+(this.session.$bidiHandler.isBidiRow(_.row,C)?this.session.$bidiHandler.getPosLeft(_.column):Math.round(_.column*this.characterWidth)),E=_.row*this.lineHeight;return{pageX:R.left+T-this.scrollLeft,pageY:R.top+E-this.scrollTop}},A.prototype.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},A.prototype.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},A.prototype.showComposition=function(C){this.$composition=C,C.cssText||(C.cssText=this.textarea.style.cssText),C.useTextareaForIME==null&&(C.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):C.markerId=this.session.addMarker(C.markerRange,"ace_composition_marker","text")},A.prototype.setCompositionText=function(C){var O=this.session.selection.cursor;this.addToken(C,"composition_placeholder",O.row,O.column),this.$moveTextAreaToCursor()},A.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),s.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var C=this.session.selection.cursor;this.removeExtraToken(C.row,C.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},A.prototype.setGhostText=function(C,O){var R=this.session.selection.cursor,_=O||{row:R.row,column:R.column};this.removeGhostText();var T=C.split(` `);if(this.addToken(T[0],"ghost_text",_.row,_.column),this.$ghostText={text:C,position:{row:_.row,column:_.column}},T.length>1){this.$ghostTextWidget={text:T.slice(1).join(` -`),row:_.row,column:_.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var E=this.$cursorLayer.getPixelPosition(_,!0),M=this.container,I=M.getBoundingClientRect().height,N=T.length*this.lineHeight,L=N1||Math.abs(C.$size.height-_)>1?C.$resizeTimer.delay():C.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},A}();S.prototype.CHANGE_CURSOR=1,S.prototype.CHANGE_MARKER=2,S.prototype.CHANGE_GUTTER=4,S.prototype.CHANGE_SCROLL=8,S.prototype.CHANGE_LINES=16,S.prototype.CHANGE_TEXT=32,S.prototype.CHANGE_SIZE=64,S.prototype.CHANGE_MARKER_BACK=128,S.prototype.CHANGE_MARKER_FRONT=256,S.prototype.CHANGE_FULL=512,S.prototype.CHANGE_H_SCROLL=1024,S.prototype.$changes=0,S.prototype.$padding=null,S.prototype.$frozen=!1,S.prototype.STEPS=8,i.implement(S.prototype,b),a.defineOptions(S.prototype,"renderer",{useResizeObserver:{set:function(A){!A&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):A&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(A){this.$textLayer.setShowInvisibles(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(A){typeof A=="number"&&(this.$printMarginColumn=A),this.$showPrintMargin=!!A,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(A){this.$gutter.style.display=A?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(A){this.$gutterLayer.$useSvgGutterIcons=A},initialValue:!1},showFoldedAnnotations:{set:function(A){this.$gutterLayer.$showFoldedAnnotations=A},initialValue:!1},fadeFoldWidgets:{set:function(A){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",A)},initialValue:!1},showFoldWidgets:{set:function(A){this.$gutterLayer.setShowFoldWidgets(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(A){this.$textLayer.setDisplayIndentGuides(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(A){this.$textLayer.setHighlightIndentGuides(A)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(A){this.$gutterLayer.setHighlightGutterLine(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(A){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(A){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(A){typeof A=="number"&&(A=A+"px"),this.container.style.fontSize=A,this.updateFontSize()},initialValue:12},fontFamily:{set:function(A){this.container.style.fontFamily=A,this.updateFontSize()}},maxLines:{set:function(A){this.updateFull()}},minLines:{set:function(A){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(A){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(A){A=+A||0,this.$scrollPastEnd!=A&&(this.$scrollPastEnd=A,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(A){this.$gutterLayer.$fixedWidth=!!A,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(A){this.$updateCustomScrollbar(A)},initialValue:!1},theme:{set:function(A){this.setTheme(A)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!x.isMobile&&!x.isIE}}),r.VirtualRenderer=S}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/net"),l=n("../lib/event_emitter").EventEmitter,a=n("../config");function u(p){var f="importScripts('"+s.qualifyURL(p)+"');";try{return new Blob([f],{type:"application/javascript"})}catch{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new g;return m.append(f),m.getBlob("application/javascript")}}function c(p){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var f=u(p),g=window.URL||window.webkitURL,m=g.createObjectURL(f);return new Worker(m)}return new Worker(p)}var d=function(p){p.postMessage||(p=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=p,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,l),this.$createWorkerFromOldConfig=function(p,f,g,m,v){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),a.get("packaged")||!n.toUrl)m=m||a.moduleUrl(f,"worker");else{var y=this.$normalizePath;m=m||y(n.toUrl("ace/worker/worker.js",null,"_"));var b={};p.forEach(function(w){b[w]=y(n.toUrl(w,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=c(m),v&&this.send("importScripts",v),this.$worker.postMessage({init:!0,tlns:b,module:f,classname:g}),this.$worker},this.onMessage=function(p){var f=p.data;switch(f.type){case"event":this._signal(f.name,{data:f.data});break;case"call":var g=this.callbacks[f.id];g&&(g(f.data),delete this.callbacks[f.id]);break;case"error":this.reportError(f.data);break;case"log":window.console&&console.log&&console.log.apply(console,f.data);break}},this.reportError=function(p){window.console&&console.error&&console.error(p)},this.$normalizePath=function(p){return s.qualifyURL(p)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(p){p.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(p,f){this.$worker.postMessage({command:p,args:f})},this.call=function(p,f,g){if(g){var m=this.callbackId++;this.callbacks[m]=g,f.push(m)}this.send(p,f)},this.emit=function(p,f){try{f.data&&f.data.err&&(f.data.err={message:f.data.err.message,stack:f.data.err.stack,code:f.data.err.code}),this.$worker&&this.$worker.postMessage({event:p,data:{data:f.data}})}catch(g){console.error(g.stack)}},this.attachToDocument=function(p){this.$doc&&this.terminate(),this.$doc=p,this.call("setValue",[p.getValue()]),p.on("change",this.changeListener,!0)},this.changeListener=function(p){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),p.action=="insert"?this.deltaQueue.push(p.start,p.lines):this.deltaQueue.push(p.start,p.end)},this.$sendDeltaQueue=function(){var p=this.deltaQueue;p&&(this.deltaQueue=null,p.length>50&&p.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:p}))}}).call(d.prototype);var h=function(p,f,g){var m=null,v=!1,y=Object.create(l),b=[],w=new d({messageBuffer:b,terminate:function(){},postMessage:function(x){b.push(x),m&&(v?setTimeout(k):k())}});w.setEmitSync=function(x){v=x};var k=function(){var x=b.shift();x.command?m[x.command].apply(m,x.args):x.event&&y._signal(x.event,x.data)};return y.postMessage=function(x){w.onMessage({data:x})},y.callback=function(x,S){this.postMessage({type:"call",id:S,data:x})},y.emit=function(x,S){this.postMessage({type:"event",name:x,data:S})},a.loadModule(["worker",f],function(x){for(m=new x[g](y);b.length;)k()}),w};r.UIWorkerClient=h,r.WorkerClient=d,r.createWorker=c}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,r,o){var i=n("./range").Range,s=n("./lib/event_emitter").EventEmitter,l=n("./lib/oop"),a=function(){function u(c,d,h,p,f,g){var m=this;this.length=d,this.session=c,this.doc=c.getDocument(),this.mainClass=f,this.othersClass=g,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=p,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=h;var v=c.getUndoManager().$undoStack||c.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=v.length,this.setup(),c.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var c=this,d=this.doc,h=this.session;this.selectionBefore=h.selection.toJSON(),h.selection.inMultiSelectMode&&h.selection.toSingleRange(),this.pos=d.createAnchor(this.$pos.row,this.$pos.column);var p=this.pos;p.$insertRight=!0,p.detach(),p.markerId=h.addMarker(new i(p.row,p.column,p.row,p.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(f){var g=d.createAnchor(f.row,f.column);g.$insertRight=!0,g.detach(),c.others.push(g)}),h.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var c=this.session,d=this;this.othersActive=!0,this.others.forEach(function(h){h.markerId=c.addMarker(new i(h.row,h.column,h.row,h.column+d.length),d.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var c=0;c=this.pos.column&&d.start.column<=this.pos.column+this.length+1,f=d.start.column-this.pos.column;if(this.updateAnchors(c),p&&(this.length+=h),p&&!this.session.$fromUndo){if(c.action==="insert")for(var g=this.others.length-1;g>=0;g--){var m=this.others[g],v={row:m.row,column:m.column+f};this.doc.insertMergedLines(v,c.lines)}else if(c.action==="remove")for(var g=this.others.length-1;g>=0;g--){var m=this.others[g],v={row:m.row,column:m.column+f};this.doc.remove(new i(v.row,v.column,v.row,v.column-h))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(c){this.pos.onChange(c);for(var d=this.others.length;d--;)this.others[d].onChange(c);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var c=this,d=this.session,h=function(f,g){d.removeMarker(f.markerId),f.markerId=d.addMarker(new i(f.row,f.column,f.row,f.column+c.length),g,null,!1)};h(this.pos,this.mainClass);for(var p=this.others.length;p--;)h(this.others[p],this.othersClass)}},u.prototype.onCursorChange=function(c){if(!(this.$updating||!this.session)){var d=this.session.selection.getCursor();d.row===this.pos.row&&d.column>=this.pos.column&&d.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",c)):(this.hideOtherMarkers(),this._emit("cursorLeave",c))}},u.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},u.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var c=this.session.getUndoManager(),d=(c.$undoStack||c.$undostack).length-this.$undoStackDepth,h=0;h1?s.multiSelect.joinSelections():s.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(s){s.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(s){s.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(s){s.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(s){s.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(s){return s&&s.inMultiSelectMode}}];var i=n("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new i(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,r,o){var i=n("./range_list").RangeList,s=n("./range").Range,l=n("./selection").Selection,a=n("./mouse/multi_select_handler").onMouseDown,u=n("./lib/event"),c=n("./lib/lang"),d=n("./commands/multi_select_commands");r.commands=d.defaultCommands.concat(d.multiSelectCommands);var h=n("./search").Search,p=new h;function f(w,k,x){return p.$options.wrap=!0,p.$options.needle=k,p.$options.backwards=x==-1,p.find(w)}var g=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(g.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(w,k){if(w){if(!this.inMultiSelectMode&&this.rangeCount===0){var x=this.toOrientedRange();if(this.rangeList.add(x),this.rangeList.add(w),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),k||this.fromOrientedRange(w);this.rangeList.removeAll(),this.rangeList.add(x),this.$onAddRange(x)}w.cursor||(w.cursor=w.end);var S=this.rangeList.add(w);return this.$onAddRange(w),S.length&&this.$onRemoveRange(S),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),k||this.fromOrientedRange(w)}},this.toSingleRange=function(w){w=w||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),w&&this.fromOrientedRange(w)},this.substractPoint=function(w){var k=this.rangeList.substractPoint(w);if(k)return this.$onRemoveRange(k),k[0]},this.mergeOverlappingRanges=function(){var w=this.rangeList.merge();w.length&&this.$onRemoveRange(w)},this.$onAddRange=function(w){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(w),this._signal("addRange",{range:w})},this.$onRemoveRange=function(w){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var k=this.rangeList.ranges.pop();w.push(k),this.rangeCount=0}for(var x=w.length;x--;){var S=this.ranges.indexOf(w[x]);this.ranges.splice(S,1)}this._signal("removeRange",{ranges:w}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var w=this.ranges.length?this.ranges:[this.getRange()],k=[],x=0;x1){var w=this.rangeList.ranges,k=w[w.length-1],x=s.fromPoints(w[0].start,k.end);this.toSingleRange(),this.setSelectionRange(x,k.cursor==k.start)}else{var S=this.session.documentToScreenPosition(this.cursor),A=this.session.documentToScreenPosition(this.anchor),C=this.rectangularRangeBlock(S,A);C.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(w,k,x){var S=[],A=w.column0;)$--;if($>0)for(var D=0;S[D].isEmpty();)D++;for(var F=$;F>=D;F--)S[F].isEmpty()&&S.splice(F,1)}return S}}).call(l.prototype);var m=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(w){w.cursor||(w.cursor=w.end);var k=this.getSelectionStyle();return w.marker=this.session.addMarker(w,"ace_selection",k),this.session.$selectionMarkers.push(w),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,w},this.removeSelectionMarker=function(w){if(w.marker){this.session.removeMarker(w.marker);var k=this.session.$selectionMarkers.indexOf(w);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(w){for(var k=this.session.$selectionMarkers,x=w.length;x--;){var S=w[x];if(S.marker){this.session.removeMarker(S.marker);var A=k.indexOf(S);A!=-1&&k.splice(A,1)}}this.session.selectionMarkerCount=k.length},this.$onAddRange=function(w){this.addSelectionMarker(w.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(w){this.removeSelectionMarkers(w.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(w){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(d.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(w){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(d.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(w){var k=w.command,x=w.editor;if(x.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?S=x.forEachSelection(k,w.args):k.multiSelectAction=="forEachLine"?S=x.forEachSelection(k,w.args,!0):k.multiSelectAction=="single"?(x.exitMultiSelectMode(),S=k.exec(x,w.args||{})):S=k.multiSelectAction(x,w.args||{});else{var S=k.exec(x,w.args||{});x.multiSelect.addRange(x.multiSelect.toOrientedRange()),x.multiSelect.mergeOverlappingRanges()}return S}},this.forEachSelection=function(w,k,x){if(!this.inVirtualSelectionMode){var S=x&&x.keepOrder,A=x==!0||x&&x.$byLines,C=this.session,O=this.selection,R=O.rangeList,_=(S?O:R).ranges,T;if(!_.length)return w.exec?w.exec(this,k||{}):w(this,k||{});var E=O._eventRegistry;O._eventRegistry={};var M=new l(C);this.inVirtualSelectionMode=!0;for(var I=_.length;I--;){if(A)for(;I>0&&_[I].start.row==_[I-1].end.row;)I--;M.fromOrientedRange(_[I]),M.index=I,this.selection=C.selection=M;var N=w.exec?w.exec(this,k||{}):w(this,k||{});!T&&N!==void 0&&(T=N),M.toOrientedRange(_[I])}M.detach(),this.selection=C.selection=O,this.inVirtualSelectionMode=!1,O._eventRegistry=E,O.mergeOverlappingRanges(),O.ranges[0]&&O.fromOrientedRange(O.ranges[0]);var L=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),L&&L.from==L.to&&this.renderer.animateScrolling(L.from),T}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var w="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,x=[],S=0;S0);O<0&&(O=0),R>=T&&(R=T-1)}var M=this.session.removeFullLines(O,R);M=this.$reAlignText(M,_),this.session.insert({row:O,column:0},M.join(` +`),row:_.row,column:_.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var E=this.$cursorLayer.getPixelPosition(_,!0),M=this.container,I=M.getBoundingClientRect().height,N=T.length*this.lineHeight,L=N1||Math.abs(C.$size.height-_)>1?C.$resizeTimer.delay():C.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},A}();S.prototype.CHANGE_CURSOR=1,S.prototype.CHANGE_MARKER=2,S.prototype.CHANGE_GUTTER=4,S.prototype.CHANGE_SCROLL=8,S.prototype.CHANGE_LINES=16,S.prototype.CHANGE_TEXT=32,S.prototype.CHANGE_SIZE=64,S.prototype.CHANGE_MARKER_BACK=128,S.prototype.CHANGE_MARKER_FRONT=256,S.prototype.CHANGE_FULL=512,S.prototype.CHANGE_H_SCROLL=1024,S.prototype.$changes=0,S.prototype.$padding=null,S.prototype.$frozen=!1,S.prototype.STEPS=8,i.implement(S.prototype,b),a.defineOptions(S.prototype,"renderer",{useResizeObserver:{set:function(A){!A&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):A&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(A){this.$textLayer.setShowInvisibles(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(A){typeof A=="number"&&(this.$printMarginColumn=A),this.$showPrintMargin=!!A,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(A){this.$gutter.style.display=A?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(A){this.$gutterLayer.$useSvgGutterIcons=A},initialValue:!1},showFoldedAnnotations:{set:function(A){this.$gutterLayer.$showFoldedAnnotations=A},initialValue:!1},fadeFoldWidgets:{set:function(A){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",A)},initialValue:!1},showFoldWidgets:{set:function(A){this.$gutterLayer.setShowFoldWidgets(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(A){this.$textLayer.setDisplayIndentGuides(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(A){this.$textLayer.setHighlightIndentGuides(A)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(A){this.$gutterLayer.setHighlightGutterLine(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(A){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(A){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(A){typeof A=="number"&&(A=A+"px"),this.container.style.fontSize=A,this.updateFontSize()},initialValue:12},fontFamily:{set:function(A){this.container.style.fontFamily=A,this.updateFontSize()}},maxLines:{set:function(A){this.updateFull()}},minLines:{set:function(A){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(A){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(A){A=+A||0,this.$scrollPastEnd!=A&&(this.$scrollPastEnd=A,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(A){this.$gutterLayer.$fixedWidth=!!A,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(A){this.$updateCustomScrollbar(A)},initialValue:!1},theme:{set:function(A){this.setTheme(A)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!x.isMobile&&!x.isIE}}),r.VirtualRenderer=S}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/net"),l=n("../lib/event_emitter").EventEmitter,a=n("../config");function u(p){var f="importScripts('"+s.qualifyURL(p)+"');";try{return new Blob([f],{type:"application/javascript"})}catch{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new g;return m.append(f),m.getBlob("application/javascript")}}function c(p){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var f=u(p),g=window.URL||window.webkitURL,m=g.createObjectURL(f);return new Worker(m)}return new Worker(p)}var d=function(p){p.postMessage||(p=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=p,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,l),this.$createWorkerFromOldConfig=function(p,f,g,m,v){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),a.get("packaged")||!n.toUrl)m=m||a.moduleUrl(f,"worker");else{var y=this.$normalizePath;m=m||y(n.toUrl("ace/worker/worker.js",null,"_"));var b={};p.forEach(function(w){b[w]=y(n.toUrl(w,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=c(m),v&&this.send("importScripts",v),this.$worker.postMessage({init:!0,tlns:b,module:f,classname:g}),this.$worker},this.onMessage=function(p){var f=p.data;switch(f.type){case"event":this._signal(f.name,{data:f.data});break;case"call":var g=this.callbacks[f.id];g&&(g(f.data),delete this.callbacks[f.id]);break;case"error":this.reportError(f.data);break;case"log":window.console&&console.log&&console.log.apply(console,f.data);break}},this.reportError=function(p){window.console&&console.error&&console.error(p)},this.$normalizePath=function(p){return s.qualifyURL(p)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(p){p.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(p,f){this.$worker.postMessage({command:p,args:f})},this.call=function(p,f,g){if(g){var m=this.callbackId++;this.callbacks[m]=g,f.push(m)}this.send(p,f)},this.emit=function(p,f){try{f.data&&f.data.err&&(f.data.err={message:f.data.err.message,stack:f.data.err.stack,code:f.data.err.code}),this.$worker&&this.$worker.postMessage({event:p,data:{data:f.data}})}catch(g){console.error(g.stack)}},this.attachToDocument=function(p){this.$doc&&this.terminate(),this.$doc=p,this.call("setValue",[p.getValue()]),p.on("change",this.changeListener,!0)},this.changeListener=function(p){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),p.action=="insert"?this.deltaQueue.push(p.start,p.lines):this.deltaQueue.push(p.start,p.end)},this.$sendDeltaQueue=function(){var p=this.deltaQueue;p&&(this.deltaQueue=null,p.length>50&&p.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:p}))}}).call(d.prototype);var h=function(p,f,g){var m=null,v=!1,y=Object.create(l),b=[],w=new d({messageBuffer:b,terminate:function(){},postMessage:function(x){b.push(x),m&&(v?setTimeout(k):k())}});w.setEmitSync=function(x){v=x};var k=function(){var x=b.shift();x.command?m[x.command].apply(m,x.args):x.event&&y._signal(x.event,x.data)};return y.postMessage=function(x){w.onMessage({data:x})},y.callback=function(x,S){this.postMessage({type:"call",id:S,data:x})},y.emit=function(x,S){this.postMessage({type:"event",name:x,data:S})},a.loadModule(["worker",f],function(x){for(m=new x[g](y);b.length;)k()}),w};r.UIWorkerClient=h,r.WorkerClient=d,r.createWorker=c}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,r,o){var i=n("./range").Range,s=n("./lib/event_emitter").EventEmitter,l=n("./lib/oop"),a=function(){function u(c,d,h,p,f,g){var m=this;this.length=d,this.session=c,this.doc=c.getDocument(),this.mainClass=f,this.othersClass=g,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=p,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=h;var v=c.getUndoManager().$undoStack||c.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=v.length,this.setup(),c.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var c=this,d=this.doc,h=this.session;this.selectionBefore=h.selection.toJSON(),h.selection.inMultiSelectMode&&h.selection.toSingleRange(),this.pos=d.createAnchor(this.$pos.row,this.$pos.column);var p=this.pos;p.$insertRight=!0,p.detach(),p.markerId=h.addMarker(new i(p.row,p.column,p.row,p.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(f){var g=d.createAnchor(f.row,f.column);g.$insertRight=!0,g.detach(),c.others.push(g)}),h.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var c=this.session,d=this;this.othersActive=!0,this.others.forEach(function(h){h.markerId=c.addMarker(new i(h.row,h.column,h.row,h.column+d.length),d.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var c=0;c=this.pos.column&&d.start.column<=this.pos.column+this.length+1,f=d.start.column-this.pos.column;if(this.updateAnchors(c),p&&(this.length+=h),p&&!this.session.$fromUndo){if(c.action==="insert")for(var g=this.others.length-1;g>=0;g--){var m=this.others[g],v={row:m.row,column:m.column+f};this.doc.insertMergedLines(v,c.lines)}else if(c.action==="remove")for(var g=this.others.length-1;g>=0;g--){var m=this.others[g],v={row:m.row,column:m.column+f};this.doc.remove(new i(v.row,v.column,v.row,v.column-h))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(c){this.pos.onChange(c);for(var d=this.others.length;d--;)this.others[d].onChange(c);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var c=this,d=this.session,h=function(f,g){d.removeMarker(f.markerId),f.markerId=d.addMarker(new i(f.row,f.column,f.row,f.column+c.length),g,null,!1)};h(this.pos,this.mainClass);for(var p=this.others.length;p--;)h(this.others[p],this.othersClass)}},u.prototype.onCursorChange=function(c){if(!(this.$updating||!this.session)){var d=this.session.selection.getCursor();d.row===this.pos.row&&d.column>=this.pos.column&&d.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",c)):(this.hideOtherMarkers(),this._emit("cursorLeave",c))}},u.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},u.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var c=this.session.getUndoManager(),d=(c.$undoStack||c.$undostack).length-this.$undoStackDepth,h=0;h1?s.multiSelect.joinSelections():s.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(s){s.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(s){s.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(s){s.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(s){s.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(s){return s&&s.inMultiSelectMode}}];var i=n("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new i(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,r,o){var i=n("./range_list").RangeList,s=n("./range").Range,l=n("./selection").Selection,a=n("./mouse/multi_select_handler").onMouseDown,u=n("./lib/event"),c=n("./lib/lang"),d=n("./commands/multi_select_commands");r.commands=d.defaultCommands.concat(d.multiSelectCommands);var h=n("./search").Search,p=new h;function f(w,k,x){return p.$options.wrap=!0,p.$options.needle=k,p.$options.backwards=x==-1,p.find(w)}var g=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(g.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(w,k){if(w){if(!this.inMultiSelectMode&&this.rangeCount===0){var x=this.toOrientedRange();if(this.rangeList.add(x),this.rangeList.add(w),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),k||this.fromOrientedRange(w);this.rangeList.removeAll(),this.rangeList.add(x),this.$onAddRange(x)}w.cursor||(w.cursor=w.end);var S=this.rangeList.add(w);return this.$onAddRange(w),S.length&&this.$onRemoveRange(S),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),k||this.fromOrientedRange(w)}},this.toSingleRange=function(w){w=w||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),w&&this.fromOrientedRange(w)},this.substractPoint=function(w){var k=this.rangeList.substractPoint(w);if(k)return this.$onRemoveRange(k),k[0]},this.mergeOverlappingRanges=function(){var w=this.rangeList.merge();w.length&&this.$onRemoveRange(w)},this.$onAddRange=function(w){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(w),this._signal("addRange",{range:w})},this.$onRemoveRange=function(w){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var k=this.rangeList.ranges.pop();w.push(k),this.rangeCount=0}for(var x=w.length;x--;){var S=this.ranges.indexOf(w[x]);this.ranges.splice(S,1)}this._signal("removeRange",{ranges:w}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var w=this.ranges.length?this.ranges:[this.getRange()],k=[],x=0;x1){var w=this.rangeList.ranges,k=w[w.length-1],x=s.fromPoints(w[0].start,k.end);this.toSingleRange(),this.setSelectionRange(x,k.cursor==k.start)}else{var S=this.session.documentToScreenPosition(this.cursor),A=this.session.documentToScreenPosition(this.anchor),C=this.rectangularRangeBlock(S,A);C.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(w,k,x){var S=[],A=w.column0;)$--;if($>0)for(var P=0;S[P].isEmpty();)P++;for(var F=$;F>=P;F--)S[F].isEmpty()&&S.splice(F,1)}return S}}).call(l.prototype);var m=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(w){w.cursor||(w.cursor=w.end);var k=this.getSelectionStyle();return w.marker=this.session.addMarker(w,"ace_selection",k),this.session.$selectionMarkers.push(w),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,w},this.removeSelectionMarker=function(w){if(w.marker){this.session.removeMarker(w.marker);var k=this.session.$selectionMarkers.indexOf(w);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(w){for(var k=this.session.$selectionMarkers,x=w.length;x--;){var S=w[x];if(S.marker){this.session.removeMarker(S.marker);var A=k.indexOf(S);A!=-1&&k.splice(A,1)}}this.session.selectionMarkerCount=k.length},this.$onAddRange=function(w){this.addSelectionMarker(w.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(w){this.removeSelectionMarkers(w.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(w){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(d.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(w){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(d.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(w){var k=w.command,x=w.editor;if(x.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?S=x.forEachSelection(k,w.args):k.multiSelectAction=="forEachLine"?S=x.forEachSelection(k,w.args,!0):k.multiSelectAction=="single"?(x.exitMultiSelectMode(),S=k.exec(x,w.args||{})):S=k.multiSelectAction(x,w.args||{});else{var S=k.exec(x,w.args||{});x.multiSelect.addRange(x.multiSelect.toOrientedRange()),x.multiSelect.mergeOverlappingRanges()}return S}},this.forEachSelection=function(w,k,x){if(!this.inVirtualSelectionMode){var S=x&&x.keepOrder,A=x==!0||x&&x.$byLines,C=this.session,O=this.selection,R=O.rangeList,_=(S?O:R).ranges,T;if(!_.length)return w.exec?w.exec(this,k||{}):w(this,k||{});var E=O._eventRegistry;O._eventRegistry={};var M=new l(C);this.inVirtualSelectionMode=!0;for(var I=_.length;I--;){if(A)for(;I>0&&_[I].start.row==_[I-1].end.row;)I--;M.fromOrientedRange(_[I]),M.index=I,this.selection=C.selection=M;var N=w.exec?w.exec(this,k||{}):w(this,k||{});!T&&N!==void 0&&(T=N),M.toOrientedRange(_[I])}M.detach(),this.selection=C.selection=O,this.inVirtualSelectionMode=!1,O._eventRegistry=E,O.mergeOverlappingRanges(),O.ranges[0]&&O.fromOrientedRange(O.ranges[0]);var L=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),L&&L.from==L.to&&this.renderer.animateScrolling(L.from),T}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var w="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,x=[],S=0;S0);O<0&&(O=0),R>=T&&(R=T-1)}var M=this.session.removeFullLines(O,R);M=this.$reAlignText(M,_),this.session.insert({row:O,column:0},M.join(` `)+` -`),_||(C.start.column=0,C.end.column=M[M.length-1].length),this.selection.setRange(C)}else{A.forEach(function($){k.substractPoint($.cursor)});var I=0,N=1/0,L=x.map(function($){var D=$.cursor,F=w.getLine(D.row),U=F.substr(D.column).search(/\S/g);return U==-1&&(U=0),D.column>I&&(I=D.column),UW?w.insert(F,c.stringRepeat(" ",U-W)):w.remove(new s(F.row,F.column,F.row,F.column-U+W)),$.start.column=$.end.column=I,$.start.row=$.end.row=F.row,$.cursor=$.end}),k.fromOrientedRange(x[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(w,k){var x=!0,S=!0,A,C,O;return w.map(function(M){var I=M.match(/(\s*)(.*?)(\s*)([=:].*)/);return I?A==null?(A=I[1].length,C=I[2].length,O=I[3].length,I):(A+C+O!=I[1].length+I[2].length+I[3].length&&(S=!1),A!=I[1].length&&(x=!1),A>I[1].length&&(A=I[1].length),CI[3].length&&(O=I[3].length),I):[M]}).map(k?_:x?S?T:_:E);function R(M){return c.stringRepeat(" ",M)}function _(M){return M[2]?R(A)+M[2]+R(C-M[2].length+O)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}function T(M){return M[2]?R(A+C-M[2].length)+M[2]+R(O)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}function E(M){return M[2]?R(A)+M[2]+R(O)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}}}).call(m.prototype);function v(w,k){return w.row==k.row&&w.column==k.column}r.onSessionChange=function(w){var k=w.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.multiSelect;var x=w.oldSession;x&&(x.multiSelect.off("addRange",this.$onAddRange),x.multiSelect.off("removeRange",this.$onRemoveRange),x.multiSelect.off("multiSelect",this.$onMultiSelect),x.multiSelect.off("singleSelect",this.$onSingleSelect),x.multiSelect.lead.off("change",this.$checkMultiselectChange),x.multiSelect.anchor.off("change",this.$checkMultiselectChange)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function y(w){w.$multiselectOnSessionChange||(w.$onAddRange=w.$onAddRange.bind(w),w.$onRemoveRange=w.$onRemoveRange.bind(w),w.$onMultiSelect=w.$onMultiSelect.bind(w),w.$onSingleSelect=w.$onSingleSelect.bind(w),w.$multiselectOnSessionChange=r.onSessionChange.bind(w),w.$checkMultiselectChange=w.$checkMultiselectChange.bind(w),w.$multiselectOnSessionChange(w),w.on("changeSession",w.$multiselectOnSessionChange),w.on("mousedown",a),w.commands.addCommands(d.defaultCommands),b(w))}function b(w){if(!w.textInput)return;var k=w.textInput.getElement(),x=!1;u.addListener(k,"keydown",function(A){var C=A.keyCode==18&&!(A.ctrlKey||A.shiftKey||A.metaKey);w.$blockSelectEnabled&&C?x||(w.renderer.setMouseCursor("crosshair"),x=!0):x&&S()},w),u.addListener(k,"keyup",S,w),u.addListener(k,"blur",S,w);function S(A){x&&(w.renderer.setMouseCursor(""),x=!1)}}r.MultiSelect=y,n("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(w){y(this),w?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(w){this.$blockSelectEnabled=w},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,r,o){var i=n("../../range").Range,s=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(l,a,u){var c=l.getLine(u);return this.foldingStartMarker.test(c)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(c)?"end":""},this.getFoldWidgetRange=function(l,a,u){return null},this.indentationBlock=function(l,a,u){var c=/\S/,d=l.getLine(a),h=d.search(c);if(h!=-1){for(var p=u||d.length,f=l.getLength(),g=a,m=a;++ag){var b=l.getLine(m).length;return new i(g,p,m,b)}}},this.openingBracketBlock=function(l,a,u,c,d){var h={row:u,column:c+1},p=l.$findClosingBracket(a,h,d);if(p){var f=l.foldWidgets[p.row];return f==null&&(f=l.getFoldWidget(p.row)),f=="start"&&p.row>h.row&&(p.row--,p.column=l.getLine(p.row).length),i.fromPoints(h,p)}},this.closingBracketBlock=function(l,a,u,c,d){var h={row:u,column:c},p=l.$findOpeningBracket(a,h);if(p)return p.column++,h.column--,i.fromPoints(p,h)}}).call(s.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(n,r,o){var i=n("../line_widgets").LineWidgets,s=n("../lib/dom"),l=n("../range").Range,a=n("../config").nls;function u(d,h,p){for(var f=0,g=d.length-1;f<=g;){var m=f+g>>1,v=p(h,d[m]);if(v>0)f=m+1;else if(v<0)g=m-1;else return m}return-(f+1)}function c(d,h,p){var f=d.getAnnotations().sort(l.comparePoints);if(f.length){var g=u(f,{row:h,column:-1},l.comparePoints);g<0&&(g=-g-1),g>=f.length?g=p>0?0:f.length-1:g===0&&p<0&&(g=f.length-1);var m=f[g];if(!(!m||!p)){if(m.row===h){do m=f[g+=p];while(m&&m.row===h);if(!m)return f.slice()}var v=[];h=m.row;do v[p<0?"unshift":"push"](m),m=f[g+=p];while(m&&m.row==h);return v.length&&v}}}r.showErrorMarker=function(d,h){var p=d.session;p.widgetManager||(p.widgetManager=new i(p),p.widgetManager.attach(d));var f=d.getCursorPosition(),g=f.row,m=p.widgetManager.getWidgetsAtRow(g).filter(function(C){return C.type=="errorMarker"})[0];m?m.destroy():g-=h;var v=c(p,g,h),y;if(v){var b=v[0];f.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,f.row=b.row,y=d.renderer.$gutterLayer.$annotations[f.row]}else{if(m)return;y={text:[a("Looks good!")],className:"ace_ok"}}d.session.unfold(f.row),d.selection.moveToPosition(f);var w={row:f.row,fixedWidth:!0,coverGutter:!0,el:s.createElement("div"),type:"errorMarker"},k=w.el.appendChild(s.createElement("div")),x=w.el.appendChild(s.createElement("div"));x.className="error_widget_arrow "+y.className;var S=d.renderer.$cursorLayer.getPixelPosition(f).left;x.style.left=S+d.renderer.gutterWidth-5+"px",w.el.className="error_widget_wrapper",k.className="error_widget "+y.className,k.innerHTML=y.text.join("
    "),k.appendChild(s.createElement("div"));var A=function(C,O,R){if(O===0&&(R==="esc"||R==="return"))return w.destroy(),{command:"null"}};w.destroy=function(){d.$mouseHandler.isMousePressed||(d.keyBinding.removeKeyboardHandler(A),p.widgetManager.removeLineWidget(w),d.off("changeSelection",w.destroy),d.off("changeSession",w.destroy),d.off("mouseup",w.destroy),d.off("change",w.destroy))},d.keyBinding.addKeyboardHandler(A),d.on("changeSelection",w.destroy),d.on("changeSession",w.destroy),d.on("mouseup",w.destroy),d.on("change",w.destroy),d.session.widgetManager.addLineWidget(w),w.el.onmousedown=d.focus.bind(d),d.renderer.scrollCursorIntoView(null,.5,{bottom:w.el.offsetHeight})},s.importCssString(` +`),_||(C.start.column=0,C.end.column=M[M.length-1].length),this.selection.setRange(C)}else{A.forEach(function($){k.substractPoint($.cursor)});var I=0,N=1/0,L=x.map(function($){var P=$.cursor,F=w.getLine(P.row),H=F.substr(P.column).search(/\S/g);return H==-1&&(H=0),P.column>I&&(I=P.column),HW?w.insert(F,c.stringRepeat(" ",H-W)):w.remove(new s(F.row,F.column,F.row,F.column-H+W)),$.start.column=$.end.column=I,$.start.row=$.end.row=F.row,$.cursor=$.end}),k.fromOrientedRange(x[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(w,k){var x=!0,S=!0,A,C,O;return w.map(function(M){var I=M.match(/(\s*)(.*?)(\s*)([=:].*)/);return I?A==null?(A=I[1].length,C=I[2].length,O=I[3].length,I):(A+C+O!=I[1].length+I[2].length+I[3].length&&(S=!1),A!=I[1].length&&(x=!1),A>I[1].length&&(A=I[1].length),CI[3].length&&(O=I[3].length),I):[M]}).map(k?_:x?S?T:_:E);function R(M){return c.stringRepeat(" ",M)}function _(M){return M[2]?R(A)+M[2]+R(C-M[2].length+O)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}function T(M){return M[2]?R(A+C-M[2].length)+M[2]+R(O)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}function E(M){return M[2]?R(A)+M[2]+R(O)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}}}).call(m.prototype);function v(w,k){return w.row==k.row&&w.column==k.column}r.onSessionChange=function(w){var k=w.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.multiSelect;var x=w.oldSession;x&&(x.multiSelect.off("addRange",this.$onAddRange),x.multiSelect.off("removeRange",this.$onRemoveRange),x.multiSelect.off("multiSelect",this.$onMultiSelect),x.multiSelect.off("singleSelect",this.$onSingleSelect),x.multiSelect.lead.off("change",this.$checkMultiselectChange),x.multiSelect.anchor.off("change",this.$checkMultiselectChange)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function y(w){w.$multiselectOnSessionChange||(w.$onAddRange=w.$onAddRange.bind(w),w.$onRemoveRange=w.$onRemoveRange.bind(w),w.$onMultiSelect=w.$onMultiSelect.bind(w),w.$onSingleSelect=w.$onSingleSelect.bind(w),w.$multiselectOnSessionChange=r.onSessionChange.bind(w),w.$checkMultiselectChange=w.$checkMultiselectChange.bind(w),w.$multiselectOnSessionChange(w),w.on("changeSession",w.$multiselectOnSessionChange),w.on("mousedown",a),w.commands.addCommands(d.defaultCommands),b(w))}function b(w){if(!w.textInput)return;var k=w.textInput.getElement(),x=!1;u.addListener(k,"keydown",function(A){var C=A.keyCode==18&&!(A.ctrlKey||A.shiftKey||A.metaKey);w.$blockSelectEnabled&&C?x||(w.renderer.setMouseCursor("crosshair"),x=!0):x&&S()},w),u.addListener(k,"keyup",S,w),u.addListener(k,"blur",S,w);function S(A){x&&(w.renderer.setMouseCursor(""),x=!1)}}r.MultiSelect=y,n("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(w){y(this),w?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(w){this.$blockSelectEnabled=w},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,r,o){var i=n("../../range").Range,s=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(l,a,u){var c=l.getLine(u);return this.foldingStartMarker.test(c)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(c)?"end":""},this.getFoldWidgetRange=function(l,a,u){return null},this.indentationBlock=function(l,a,u){var c=/\S/,d=l.getLine(a),h=d.search(c);if(h!=-1){for(var p=u||d.length,f=l.getLength(),g=a,m=a;++ag){var b=l.getLine(m).length;return new i(g,p,m,b)}}},this.openingBracketBlock=function(l,a,u,c,d){var h={row:u,column:c+1},p=l.$findClosingBracket(a,h,d);if(p){var f=l.foldWidgets[p.row];return f==null&&(f=l.getFoldWidget(p.row)),f=="start"&&p.row>h.row&&(p.row--,p.column=l.getLine(p.row).length),i.fromPoints(h,p)}},this.closingBracketBlock=function(l,a,u,c,d){var h={row:u,column:c},p=l.$findOpeningBracket(a,h);if(p)return p.column++,h.column--,i.fromPoints(p,h)}}).call(s.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(n,r,o){var i=n("../line_widgets").LineWidgets,s=n("../lib/dom"),l=n("../range").Range,a=n("../config").nls;function u(d,h,p){for(var f=0,g=d.length-1;f<=g;){var m=f+g>>1,v=p(h,d[m]);if(v>0)f=m+1;else if(v<0)g=m-1;else return m}return-(f+1)}function c(d,h,p){var f=d.getAnnotations().sort(l.comparePoints);if(f.length){var g=u(f,{row:h,column:-1},l.comparePoints);g<0&&(g=-g-1),g>=f.length?g=p>0?0:f.length-1:g===0&&p<0&&(g=f.length-1);var m=f[g];if(!(!m||!p)){if(m.row===h){do m=f[g+=p];while(m&&m.row===h);if(!m)return f.slice()}var v=[];h=m.row;do v[p<0?"unshift":"push"](m),m=f[g+=p];while(m&&m.row==h);return v.length&&v}}}r.showErrorMarker=function(d,h){var p=d.session;p.widgetManager||(p.widgetManager=new i(p),p.widgetManager.attach(d));var f=d.getCursorPosition(),g=f.row,m=p.widgetManager.getWidgetsAtRow(g).filter(function(C){return C.type=="errorMarker"})[0];m?m.destroy():g-=h;var v=c(p,g,h),y;if(v){var b=v[0];f.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,f.row=b.row,y=d.renderer.$gutterLayer.$annotations[f.row]}else{if(m)return;y={text:[a("Looks good!")],className:"ace_ok"}}d.session.unfold(f.row),d.selection.moveToPosition(f);var w={row:f.row,fixedWidth:!0,coverGutter:!0,el:s.createElement("div"),type:"errorMarker"},k=w.el.appendChild(s.createElement("div")),x=w.el.appendChild(s.createElement("div"));x.className="error_widget_arrow "+y.className;var S=d.renderer.$cursorLayer.getPixelPosition(f).left;x.style.left=S+d.renderer.gutterWidth-5+"px",w.el.className="error_widget_wrapper",k.className="error_widget "+y.className,k.innerHTML=y.text.join("
    "),k.appendChild(s.createElement("div"));var A=function(C,O,R){if(O===0&&(R==="esc"||R==="return"))return w.destroy(),{command:"null"}};w.destroy=function(){d.$mouseHandler.isMousePressed||(d.keyBinding.removeKeyboardHandler(A),p.widgetManager.removeLineWidget(w),d.off("changeSelection",w.destroy),d.off("changeSession",w.destroy),d.off("mouseup",w.destroy),d.off("change",w.destroy))},d.keyBinding.addKeyboardHandler(A),d.on("changeSelection",w.destroy),d.on("changeSession",w.destroy),d.on("mouseup",w.destroy),d.on("change",w.destroy),d.session.widgetManager.addLineWidget(w),w.el.onmousedown=d.focus.bind(d),d.renderer.scrollCursorIntoView(null,.5,{bottom:w.el.offsetHeight})},s.importCssString(` .error_widget_wrapper { background: inherit; color: inherit; @@ -6086,26 +6090,26 @@ ${u} border-left-color: transparent!important; top: -5px; } -`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(n,r,o){n("./loader_build")(r);var i=n("./lib/dom"),s=n("./range").Range,l=n("./editor").Editor,a=n("./edit_session").EditSession,u=n("./undomanager").UndoManager,c=n("./virtual_renderer").VirtualRenderer;n("./worker/worker_client"),n("./keyboard/hash_handler"),n("./placeholder"),n("./multi_select"),n("./mode/folding/fold_mode"),n("./theme/textmate"),n("./ext/error_marker"),r.config=n("./config"),r.edit=function(d,h){if(typeof d=="string"){var p=d;if(d=document.getElementById(p),!d)throw new Error("ace.edit can't find div #"+p)}if(d&&d.env&&d.env.editor instanceof l)return d.env.editor;var f="";if(d&&/input|textarea/i.test(d.tagName)){var g=d;f=g.value,d=i.createElement("pre"),g.parentNode.replaceChild(d,g)}else d&&(f=d.textContent,d.innerHTML="");var m=r.createEditSession(f),v=new l(new c(d),m,h),y={document:m,editor:v,onResize:v.resize.bind(v,null)};return g&&(y.textarea=g),v.on("destroy",function(){y.editor.container.env=null}),v.container.env=v.env=y,v},r.createEditSession=function(d,h){var p=new a(d,h);return p.setUndoManager(new u),p},r.Range=s,r.Editor=l,r.EditSession=a,r.UndoManager=u,r.VirtualRenderer=c,r.version=r.config.version}),function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define);var r=function(){return this}();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=n);for(var o in n)n.hasOwnProperty(o)&&(r.ace[o]=n[o]);r.ace.default=r.ace,t&&(t.exports=r.ace)})}()})(H$);var lm=H$.exports,cm={exports:{}};cm.exports;(function(t,e){var n=200,r="__lodash_hash_undefined__",o=1,i=2,s=9007199254740991,l="[object Arguments]",a="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",h="[object Error]",p="[object Function]",f="[object GeneratorFunction]",g="[object Map]",m="[object Number]",v="[object Null]",y="[object Object]",b="[object Promise]",w="[object Proxy]",k="[object RegExp]",x="[object Set]",S="[object String]",A="[object Symbol]",C="[object Undefined]",O="[object WeakMap]",R="[object ArrayBuffer]",_="[object DataView]",T="[object Float32Array]",E="[object Float64Array]",M="[object Int8Array]",I="[object Int16Array]",N="[object Int32Array]",L="[object Uint8Array]",$="[object Uint8ClampedArray]",D="[object Uint16Array]",F="[object Uint32Array]",U=/[\\^$.*+?()[\]{}|]/g,W=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,H={};H[T]=H[E]=H[M]=H[I]=H[N]=H[L]=H[$]=H[D]=H[F]=!0,H[l]=H[a]=H[R]=H[c]=H[_]=H[d]=H[h]=H[p]=H[g]=H[m]=H[y]=H[k]=H[x]=H[S]=H[O]=!1;var G=typeof ct=="object"&&ct&&ct.Object===Object&&ct,Y=typeof self=="object"&&self&&self.Object===Object&&self,X=G||Y||Function("return this")(),Z=e&&!e.nodeType&&e,te=Z&&!0&&t&&!t.nodeType&&t,de=te&&te.exports===Z,Ie=de&&G.process,ve=function(){try{return Ie&&Ie.binding&&Ie.binding("util")}catch{}}(),_e=ve&&ve.isTypedArray;function Se(z,j){for(var Q=-1,he=z==null?0:z.length,St=0,$e=[];++Q-1}function Yv(z,j){var Q=this.__data__,he=Cp(Q,z);return he<0?(++this.size,Q.push([z,j])):Q[he][1]=j,this}ro.prototype.clear=Ep,ro.prototype.delete=jv,ro.prototype.get=Gv,ro.prototype.has=Kv,ro.prototype.set=Yv;function Le(z){var j=-1,Q=z==null?0:z.length;for(this.clear();++jpn))return!1;var Lt=$e.get(z);if(Lt&&$e.get(j))return Lt==j;var Nr=-1,To=!0,zn=Q&i?new Sp:void 0;for($e.set(z,j),$e.set(j,z);++Nr-1&&z%1==0&&z-1&&z%1==0&&z<=s}function aS(z){var j=typeof z;return z!=null&&(j=="object"||j=="function")}function Su(z){return z!=null&&typeof z=="object"}var lS=_e?Xn(_e):gD;function RD(z){return AD(z)?dD(z):mD(z)}function MD(){return[]}function OD(){return!1}t.exports=_D})(cm,cm.exports);var U$=cm.exports,zo={};Object.defineProperty(zo,"__esModule",{value:!0});zo.getAceInstance=zo.debounce=zo.editorEvents=zo.editorOptions=void 0;var Efe=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];zo.editorOptions=Efe;var Sfe=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];zo.editorEvents=Sfe;var Cfe=function(){var t;return typeof window>"u"?(ct.window={},t=lm,delete ct.window):window.ace?(t=window.ace,t.acequire=window.ace.require||window.ace.acequire):t=lm,t};zo.getAceInstance=Cfe;var Tfe=function(t,e){var n=null;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout(function(){t.apply(r,o)},e)}};zo.debounce=Tfe;var Afe=ct&&ct.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),hb=ct&&ct.__assign||function(){return hb=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&this.handleMarkers(S);var R=this.editor.$options;rc.editorOptions.forEach(function(_){R.hasOwnProperty(_)?n.editor.setOption(_,n.props[_]):n.props[_]&&console.warn("ReactAce: editor option ".concat(_," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(k)&&k.forEach(function(_){typeof _.exec=="string"?n.editor.commands.bindKey(_.bindKey,_.exec):n.editor.commands.addCommand(_)}),b&&this.editor.setKeyboardHandler("ace/keyboard/"+b),o&&(this.refEditor.className+=" "+o),w&&w(this.editor),this.editor.resize(),a&&this.editor.focus()},e.prototype.componentDidUpdate=function(n){for(var r=n,o=this.props,i=0;i 0!";if(d!=this.$splits){if(d>this.$splits){for(;this.$splitsd;)h=this.$editors[this.$splits-1],this.$container.removeChild(h.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(d){return this.$editors[d]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(d){this.$editors.forEach(function(h){h.setTheme(d)})},this.setKeyboardHandler=function(d){this.$editors.forEach(function(h){h.setKeyboardHandler(d)})},this.forEach=function(d,h){this.$editors.forEach(d,h)},this.$fontSize="",this.setFontSize=function(d){this.$fontSize=d,this.forEach(function(h){h.setFontSize(d)})},this.$cloneSession=function(d){var h=new u(d.getDocument(),d.getMode()),p=d.getUndoManager();return h.setUndoManager(p),h.setTabSize(d.getTabSize()),h.setUseSoftTabs(d.getUseSoftTabs()),h.setOverwrite(d.getOverwrite()),h.setBreakpoints(d.getBreakpoints()),h.setUseWrapMode(d.getUseWrapMode()),h.setUseWorker(d.getUseWorker()),h.setWrapLimitRange(d.$wrapLimitRange.min,d.$wrapLimitRange.max),h.$foldData=d.$cloneFoldData(),h},this.setSession=function(d,h){var p;h==null?p=this.$cEditor:p=this.$editors[h];var f=this.$editors.some(function(g){return g.session===d});return f&&(d=this.$cloneSession(d)),p.setSession(d),d},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(d){this.$orientation!=d&&(this.$orientation=d,this.resize())},this.resize=function(){var d=this.$container.clientWidth,h=this.$container.clientHeight,p;if(this.$orientation==this.BESIDE)for(var f=d/this.$splits,g=0;g-1}function sge(t,e){var n=this.__data__,r=zv(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}wu.prototype.clear=nge;wu.prototype.delete=rge;wu.prototype.get=oge;wu.prototype.has=ige;wu.prototype.set=sge;function Al(t){var e=-1,n=t?t.length:0;for(this.clear();++e0&&n.handleMarkers(L,_);for(var E=0;E"u"&&(this.Diff_Timeout<=0?a=Number.MAX_VALUE:a=new Date().getTime()+this.Diff_Timeout*1e3);var u=a;if(i==null||s==null)throw new Error("Null input. (diff_main)");if(i==s)return i?[new e.Diff(o,i)]:[];typeof l>"u"&&(l=!0);var c=l,d=this.diff_commonPrefix(i,s),h=i.substring(0,d);i=i.substring(d),s=s.substring(d),d=this.diff_commonSuffix(i,s);var p=i.substring(i.length-d);i=i.substring(0,i.length-d),s=s.substring(0,s.length-d);var f=this.diff_compute_(i,s,c,u);return h&&f.unshift(new e.Diff(o,h)),p&&f.push(new e.Diff(o,p)),this.diff_cleanupMerge(f),f},e.prototype.diff_compute_=function(i,s,l,a){var u;if(!i)return[new e.Diff(r,s)];if(!s)return[new e.Diff(n,i)];var c=i.length>s.length?i:s,d=i.length>s.length?s:i,h=c.indexOf(d);if(h!=-1)return u=[new e.Diff(r,c.substring(0,h)),new e.Diff(o,d),new e.Diff(r,c.substring(h+d.length))],i.length>s.length&&(u[0][0]=u[2][0]=n),u;if(d.length==1)return[new e.Diff(n,i),new e.Diff(r,s)];var p=this.diff_halfMatch_(i,s);if(p){var f=p[0],g=p[1],m=p[2],v=p[3],y=p[4],b=this.diff_main(f,m,l,a),w=this.diff_main(g,v,l,a);return b.concat([new e.Diff(o,y)],w)}return l&&i.length>100&&s.length>100?this.diff_lineMode_(i,s,a):this.diff_bisect_(i,s,a)},e.prototype.diff_lineMode_=function(i,s,l){var a=this.diff_linesToChars_(i,s);i=a.chars1,s=a.chars2;var u=a.lineArray,c=this.diff_main(i,s,!1,l);this.diff_charsToLines_(c,u),this.diff_cleanupSemantic(c),c.push(new e.Diff(o,""));for(var d=0,h=0,p=0,f="",g="";d=1&&p>=1){c.splice(d-h-p,h+p),d=d-h-p;for(var m=this.diff_main(f,g,!1,l),v=m.length-1;v>=0;v--)c.splice(d,0,m[v]);d=d+m.length}p=0,h=0,f="",g="";break}d++}return c.pop(),c},e.prototype.diff_bisect_=function(i,s,l){for(var a=i.length,u=s.length,c=Math.ceil((a+u)/2),d=c,h=2*c,p=new Array(h),f=new Array(h),g=0;gl);x++){for(var S=-x+y;S<=x-b;S+=2){var A=d+S,C;S==-x||S!=x&&p[A-1]a)b+=2;else if(O>u)y+=2;else if(v){var R=d+m-S;if(R>=0&&R=_)return this.diff_bisectSplit_(i,s,C,O,l)}}}for(var T=-x+w;T<=x-k;T+=2){var R=d+T,_;T==-x||T!=x&&f[R-1]a)k+=2;else if(E>u)w+=2;else if(!v){var A=d+m-T;if(A>=0&&A=_)return this.diff_bisectSplit_(i,s,C,O,l)}}}}return[new e.Diff(n,i),new e.Diff(r,s)]},e.prototype.diff_bisectSplit_=function(i,s,l,a,u){var c=i.substring(0,l),d=s.substring(0,a),h=i.substring(l),p=s.substring(a),f=this.diff_main(c,d,!1,u),g=this.diff_main(h,p,!1,u);return f.concat(g)},e.prototype.diff_linesToChars_=function(i,s){var l=[],a={};l[0]="";function u(p){for(var f="",g=0,m=-1,v=l.length;m-1}function Xv(z,j){var Q=this.__data__,he=Cp(Q,z);return he<0?(++this.size,Q.push([z,j])):Q[he][1]=j,this}ro.prototype.clear=Ep,ro.prototype.delete=Gv,ro.prototype.get=Kv,ro.prototype.has=Yv,ro.prototype.set=Xv;function Le(z){var j=-1,Q=z==null?0:z.length;for(this.clear();++jpn))return!1;var Lt=$e.get(z);if(Lt&&$e.get(j))return Lt==j;var Nr=-1,Ao=!0,zn=Q&i?new Sp:void 0;for($e.set(z,j),$e.set(j,z);++Nr-1&&z%1==0&&z-1&&z%1==0&&z<=s}function lS(z){var j=typeof z;return z!=null&&(j=="object"||j=="function")}function Su(z){return z!=null&&typeof z=="object"}var cS=_e?Xn(_e):vD;function OD(z){return RD(z)?pD(z):yD(z)}function ID(){return[]}function LD(){return!1}t.exports=MD})(cm,cm.exports);var V$=cm.exports,Fo={};Object.defineProperty(Fo,"__esModule",{value:!0});Fo.getAceInstance=Fo.debounce=Fo.editorEvents=Fo.editorOptions=void 0;var Rfe=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];Fo.editorOptions=Rfe;var Mfe=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];Fo.editorEvents=Mfe;var Ofe=function(){var t;return typeof window>"u"?(ct.window={},t=lm,delete ct.window):window.ace?(t=window.ace,t.acequire=window.ace.require||window.ace.acequire):t=lm,t};Fo.getAceInstance=Ofe;var Ife=function(t,e){var n=null;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout(function(){t.apply(r,o)},e)}};Fo.debounce=Ife;var Lfe=ct&&ct.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fb=ct&&ct.__assign||function(){return fb=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&this.handleMarkers(S);var R=this.editor.$options;rc.editorOptions.forEach(function(_){R.hasOwnProperty(_)?n.editor.setOption(_,n.props[_]):n.props[_]&&console.warn("ReactAce: editor option ".concat(_," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(k)&&k.forEach(function(_){typeof _.exec=="string"?n.editor.commands.bindKey(_.bindKey,_.exec):n.editor.commands.addCommand(_)}),b&&this.editor.setKeyboardHandler("ace/keyboard/"+b),o&&(this.refEditor.className+=" "+o),w&&w(this.editor),this.editor.resize(),a&&this.editor.focus()},e.prototype.componentDidUpdate=function(n){for(var r=n,o=this.props,i=0;i 0!";if(d!=this.$splits){if(d>this.$splits){for(;this.$splitsd;)h=this.$editors[this.$splits-1],this.$container.removeChild(h.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(d){return this.$editors[d]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(d){this.$editors.forEach(function(h){h.setTheme(d)})},this.setKeyboardHandler=function(d){this.$editors.forEach(function(h){h.setKeyboardHandler(d)})},this.forEach=function(d,h){this.$editors.forEach(d,h)},this.$fontSize="",this.setFontSize=function(d){this.$fontSize=d,this.forEach(function(h){h.setFontSize(d)})},this.$cloneSession=function(d){var h=new u(d.getDocument(),d.getMode()),p=d.getUndoManager();return h.setUndoManager(p),h.setTabSize(d.getTabSize()),h.setUseSoftTabs(d.getUseSoftTabs()),h.setOverwrite(d.getOverwrite()),h.setBreakpoints(d.getBreakpoints()),h.setUseWrapMode(d.getUseWrapMode()),h.setUseWorker(d.getUseWorker()),h.setWrapLimitRange(d.$wrapLimitRange.min,d.$wrapLimitRange.max),h.$foldData=d.$cloneFoldData(),h},this.setSession=function(d,h){var p;h==null?p=this.$cEditor:p=this.$editors[h];var f=this.$editors.some(function(g){return g.session===d});return f&&(d=this.$cloneSession(d)),p.setSession(d),d},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(d){this.$orientation!=d&&(this.$orientation=d,this.resize())},this.resize=function(){var d=this.$container.clientWidth,h=this.$container.clientHeight,p;if(this.$orientation==this.BESIDE)for(var f=d/this.$splits,g=0;g-1}function hge(t,e){var n=this.__data__,r=Fv(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}wu.prototype.clear=lge;wu.prototype.delete=cge;wu.prototype.get=uge;wu.prototype.has=dge;wu.prototype.set=hge;function Al(t){var e=-1,n=t?t.length:0;for(this.clear();++e0&&n.handleMarkers(L,_);for(var E=0;E"u"&&(this.Diff_Timeout<=0?a=Number.MAX_VALUE:a=new Date().getTime()+this.Diff_Timeout*1e3);var u=a;if(i==null||s==null)throw new Error("Null input. (diff_main)");if(i==s)return i?[new e.Diff(o,i)]:[];typeof l>"u"&&(l=!0);var c=l,d=this.diff_commonPrefix(i,s),h=i.substring(0,d);i=i.substring(d),s=s.substring(d),d=this.diff_commonSuffix(i,s);var p=i.substring(i.length-d);i=i.substring(0,i.length-d),s=s.substring(0,s.length-d);var f=this.diff_compute_(i,s,c,u);return h&&f.unshift(new e.Diff(o,h)),p&&f.push(new e.Diff(o,p)),this.diff_cleanupMerge(f),f},e.prototype.diff_compute_=function(i,s,l,a){var u;if(!i)return[new e.Diff(r,s)];if(!s)return[new e.Diff(n,i)];var c=i.length>s.length?i:s,d=i.length>s.length?s:i,h=c.indexOf(d);if(h!=-1)return u=[new e.Diff(r,c.substring(0,h)),new e.Diff(o,d),new e.Diff(r,c.substring(h+d.length))],i.length>s.length&&(u[0][0]=u[2][0]=n),u;if(d.length==1)return[new e.Diff(n,i),new e.Diff(r,s)];var p=this.diff_halfMatch_(i,s);if(p){var f=p[0],g=p[1],m=p[2],v=p[3],y=p[4],b=this.diff_main(f,m,l,a),w=this.diff_main(g,v,l,a);return b.concat([new e.Diff(o,y)],w)}return l&&i.length>100&&s.length>100?this.diff_lineMode_(i,s,a):this.diff_bisect_(i,s,a)},e.prototype.diff_lineMode_=function(i,s,l){var a=this.diff_linesToChars_(i,s);i=a.chars1,s=a.chars2;var u=a.lineArray,c=this.diff_main(i,s,!1,l);this.diff_charsToLines_(c,u),this.diff_cleanupSemantic(c),c.push(new e.Diff(o,""));for(var d=0,h=0,p=0,f="",g="";d=1&&p>=1){c.splice(d-h-p,h+p),d=d-h-p;for(var m=this.diff_main(f,g,!1,l),v=m.length-1;v>=0;v--)c.splice(d,0,m[v]);d=d+m.length}p=0,h=0,f="",g="";break}d++}return c.pop(),c},e.prototype.diff_bisect_=function(i,s,l){for(var a=i.length,u=s.length,c=Math.ceil((a+u)/2),d=c,h=2*c,p=new Array(h),f=new Array(h),g=0;gl);x++){for(var S=-x+y;S<=x-b;S+=2){var A=d+S,C;S==-x||S!=x&&p[A-1]a)b+=2;else if(O>u)y+=2;else if(v){var R=d+m-S;if(R>=0&&R=_)return this.diff_bisectSplit_(i,s,C,O,l)}}}for(var T=-x+w;T<=x-k;T+=2){var R=d+T,_;T==-x||T!=x&&f[R-1]a)k+=2;else if(E>u)w+=2;else if(!v){var A=d+m-T;if(A>=0&&A=_)return this.diff_bisectSplit_(i,s,C,O,l)}}}}return[new e.Diff(n,i),new e.Diff(r,s)]},e.prototype.diff_bisectSplit_=function(i,s,l,a,u){var c=i.substring(0,l),d=s.substring(0,a),h=i.substring(l),p=s.substring(a),f=this.diff_main(c,d,!1,u),g=this.diff_main(h,p,!1,u);return f.concat(g)},e.prototype.diff_linesToChars_=function(i,s){var l=[],a={};l[0]="";function u(p){for(var f="",g=0,m=-1,v=l.length;ma?i=i.substring(l-a):ls.length?i:s,a=i.length>s.length?s:i;if(l.length<4||a.length*2=b.length?[C,O,R,_,A]:null}var d=c(l,a,Math.ceil(l.length/4)),h=c(l,a,Math.ceil(l.length/2)),p;if(!d&&!h)return null;h?d?p=d[4].length>h[4].length?d:h:p=h:p=d;var f,g,m,v;i.length>s.length?(f=p[0],g=p[1],m=p[2],v=p[3]):(m=p[0],v=p[1],f=p[2],g=p[3]);var y=p[4];return[f,g,m,v,y]},e.prototype.diff_cleanupSemantic=function(i){for(var s=!1,l=[],a=0,u=null,c=0,d=0,h=0,p=0,f=0;c0?l[a-1]:-1,d=0,h=0,p=0,f=0,u=null,s=!0)),c++;for(s&&this.diff_cleanupMerge(i),this.diff_cleanupSemanticLossless(i),c=1;c=y?(v>=g.length/2||v>=m.length/2)&&(i.splice(c,0,new e.Diff(o,m.substring(0,v))),i[c-1][1]=g.substring(0,g.length-v),i[c+1][1]=m.substring(v),c++):(y>=g.length/2||y>=m.length/2)&&(i.splice(c,0,new e.Diff(o,g.substring(0,y))),i[c-1][0]=r,i[c-1][1]=m.substring(0,m.length-y),i[c+1][0]=n,i[c+1][1]=g.substring(y),c++),c++}c++}},e.prototype.diff_cleanupSemanticLossless=function(i){function s(y,b){if(!y||!b)return 6;var w=y.charAt(y.length-1),k=b.charAt(0),x=w.match(e.nonAlphaNumericRegex_),S=k.match(e.nonAlphaNumericRegex_),A=x&&w.match(e.whitespaceRegex_),C=S&&k.match(e.whitespaceRegex_),O=A&&w.match(e.linebreakRegex_),R=C&&k.match(e.linebreakRegex_),_=O&&y.match(e.blanklineEndRegex_),T=R&&b.match(e.blanklineStartRegex_);return _||T?5:O||R?4:x&&!A&&C?3:A||C?2:x||S?1:0}for(var l=1;l=m&&(m=v,p=a,f=u,g=c)}i[l-1][1]!=p&&(p?i[l-1][1]=p:(i.splice(l-1,1),l--),i[l][1]=f,g?i[l+1][1]=g:(i.splice(l+1,1),l--))}l++}},e.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,e.whitespaceRegex_=/\s/,e.linebreakRegex_=/[\r\n]/,e.blanklineEndRegex_=/\n\r?\n$/,e.blanklineStartRegex_=/^\r?\n\r?\n/,e.prototype.diff_cleanupEfficiency=function(i){for(var s=!1,l=[],a=0,u=null,c=0,d=!1,h=!1,p=!1,f=!1;c0?l[a-1]:-1,p=f=!1),s=!0)),c++;s&&this.diff_cleanupMerge(i)},e.prototype.diff_cleanupMerge=function(i){i.push(new e.Diff(o,""));for(var s=0,l=0,a=0,u="",c="",d;s1?(l!==0&&a!==0&&(d=this.diff_commonPrefix(c,u),d!==0&&(s-l-a>0&&i[s-l-a-1][0]==o?i[s-l-a-1][1]+=c.substring(0,d):(i.splice(0,0,new e.Diff(o,c.substring(0,d))),s++),c=c.substring(d),u=u.substring(d)),d=this.diff_commonSuffix(c,u),d!==0&&(i[s][1]=c.substring(c.length-d)+i[s][1],c=c.substring(0,c.length-d),u=u.substring(0,u.length-d))),s-=l+a,i.splice(s,l+a),u.length&&(i.splice(s,0,new e.Diff(n,u)),s++),c.length&&(i.splice(s,0,new e.Diff(r,c)),s++),s++):s!==0&&i[s-1][0]==o?(i[s-1][1]+=i[s][1],i.splice(s,1)):s++,a=0,l=0,u="",c="";break}i[i.length-1][1]===""&&i.pop();var h=!1;for(s=1;ss));d++)u=l,c=a;return i.length!=d&&i[d][0]===n?c:c+(s-u)},e.prototype.diff_prettyHtml=function(i){for(var s=[],l=/&/g,a=//g,c=/\n/g,d=0;d");switch(h){case r:s[d]=''+f+"";break;case n:s[d]=''+f+"";break;case o:s[d]=""+f+"";break}}return s.join("")},e.prototype.diff_text1=function(i){for(var s=[],l=0;lthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var a=this.match_alphabet_(s),u=this;function c(C,O){var R=C/s.length,_=Math.abs(l-O);return u.Match_Distance?R+_/u.Match_Distance:_?1:R}var d=this.Match_Threshold,h=i.indexOf(s,l);h!=-1&&(d=Math.min(c(0,h),d),h=i.lastIndexOf(s,l+s.length),h!=-1&&(d=Math.min(c(0,h),d)));var p=1<=b;x--){var S=a[i.charAt(x-1)];if(y===0?k[x]=(k[x+1]<<1|1)&S:k[x]=(k[x+1]<<1|1)&S|((v[x+1]|v[x])<<1|1)|v[x+1],k[x]&p){var A=c(y,x-1);if(A<=d)if(d=A,h=x-1,h>l)b=Math.max(1,2*l-h);else break}}if(c(y+1,l)>d)break;v=k}return h},e.prototype.match_alphabet_=function(i){for(var s={},l=0;l"u")a=i,u=this.diff_main(a,s,!0),u.length>2&&(this.diff_cleanupSemantic(u),this.diff_cleanupEfficiency(u));else if(i&&typeof i=="object"&&typeof s>"u"&&typeof l>"u")u=i,a=this.diff_text1(u);else if(typeof i=="string"&&s&&typeof s=="object"&&typeof l>"u")a=i,u=s;else if(typeof i=="string"&&typeof s=="string"&&l&&typeof l=="object")a=i,u=l;else throw new Error("Unknown call format to patch_make.");if(u.length===0)return[];for(var c=[],d=new e.patch_obj,h=0,p=0,f=0,g=a,m=a,v=0;v=2*this.Patch_Margin&&h&&(this.patch_addContext_(d,g),c.push(d),d=new e.patch_obj,h=0,g=m,p=f);break}y!==r&&(p+=b.length),y!==n&&(f+=b.length)}return h&&(this.patch_addContext_(d,g),c.push(d)),c},e.prototype.patch_deepCopy=function(i){for(var s=[],l=0;lthis.Match_MaxBits?(p=this.match_main(s,h.substring(0,this.Match_MaxBits),d),p!=-1&&(f=this.match_main(s,h.substring(h.length-this.Match_MaxBits),d+h.length-this.Match_MaxBits),(f==-1||p>=f)&&(p=-1))):p=this.match_main(s,h,d),p==-1)u[c]=!1,a-=i[c].length2-i[c].length1;else{u[c]=!0,a=p-d;var g;if(f==-1?g=s.substring(p,p+h.length):g=s.substring(p,f+this.Match_MaxBits),h==g)s=s.substring(0,p)+this.diff_text2(i[c].diffs)+s.substring(p+h.length);else{var m=this.diff_main(h,g,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(m)/h.length>this.Patch_DeleteThreshold)u[c]=!1;else{this.diff_cleanupSemanticLossless(m);for(var v=0,y,b=0;bc[0][1].length){var d=s-c[0][1].length;c[0][1]=l.substring(c[0][1].length)+c[0][1],u.start1-=d,u.start2-=d,u.length1+=d,u.length2+=d}if(u=i[i.length-1],c=u.diffs,c.length==0||c[c.length-1][0]!=o)c.push(new e.Diff(o,l)),u.length1+=s,u.length2+=s;else if(s>c[c.length-1][1].length){var d=s-c[c.length-1][1].length;c[c.length-1][1]+=l.substring(0,d),u.length1+=d,u.length2+=d}return l},e.prototype.patch_splitMax=function(i){for(var s=this.Match_MaxBits,l=0;l2*s?(h.length1+=g.length,u+=g.length,p=!1,h.diffs.push(new e.Diff(f,g)),a.diffs.shift()):(g=g.substring(0,s-h.length1-this.Patch_Margin),h.length1+=g.length,u+=g.length,f===o?(h.length2+=g.length,c+=g.length):p=!1,h.diffs.push(new e.Diff(f,g)),g==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(g.length))}d=this.diff_text2(h.diffs),d=d.substring(d.length-this.Patch_Margin);var m=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);m!==""&&(h.length1+=m.length,h.length2+=m.length,h.diffs.length!==0&&h.diffs[h.diffs.length-1][0]===o?h.diffs[h.diffs.length-1][1]+=m:h.diffs.push(new e.Diff(o,m))),p||i.splice(++l,0,h)}}},e.prototype.patch_toText=function(i){for(var s=[],l=0;l/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),d("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[d("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!h||!h.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(m,v,y){if(this.next=m=="{"?this.nextState:"",m=="{"&&y.length)y.unshift("start",v);else if(m=="}"&&y.length&&(y.shift(),this.next=y.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return m=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!h||h.jsx!=!1)&&c.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};i.inherits(u,l);function c(){var h=a.replace("\\d","\\d\\-"),p={onMatch:function(g,m,v){var y=g.charAt(1)=="/"?2:1;return y==1?(m!=this.nextState?v.unshift(this.next,this.nextState,0):v.unshift(this.next),v[2]++):y==2&&m==this.nextState&&(v[1]--,(!v[1]||v[1]<0)&&(v.shift(),v.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:g.slice(0,y)},{type:"meta.tag.tag-name.xml",value:g.substr(y)}]},regex:"",onMatch:function(g,m,v){return m==v[0]&&v.shift(),g.length==2&&(v[0]==this.nextState&&v[1]--,(!v[1]||v[1]<0)&&v.splice(0,2)),this.next=v[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},f,d("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:h},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},p],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function d(h){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,o){var i=n("../range").Range,s=function(){};(function(){this.checkOutdent=function(l,a){return/^\s+$/.test(l)?/^\s*\}/.test(a):!1},this.autoOutdent=function(l,a){var u=l.getLine(a),c=u.match(/^(\s*\})/);if(!c)return 0;var d=c[1].length,h=l.findMatchingBracket({row:a,column:d});if(!h||h.row==a)return 0;var p=this.$getIndent(l.getLine(h.row));l.replace(new i(a,0,a,d-1),p)},this.$getIndent=function(l){return l.match(/^\s*/)[0]}}).call(s.prototype),r.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("../../range").Range,l=n("./fold_mode").FoldMode,a=r.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};i.inherits(a,l),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var p=this._getFoldWidgetBase(u,c,d);return!p&&this.startRegionRe.test(h)?"start":p},this.getFoldWidgetRange=function(u,c,d,h){var p=u.getLine(d);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(u,p,d);var m=p.match(this.foldingStartMarker);if(m){var f=m.index;if(m[1])return this.openingBracketBlock(u,m[1],d,f);var g=u.getCommentFoldRange(d,f+m[0].length,1);return g&&!g.isMultiLine()&&(h?g=this.getSectionRange(u,d):c!="all"&&(g=null)),g}if(c!=="markbegin"){var m=p.match(this.foldingStopMarker);if(m){var f=m.index+m[0].length;return m[1]?this.closingBracketBlock(u,m[1],d,f):u.getCommentFoldRange(d,f,-1)}}},this.getSectionRange=function(u,c){var d=u.getLine(c),h=d.search(/\S/),p=c,f=d.length;c=c+1;for(var g=c,m=u.getLength();++cv)break;var y=this.getFoldWidgetRange(u,"all",c);if(y){if(y.start.row<=p)break;if(y.isMultiLine())c=y.end.row;else if(h==v)break}g=c}}return new s(p,f,g,u.getLine(g).length)},this.getCommentRegionBlock=function(u,c,d){for(var h=c.search(/\s*$/),p=u.getLength(),f=d,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++df)return new s(f,h,y,c.length)}}).call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./javascript_highlight_rules").JavaScriptHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./behaviour/cstyle").CstyleBehaviour,d=n("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new d};i.inherits(h,s),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(p,f,g){var m=this.$getIndent(f),v=this.getTokenizer().getLineTokens(f,p),y=v.tokens,b=v.state;if(y.length&&y[y.length-1].type=="comment")return m;if(p=="start"||p=="no_regex"){var w=f.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);w&&(m+=g)}else if(p=="doc-start"){if(b=="start"||b=="no_regex")return"";var w=f.match(/^\s*(\/?)\*/);w&&(w[1]&&(m+=" "),m+="* ")}return m},this.checkOutdent=function(p,f,g){return this.$outdent.checkOutdent(f,g)},this.autoOutdent=function(p,f,g){this.$outdent.autoOutdent(f,g)},this.createWorker=function(p){var f=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return f.attachToDocument(p.getDocument()),f.on("annotate",function(g){p.setAnnotations(g.data)}),f.on("terminate",function(){p.clearAnnotations()}),f},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(h.prototype),r.Mode=h}),function(){ace.require(["ace/mode/javascript"],function(n){t&&(t.exports=n)})}()})(Hge);var Uge={exports:{}};(function(t,e){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop");n("../lib/lang");var s=n("./text_highlight_rules").TextHighlightRules,l=r.supportType="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|border|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-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-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=r.supportFunction="rgb|rgba|url|attr|counter|counters",u=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",c=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",d=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",h=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",p=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",f=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",g=function(){var m=this.createKeywordMapper({"support.function":a,"support.constant":u,"support.type":l,"support.constant.color":c,"support.constant.fonts":d},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:h},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+h+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:p},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:f},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};i.inherits(g,s),r.CssHighlightRules=g}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},l.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};i.inherits(l,s),l.getTagRule=function(a){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},l.getStartRule=function(a){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:a}},l.getEndRule=function(a){return{token:"comment.doc",regex:"\\*\\/",next:a}},r.JsDocCommentHighlightRules=l}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,l=n("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",u=function(h){var p=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),f="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",g="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[s.getStartRule("doc-start"),d("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+a+")(\\.)(prototype)(\\.)("+a+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function\\*?)(\\s+)("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+f+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:p,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),d("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[d("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!h||!h.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(m,v,y){if(this.next=m=="{"?this.nextState:"",m=="{"&&y.length)y.unshift("start",v);else if(m=="}"&&y.length&&(y.shift(),this.next=y.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return m=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!h||h.jsx!=!1)&&c.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};i.inherits(u,l);function c(){var h=a.replace("\\d","\\d\\-"),p={onMatch:function(g,m,v){var y=g.charAt(1)=="/"?2:1;return y==1?(m!=this.nextState?v.unshift(this.next,this.nextState,0):v.unshift(this.next),v[2]++):y==2&&m==this.nextState&&(v[1]--,(!v[1]||v[1]<0)&&(v.shift(),v.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:g.slice(0,y)},{type:"meta.tag.tag-name.xml",value:g.substr(y)}]},regex:"",onMatch:function(g,m,v){return m==v[0]&&v.shift(),g.length==2&&(v[0]==this.nextState&&v[1]--,(!v[1]||v[1]<0)&&v.splice(0,2)),this.next=v[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},f,d("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:h},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},p],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function d(h){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.JavaScriptHighlightRules=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(a){var u="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+u+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+u+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===l&&this.normalizeRules()};(function(){this.embedTagRules=function(a,u,c){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(<)("+c+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:u+"start"}]}),this.$rules[c+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(d,h,p){return p.splice(0),this.token}}],this.embedRules(a,u,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(|$))",next:c+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(s.prototype),i.inherits(l,s),r.XmlHighlightRules=l}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./css_highlight_rules").CssHighlightRules,a=n("./javascript_highlight_rules").JavaScriptHighlightRules,u=n("./xml_highlight_rules").XmlHighlightRules,c=s.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),d=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(h,p){var f=c[p];return["meta.tag.punctuation."+(h=="<"?"":"end-")+"tag-open.xml","meta.tag"+(f?"."+f:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(l,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===d&&this.normalizeRules()};i.inherits(d,u),r.HtmlHighlightRules=d}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(n,r,o){var i=n("../config").$modes,s=n("../lib/oop"),l=n("../lib/lang"),a=n("./text_highlight_rules").TextHighlightRules,u=n("./html_highlight_rules").HtmlHighlightRules,c=function(h){return"(?:[^"+l.escapeRegExp(h)+"\\\\]|\\\\.)*"},d=function(){u.call(this);var h={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(f,g,m,v){var y=f.match(/^(\s*)([`~]+)(.*)/),b=/[\w-]+|$/.exec(y[3])[0];return i[b]||(b=""),m.unshift("githubblock",[],[y[1],y[2],b],g),this.token},next:"githubblock"},p=[{token:"support.function",regex:".*",onMatch:function(f,g,m,v){var y=m[1],b=m[2][0],w=m[2][1],k=m[2][2],x=/^(\s*)(`+|~+)\s*$/.exec(f);if(x&&x[1].length=w.length&&x[2][0]==w[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",k&&i[k]){var S=i[k].getTokenizer().getLineTokens(f,y.slice(0));return m[1]=S.state,S.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(f){return"markup.heading."+f.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},h,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+c("]")+")(\\]\\s*\\[)("+c("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+c("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+c('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},h,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:p}),this.normalizeRules()};s.inherits(d,a),r.MarkdownHighlightRules=d}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(n,r,o){var i=n("../../lib/oop"),s=n("./fold_mode").FoldMode,l=n("../../range").Range,a=r.FoldMode=function(){};i.inherits(a,s),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);return this.foldingStartMarker.test(h)?h[0]=="`"&&u.bgTokenizer.getState(d)=="start"?"end":"start":""},this.getFoldWidgetRange=function(u,c,d){var h=u.getLine(d),p=h.length,f=u.getLength(),g=d,m=d;if(!h.match(this.foldingStartMarker))return;if(h[0]=="`")if(u.bgTokenizer.getState(d)!=="start"){for(;++d0&&(h=u.getLine(d),!(h[0]=="`"&h.substring(0,3)=="```")););return new l(d,h.length,g,0)}var v;function y(A){return v=u.getTokens(A)[0],v&&v.type.lastIndexOf(b,0)===0}var b="markup.heading";function w(){var A=v.value[0];return A=="="?6:A=="-"?5:7-v.value.search(/[^#]|$/)}if(y(d)){for(var k=w();++d=k)break}if(m=d-(!v||["=","-"].indexOf(v.value[0])==-1?1:2),m>g)for(;m>g&&/^\s*$/.test(u.getLine(m));)m--;if(m>g){var S=u.getLine(m).length;return new l(g,p,m,S)}}}}).call(a.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,o){var i=n("../range").Range,s=function(){};(function(){this.checkOutdent=function(l,a){return/^\s+$/.test(l)?/^\s*\}/.test(a):!1},this.autoOutdent=function(l,a){var u=l.getLine(a),c=u.match(/^(\s*\})/);if(!c)return 0;var d=c[1].length,h=l.findMatchingBracket({row:a,column:d});if(!h||h.row==a)return 0;var p=this.$getIndent(l.getLine(h.row));l.replace(new i(a,0,a,d-1),p)},this.$getIndent=function(l){return l.match(/^\s*/)[0]}}).call(s.prototype),r.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("../../range").Range,l=n("./fold_mode").FoldMode,a=r.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};i.inherits(a,l),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var p=this._getFoldWidgetBase(u,c,d);return!p&&this.startRegionRe.test(h)?"start":p},this.getFoldWidgetRange=function(u,c,d,h){var p=u.getLine(d);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(u,p,d);var m=p.match(this.foldingStartMarker);if(m){var f=m.index;if(m[1])return this.openingBracketBlock(u,m[1],d,f);var g=u.getCommentFoldRange(d,f+m[0].length,1);return g&&!g.isMultiLine()&&(h?g=this.getSectionRange(u,d):c!="all"&&(g=null)),g}if(c!=="markbegin"){var m=p.match(this.foldingStopMarker);if(m){var f=m.index+m[0].length;return m[1]?this.closingBracketBlock(u,m[1],d,f):u.getCommentFoldRange(d,f,-1)}}},this.getSectionRange=function(u,c){var d=u.getLine(c),h=d.search(/\S/),p=c,f=d.length;c=c+1;for(var g=c,m=u.getLength();++cv)break;var y=this.getFoldWidgetRange(u,"all",c);if(y){if(y.start.row<=p)break;if(y.isMultiLine())c=y.end.row;else if(h==v)break}g=c}}return new s(p,f,g,u.getLine(g).length)},this.getCommentRegionBlock=function(u,c,d){for(var h=c.search(/\s*$/),p=u.getLength(),f=d,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++df)return new s(f,h,y,c.length)}}).call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./javascript_highlight_rules").JavaScriptHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./behaviour/cstyle").CstyleBehaviour,d=n("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new d};i.inherits(h,s),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(p,f,g){var m=this.$getIndent(f),v=this.getTokenizer().getLineTokens(f,p),y=v.tokens,b=v.state;if(y.length&&y[y.length-1].type=="comment")return m;if(p=="start"||p=="no_regex"){var w=f.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);w&&(m+=g)}else if(p=="doc-start"){if(b=="start"||b=="no_regex")return"";var w=f.match(/^\s*(\/?)\*/);w&&(w[1]&&(m+=" "),m+="* ")}return m},this.checkOutdent=function(p,f,g){return this.$outdent.checkOutdent(f,g)},this.autoOutdent=function(p,f,g){this.$outdent.autoOutdent(f,g)},this.createWorker=function(p){var f=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return f.attachToDocument(p.getDocument()),f.on("annotate",function(g){p.setAnnotations(g.data)}),f.on("terminate",function(){p.clearAnnotations()}),f},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,r,o){var i={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},s=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var l=document.createElement("c").style;for(var a in l)if(typeof l[a]=="string"){var u=a.replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});i.hasOwnProperty(u)||(i[u]=1)}}this.completionsDefined=!0},this.getCompletions=function(l,a,u,c){if(this.completionsDefined||this.defineCompletions(),l==="ruleset"||a.$mode.$id=="ace/mode/scss"){var d=a.getLine(u.row).substr(0,u.column),h=/\([^)]*$/.test(d);return h&&(d=d.substr(d.lastIndexOf("(")+1)),/:[^;]+$/.test(d)?this.getPropertyValueCompletions(l,a,u,c):this.getPropertyCompletions(l,a,u,c,h)}return[]},this.getPropertyCompletions=function(l,a,u,c,d){d=d||!1;var h=Object.keys(i);return h.map(function(p){return{caption:p,snippet:p+": $0"+(d?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(l,a,u,c){var d=a.getLine(u.row).substr(0,u.column),h=(/([\w\-]+):[^:]*$/.exec(d)||{})[1];if(!h)return[];var p=[];return h in i&&typeof i[h]=="object"&&(p=Object.keys(i[h])),p.map(function(f){return{caption:f,snippet:f,meta:"property value",score:1e6}})}}).call(s.prototype),r.CssCompletions=s}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,r,o){var i=n("../../lib/oop");n("../behaviour").Behaviour;var s=n("./cstyle").CstyleBehaviour,l=n("../../token_iterator").TokenIterator,a=function(){this.inherit(s),this.add("colon","insertion",function(u,c,d,h,p){if(p===":"&&d.selection.isEmpty()){var f=d.getCursorPosition(),g=new l(h,f.row,f.column),m=g.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=g.stepBackward()),m&&m.type==="support.type"){var v=h.doc.getLine(f.row),y=v.substring(f.column,f.column+1);if(y===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(v.substring(f.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(u,c,d,h,p){var f=h.doc.getTextRange(p);if(!p.isMultiLine()&&f===":"){var g=d.getCursorPosition(),m=new l(h,g.row,g.column),v=m.getCurrentToken();if(v&&v.value.match(/\s+/)&&(v=m.stepBackward()),v&&v.type==="support.type"){var y=h.doc.getLine(p.start.row),b=y.substring(p.end.column,p.end.column+1);if(b===";")return p.end.column++,p}}}),this.add("semicolon","insertion",function(u,c,d,h,p){if(p===";"&&d.selection.isEmpty()){var f=d.getCursorPosition(),g=h.doc.getLine(f.row),m=g.substring(f.column,f.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(u,c,d,h,p){if(p==="!"&&d.selection.isEmpty()){var f=d.getCursorPosition(),g=h.doc.getLine(f.row);if(/^\s*(;|}|$)/.test(g.substring(f.column)))return{text:"!important",selection:[10,10]}}})};i.inherits(a,s),r.CssBehaviour=a}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./css_highlight_rules").CssHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./css_completions").CssCompletions,d=n("./behaviour/css").CssBehaviour,h=n("./folding/cstyle").FoldMode,p=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new d,this.$completer=new c,this.foldingRules=new h};i.inherits(p,s),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(f,g,m){var v=this.$getIndent(g),y=this.getTokenizer().getLineTokens(g,f).tokens;if(y.length&&y[y.length-1].type=="comment")return v;var b=g.match(/^.*\{\s*$/);return b&&(v+=m),v},this.checkOutdent=function(f,g,m){return this.$outdent.checkOutdent(g,m)},this.autoOutdent=function(f,g,m){this.$outdent.autoOutdent(g,m)},this.getCompletions=function(f,g,m,v){return this.$completer.getCompletions(f,g,m,v)},this.createWorker=function(f){var g=new u(["ace"],"ace/mode/css_worker","Worker");return g.attachToDocument(f.getDocument()),g.on("annotate",function(m){f.setAnnotations(m.data)}),g.on("terminate",function(){f.clearAnnotations()}),g},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(p.prototype),r.Mode=p}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,o){var i=n("../../lib/oop"),s=n("../behaviour").Behaviour,l=n("../../token_iterator").TokenIterator;n("../../lib/lang");function a(c,d){return c&&c.type.lastIndexOf(d+".xml")>-1}var u=function(){this.add("string_dquotes","insertion",function(c,d,h,p,f){if(f=='"'||f=="'"){var g=f,m=p.doc.getTextRange(h.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&h.getWrapBehavioursEnabled())return{text:g+m+g,selection:!1};var v=h.getCursorPosition(),y=p.doc.getLine(v.row),b=y.substring(v.column,v.column+1),w=new l(p,v.row,v.column),k=w.getCurrentToken();if(b==g&&(a(k,"attribute-value")||a(k,"string")))return{text:"",selection:[1,1]};if(k||(k=w.stepBackward()),!k)return;for(;a(k,"tag-whitespace")||a(k,"whitespace");)k=w.stepBackward();var x=!b||b.match(/\s/);if(a(k,"attribute-equals")&&(x||b==">")||a(k,"decl-attribute-equals")&&(x||b=="?"))return{text:g+g,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(c,d,h,p,f){var g=p.doc.getTextRange(f);if(!f.isMultiLine()&&(g=='"'||g=="'")){var m=p.doc.getLine(f.start.row),v=m.substring(f.start.column+1,f.start.column+2);if(v==g)return f.end.column++,f}}),this.add("autoclosing","insertion",function(c,d,h,p,f){if(f==">"){var g=h.getSelectionRange().start,m=new l(p,g.row,g.column),v=m.getCurrentToken()||m.stepBackward();if(!v||!(a(v,"tag-name")||a(v,"tag-whitespace")||a(v,"attribute-name")||a(v,"attribute-equals")||a(v,"attribute-value"))||a(v,"reference.attribute-value"))return;if(a(v,"attribute-value")){var y=m.getCurrentTokenColumn()+v.value.length;if(g.column/.test(p.getLine(g.row).slice(g.column)))return;for(;!a(v,"tag-name");)if(v=m.stepBackward(),v.value=="<"){v=m.stepForward();break}var w=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(a(m.stepBackward(),"end-tag-open"))return;var x=v.value;return w==g.row&&(x=x.substring(0,g.column-k)),this.voidElements.hasOwnProperty(x.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(c,d,h,p,f){if(f==` +`&&(h-=1),o.right.push({startLine:i.right,endLine:i.right+h}),i.right+=u;break;default:throw new Error("Diff type was not defined.")}}}),o},e.prototype.setCodeMarkers=function(n){n===void 0&&(n={left:[],right:[]});for(var r=[],o={left:[],right:[]},i=0;i/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),d("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[d("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!h||!h.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(m,v,y){if(this.next=m=="{"?this.nextState:"",m=="{"&&y.length)y.unshift("start",v);else if(m=="}"&&y.length&&(y.shift(),this.next=y.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return m=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!h||h.jsx!=!1)&&c.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};i.inherits(u,l);function c(){var h=a.replace("\\d","\\d\\-"),p={onMatch:function(g,m,v){var y=g.charAt(1)=="/"?2:1;return y==1?(m!=this.nextState?v.unshift(this.next,this.nextState,0):v.unshift(this.next),v[2]++):y==2&&m==this.nextState&&(v[1]--,(!v[1]||v[1]<0)&&(v.shift(),v.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:g.slice(0,y)},{type:"meta.tag.tag-name.xml",value:g.substr(y)}]},regex:"",onMatch:function(g,m,v){return m==v[0]&&v.shift(),g.length==2&&(v[0]==this.nextState&&v[1]--,(!v[1]||v[1]<0)&&v.splice(0,2)),this.next=v[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},f,d("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:h},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},p],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function d(h){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,o){var i=n("../range").Range,s=function(){};(function(){this.checkOutdent=function(l,a){return/^\s+$/.test(l)?/^\s*\}/.test(a):!1},this.autoOutdent=function(l,a){var u=l.getLine(a),c=u.match(/^(\s*\})/);if(!c)return 0;var d=c[1].length,h=l.findMatchingBracket({row:a,column:d});if(!h||h.row==a)return 0;var p=this.$getIndent(l.getLine(h.row));l.replace(new i(a,0,a,d-1),p)},this.$getIndent=function(l){return l.match(/^\s*/)[0]}}).call(s.prototype),r.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("../../range").Range,l=n("./fold_mode").FoldMode,a=r.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};i.inherits(a,l),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var p=this._getFoldWidgetBase(u,c,d);return!p&&this.startRegionRe.test(h)?"start":p},this.getFoldWidgetRange=function(u,c,d,h){var p=u.getLine(d);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(u,p,d);var m=p.match(this.foldingStartMarker);if(m){var f=m.index;if(m[1])return this.openingBracketBlock(u,m[1],d,f);var g=u.getCommentFoldRange(d,f+m[0].length,1);return g&&!g.isMultiLine()&&(h?g=this.getSectionRange(u,d):c!="all"&&(g=null)),g}if(c!=="markbegin"){var m=p.match(this.foldingStopMarker);if(m){var f=m.index+m[0].length;return m[1]?this.closingBracketBlock(u,m[1],d,f):u.getCommentFoldRange(d,f,-1)}}},this.getSectionRange=function(u,c){var d=u.getLine(c),h=d.search(/\S/),p=c,f=d.length;c=c+1;for(var g=c,m=u.getLength();++cv)break;var y=this.getFoldWidgetRange(u,"all",c);if(y){if(y.start.row<=p)break;if(y.isMultiLine())c=y.end.row;else if(h==v)break}g=c}}return new s(p,f,g,u.getLine(g).length)},this.getCommentRegionBlock=function(u,c,d){for(var h=c.search(/\s*$/),p=u.getLength(),f=d,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++df)return new s(f,h,y,c.length)}}).call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./javascript_highlight_rules").JavaScriptHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./behaviour/cstyle").CstyleBehaviour,d=n("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new d};i.inherits(h,s),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(p,f,g){var m=this.$getIndent(f),v=this.getTokenizer().getLineTokens(f,p),y=v.tokens,b=v.state;if(y.length&&y[y.length-1].type=="comment")return m;if(p=="start"||p=="no_regex"){var w=f.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);w&&(m+=g)}else if(p=="doc-start"){if(b=="start"||b=="no_regex")return"";var w=f.match(/^\s*(\/?)\*/);w&&(w[1]&&(m+=" "),m+="* ")}return m},this.checkOutdent=function(p,f,g){return this.$outdent.checkOutdent(f,g)},this.autoOutdent=function(p,f,g){this.$outdent.autoOutdent(f,g)},this.createWorker=function(p){var f=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return f.attachToDocument(p.getDocument()),f.on("annotate",function(g){p.setAnnotations(g.data)}),f.on("terminate",function(){p.clearAnnotations()}),f},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(h.prototype),r.Mode=h}),function(){ace.require(["ace/mode/javascript"],function(n){t&&(t.exports=n)})}()})(Kge);var Yge={exports:{}};(function(t,e){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop");n("../lib/lang");var s=n("./text_highlight_rules").TextHighlightRules,l=r.supportType="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|border|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-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-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=r.supportFunction="rgb|rgba|url|attr|counter|counters",u=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",c=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",d=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",h=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",p=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",f=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",g=function(){var m=this.createKeywordMapper({"support.function":a,"support.constant":u,"support.type":l,"support.constant.color":c,"support.constant.fonts":d},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:h},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+h+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:p},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:f},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};i.inherits(g,s),r.CssHighlightRules=g}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},l.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};i.inherits(l,s),l.getTagRule=function(a){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},l.getStartRule=function(a){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:a}},l.getEndRule=function(a){return{token:"comment.doc",regex:"\\*\\/",next:a}},r.JsDocCommentHighlightRules=l}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,l=n("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",u=function(h){var p=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),f="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",g="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[s.getStartRule("doc-start"),d("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+a+")(\\.)(prototype)(\\.)("+a+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function\\*?)(\\s+)("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+f+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:p,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),d("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[d("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!h||!h.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(m,v,y){if(this.next=m=="{"?this.nextState:"",m=="{"&&y.length)y.unshift("start",v);else if(m=="}"&&y.length&&(y.shift(),this.next=y.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return m=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!h||h.jsx!=!1)&&c.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};i.inherits(u,l);function c(){var h=a.replace("\\d","\\d\\-"),p={onMatch:function(g,m,v){var y=g.charAt(1)=="/"?2:1;return y==1?(m!=this.nextState?v.unshift(this.next,this.nextState,0):v.unshift(this.next),v[2]++):y==2&&m==this.nextState&&(v[1]--,(!v[1]||v[1]<0)&&(v.shift(),v.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:g.slice(0,y)},{type:"meta.tag.tag-name.xml",value:g.substr(y)}]},regex:"",onMatch:function(g,m,v){return m==v[0]&&v.shift(),g.length==2&&(v[0]==this.nextState&&v[1]--,(!v[1]||v[1]<0)&&v.splice(0,2)),this.next=v[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},f,d("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:h},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},p],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function d(h){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.JavaScriptHighlightRules=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(a){var u="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+u+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+u+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===l&&this.normalizeRules()};(function(){this.embedTagRules=function(a,u,c){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(<)("+c+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:u+"start"}]}),this.$rules[c+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(d,h,p){return p.splice(0),this.token}}],this.embedRules(a,u,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(|$))",next:c+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(s.prototype),i.inherits(l,s),r.XmlHighlightRules=l}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./css_highlight_rules").CssHighlightRules,a=n("./javascript_highlight_rules").JavaScriptHighlightRules,u=n("./xml_highlight_rules").XmlHighlightRules,c=s.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),d=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(h,p){var f=c[p];return["meta.tag.punctuation."+(h=="<"?"":"end-")+"tag-open.xml","meta.tag"+(f?"."+f:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(l,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===d&&this.normalizeRules()};i.inherits(d,u),r.HtmlHighlightRules=d}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(n,r,o){var i=n("../config").$modes,s=n("../lib/oop"),l=n("../lib/lang"),a=n("./text_highlight_rules").TextHighlightRules,u=n("./html_highlight_rules").HtmlHighlightRules,c=function(h){return"(?:[^"+l.escapeRegExp(h)+"\\\\]|\\\\.)*"},d=function(){u.call(this);var h={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(f,g,m,v){var y=f.match(/^(\s*)([`~]+)(.*)/),b=/[\w-]+|$/.exec(y[3])[0];return i[b]||(b=""),m.unshift("githubblock",[],[y[1],y[2],b],g),this.token},next:"githubblock"},p=[{token:"support.function",regex:".*",onMatch:function(f,g,m,v){var y=m[1],b=m[2][0],w=m[2][1],k=m[2][2],x=/^(\s*)(`+|~+)\s*$/.exec(f);if(x&&x[1].length=w.length&&x[2][0]==w[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",k&&i[k]){var S=i[k].getTokenizer().getLineTokens(f,y.slice(0));return m[1]=S.state,S.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(f){return"markup.heading."+f.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},h,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+c("]")+")(\\]\\s*\\[)("+c("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+c("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+c('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},h,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:p}),this.normalizeRules()};s.inherits(d,a),r.MarkdownHighlightRules=d}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(n,r,o){var i=n("../../lib/oop"),s=n("./fold_mode").FoldMode,l=n("../../range").Range,a=r.FoldMode=function(){};i.inherits(a,s),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);return this.foldingStartMarker.test(h)?h[0]=="`"&&u.bgTokenizer.getState(d)=="start"?"end":"start":""},this.getFoldWidgetRange=function(u,c,d){var h=u.getLine(d),p=h.length,f=u.getLength(),g=d,m=d;if(!h.match(this.foldingStartMarker))return;if(h[0]=="`")if(u.bgTokenizer.getState(d)!=="start"){for(;++d0&&(h=u.getLine(d),!(h[0]=="`"&h.substring(0,3)=="```")););return new l(d,h.length,g,0)}var v;function y(A){return v=u.getTokens(A)[0],v&&v.type.lastIndexOf(b,0)===0}var b="markup.heading";function w(){var A=v.value[0];return A=="="?6:A=="-"?5:7-v.value.search(/[^#]|$/)}if(y(d)){for(var k=w();++d=k)break}if(m=d-(!v||["=","-"].indexOf(v.value[0])==-1?1:2),m>g)for(;m>g&&/^\s*$/.test(u.getLine(m));)m--;if(m>g){var S=u.getLine(m).length;return new l(g,p,m,S)}}}}).call(a.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,o){var i=n("../range").Range,s=function(){};(function(){this.checkOutdent=function(l,a){return/^\s+$/.test(l)?/^\s*\}/.test(a):!1},this.autoOutdent=function(l,a){var u=l.getLine(a),c=u.match(/^(\s*\})/);if(!c)return 0;var d=c[1].length,h=l.findMatchingBracket({row:a,column:d});if(!h||h.row==a)return 0;var p=this.$getIndent(l.getLine(h.row));l.replace(new i(a,0,a,d-1),p)},this.$getIndent=function(l){return l.match(/^\s*/)[0]}}).call(s.prototype),r.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("../../range").Range,l=n("./fold_mode").FoldMode,a=r.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};i.inherits(a,l),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var p=this._getFoldWidgetBase(u,c,d);return!p&&this.startRegionRe.test(h)?"start":p},this.getFoldWidgetRange=function(u,c,d,h){var p=u.getLine(d);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(u,p,d);var m=p.match(this.foldingStartMarker);if(m){var f=m.index;if(m[1])return this.openingBracketBlock(u,m[1],d,f);var g=u.getCommentFoldRange(d,f+m[0].length,1);return g&&!g.isMultiLine()&&(h?g=this.getSectionRange(u,d):c!="all"&&(g=null)),g}if(c!=="markbegin"){var m=p.match(this.foldingStopMarker);if(m){var f=m.index+m[0].length;return m[1]?this.closingBracketBlock(u,m[1],d,f):u.getCommentFoldRange(d,f,-1)}}},this.getSectionRange=function(u,c){var d=u.getLine(c),h=d.search(/\S/),p=c,f=d.length;c=c+1;for(var g=c,m=u.getLength();++cv)break;var y=this.getFoldWidgetRange(u,"all",c);if(y){if(y.start.row<=p)break;if(y.isMultiLine())c=y.end.row;else if(h==v)break}g=c}}return new s(p,f,g,u.getLine(g).length)},this.getCommentRegionBlock=function(u,c,d){for(var h=c.search(/\s*$/),p=u.getLength(),f=d,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++df)return new s(f,h,y,c.length)}}).call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./javascript_highlight_rules").JavaScriptHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./behaviour/cstyle").CstyleBehaviour,d=n("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new d};i.inherits(h,s),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(p,f,g){var m=this.$getIndent(f),v=this.getTokenizer().getLineTokens(f,p),y=v.tokens,b=v.state;if(y.length&&y[y.length-1].type=="comment")return m;if(p=="start"||p=="no_regex"){var w=f.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);w&&(m+=g)}else if(p=="doc-start"){if(b=="start"||b=="no_regex")return"";var w=f.match(/^\s*(\/?)\*/);w&&(w[1]&&(m+=" "),m+="* ")}return m},this.checkOutdent=function(p,f,g){return this.$outdent.checkOutdent(f,g)},this.autoOutdent=function(p,f,g){this.$outdent.autoOutdent(f,g)},this.createWorker=function(p){var f=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return f.attachToDocument(p.getDocument()),f.on("annotate",function(g){p.setAnnotations(g.data)}),f.on("terminate",function(){p.clearAnnotations()}),f},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,r,o){var i={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},s=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var l=document.createElement("c").style;for(var a in l)if(typeof l[a]=="string"){var u=a.replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});i.hasOwnProperty(u)||(i[u]=1)}}this.completionsDefined=!0},this.getCompletions=function(l,a,u,c){if(this.completionsDefined||this.defineCompletions(),l==="ruleset"||a.$mode.$id=="ace/mode/scss"){var d=a.getLine(u.row).substr(0,u.column),h=/\([^)]*$/.test(d);return h&&(d=d.substr(d.lastIndexOf("(")+1)),/:[^;]+$/.test(d)?this.getPropertyValueCompletions(l,a,u,c):this.getPropertyCompletions(l,a,u,c,h)}return[]},this.getPropertyCompletions=function(l,a,u,c,d){d=d||!1;var h=Object.keys(i);return h.map(function(p){return{caption:p,snippet:p+": $0"+(d?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(l,a,u,c){var d=a.getLine(u.row).substr(0,u.column),h=(/([\w\-]+):[^:]*$/.exec(d)||{})[1];if(!h)return[];var p=[];return h in i&&typeof i[h]=="object"&&(p=Object.keys(i[h])),p.map(function(f){return{caption:f,snippet:f,meta:"property value",score:1e6}})}}).call(s.prototype),r.CssCompletions=s}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,r,o){var i=n("../../lib/oop");n("../behaviour").Behaviour;var s=n("./cstyle").CstyleBehaviour,l=n("../../token_iterator").TokenIterator,a=function(){this.inherit(s),this.add("colon","insertion",function(u,c,d,h,p){if(p===":"&&d.selection.isEmpty()){var f=d.getCursorPosition(),g=new l(h,f.row,f.column),m=g.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=g.stepBackward()),m&&m.type==="support.type"){var v=h.doc.getLine(f.row),y=v.substring(f.column,f.column+1);if(y===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(v.substring(f.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(u,c,d,h,p){var f=h.doc.getTextRange(p);if(!p.isMultiLine()&&f===":"){var g=d.getCursorPosition(),m=new l(h,g.row,g.column),v=m.getCurrentToken();if(v&&v.value.match(/\s+/)&&(v=m.stepBackward()),v&&v.type==="support.type"){var y=h.doc.getLine(p.start.row),b=y.substring(p.end.column,p.end.column+1);if(b===";")return p.end.column++,p}}}),this.add("semicolon","insertion",function(u,c,d,h,p){if(p===";"&&d.selection.isEmpty()){var f=d.getCursorPosition(),g=h.doc.getLine(f.row),m=g.substring(f.column,f.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(u,c,d,h,p){if(p==="!"&&d.selection.isEmpty()){var f=d.getCursorPosition(),g=h.doc.getLine(f.row);if(/^\s*(;|}|$)/.test(g.substring(f.column)))return{text:"!important",selection:[10,10]}}})};i.inherits(a,s),r.CssBehaviour=a}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./css_highlight_rules").CssHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./css_completions").CssCompletions,d=n("./behaviour/css").CssBehaviour,h=n("./folding/cstyle").FoldMode,p=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new d,this.$completer=new c,this.foldingRules=new h};i.inherits(p,s),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(f,g,m){var v=this.$getIndent(g),y=this.getTokenizer().getLineTokens(g,f).tokens;if(y.length&&y[y.length-1].type=="comment")return v;var b=g.match(/^.*\{\s*$/);return b&&(v+=m),v},this.checkOutdent=function(f,g,m){return this.$outdent.checkOutdent(g,m)},this.autoOutdent=function(f,g,m){this.$outdent.autoOutdent(g,m)},this.getCompletions=function(f,g,m,v){return this.$completer.getCompletions(f,g,m,v)},this.createWorker=function(f){var g=new u(["ace"],"ace/mode/css_worker","Worker");return g.attachToDocument(f.getDocument()),g.on("annotate",function(m){f.setAnnotations(m.data)}),g.on("terminate",function(){f.clearAnnotations()}),g},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(p.prototype),r.Mode=p}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,o){var i=n("../../lib/oop"),s=n("../behaviour").Behaviour,l=n("../../token_iterator").TokenIterator;n("../../lib/lang");function a(c,d){return c&&c.type.lastIndexOf(d+".xml")>-1}var u=function(){this.add("string_dquotes","insertion",function(c,d,h,p,f){if(f=='"'||f=="'"){var g=f,m=p.doc.getTextRange(h.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&h.getWrapBehavioursEnabled())return{text:g+m+g,selection:!1};var v=h.getCursorPosition(),y=p.doc.getLine(v.row),b=y.substring(v.column,v.column+1),w=new l(p,v.row,v.column),k=w.getCurrentToken();if(b==g&&(a(k,"attribute-value")||a(k,"string")))return{text:"",selection:[1,1]};if(k||(k=w.stepBackward()),!k)return;for(;a(k,"tag-whitespace")||a(k,"whitespace");)k=w.stepBackward();var x=!b||b.match(/\s/);if(a(k,"attribute-equals")&&(x||b==">")||a(k,"decl-attribute-equals")&&(x||b=="?"))return{text:g+g,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(c,d,h,p,f){var g=p.doc.getTextRange(f);if(!f.isMultiLine()&&(g=='"'||g=="'")){var m=p.doc.getLine(f.start.row),v=m.substring(f.start.column+1,f.start.column+2);if(v==g)return f.end.column++,f}}),this.add("autoclosing","insertion",function(c,d,h,p,f){if(f==">"){var g=h.getSelectionRange().start,m=new l(p,g.row,g.column),v=m.getCurrentToken()||m.stepBackward();if(!v||!(a(v,"tag-name")||a(v,"tag-whitespace")||a(v,"attribute-name")||a(v,"attribute-equals")||a(v,"attribute-value"))||a(v,"reference.attribute-value"))return;if(a(v,"attribute-value")){var y=m.getCurrentTokenColumn()+v.value.length;if(g.column/.test(p.getLine(g.row).slice(g.column)))return;for(;!a(v,"tag-name");)if(v=m.stepBackward(),v.value=="<"){v=m.stepForward();break}var w=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(a(m.stepBackward(),"end-tag-open"))return;var x=v.value;return w==g.row&&(x=x.substring(0,g.column-k)),this.voidElements.hasOwnProperty(x.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(c,d,h,p,f){if(f==` `){var g=h.getCursorPosition(),m=p.getLine(g.row),v=new l(p,g.row,g.column),y=v.getCurrentToken();if(y&&y.type.indexOf("tag-close")!==-1){if(y.value=="/>")return;for(;y&&y.type.indexOf("tag-name")===-1;)y=v.stepBackward();if(!y)return;var b=y.value,w=v.getCurrentTokenRow();if(y=v.stepBackward(),!y||y.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[b]){var k=p.getTokenAt(g.row,g.column+1),m=p.getLine(w),x=this.$getIndent(m),S=x+p.getTabString();return k&&k.value==="-1}(function(){this.getFoldWidget=function(d,h,p){var f=this._getFirstTagInLine(d,p);return f?f.closing||!f.tagName&&f.selfClosing?h==="markbeginend"?"end":"":!f.tagName||f.selfClosing||this.voidElements.hasOwnProperty(f.tagName.toLowerCase())||this._findEndTagInLine(d,p,f.tagName,f.end.column)?"":"start":this.getCommentFoldWidget(d,p)},this.getCommentFoldWidget=function(d,h){return/comment/.test(d.getState(h))&&/";break}return f}else if(c(m,"tag-close"))return f.selfClosing=m.value=="/>",f;f.start.column+=m.value.length}return null},this._findEndTagInLine=function(d,h,p,f){for(var g=d.getTokens(h),m=0,v=0;v-1}function h(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"tag-name");)y=v.stepBackward();if(y)return y.value}function p(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"attribute-name");)y=v.stepBackward();if(y)return y.value}var f=function(){};(function(){this.getCompletions=function(g,m,v,y){var b=m.getTokenAt(v.row,v.column);if(!b)return[];if(d(b,"tag-name")||d(b,"tag-open")||d(b,"end-tag-open"))return this.getTagCompletions(g,m,v,y);if(d(b,"tag-whitespace")||d(b,"attribute-name"))return this.getAttributeCompletions(g,m,v,y);if(d(b,"attribute-value"))return this.getAttributeValueCompletions(g,m,v,y);var w=m.getLine(v.row).substr(0,v.column);return/&[a-z]*$/i.test(w)?this.getHTMLEntityCompletions(g,m,v,y):[]},this.getTagCompletions=function(g,m,v,y){return c.map(function(b){return{value:b,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(g,m,v,y){var b=h(m,v);if(!b)return[];var w=a;return b in u&&(w=w.concat(Object.keys(u[b]))),w.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(g,m,v,y){var b=h(m,v),w=p(m,v);if(!b)return[];var k=[];return b in u&&w in u[b]&&typeof u[b][w]=="object"&&(k=Object.keys(u[b][w])),k.map(function(x){return{caption:x,snippet:x,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(g,m,v,y){var b=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return b.map(function(w){return{caption:w,snippet:w,meta:"html entity",score:1e6}})}}).call(f.prototype),r.HtmlCompletions=f}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./text").Mode,a=n("./javascript").Mode,u=n("./css").Mode,c=n("./html_highlight_rules").HtmlHighlightRules,d=n("./behaviour/xml").XmlBehaviour,h=n("./folding/html").FoldMode,p=n("./html_completions").HtmlCompletions,f=n("../worker/worker_client").WorkerClient,g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(y){this.fragmentContext=y&&y.fragmentContext,this.HighlightRules=c,this.$behaviour=new d,this.$completer=new p,this.createModeDelegates({"js-":a,"css-":u}),this.foldingRules=new h(this.voidElements,s.arrayToMap(m))};i.inherits(v,l),(function(){this.blockComment={start:""},this.voidElements=s.arrayToMap(g),this.getNextLineIndent=function(y,b,w){return this.$getIndent(b)},this.checkOutdent=function(y,b,w){return!1},this.getCompletions=function(y,b,w,k){return this.$completer.getCompletions(y,b,w,k)},this.createWorker=function(y){if(this.constructor==v){var b=new f(["ace"],"ace/mode/html_worker","Worker");return b.attachToDocument(y.getDocument()),this.fragmentContext&&b.call("setOptions",[{context:this.fragmentContext}]),b.on("error",function(w){y.setAnnotations(w.data)}),b.on("terminate",function(){y.clearAnnotations()}),b}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(v.prototype),r.Mode=v}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=r.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",a=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",u=function(){var c=this.createKeywordMapper({keyword:l,"support.function.builtin":a,"invalid.deprecated":"debugger"},"identifier"),d="(?:(?:[1-9]\\d*)|(?:0))",h="(?:\\.\\d+)",p="(?:\\d+)",f="(?:(?:"+p+"?"+h+")|(?:"+p+"\\.))",g="(?:(?:"+f+"|"+p+"))",m="(?:"+g+"|"+f+")",v="(?:&"+p+")",y="[a-zA-Z_][a-zA-Z0-9_]*",b="(?:"+y+"(?==))",w="(?:\\$(?:SHLVL|\\$|\\!|\\?))",k="(?:"+y+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(x,S,A){var C=x[2]=="-"?"indentedHeredoc":"heredoc",O=x.split(this.splitRegex);return A.push(C,O[4]),[{type:"constant",value:O[1]},{type:"text",value:O[2]},{type:"string",value:O[3]},{type:"support.class",value:O[4]},{type:"string",value:O[5]}]},rules:{heredoc:[{onMatch:function(x,S,A){return x===A[1]?(A.shift(),A.shift(),this.next=A[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(x,S,A){return x===A[1]?(A.shift(),A.shift(),this.next=A[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(x,S){return S[0]==="heredoc"||S[0]==="indentedHeredoc"?S[0]:x}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:w},{token:"variable",regex:b},{include:"variables"},{token:"support.function",regex:k},{token:"support.function",regex:v},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:d+"\\b"},{token:c,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};i.inherits(u,s),r.ShHighlightRules=u}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./sh_highlight_rules").ShHighlightRules,a=n("../range").Range,u=n("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=l,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};i.inherits(c,s),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(h,p,f){var g=this.$getIndent(p),m=this.getTokenizer().getLineTokens(p,h),v=m.tokens;if(v.length&&v[v.length-1].type=="comment")return g;if(h=="start"){var y=p.match(/^.*[\{\(\[:]\s*$/);y&&(g+=f)}return g};var d={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(h,p,f){if(f!==`\r `&&f!=="\r"&&f!==` -`)return!1;var g=this.getTokenizer().getLineTokens(p.trim(),h).tokens;if(!g)return!1;do var m=g.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&d[m.value]:!1},this.autoOutdent=function(h,p,f){f+=1;var g=this.$getIndent(p.getLine(f)),m=p.getTabString();g.slice(-m.length)==m&&p.remove(new a(f,g.length-m.length,f,g.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./text").Mode,a=n("./xml_highlight_rules").XmlHighlightRules,u=n("./behaviour/xml").XmlBehaviour,c=n("./folding/xml").FoldMode,d=n("../worker/worker_client").WorkerClient,h=function(){this.HighlightRules=a,this.$behaviour=new u,this.foldingRules=new c};i.inherits(h,l),(function(){this.voidElements=s.arrayToMap([]),this.blockComment={start:""},this.createWorker=function(p){var f=new d(["ace"],"ace/mode/xml_worker","Worker");return f.attachToDocument(p.getDocument()),f.on("error",function(g){p.setAnnotations(g.data)}),f.on("terminate",function(){p.clearAnnotations()}),f},this.$id="ace/mode/xml"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(n,r,o){var i=n("../lib/oop"),s=n("./behaviour/cstyle").CstyleBehaviour,l=n("./text").Mode,a=n("./markdown_highlight_rules").MarkdownHighlightRules,u=n("./folding/markdown").FoldMode,c=function(){this.HighlightRules=a,this.createModeDelegates({javascript:n("./javascript").Mode,html:n("./html").Mode,bash:n("./sh").Mode,sh:n("./sh").Mode,xml:n("./xml").Mode,css:n("./css").Mode}),this.foldingRules=new u,this.$behaviour=new s({braces:!0})};i.inherits(c,l),(function(){this.type="text",this.blockComment={start:""},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(d,h,p){if(d=="listblock"){var f=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(h);if(!f)return"";var g=f[2];return g||(g=parseInt(f[3],10)+1+"."),f[1]+g+f[4]}else return this.$getIndent(h)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(c.prototype),r.Mode=c}),function(){ace.require(["ace/mode/markdown"],function(n){t&&(t.exports=n)})}()})(Uge);var Wge={exports:{}};(function(t,e){ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},l.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};i.inherits(l,s),l.getTagRule=function(a){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},l.getStartRule=function(a){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:a}},l.getEndRule=function(a){return{token:"comment.doc",regex:"\\*\\/",next:a}},r.JsDocCommentHighlightRules=l}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,l=n("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",u=function(h){var p=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),f="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",g="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[s.getStartRule("doc-start"),d("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+a+")(\\.)(prototype)(\\.)("+a+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function\\*?)(\\s+)("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+f+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:p,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),d("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[d("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!h||!h.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(m,v,y){if(this.next=m=="{"?this.nextState:"",m=="{"&&y.length)y.unshift("start",v);else if(m=="}"&&y.length&&(y.shift(),this.next=y.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return m=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!h||h.jsx!=!1)&&c.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};i.inherits(u,l);function c(){var h=a.replace("\\d","\\d\\-"),p={onMatch:function(g,m,v){var y=g.charAt(1)=="/"?2:1;return y==1?(m!=this.nextState?v.unshift(this.next,this.nextState,0):v.unshift(this.next),v[2]++):y==2&&m==this.nextState&&(v[1]--,(!v[1]||v[1]<0)&&(v.shift(),v.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:g.slice(0,y)},{type:"meta.tag.tag-name.xml",value:g.substr(y)}]},regex:"",onMatch:function(g,m,v){return m==v[0]&&v.shift(),g.length==2&&(v[0]==this.nextState&&v[1]--,(!v[1]||v[1]<0)&&v.splice(0,2)),this.next=v[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},f,d("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:h},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},p],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function d(h){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,o){var i=n("../range").Range,s=function(){};(function(){this.checkOutdent=function(l,a){return/^\s+$/.test(l)?/^\s*\}/.test(a):!1},this.autoOutdent=function(l,a){var u=l.getLine(a),c=u.match(/^(\s*\})/);if(!c)return 0;var d=c[1].length,h=l.findMatchingBracket({row:a,column:d});if(!h||h.row==a)return 0;var p=this.$getIndent(l.getLine(h.row));l.replace(new i(a,0,a,d-1),p)},this.$getIndent=function(l){return l.match(/^\s*/)[0]}}).call(s.prototype),r.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("../../range").Range,l=n("./fold_mode").FoldMode,a=r.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};i.inherits(a,l),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var p=this._getFoldWidgetBase(u,c,d);return!p&&this.startRegionRe.test(h)?"start":p},this.getFoldWidgetRange=function(u,c,d,h){var p=u.getLine(d);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(u,p,d);var m=p.match(this.foldingStartMarker);if(m){var f=m.index;if(m[1])return this.openingBracketBlock(u,m[1],d,f);var g=u.getCommentFoldRange(d,f+m[0].length,1);return g&&!g.isMultiLine()&&(h?g=this.getSectionRange(u,d):c!="all"&&(g=null)),g}if(c!=="markbegin"){var m=p.match(this.foldingStopMarker);if(m){var f=m.index+m[0].length;return m[1]?this.closingBracketBlock(u,m[1],d,f):u.getCommentFoldRange(d,f,-1)}}},this.getSectionRange=function(u,c){var d=u.getLine(c),h=d.search(/\S/),p=c,f=d.length;c=c+1;for(var g=c,m=u.getLength();++cv)break;var y=this.getFoldWidgetRange(u,"all",c);if(y){if(y.start.row<=p)break;if(y.isMultiLine())c=y.end.row;else if(h==v)break}g=c}}return new s(p,f,g,u.getLine(g).length)},this.getCommentRegionBlock=function(u,c,d){for(var h=c.search(/\s*$/),p=u.getLength(),f=d,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++df)return new s(f,h,y,c.length)}}).call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./javascript_highlight_rules").JavaScriptHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./behaviour/cstyle").CstyleBehaviour,d=n("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new d};i.inherits(h,s),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(p,f,g){var m=this.$getIndent(f),v=this.getTokenizer().getLineTokens(f,p),y=v.tokens,b=v.state;if(y.length&&y[y.length-1].type=="comment")return m;if(p=="start"||p=="no_regex"){var w=f.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);w&&(m+=g)}else if(p=="doc-start"){if(b=="start"||b=="no_regex")return"";var w=f.match(/^\s*(\/?)\*/);w&&(w[1]&&(m+=" "),m+="* ")}return m},this.checkOutdent=function(p,f,g){return this.$outdent.checkOutdent(f,g)},this.autoOutdent=function(p,f,g){this.$outdent.autoOutdent(f,g)},this.createWorker=function(p){var f=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return f.attachToDocument(p.getDocument()),f.on("annotate",function(g){p.setAnnotations(g.data)}),f.on("terminate",function(){p.clearAnnotations()}),f},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop");n("../lib/lang");var s=n("./text_highlight_rules").TextHighlightRules,l=r.supportType="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|border|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-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-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=r.supportFunction="rgb|rgba|url|attr|counter|counters",u=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",c=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",d=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",h=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",p=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",f=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",g=function(){var m=this.createKeywordMapper({"support.function":a,"support.constant":u,"support.type":l,"support.constant.color":c,"support.constant.fonts":d},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:h},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+h+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:p},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:f},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};i.inherits(g,s),r.CssHighlightRules=g}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,r,o){var i={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},s=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var l=document.createElement("c").style;for(var a in l)if(typeof l[a]=="string"){var u=a.replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});i.hasOwnProperty(u)||(i[u]=1)}}this.completionsDefined=!0},this.getCompletions=function(l,a,u,c){if(this.completionsDefined||this.defineCompletions(),l==="ruleset"||a.$mode.$id=="ace/mode/scss"){var d=a.getLine(u.row).substr(0,u.column),h=/\([^)]*$/.test(d);return h&&(d=d.substr(d.lastIndexOf("(")+1)),/:[^;]+$/.test(d)?this.getPropertyValueCompletions(l,a,u,c):this.getPropertyCompletions(l,a,u,c,h)}return[]},this.getPropertyCompletions=function(l,a,u,c,d){d=d||!1;var h=Object.keys(i);return h.map(function(p){return{caption:p,snippet:p+": $0"+(d?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(l,a,u,c){var d=a.getLine(u.row).substr(0,u.column),h=(/([\w\-]+):[^:]*$/.exec(d)||{})[1];if(!h)return[];var p=[];return h in i&&typeof i[h]=="object"&&(p=Object.keys(i[h])),p.map(function(f){return{caption:f,snippet:f,meta:"property value",score:1e6}})}}).call(s.prototype),r.CssCompletions=s}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,r,o){var i=n("../../lib/oop");n("../behaviour").Behaviour;var s=n("./cstyle").CstyleBehaviour,l=n("../../token_iterator").TokenIterator,a=function(){this.inherit(s),this.add("colon","insertion",function(u,c,d,h,p){if(p===":"&&d.selection.isEmpty()){var f=d.getCursorPosition(),g=new l(h,f.row,f.column),m=g.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=g.stepBackward()),m&&m.type==="support.type"){var v=h.doc.getLine(f.row),y=v.substring(f.column,f.column+1);if(y===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(v.substring(f.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(u,c,d,h,p){var f=h.doc.getTextRange(p);if(!p.isMultiLine()&&f===":"){var g=d.getCursorPosition(),m=new l(h,g.row,g.column),v=m.getCurrentToken();if(v&&v.value.match(/\s+/)&&(v=m.stepBackward()),v&&v.type==="support.type"){var y=h.doc.getLine(p.start.row),b=y.substring(p.end.column,p.end.column+1);if(b===";")return p.end.column++,p}}}),this.add("semicolon","insertion",function(u,c,d,h,p){if(p===";"&&d.selection.isEmpty()){var f=d.getCursorPosition(),g=h.doc.getLine(f.row),m=g.substring(f.column,f.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(u,c,d,h,p){if(p==="!"&&d.selection.isEmpty()){var f=d.getCursorPosition(),g=h.doc.getLine(f.row);if(/^\s*(;|}|$)/.test(g.substring(f.column)))return{text:"!important",selection:[10,10]}}})};i.inherits(a,s),r.CssBehaviour=a}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./css_highlight_rules").CssHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./css_completions").CssCompletions,d=n("./behaviour/css").CssBehaviour,h=n("./folding/cstyle").FoldMode,p=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new d,this.$completer=new c,this.foldingRules=new h};i.inherits(p,s),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(f,g,m){var v=this.$getIndent(g),y=this.getTokenizer().getLineTokens(g,f).tokens;if(y.length&&y[y.length-1].type=="comment")return v;var b=g.match(/^.*\{\s*$/);return b&&(v+=m),v},this.checkOutdent=function(f,g,m){return this.$outdent.checkOutdent(g,m)},this.autoOutdent=function(f,g,m){this.$outdent.autoOutdent(g,m)},this.getCompletions=function(f,g,m,v){return this.$completer.getCompletions(f,g,m,v)},this.createWorker=function(f){var g=new u(["ace"],"ace/mode/css_worker","Worker");return g.attachToDocument(f.getDocument()),g.on("annotate",function(m){f.setAnnotations(m.data)}),g.on("terminate",function(){f.clearAnnotations()}),g},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(p.prototype),r.Mode=p}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(a){var u="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+u+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+u+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===l&&this.normalizeRules()};(function(){this.embedTagRules=function(a,u,c){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(<)("+c+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:u+"start"}]}),this.$rules[c+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(d,h,p){return p.splice(0),this.token}}],this.embedRules(a,u,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(|$))",next:c+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(s.prototype),i.inherits(l,s),r.XmlHighlightRules=l}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./css_highlight_rules").CssHighlightRules,a=n("./javascript_highlight_rules").JavaScriptHighlightRules,u=n("./xml_highlight_rules").XmlHighlightRules,c=s.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),d=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(h,p){var f=c[p];return["meta.tag.punctuation."+(h=="<"?"":"end-")+"tag-open.xml","meta.tag"+(f?"."+f:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(l,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===d&&this.normalizeRules()};i.inherits(d,u),r.HtmlHighlightRules=d}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,o){var i=n("../../lib/oop"),s=n("../behaviour").Behaviour,l=n("../../token_iterator").TokenIterator;n("../../lib/lang");function a(c,d){return c&&c.type.lastIndexOf(d+".xml")>-1}var u=function(){this.add("string_dquotes","insertion",function(c,d,h,p,f){if(f=='"'||f=="'"){var g=f,m=p.doc.getTextRange(h.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&h.getWrapBehavioursEnabled())return{text:g+m+g,selection:!1};var v=h.getCursorPosition(),y=p.doc.getLine(v.row),b=y.substring(v.column,v.column+1),w=new l(p,v.row,v.column),k=w.getCurrentToken();if(b==g&&(a(k,"attribute-value")||a(k,"string")))return{text:"",selection:[1,1]};if(k||(k=w.stepBackward()),!k)return;for(;a(k,"tag-whitespace")||a(k,"whitespace");)k=w.stepBackward();var x=!b||b.match(/\s/);if(a(k,"attribute-equals")&&(x||b==">")||a(k,"decl-attribute-equals")&&(x||b=="?"))return{text:g+g,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(c,d,h,p,f){var g=p.doc.getTextRange(f);if(!f.isMultiLine()&&(g=='"'||g=="'")){var m=p.doc.getLine(f.start.row),v=m.substring(f.start.column+1,f.start.column+2);if(v==g)return f.end.column++,f}}),this.add("autoclosing","insertion",function(c,d,h,p,f){if(f==">"){var g=h.getSelectionRange().start,m=new l(p,g.row,g.column),v=m.getCurrentToken()||m.stepBackward();if(!v||!(a(v,"tag-name")||a(v,"tag-whitespace")||a(v,"attribute-name")||a(v,"attribute-equals")||a(v,"attribute-value"))||a(v,"reference.attribute-value"))return;if(a(v,"attribute-value")){var y=m.getCurrentTokenColumn()+v.value.length;if(g.column/.test(p.getLine(g.row).slice(g.column)))return;for(;!a(v,"tag-name");)if(v=m.stepBackward(),v.value=="<"){v=m.stepForward();break}var w=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(a(m.stepBackward(),"end-tag-open"))return;var x=v.value;return w==g.row&&(x=x.substring(0,g.column-k)),this.voidElements.hasOwnProperty(x.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(c,d,h,p,f){if(f==` +`)return!1;var g=this.getTokenizer().getLineTokens(p.trim(),h).tokens;if(!g)return!1;do var m=g.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&d[m.value]:!1},this.autoOutdent=function(h,p,f){f+=1;var g=this.$getIndent(p.getLine(f)),m=p.getTabString();g.slice(-m.length)==m&&p.remove(new a(f,g.length-m.length,f,g.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./text").Mode,a=n("./xml_highlight_rules").XmlHighlightRules,u=n("./behaviour/xml").XmlBehaviour,c=n("./folding/xml").FoldMode,d=n("../worker/worker_client").WorkerClient,h=function(){this.HighlightRules=a,this.$behaviour=new u,this.foldingRules=new c};i.inherits(h,l),(function(){this.voidElements=s.arrayToMap([]),this.blockComment={start:""},this.createWorker=function(p){var f=new d(["ace"],"ace/mode/xml_worker","Worker");return f.attachToDocument(p.getDocument()),f.on("error",function(g){p.setAnnotations(g.data)}),f.on("terminate",function(){p.clearAnnotations()}),f},this.$id="ace/mode/xml"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(n,r,o){var i=n("../lib/oop"),s=n("./behaviour/cstyle").CstyleBehaviour,l=n("./text").Mode,a=n("./markdown_highlight_rules").MarkdownHighlightRules,u=n("./folding/markdown").FoldMode,c=function(){this.HighlightRules=a,this.createModeDelegates({javascript:n("./javascript").Mode,html:n("./html").Mode,bash:n("./sh").Mode,sh:n("./sh").Mode,xml:n("./xml").Mode,css:n("./css").Mode}),this.foldingRules=new u,this.$behaviour=new s({braces:!0})};i.inherits(c,l),(function(){this.type="text",this.blockComment={start:""},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(d,h,p){if(d=="listblock"){var f=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(h);if(!f)return"";var g=f[2];return g||(g=parseInt(f[3],10)+1+"."),f[1]+g+f[4]}else return this.$getIndent(h)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(c.prototype),r.Mode=c}),function(){ace.require(["ace/mode/markdown"],function(n){t&&(t.exports=n)})}()})(Yge);var Xge={exports:{}};(function(t,e){ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},l.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};i.inherits(l,s),l.getTagRule=function(a){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},l.getStartRule=function(a){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:a}},l.getEndRule=function(a){return{token:"comment.doc",regex:"\\*\\/",next:a}},r.JsDocCommentHighlightRules=l}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,l=n("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",u=function(h){var p=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),f="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",g="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[s.getStartRule("doc-start"),d("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+a+")(\\.)(prototype)(\\.)("+a+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function\\*?)(\\s+)("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+f+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:p,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),d("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[d("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!h||!h.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(m,v,y){if(this.next=m=="{"?this.nextState:"",m=="{"&&y.length)y.unshift("start",v);else if(m=="}"&&y.length&&(y.shift(),this.next=y.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return m=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!h||h.jsx!=!1)&&c.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};i.inherits(u,l);function c(){var h=a.replace("\\d","\\d\\-"),p={onMatch:function(g,m,v){var y=g.charAt(1)=="/"?2:1;return y==1?(m!=this.nextState?v.unshift(this.next,this.nextState,0):v.unshift(this.next),v[2]++):y==2&&m==this.nextState&&(v[1]--,(!v[1]||v[1]<0)&&(v.shift(),v.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:g.slice(0,y)},{type:"meta.tag.tag-name.xml",value:g.substr(y)}]},regex:"",onMatch:function(g,m,v){return m==v[0]&&v.shift(),g.length==2&&(v[0]==this.nextState&&v[1]--,(!v[1]||v[1]<0)&&v.splice(0,2)),this.next=v[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},f,d("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:h},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},p],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function d(h){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,o){var i=n("../range").Range,s=function(){};(function(){this.checkOutdent=function(l,a){return/^\s+$/.test(l)?/^\s*\}/.test(a):!1},this.autoOutdent=function(l,a){var u=l.getLine(a),c=u.match(/^(\s*\})/);if(!c)return 0;var d=c[1].length,h=l.findMatchingBracket({row:a,column:d});if(!h||h.row==a)return 0;var p=this.$getIndent(l.getLine(h.row));l.replace(new i(a,0,a,d-1),p)},this.$getIndent=function(l){return l.match(/^\s*/)[0]}}).call(s.prototype),r.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("../../range").Range,l=n("./fold_mode").FoldMode,a=r.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};i.inherits(a,l),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var p=this._getFoldWidgetBase(u,c,d);return!p&&this.startRegionRe.test(h)?"start":p},this.getFoldWidgetRange=function(u,c,d,h){var p=u.getLine(d);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(u,p,d);var m=p.match(this.foldingStartMarker);if(m){var f=m.index;if(m[1])return this.openingBracketBlock(u,m[1],d,f);var g=u.getCommentFoldRange(d,f+m[0].length,1);return g&&!g.isMultiLine()&&(h?g=this.getSectionRange(u,d):c!="all"&&(g=null)),g}if(c!=="markbegin"){var m=p.match(this.foldingStopMarker);if(m){var f=m.index+m[0].length;return m[1]?this.closingBracketBlock(u,m[1],d,f):u.getCommentFoldRange(d,f,-1)}}},this.getSectionRange=function(u,c){var d=u.getLine(c),h=d.search(/\S/),p=c,f=d.length;c=c+1;for(var g=c,m=u.getLength();++cv)break;var y=this.getFoldWidgetRange(u,"all",c);if(y){if(y.start.row<=p)break;if(y.isMultiLine())c=y.end.row;else if(h==v)break}g=c}}return new s(p,f,g,u.getLine(g).length)},this.getCommentRegionBlock=function(u,c,d){for(var h=c.search(/\s*$/),p=u.getLength(),f=d,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++df)return new s(f,h,y,c.length)}}).call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./javascript_highlight_rules").JavaScriptHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./behaviour/cstyle").CstyleBehaviour,d=n("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new d};i.inherits(h,s),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(p,f,g){var m=this.$getIndent(f),v=this.getTokenizer().getLineTokens(f,p),y=v.tokens,b=v.state;if(y.length&&y[y.length-1].type=="comment")return m;if(p=="start"||p=="no_regex"){var w=f.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);w&&(m+=g)}else if(p=="doc-start"){if(b=="start"||b=="no_regex")return"";var w=f.match(/^\s*(\/?)\*/);w&&(w[1]&&(m+=" "),m+="* ")}return m},this.checkOutdent=function(p,f,g){return this.$outdent.checkOutdent(f,g)},this.autoOutdent=function(p,f,g){this.$outdent.autoOutdent(f,g)},this.createWorker=function(p){var f=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return f.attachToDocument(p.getDocument()),f.on("annotate",function(g){p.setAnnotations(g.data)}),f.on("terminate",function(){p.clearAnnotations()}),f},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop");n("../lib/lang");var s=n("./text_highlight_rules").TextHighlightRules,l=r.supportType="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|border|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-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-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=r.supportFunction="rgb|rgba|url|attr|counter|counters",u=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",c=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",d=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",h=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",p=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",f=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",g=function(){var m=this.createKeywordMapper({"support.function":a,"support.constant":u,"support.type":l,"support.constant.color":c,"support.constant.fonts":d},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:h},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+h+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:p},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:f},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};i.inherits(g,s),r.CssHighlightRules=g}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,r,o){var i={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},s=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var l=document.createElement("c").style;for(var a in l)if(typeof l[a]=="string"){var u=a.replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});i.hasOwnProperty(u)||(i[u]=1)}}this.completionsDefined=!0},this.getCompletions=function(l,a,u,c){if(this.completionsDefined||this.defineCompletions(),l==="ruleset"||a.$mode.$id=="ace/mode/scss"){var d=a.getLine(u.row).substr(0,u.column),h=/\([^)]*$/.test(d);return h&&(d=d.substr(d.lastIndexOf("(")+1)),/:[^;]+$/.test(d)?this.getPropertyValueCompletions(l,a,u,c):this.getPropertyCompletions(l,a,u,c,h)}return[]},this.getPropertyCompletions=function(l,a,u,c,d){d=d||!1;var h=Object.keys(i);return h.map(function(p){return{caption:p,snippet:p+": $0"+(d?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(l,a,u,c){var d=a.getLine(u.row).substr(0,u.column),h=(/([\w\-]+):[^:]*$/.exec(d)||{})[1];if(!h)return[];var p=[];return h in i&&typeof i[h]=="object"&&(p=Object.keys(i[h])),p.map(function(f){return{caption:f,snippet:f,meta:"property value",score:1e6}})}}).call(s.prototype),r.CssCompletions=s}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,r,o){var i=n("../../lib/oop");n("../behaviour").Behaviour;var s=n("./cstyle").CstyleBehaviour,l=n("../../token_iterator").TokenIterator,a=function(){this.inherit(s),this.add("colon","insertion",function(u,c,d,h,p){if(p===":"&&d.selection.isEmpty()){var f=d.getCursorPosition(),g=new l(h,f.row,f.column),m=g.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=g.stepBackward()),m&&m.type==="support.type"){var v=h.doc.getLine(f.row),y=v.substring(f.column,f.column+1);if(y===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(v.substring(f.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(u,c,d,h,p){var f=h.doc.getTextRange(p);if(!p.isMultiLine()&&f===":"){var g=d.getCursorPosition(),m=new l(h,g.row,g.column),v=m.getCurrentToken();if(v&&v.value.match(/\s+/)&&(v=m.stepBackward()),v&&v.type==="support.type"){var y=h.doc.getLine(p.start.row),b=y.substring(p.end.column,p.end.column+1);if(b===";")return p.end.column++,p}}}),this.add("semicolon","insertion",function(u,c,d,h,p){if(p===";"&&d.selection.isEmpty()){var f=d.getCursorPosition(),g=h.doc.getLine(f.row),m=g.substring(f.column,f.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(u,c,d,h,p){if(p==="!"&&d.selection.isEmpty()){var f=d.getCursorPosition(),g=h.doc.getLine(f.row);if(/^\s*(;|}|$)/.test(g.substring(f.column)))return{text:"!important",selection:[10,10]}}})};i.inherits(a,s),r.CssBehaviour=a}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./css_highlight_rules").CssHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./css_completions").CssCompletions,d=n("./behaviour/css").CssBehaviour,h=n("./folding/cstyle").FoldMode,p=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new d,this.$completer=new c,this.foldingRules=new h};i.inherits(p,s),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(f,g,m){var v=this.$getIndent(g),y=this.getTokenizer().getLineTokens(g,f).tokens;if(y.length&&y[y.length-1].type=="comment")return v;var b=g.match(/^.*\{\s*$/);return b&&(v+=m),v},this.checkOutdent=function(f,g,m){return this.$outdent.checkOutdent(g,m)},this.autoOutdent=function(f,g,m){this.$outdent.autoOutdent(g,m)},this.getCompletions=function(f,g,m,v){return this.$completer.getCompletions(f,g,m,v)},this.createWorker=function(f){var g=new u(["ace"],"ace/mode/css_worker","Worker");return g.attachToDocument(f.getDocument()),g.on("annotate",function(m){f.setAnnotations(m.data)}),g.on("terminate",function(){f.clearAnnotations()}),g},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(p.prototype),r.Mode=p}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(a){var u="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+u+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+u+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===l&&this.normalizeRules()};(function(){this.embedTagRules=function(a,u,c){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(<)("+c+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:u+"start"}]}),this.$rules[c+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(d,h,p){return p.splice(0),this.token}}],this.embedRules(a,u,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(|$))",next:c+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(s.prototype),i.inherits(l,s),r.XmlHighlightRules=l}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./css_highlight_rules").CssHighlightRules,a=n("./javascript_highlight_rules").JavaScriptHighlightRules,u=n("./xml_highlight_rules").XmlHighlightRules,c=s.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),d=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(h,p){var f=c[p];return["meta.tag.punctuation."+(h=="<"?"":"end-")+"tag-open.xml","meta.tag"+(f?"."+f:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(l,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===d&&this.normalizeRules()};i.inherits(d,u),r.HtmlHighlightRules=d}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,o){var i=n("../../lib/oop"),s=n("../behaviour").Behaviour,l=n("../../token_iterator").TokenIterator;n("../../lib/lang");function a(c,d){return c&&c.type.lastIndexOf(d+".xml")>-1}var u=function(){this.add("string_dquotes","insertion",function(c,d,h,p,f){if(f=='"'||f=="'"){var g=f,m=p.doc.getTextRange(h.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&h.getWrapBehavioursEnabled())return{text:g+m+g,selection:!1};var v=h.getCursorPosition(),y=p.doc.getLine(v.row),b=y.substring(v.column,v.column+1),w=new l(p,v.row,v.column),k=w.getCurrentToken();if(b==g&&(a(k,"attribute-value")||a(k,"string")))return{text:"",selection:[1,1]};if(k||(k=w.stepBackward()),!k)return;for(;a(k,"tag-whitespace")||a(k,"whitespace");)k=w.stepBackward();var x=!b||b.match(/\s/);if(a(k,"attribute-equals")&&(x||b==">")||a(k,"decl-attribute-equals")&&(x||b=="?"))return{text:g+g,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(c,d,h,p,f){var g=p.doc.getTextRange(f);if(!f.isMultiLine()&&(g=='"'||g=="'")){var m=p.doc.getLine(f.start.row),v=m.substring(f.start.column+1,f.start.column+2);if(v==g)return f.end.column++,f}}),this.add("autoclosing","insertion",function(c,d,h,p,f){if(f==">"){var g=h.getSelectionRange().start,m=new l(p,g.row,g.column),v=m.getCurrentToken()||m.stepBackward();if(!v||!(a(v,"tag-name")||a(v,"tag-whitespace")||a(v,"attribute-name")||a(v,"attribute-equals")||a(v,"attribute-value"))||a(v,"reference.attribute-value"))return;if(a(v,"attribute-value")){var y=m.getCurrentTokenColumn()+v.value.length;if(g.column/.test(p.getLine(g.row).slice(g.column)))return;for(;!a(v,"tag-name");)if(v=m.stepBackward(),v.value=="<"){v=m.stepForward();break}var w=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(a(m.stepBackward(),"end-tag-open"))return;var x=v.value;return w==g.row&&(x=x.substring(0,g.column-k)),this.voidElements.hasOwnProperty(x.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(c,d,h,p,f){if(f==` `){var g=h.getCursorPosition(),m=p.getLine(g.row),v=new l(p,g.row,g.column),y=v.getCurrentToken();if(y&&y.type.indexOf("tag-close")!==-1){if(y.value=="/>")return;for(;y&&y.type.indexOf("tag-name")===-1;)y=v.stepBackward();if(!y)return;var b=y.value,w=v.getCurrentTokenRow();if(y=v.stepBackward(),!y||y.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[b]){var k=p.getTokenAt(g.row,g.column+1),m=p.getLine(w),x=this.$getIndent(m),S=x+p.getTabString();return k&&k.value==="-1}(function(){this.getFoldWidget=function(d,h,p){var f=this._getFirstTagInLine(d,p);return f?f.closing||!f.tagName&&f.selfClosing?h==="markbeginend"?"end":"":!f.tagName||f.selfClosing||this.voidElements.hasOwnProperty(f.tagName.toLowerCase())||this._findEndTagInLine(d,p,f.tagName,f.end.column)?"":"start":this.getCommentFoldWidget(d,p)},this.getCommentFoldWidget=function(d,h){return/comment/.test(d.getState(h))&&/";break}return f}else if(c(m,"tag-close"))return f.selfClosing=m.value=="/>",f;f.start.column+=m.value.length}return null},this._findEndTagInLine=function(d,h,p,f){for(var g=d.getTokens(h),m=0,v=0;v-1}function h(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"tag-name");)y=v.stepBackward();if(y)return y.value}function p(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"attribute-name");)y=v.stepBackward();if(y)return y.value}var f=function(){};(function(){this.getCompletions=function(g,m,v,y){var b=m.getTokenAt(v.row,v.column);if(!b)return[];if(d(b,"tag-name")||d(b,"tag-open")||d(b,"end-tag-open"))return this.getTagCompletions(g,m,v,y);if(d(b,"tag-whitespace")||d(b,"attribute-name"))return this.getAttributeCompletions(g,m,v,y);if(d(b,"attribute-value"))return this.getAttributeValueCompletions(g,m,v,y);var w=m.getLine(v.row).substr(0,v.column);return/&[a-z]*$/i.test(w)?this.getHTMLEntityCompletions(g,m,v,y):[]},this.getTagCompletions=function(g,m,v,y){return c.map(function(b){return{value:b,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(g,m,v,y){var b=h(m,v);if(!b)return[];var w=a;return b in u&&(w=w.concat(Object.keys(u[b]))),w.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(g,m,v,y){var b=h(m,v),w=p(m,v);if(!b)return[];var k=[];return b in u&&w in u[b]&&typeof u[b][w]=="object"&&(k=Object.keys(u[b][w])),k.map(function(x){return{caption:x,snippet:x,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(g,m,v,y){var b=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return b.map(function(w){return{caption:w,snippet:w,meta:"html entity",score:1e6}})}}).call(f.prototype),r.HtmlCompletions=f}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./text").Mode,a=n("./javascript").Mode,u=n("./css").Mode,c=n("./html_highlight_rules").HtmlHighlightRules,d=n("./behaviour/xml").XmlBehaviour,h=n("./folding/html").FoldMode,p=n("./html_completions").HtmlCompletions,f=n("../worker/worker_client").WorkerClient,g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(y){this.fragmentContext=y&&y.fragmentContext,this.HighlightRules=c,this.$behaviour=new d,this.$completer=new p,this.createModeDelegates({"js-":a,"css-":u}),this.foldingRules=new h(this.voidElements,s.arrayToMap(m))};i.inherits(v,l),(function(){this.blockComment={start:""},this.voidElements=s.arrayToMap(g),this.getNextLineIndent=function(y,b,w){return this.$getIndent(b)},this.checkOutdent=function(y,b,w){return!1},this.getCompletions=function(y,b,w,k){return this.$completer.getCompletions(y,b,w,k)},this.createWorker=function(y){if(this.constructor==v){var b=new f(["ace"],"ace/mode/html_worker","Worker");return b.attachToDocument(y.getDocument()),this.fragmentContext&&b.call("setOptions",[{context:this.fragmentContext}]),b.on("error",function(w){y.setAnnotations(w.data)}),b.on("terminate",function(){y.clearAnnotations()}),b}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(v.prototype),r.Mode=v}),function(){ace.require(["ace/mode/html"],function(n){t&&(t.exports=n)})}()})(Wge);var Vge={exports:{}};(function(t,e){ace.define("ace/theme/github-css",["require","exports","module"],function(n,r,o){o.exports=`/* CSS style content from github's default pygments highlighter template. +`+S}}}}})};i.inherits(u,s),r.XmlBehaviour=u}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("./fold_mode").FoldMode,l=r.FoldMode=function(a,u){this.defaultMode=a,this.subModes=u};i.inherits(l,s),(function(){this.$getMode=function(a){typeof a!="string"&&(a=a[0]);for(var u in this.subModes)if(a.indexOf(u)===0)return this.subModes[u];return null},this.$tryMode=function(a,u,c,d){var h=this.$getMode(a);return h?h.getFoldWidget(u,c,d):""},this.getFoldWidget=function(a,u,c){return this.$tryMode(a.getState(c-1),a,u,c)||this.$tryMode(a.getState(c),a,u,c)||this.defaultMode.getFoldWidget(a,u,c)},this.getFoldWidgetRange=function(a,u,c){var d=this.$getMode(a.getState(c-1));return(!d||!d.getFoldWidget(a,u,c))&&(d=this.$getMode(a.getState(c))),(!d||!d.getFoldWidget(a,u,c))&&(d=this.defaultMode),d.getFoldWidgetRange(a,u,c)}}).call(l.prototype)}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("../../range").Range,l=n("./fold_mode").FoldMode,a=r.FoldMode=function(d,h){l.call(this),this.voidElements=d||{},this.optionalEndTags=i.mixin({},this.voidElements),h&&i.mixin(this.optionalEndTags,h)};i.inherits(a,l);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function c(d,h){return d.type.lastIndexOf(h+".xml")>-1}(function(){this.getFoldWidget=function(d,h,p){var f=this._getFirstTagInLine(d,p);return f?f.closing||!f.tagName&&f.selfClosing?h==="markbeginend"?"end":"":!f.tagName||f.selfClosing||this.voidElements.hasOwnProperty(f.tagName.toLowerCase())||this._findEndTagInLine(d,p,f.tagName,f.end.column)?"":"start":this.getCommentFoldWidget(d,p)},this.getCommentFoldWidget=function(d,h){return/comment/.test(d.getState(h))&&/";break}return f}else if(c(m,"tag-close"))return f.selfClosing=m.value=="/>",f;f.start.column+=m.value.length}return null},this._findEndTagInLine=function(d,h,p,f){for(var g=d.getTokens(h),m=0,v=0;v-1}function h(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"tag-name");)y=v.stepBackward();if(y)return y.value}function p(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"attribute-name");)y=v.stepBackward();if(y)return y.value}var f=function(){};(function(){this.getCompletions=function(g,m,v,y){var b=m.getTokenAt(v.row,v.column);if(!b)return[];if(d(b,"tag-name")||d(b,"tag-open")||d(b,"end-tag-open"))return this.getTagCompletions(g,m,v,y);if(d(b,"tag-whitespace")||d(b,"attribute-name"))return this.getAttributeCompletions(g,m,v,y);if(d(b,"attribute-value"))return this.getAttributeValueCompletions(g,m,v,y);var w=m.getLine(v.row).substr(0,v.column);return/&[a-z]*$/i.test(w)?this.getHTMLEntityCompletions(g,m,v,y):[]},this.getTagCompletions=function(g,m,v,y){return c.map(function(b){return{value:b,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(g,m,v,y){var b=h(m,v);if(!b)return[];var w=a;return b in u&&(w=w.concat(Object.keys(u[b]))),w.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(g,m,v,y){var b=h(m,v),w=p(m,v);if(!b)return[];var k=[];return b in u&&w in u[b]&&typeof u[b][w]=="object"&&(k=Object.keys(u[b][w])),k.map(function(x){return{caption:x,snippet:x,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(g,m,v,y){var b=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return b.map(function(w){return{caption:w,snippet:w,meta:"html entity",score:1e6}})}}).call(f.prototype),r.HtmlCompletions=f}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./text").Mode,a=n("./javascript").Mode,u=n("./css").Mode,c=n("./html_highlight_rules").HtmlHighlightRules,d=n("./behaviour/xml").XmlBehaviour,h=n("./folding/html").FoldMode,p=n("./html_completions").HtmlCompletions,f=n("../worker/worker_client").WorkerClient,g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(y){this.fragmentContext=y&&y.fragmentContext,this.HighlightRules=c,this.$behaviour=new d,this.$completer=new p,this.createModeDelegates({"js-":a,"css-":u}),this.foldingRules=new h(this.voidElements,s.arrayToMap(m))};i.inherits(v,l),(function(){this.blockComment={start:""},this.voidElements=s.arrayToMap(g),this.getNextLineIndent=function(y,b,w){return this.$getIndent(b)},this.checkOutdent=function(y,b,w){return!1},this.getCompletions=function(y,b,w,k){return this.$completer.getCompletions(y,b,w,k)},this.createWorker=function(y){if(this.constructor==v){var b=new f(["ace"],"ace/mode/html_worker","Worker");return b.attachToDocument(y.getDocument()),this.fragmentContext&&b.call("setOptions",[{context:this.fragmentContext}]),b.on("error",function(w){y.setAnnotations(w.data)}),b.on("terminate",function(){y.clearAnnotations()}),b}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(v.prototype),r.Mode=v}),function(){ace.require(["ace/mode/html"],function(n){t&&(t.exports=n)})}()})(Xge);var qge={exports:{}};(function(t,e){ace.define("ace/theme/github-css",["require","exports","module"],function(n,r,o){o.exports=`/* CSS style content from github's default pygments highlighter template. Cursor and selection styles from textmate.css. */ .ace-github .ace_gutter { background: #e8e8e8; @@ -6233,10 +6237,10 @@ ${u} .ace-github .ace_indent-guide-active { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; } -`}),ace.define("ace/theme/github",["require","exports","module","ace/theme/github-css","ace/lib/dom"],function(n,r,o){r.isDark=!1,r.cssClass="ace-github",r.cssText=n("./github-css");var i=n("../lib/dom");i.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/github"],function(n){t&&(t.exports=n)})}()})(Vge);const jge=({editable:t,mode:e,onChange:n,value:r})=>{const[o,i]=P.useState("");P.useEffect(()=>{let a;r?KE(r)?a=r:a=JSON.stringify(r,void 0,2):a="",e==="Html"&&(a=Gge(a)),i(a)},[]);const s=P.useMemo(()=>{switch(e){case"Markdown":return"markdown";case"Html":return"html";default:return"javascript"}},[e]),l=P.useCallback(a=>{i(a),t&&n(a)},[t,n]);return V.jsx(Bge,{mode:s,value:o,height:"100%",width:"100%",readOnly:!t,onChange:l,wrapEnabled:!0})},lR=" ";function Gge(t){let e="",n="";return t.split(/>\s*{r.match(/^\/\w/)&&(n=n.substring(lR.length)),e+=n+"<"+r+`>\r -`,r.match(/^]*[^/]$/)&&!r.startsWith("input")&&(n+=lR)}),e.substring(1,e.length-3)}const Kge=t=>{const{onClose:e,node:n}=t,[r,o,i]=b$(""),s=un();P.useEffect(()=>{o(n.node.attrs.title||"")},[n,o]);const l=P.useCallback(c=>{o(c.target.value)},[o]),a=P.useCallback(()=>{s.updateNodeAttributes(n.getPos()||0,{...n.node.attrs||{},title:i.current}),e()},[s,n,e,i]),u=P.useCallback(c=>{const{code:d}=c;d==="Enter"&&a(),d==="Escape"&&e()},[e,a]);return V.jsxs(F$,{title:"Change Image Title",children:[V.jsx(z$,{value:r,onChange:l,onKeyDown:u,placeholder:"Enter Title..."}),V.jsxs(Fr,{children:[V.jsx(kt,{commandName:"submitLink",enabled:!0,onSelect:a,icon:V.jsx(Or,{type:"Check"})}),V.jsx(kt,{commandName:"cancelLink",enabled:!0,onSelect:e,icon:V.jsx(Or,{type:"Cancel"})})]})]})},Yge=t=>{const{annotations:e,appName:n,canAddAnnotation:r,canSelectAIText:o,canSelectAssets:i,canSelectContents:s,classNames:l,isDisabled:a,mode:u,onAnnotationCreate:c,onAnnotationsFocus:d,onAnnotationsUpdate:h,onChange:p,onEditAsset:f,onEditContent:g,onSelectAIText:m,onSelectAssets:v,onSelectContents:y,onUpload:b,value:w}=t,k=P.useMemo(()=>{let D=t.baseUrl;return D.endsWith("/")&&(D=D.substring(0,D.length-1)),D},[t.baseUrl]),[x,S]=P.useState(),[A,C]=P.useState(!1),[O,R]=P.useState(!1),_=P.useCallback(()=>{C(!0)},[]),T=P.useCallback(()=>{C(!1)},[]),E=P.useCallback(()=>{S(null)},[]),M=P.useCallback(()=>{R(D=>!D)},[]),I=P.useCallback(()=>[new In({}),new kk,new pl({}),new Rh({enableSpine:!0}),new iu({classNames:l||[]}),new nfe({mode:u}),new vo({supportedLanguages:lpe}),new Oh,new zh({appName:n,baseUrl:k,onEditContent:g}),new Gs({}),new Zg,new Jg({}),new Qg({}),new Ih({uploadHandler:b}),new Lh,new fl({autoLink:!0,markOverride:{excludes:void 0}}),new hl({enableCollapsible:!0}),new ou({copyAsMarkdown:u==="Markdown",htmlToMarkdown:L$,htmlSanitizer:void 0,markdownToHtml:N$}),new Mh,new am,new $h,new lb({}),new Dh],[n,k,l,u,g,b]),{manager:N,getContext:L}=jJ({stringHandler:u==="Markdown"?"markdown":"html",content:w,nodeViewComponents:{image:D=>V.jsx(tfe,{...D,appName:n,baseUrl:k,onEditNode:S,onEditAsset:f})},extensions:I}),$=P.useCallback(D=>{var F;(F=L())==null||F.setContent(D)},[L]);return V.jsx(Zue,{children:V.jsx(jue,{theme:{color:{primary:"#3389ff",active:{primary:"#3389ff"}}},children:V.jsxs(YJ,{classNames:a?["squidex-editor-disabled"]:[],manager:N,children:[V.jsx("div",{className:"squidex-editor-menu",children:V.jsxs(XN,{children:[V.jsxs("fieldset",{disabled:O||a,className:"MuiStack-root",children:[V.jsx(Uue,{}),V.jsx(Hue,{showAll:!0}),V.jsxs(Fr,{children:[V.jsx(Jx,{}),V.jsx(ek,{}),V.jsx(tk,{}),V.jsx(Qx,{})]}),V.jsxs(Fr,{children:[V.jsx(_ue,{}),V.jsx(Mue,{}),V.jsx(Tue,{})]}),V.jsxs(Fr,{children:[V.jsx(Rue,{}),V.jsx(Oue,{})]}),u!=="Markdown"&&l&&l.length>0&&V.jsx(Fr,{children:V.jsx(wfe,{})}),V.jsx(Fr,{children:V.jsx(B$,{onEdit:_})}),V.jsxs(Fr,{children:[i&&v&&V.jsx(pfe,{onSelectAssets:v}),s&&y&&V.jsx(ffe,{onSelectContents:y}),o&&m&&V.jsx(dfe,{onSelectAIText:m})]}),r&&c&&V.jsx(Fr,{children:V.jsx(mfe,{onAnnotationCreate:c})}),u!=="Markdown"&&V.jsx(Fr,{children:V.jsx(gfe,{})})]}),u==="Markdown"?V.jsx(kt,{commandName:"toggleMarkup",enabled:!0,onSelect:M,label:"Edit Markup",icon:V.jsx(Or,{type:"Edit"})}):V.jsx(kt,{commandName:"toggleMarkup",enabled:!0,onSelect:M,label:"Show Markup (readonly)",icon:V.jsx(Or,{type:"Preview"})})]})}),V.jsxs("div",{className:"squidex-editor-main",children:[V.jsx(rfe,{mode:u,onChange:p,value:w}),V.jsx(Ky,{}),O?V.jsx(V.Fragment,{children:V.jsx(jge,{value:w,mode:u,editable:u==="Markdown",onChange:$})}):V.jsxs(V.Fragment,{children:[A?V.jsx(kfe,{onClose:T}):x?V.jsx(Kge,{node:x,onClose:E}):V.jsx(Xge,{onLinkModal:_}),V.jsx(Yue,{offset:{x:5,y:5},className:Fc(Y0.LANGUAGE_SELECT_POSITIONER,Y0.LANGUAGE_SELECT_WIDTH)}),V.jsx(vfe,{annotations:e,onAnnotationsFocus:d,onAnnotationsUpdate:h})]})]}),V.jsx(xfe,{})]})})})},Xge=({onLinkModal:t})=>hr().codeBlock()?null:V.jsxs(Kue,{className:"squidex-editor-floating",children:[V.jsx(Jx,{}),V.jsx(ek,{}),V.jsx(tk,{}),V.jsx(Qx,{}),V.jsx(B$,{onEdit:t})]});var Q$,cR=ip;Q$=cR.createRoot,cR.hydrateRoot;class qge{constructor(e,n){lt(this,"root");this.element=e,this.props=n,this.root=Q$(this.element),this.render()}update(e){this.props={...this.props,...e},this.render()}setValue(e){this.update({value:e})}setAnnotations(e){this.update({annotations:e})}setIsDisabled(e){this.update({isDisabled:e})}destroy(){this.root.unmount()}render(){this.root.render(V.jsx(Yge,{...this.props}))}}/* +`}),ace.define("ace/theme/github",["require","exports","module","ace/theme/github-css","ace/lib/dom"],function(n,r,o){r.isDark=!1,r.cssClass="ace-github",r.cssText=n("./github-css");var i=n("../lib/dom");i.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/github"],function(n){t&&(t.exports=n)})}()})(qge);const Zge=({editable:t,mode:e,onChange:n,value:r})=>{const[o,i]=D.useState("");D.useEffect(()=>{let a;r?YE(r)?a=r:a=JSON.stringify(r,void 0,2):a="",e==="Html"&&(a=Jge(a)),i(a)},[]);const s=D.useMemo(()=>{switch(e){case"Markdown":return"markdown";case"Html":return"html";default:return"javascript"}},[e]),l=D.useCallback(a=>{i(a),t&&n(a)},[t,n]);return V.jsx(Gge,{mode:s,value:o,height:"100%",width:"100%",readOnly:!t,onChange:l,wrapEnabled:!0})},cR=" ";function Jge(t){let e="",n="";return t.split(/>\s*{r.match(/^\/\w/)&&(n=n.substring(cR.length)),e+=n+"<"+r+`>\r +`,r.match(/^]*[^/]$/)&&!r.startsWith("input")&&(n+=cR)}),e.substring(1,e.length-3)}const Qge=t=>{const{onClose:e,node:n}=t,[r,o,i]=x$(""),s=un();D.useEffect(()=>{o(n.node.attrs.title||"")},[n,o]);const l=D.useCallback(c=>{o(c.target.value)},[o]),a=D.useCallback(()=>{s.updateNodeAttributes(n.getPos()||0,{...n.node.attrs||{},title:i.current}),e()},[s,n,e,i]),u=D.useCallback(c=>{const{code:d}=c;d==="Enter"&&a(),d==="Escape"&&e()},[e,a]);return V.jsxs(H$,{title:"Change Image Title",children:[V.jsx(B$,{value:r,onChange:l,onKeyDown:u,placeholder:"Enter Title..."}),V.jsxs(Fr,{children:[V.jsx(kt,{commandName:"submitLink",enabled:!0,onSelect:a,icon:V.jsx(Or,{type:"Check"})}),V.jsx(kt,{commandName:"cancelLink",enabled:!0,onSelect:e,icon:V.jsx(Or,{type:"Cancel"})})]})]})},eme=t=>{const{annotations:e,appName:n,canAddAnnotation:r,canSelectAIText:o,canSelectAssets:i,canSelectContents:s,classNames:l,isDisabled:a,mode:u,onAnnotationCreate:c,onAnnotationsFocus:d,onAnnotationsUpdate:h,onChange:p,onEditAsset:f,onEditContent:g,onSelectAIText:m,onSelectAssets:v,onSelectContents:y,onUpload:b,value:w}=t,k=D.useMemo(()=>{let H=t.baseUrl;return H.endsWith("/")&&(H=H.substring(0,H.length-1)),H},[t.baseUrl]),[x,S]=D.useState(),[A,C]=D.useState(!1),[O,R]=D.useState(!1),[_,T]=ppe("toolbar"),E=D.useCallback(()=>{C(!0)},[]),M=D.useCallback(()=>{C(!1)},[]),I=D.useCallback(()=>{S(null)},[]),N=D.useCallback(()=>{R(H=>!H)},[]),L=D.useCallback(()=>[new In({}),new Ek,new pl({}),new Rh({enableSpine:!0}),new iu({classNames:l||[]}),new lfe({mode:u}),new vo({supportedLanguages:fpe}),new Oh,new zh({appName:n,baseUrl:k,onEditContent:g}),new Gs({}),new Zg,new Jg({}),new Qg({}),new Ih({uploadHandler:b}),new Lh,new fl({autoLink:!0,markOverride:{excludes:void 0}}),new hl({enableCollapsible:!0}),new ou({copyAsMarkdown:u==="Markdown",htmlToMarkdown:$$,htmlSanitizer:void 0,markdownToHtml:D$}),new Mh,new am,new $h,new ub({}),new Dh],[n,k,l,u,g,b]),{manager:$,getContext:P}=KJ({stringHandler:u==="Markdown"?"markdown":"html",content:w,nodeViewComponents:{image:H=>V.jsx(afe,{...H,appName:n,baseUrl:k,onEditNode:S,onEditAsset:f})},extensions:L}),F=D.useCallback(H=>{var W;(W=P())==null||W.setContent(H)},[P]);return V.jsx(Que,{children:V.jsx(Kue,{theme:{color:{primary:"#3389ff",active:{primary:"#3389ff"}}},children:V.jsxs(qJ,{classNames:a?["squidex-editor-disabled"]:[],manager:$,children:[V.jsx("div",{className:"squidex-editor-menu",children:V.jsxs(qN,{children:[V.jsxs("fieldset",{disabled:O||a,className:"MuiStack-root",children:[V.jsx(Vue,{}),V.jsx(Wue,{showAll:!0}),V.jsxs(Fr,{children:[V.jsx(Qx,{}),V.jsx(tk,{}),V.jsx(nk,{}),V.jsx(ek,{})]}),V.jsxs(Fr,{children:[V.jsx(Mue,{}),V.jsx(Iue,{}),V.jsx(_ue,{})]}),V.jsxs(Fr,{children:[V.jsx(Oue,{}),V.jsx(Lue,{})]}),u!=="Markdown"&&l&&l.length>0&&V.jsx(Fr,{children:V.jsx(Tfe,{})}),V.jsx(Fr,{children:V.jsx(U$,{onEdit:E})}),V.jsxs(Fr,{children:[i&&v&&V.jsx(bfe,{onSelectAssets:v}),s&&y&&V.jsx(wfe,{onSelectContents:y}),o&&m&&V.jsx(vfe,{onSelectAIText:m})]}),r&&c&&V.jsx(Fr,{children:V.jsx(kfe,{onAnnotationCreate:c})}),u!=="Markdown"&&V.jsx(Fr,{children:V.jsx(xfe,{})})]}),u==="Markdown"?V.jsx(kt,{commandName:"toggleMarkup",enabled:!0,onSelect:N,label:"Edit Markup",icon:V.jsx(Or,{type:"Edit"})}):V.jsx(kt,{commandName:"toggleMarkup",enabled:!0,onSelect:N,label:"Show Markup (readonly)",icon:V.jsx(Or,{type:"Preview"})})]})}),V.jsxs("div",{className:"squidex-editor-main",children:[V.jsx(cfe,{mode:u,onChange:p,value:w}),V.jsx(Xy,{}),O?V.jsx(V.Fragment,{children:V.jsx(Zge,{value:w,mode:u,editable:u==="Markdown",onChange:F})}):V.jsxs(V.Fragment,{children:[A?V.jsx(_fe,{onClose:M}):x?V.jsx(Qge,{node:x,onClose:I}):_?V.jsx(tme,{onLinkModal:E}):null,V.jsx(que,{offset:{x:5,y:5},className:Fc(q0.LANGUAGE_SELECT_POSITIONER,q0.LANGUAGE_SELECT_WIDTH)}),V.jsx(Efe,{annotations:e,onAnnotationsFocus:d,onAnnotationsUpdate:h})]})]}),V.jsxs("div",{className:"squidex-editor-counter",children:[V.jsxs("label",{children:[V.jsx("input",{type:"checkbox",checked:_,onChange:H=>T(H.target.checked)}),"Floating Toolbar"]}),V.jsx(Afe,{})]})]})})})},tme=({onLinkModal:t})=>{const e=hr(),n=qm(),r=hpe(400,[n.from,n.to]);return e.codeBlock()?null:V.jsxs(Xue,{className:tde("squidex-editor-floating",{hidden:!r}),children:[V.jsx(Qx,{}),V.jsx(tk,{}),V.jsx(nk,{}),V.jsx(ek,{}),V.jsx(U$,{onEdit:t})]})};var tD,uR=ip;tD=uR.createRoot,uR.hydrateRoot;class nme{constructor(e,n){lt(this,"root");this.element=e,this.props=n,this.root=tD(this.element),this.render()}update(e){this.props={...this.props,...e},this.render()}setValue(e){this.update({value:e})}setAnnotations(e){this.update({annotations:e})}setIsDisabled(e){this.update({isDisabled:e})}destroy(){this.root.unmount()}render(){this.root.render(V.jsx(eme,{...this.props}))}}/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */window.SquidexEditorWrapper=qge; + */window.SquidexEditorWrapper=nme; diff --git a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Apps/DomainObject/Guards/GuardAppTests.cs b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Apps/DomainObject/Guards/GuardAppTests.cs index 7d41416e79..b1fb26a917 100644 --- a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Apps/DomainObject/Guards/GuardAppTests.cs +++ b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Apps/DomainObject/Guards/GuardAppTests.cs @@ -163,7 +163,7 @@ public async Task CanTransfer_should_not_throw_exception_if_team_exists() [Fact] public async Task CanTransfer_should_not_throw_exception_if_user_has_transfer_permission() { - var admin = Mocks.ApiUser(permission: PermissionIds.Transfer); + var admin = Mocks.ApiUser(permissions: [PermissionIds.Transfer]); var command = new TransferToTeam { TeamId = TeamId, Actor = User, User = admin }; diff --git a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/DomainObject/Guards/GuardContentTests.cs b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/DomainObject/Guards/GuardContentTests.cs index a694473c9c..57dc713326 100644 --- a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/DomainObject/Guards/GuardContentTests.cs +++ b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/DomainObject/Guards/GuardContentTests.cs @@ -311,10 +311,10 @@ public async Task Should_not_throw_exception_if_workflow_transition_is_checked_f [Fact] public void Should_not_throw_exception_if_content_is_from_another_user_but_user_has_permission() { - var userPermission = PermissionIds.ForApp(PermissionIds.AppContentsDelete, AppId.Name, SchemaId.Name).Id; - var userObject = Mocks.FrontendUser(permission: userPermission); + var userPermissions = PermissionIds.ForApp(PermissionIds.AppContentsDelete, AppId.Name, SchemaId.Name).Id; + var userPrincipal = Mocks.FrontendUser(permissions: [userPermissions]); - var operation = Operation(CreateContent(Status.Draft) with { CreatedBy = RefToken.User("invalid") }, normalSchema, userObject); + var operation = Operation(CreateContent(Status.Draft) with { CreatedBy = RefToken.User("invalid") }, normalSchema, userPrincipal); operation.MustHavePermission(PermissionIds.AppContentsDelete); } diff --git a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLMutationTests.cs b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLMutationTests.cs index bc7898b542..645f719958 100644 --- a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLMutationTests.cs +++ b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLMutationTests.cs @@ -104,7 +104,7 @@ mutation MyMutation($data: MySchemaDataInputDto!) { { data = TestContent.Input(content), }, - Permission = PermissionIds.AppContentsCreate + Permissions = [PermissionIds.AppContentsCreate] }); var expected = new @@ -156,7 +156,7 @@ mutation MyMutation($location: JsonScalar) { longitude = 13 } }, - Permission = PermissionIds.AppContentsCreate + Permissions = [PermissionIds.AppContentsCreate] }); var expected = new @@ -202,7 +202,7 @@ mutation MyMutation($data: MySchemaDataInputDto!) { { data = TestContent.Input(content) }, - Permission = PermissionIds.AppContentsCreate + Permissions = [PermissionIds.AppContentsCreate] }); var expected = new @@ -306,7 +306,7 @@ mutation MyMutation($data: MySchemaDataInputDto!) { { data = TestContent.Input(content) }, - Permission = PermissionIds.AppContentsUpdateOwn + Permissions = [PermissionIds.AppContentsUpdateOwn] }); var expected = new @@ -405,7 +405,7 @@ mutation MyMutation($data: MySchemaDataInputDto!) { { data = TestContent.Input(content) }, - Permission = PermissionIds.AppContentsUpsert + Permissions = [PermissionIds.AppContentsUpsert] }); var expected = new @@ -509,7 +509,7 @@ mutation MyMutation($data: MySchemaDataInputDto!) { { data = TestContent.Input(content) }, - Permission = PermissionIds.AppContentsUpdateOwn + Permissions = [PermissionIds.AppContentsUpdateOwn] }); var expected = new @@ -610,7 +610,7 @@ public async Task Should_return_single_content_if_changing_status() contentId, fields = TestContent.AllFields }, - Permission = PermissionIds.AppContentsChangeStatusOwn + Permissions = [PermissionIds.AppContentsChangeStatusOwn] }); var expected = new @@ -652,7 +652,7 @@ public async Task Should_return_single_content_if_changing_status_without_due_ti contentId, fields = TestContent.AllFields }, - Permission = PermissionIds.AppContentsChangeStatusOwn + Permissions = [PermissionIds.AppContentsChangeStatusOwn] }); var expected = new @@ -694,7 +694,7 @@ public async Task Should_return_single_content_if_changing_status_with_null_due_ contentId, fields = TestContent.AllFields }, - Permission = PermissionIds.AppContentsChangeStatusOwn + Permissions = [PermissionIds.AppContentsChangeStatusOwn] }); var expected = new @@ -790,7 +790,7 @@ public async Task Should_return_new_version_if_deleting_content() { contentId }, - Permission = PermissionIds.AppContentsDeleteOwn + Permissions = [PermissionIds.AppContentsDeleteOwn] }); var expected = new diff --git a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLQueriesTests.cs b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLQueriesTests.cs index e3d61bebba..fb349f2f0c 100644 --- a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLQueriesTests.cs +++ b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLQueriesTests.cs @@ -12,6 +12,7 @@ using Squidex.Domain.Apps.Entities.TestHelpers; using Squidex.Infrastructure; using Squidex.Infrastructure.Json.Objects; +using Squidex.Shared; namespace Squidex.Domain.Apps.Entities.Contents.GraphQL; @@ -1973,4 +1974,64 @@ public async Task Should_not_fetch_user_if_only_is_id_queried() A.CallTo(() => userResolver.FindByIdAsync(A._, A._)) .MustNotHaveHappened(); } + + [Fact] + public async Task Should_expose_user_information_if_user_has_permission() + { + var assetId = DomainId.NewGuid(); + var asset = TestAsset.Create(assetId); + + A.CallTo(() => assetQuery.QueryAsync(MatchsAssetContext(), null, + A.That.HasIdsWithoutTotal(assetId), + A._)) + .Returns(ResultList.CreateFrom(1, asset)); + + var actual = await ExecuteAsync(new TestQuery + { + Query = @" + query { + findAsset(id: '{assetId}') { + createdByUser { + id, + email, + displayName + }, + lastModifiedByUser { + id, + email, + displayName + } + } + }", + Args = new + { + assetId + }, + Permissions = [PermissionIds.AppPii] + }); + + var expected = new + { + data = new + { + findAsset = new + { + createdByUser = new + { + id = asset.CreatedBy.Identifier, + email = $"{asset.CreatedBy.Identifier}@email.com", + displayName = $"{asset.CreatedBy.Identifier}name" + }, + lastModifiedByUser = new + { + id = asset.LastModifiedBy.Identifier, + email = $"{asset.LastModifiedBy}", + displayName = asset.LastModifiedBy.Identifier + } + } + } + }; + + AssertResult(expected, actual); + } } diff --git a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLSubscriptionTests.cs b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLSubscriptionTests.cs index ba9086c4d8..7906d25ea5 100644 --- a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLSubscriptionTests.cs +++ b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLSubscriptionTests.cs @@ -43,7 +43,7 @@ public async Task Should_subscribe_to_assets() fileSize } }", - Permission = PermissionIds.AppAssetsRead + Permissions = [PermissionIds.AppAssetsRead] }); var expected = new @@ -140,7 +140,7 @@ public async Task Should_subscribe_to_contents() data } }", - Permission = PermissionIds.AppContentsRead + Permissions = [PermissionIds.AppContentsRead] }); var expected = new diff --git a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/TestAsset.cs b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/TestAsset.cs index 79c1b6cca7..f11308f789 100644 --- a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/TestAsset.cs +++ b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/TestAsset.cs @@ -102,8 +102,8 @@ public static object Response(EnrichedAsset asset) createdByUser = new { id = asset.CreatedBy.Identifier, - email = $"{asset.CreatedBy.Identifier}@email.com", - displayName = $"{asset.CreatedBy.Identifier}name" + email = "Hidden", + displayName = "Hidden" }, editToken = $"token_{asset.Id}", lastModified = asset.LastModified, @@ -111,8 +111,8 @@ public static object Response(EnrichedAsset asset) lastModifiedByUser = new { id = asset.LastModifiedBy.Identifier, - email = $"{asset.LastModifiedBy}", - displayName = asset.LastModifiedBy.Identifier + email = "Hidden", + displayName = "Hidden" }, url = $"assets/{asset.AppId.Name}/{asset.Id}", thumbnailUrl = $"assets/{asset.AppId.Name}/{asset.Id}?width=100", diff --git a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/TestContent.cs b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/TestContent.cs index ea116a8635..1433202de9 100644 --- a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/TestContent.cs +++ b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/TestContent.cs @@ -405,8 +405,8 @@ public static object Response(EnrichedContent content) createdByUser = new { id = content.CreatedBy.Identifier, - email = $"{content.CreatedBy.Identifier}@email.com", - displayName = $"{content.CreatedBy.Identifier}name" + email = "Hidden", + displayName = "Hidden" }, editToken = $"token_{content.Id}", lastModified = content.LastModified, @@ -414,8 +414,8 @@ public static object Response(EnrichedContent content) lastModifiedByUser = new { id = content.LastModifiedBy.Identifier, - email = $"{content.LastModifiedBy}", - displayName = content.LastModifiedBy.Identifier + email = "Hidden", + displayName = "Hidden" }, status = "DRAFT", statusColor = "red", @@ -437,8 +437,8 @@ public static object FlatResponse(EnrichedContent content) createdByUser = new { id = content.CreatedBy.Identifier, - email = $"{content.CreatedBy.Identifier}@email.com", - displayName = $"{content.CreatedBy.Identifier}name" + email = "Hidden", + displayName = "Hidden", }, editToken = $"token_{content.Id}", lastModified = content.LastModified, @@ -446,8 +446,8 @@ public static object FlatResponse(EnrichedContent content) lastModifiedByUser = new { id = content.LastModifiedBy.Identifier, - email = $"{content.LastModifiedBy}", - displayName = content.LastModifiedBy.Identifier + email = "Hidden", + displayName = "Hidden", }, status = "DRAFT", statusColor = "red", diff --git a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/TestQuery.cs b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/TestQuery.cs index 6867837d06..98dbebc3aa 100644 --- a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/TestQuery.cs +++ b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/TestQuery.cs @@ -26,7 +26,7 @@ public sealed class TestQuery public object? Args { get; set; } - public string? Permission { get; set; } + public string[] Permissions { get; set; } = []; public string? OperationName { get; set; } @@ -42,16 +42,21 @@ public ExecutionOptions ToOptions(IServiceProvider services) } } + query = query.Replace('\'', '\"'); + + var userPermissions = Permissions.Select(p => PermissionIds.ForApp(p, TestApp.Default.Name, TestSchemas.Default.Name).Id); + var userPrincipal = Mocks.FrontendUser(null, userPermissions.ToArray()); + + var context = new Context(userPrincipal, TestApp.Default); + var options = new ExecutionOptions { - Query = query.Replace('\'', '\"') + Query = query, + User = userPrincipal, + UserContext = ActivatorUtilities.CreateInstance(services, context), + OperationName = OperationName, }; - if (OperationName != null) - { - options.OperationName = OperationName; - } - if (Variables != null) { options.Variables = Serializer.ReadNode(Serialize(Variables))!; @@ -62,25 +67,11 @@ public ExecutionOptions ToOptions(IServiceProvider services) options.Listeners.Add(listener); } - options.UserContext = ActivatorUtilities.CreateInstance(services, BuildContext(Permission)); - return options; + } - static Context BuildContext(string? permissionId) - { - if (permissionId == null) - { - return new Context(Mocks.FrontendUser(), TestApp.Default); - } - - var permission = PermissionIds.ForApp(permissionId, TestApp.Default.Name, TestSchemas.Default.Name).Id; - - return new Context(Mocks.FrontendUser(permission: permission), TestApp.Default); - } - - static JsonElement Serialize(object value) - { - return JsonSerializer.SerializeToElement(value, TestUtils.DefaultOptions()); - } + private static JsonElement Serialize(object value) + { + return JsonSerializer.SerializeToElement(value, TestUtils.DefaultOptions()); } } diff --git a/backend/tests/Squidex.Domain.Apps.Entities.Tests/TestHelpers/Mocks.cs b/backend/tests/Squidex.Domain.Apps.Entities.Tests/TestHelpers/Mocks.cs index 6bdaf996b3..5b0f963185 100644 --- a/backend/tests/Squidex.Domain.Apps.Entities.Tests/TestHelpers/Mocks.cs +++ b/backend/tests/Squidex.Domain.Apps.Entities.Tests/TestHelpers/Mocks.cs @@ -19,21 +19,11 @@ public static ClaimsPrincipal ApiUser(string? role = null, params string[] permi return CreateUser(false, role, permissions); } - public static ClaimsPrincipal ApiUser(string? role = null, string? permission = null) - { - return CreateUser(false, role, permission); - } - public static ClaimsPrincipal FrontendUser(string? role = null, params string[] permissions) { return CreateUser(true, role, permissions); } - public static ClaimsPrincipal FrontendUser(string? role = null, string? permission = null) - { - return CreateUser(true, role, permission); - } - public static ClaimsPrincipal CreateUser(bool isFrontend, string? role, params string?[] permissions) { var claimsIdentity = new ClaimsIdentity(); diff --git a/frontend/src/app/features/apps/pages/apps-page.component.html b/frontend/src/app/features/apps/pages/apps-page.component.html index cd33944106..c047fa3fa4 100644 --- a/frontend/src/app/features/apps/pages/apps-page.component.html +++ b/frontend/src/app/features/apps/pages/apps-page.component.html @@ -62,6 +62,7 @@

    {{ template.title }}

    } } + @if (info) {
    {{ info }} diff --git a/frontend/src/app/features/apps/pages/apps-page.component.scss b/frontend/src/app/features/apps/pages/apps-page.component.scss index df44c9071d..e8ebbddd00 100644 --- a/frontend/src/app/features/apps/pages/apps-page.component.scss +++ b/frontend/src/app/features/apps/pages/apps-page.component.scss @@ -104,8 +104,4 @@ padding-top: 1rem; } } -} - -.info { - color: $color-border-dark; } \ No newline at end of file diff --git a/frontend/src/app/framework/angular/forms/editors/dropdown.component.html b/frontend/src/app/framework/angular/forms/editors/dropdown.component.html index 3e7dbad6bd..2da697d1c5 100644 --- a/frontend/src/app/framework/angular/forms/editors/dropdown.component.html +++ b/frontend/src/app/framework/angular/forms/editors/dropdown.component.html @@ -32,7 +32,7 @@ [adjustWidth]="dropdownFullWidth" [position]="dropdownPosition" scrollX="false" - scrollY="true" + scrollY="hidden" [sqxAnchoredTo]="input" *sqxModal="dropdown" [style]="dropdownStyles"> diff --git a/frontend/src/app/framework/angular/forms/editors/dropdown.component.scss b/frontend/src/app/framework/angular/forms/editors/dropdown.component.scss index a536de888e..5e0638c7ae 100644 --- a/frontend/src/app/framework/angular/forms/editors/dropdown.component.scss +++ b/frontend/src/app/framework/angular/forms/editors/dropdown.component.scss @@ -27,6 +27,11 @@ $color-input-disabled: #eef1f4; padding: .5rem; } +.items-container { + display: flex; + flex-direction: column; +} + .control-dropdown { max-height: none; max-width: 40rem; @@ -37,6 +42,7 @@ $color-input-disabled: #eef1f4; max-height: 15rem; overflow-x: hidden; overflow-y: auto; + padding-bottom: .5rem; } .selection { @@ -65,4 +71,11 @@ $color-input-disabled: #eef1f4; sqx-loader { margin-top: .25rem; +} + +sqx-dropdown-menu { + display: flex !important; + flex-direction: column; + flex-grow: 0; + padding-bottom: 0; } \ No newline at end of file diff --git a/frontend/src/app/framework/angular/forms/editors/dropdown.stories.ts b/frontend/src/app/framework/angular/forms/editors/dropdown.stories.ts index 7b4372c5e3..c8190401e2 100644 --- a/frontend/src/app/framework/angular/forms/editors/dropdown.stories.ts +++ b/frontend/src/app/framework/angular/forms/editors/dropdown.stories.ts @@ -113,6 +113,13 @@ export const Default: Story = { }, }; +export const Long: Story = { + args: { + items: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K'], + model: 'B', + }, +}; + export const WrongModel: Story = { args: { items: ['A', 'B', 'C'], diff --git a/frontend/src/app/framework/angular/modals/modal-placement.directive.ts b/frontend/src/app/framework/angular/modals/modal-placement.directive.ts index 3e052afebc..84c9aa4273 100644 --- a/frontend/src/app/framework/angular/modals/modal-placement.directive.ts +++ b/frontend/src/app/framework/angular/modals/modal-placement.directive.ts @@ -20,11 +20,11 @@ export class ModalPlacementDirective implements AfterViewInit, OnDestroy { @Input('sqxAnchoredTo') public target?: Element; - @Input({ transform: booleanAttribute }) - public scrollX = false; + @Input() + public scrollX?: Scroll; - @Input({ transform: booleanAttribute }) - public scrollY = false; + @Input() + public scrollY?: Scroll; @Input({ transform: numberAttribute }) public scrollMargin = 10; @@ -131,21 +131,24 @@ export class ModalPlacementDirective implements AfterViewInit, OnDestroy { middleware.push(size({ apply: ({ availableWidth, availableHeight, rects }) => { - if (this.scrollX) { - const maxWidth = availableWidth > 0 ? `${availableWidth - this.scrollMargin}px` : 'none'; + const overflowX = parseScroll(this.scrollX); + const overflowY = parseScroll(this.scrollY); - this.renderer.setStyle(modalRef, 'overflow-x', 'auto'); - this.renderer.setStyle(modalRef, 'overflow-y', 'none'); - this.renderer.setStyle(modalRef, 'max-width', maxWidth); - } + const maxWidth = + overflowX !== 'none' + ? availableWidth > 0 ? `${availableWidth - this.scrollMargin}px` : 'none' + : undefined; - if (this.scrollY) { - const maxHeight = availableHeight > 0 ? `${availableHeight - this.scrollMargin}px` : 'none'; + const maxHeight = + overflowY !== 'none' + ? availableHeight > 0 ? `${availableHeight - this.scrollMargin}px` : 'none' + : undefined; - this.renderer.setStyle(modalRef, 'overflow-x', 'none'); - this.renderer.setStyle(modalRef, 'overflow-y', 'auto'); - this.renderer.setStyle(modalRef, 'max-height', maxHeight); - } + this.renderer.setStyle(modalRef, 'overflow-x', overflowX); + this.renderer.setStyle(modalRef, 'overflow-y', overflowY); + + this.renderer.setStyle(modalRef, 'max-width', maxWidth); + this.renderer.setStyle(modalRef, 'max-height', maxHeight); if (this.adjustWidth) { const width = rects.reference.width + 2 * this.spaceX; @@ -169,3 +172,17 @@ export class ModalPlacementDirective implements AfterViewInit, OnDestroy { this.renderer.setStyle(modalRef, 'visibility', 'visible'); } } + +type Scroll = 'hidden' | 'scroll' | 'auto' | 'true' | 'false' | true | undefined; + +function parseScroll(source: Scroll): string { + if (source === 'true' || source === 'auto' || source === true) { + return 'auto'; + } + + if (!source || source === 'false') { + return 'none'; + } + + return source; +}