D.name===R).forEach(D=>Ln(`${ne.getSimpleClass(v)}.`,D,I)),ne.findEnums(T).filter(D=>D===R).forEach(D=>{I.push({value:`\u8BBF\u95EE\u679A\u4E3E\uFF1A\`${v}.${R}\``})}),ne.findAttributes(T).filter(D=>D.name===R).forEach(D=>{I.push({value:`\u8BBF\u95EE\u5C5E\u6027\uFF1A\`${v}.${R}\``}),D.comment&&I.push({value:`${D.comment}`}),I.push({value:`\u5C5E\u6027\u7C7B\u578B\uFF1A\`${D.type}\``})}),O=E.member.getLine()}else if(E instanceof xn){let v=E.target;hn(v.variable,C,I)}else if(E instanceof Ut){let v=E.identifier;v instanceof Xe&&hn(v,C,I,!0)}else if(E instanceof Jt)I.push({value:"\u8BBF\u95EEMap\u6216\u6570\u7EC4"});else if(E instanceof Pa)I.push({value:"linq\u67E5\u8BE2"});else return;return{range:new ot(O.lineNumber,O.startCol,O.endLineNumber,O.endCol+1),contents:I}}}}},co=()=>{const e="mybatis";W.register({id:e}),W.setLanguageConfiguration(e,{comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]}),W.setMonarchTokensProvider(e,{defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ABORT_AFTER_WAIT","ABSENT","ABSOLUTE","ACCENT_SENSITIVITY","ACTION","ACTIVATION","ACTIVE","ADD","ADDRESS","ADMIN","AES","AES_128","AES_192","AES_256","AFFINITY","AFTER","AGGREGATE","ALGORITHM","ALL_CONSTRAINTS","ALL_ERRORMSGS","ALL_INDEXES","ALL_LEVELS","ALL_SPARSE_COLUMNS","ALLOW_CONNECTIONS","ALLOW_MULTIPLE_EVENT_LOSS","ALLOW_PAGE_LOCKS","ALLOW_ROW_LOCKS","ALLOW_SINGLE_EVENT_LOSS","ALLOW_SNAPSHOT_ISOLATION","ALLOWED","ALTER","ANONYMOUS","ANSI_DEFAULTS","ANSI_NULL_DEFAULT","ANSI_NULL_DFLT_OFF","ANSI_NULL_DFLT_ON","ANSI_NULLS","ANSI_PADDING","ANSI_WARNINGS","APPEND","APPLICATION","APPLICATION_LOG","ARITHABORT","ARITHIGNORE","AS","ASC","ASSEMBLY","ASYMMETRIC","ASYNCHRONOUS_COMMIT","AT","ATOMIC","ATTACH","ATTACH_REBUILD_LOG","AUDIT","AUDIT_GUID","AUTHENTICATION","AUTHORIZATION","AUTO","AUTO_CLEANUP","AUTO_CLOSE","AUTO_CREATE_STATISTICS","AUTO_SHRINK","AUTO_UPDATE_STATISTICS","AUTO_UPDATE_STATISTICS_ASYNC","AUTOMATED_BACKUP_PREFERENCE","AUTOMATIC","AVAILABILITY","AVAILABILITY_MODE","BACKUP","BACKUP_PRIORITY","BASE64","BATCHSIZE","BEGIN","BEGIN_DIALOG","BIGINT","BINARY","BINDING","BIT","BLOCKERS","BLOCKSIZE","BOUNDING_BOX","BREAK","BROKER","BROKER_INSTANCE","BROWSE","BUCKET_COUNT","BUFFER","BUFFERCOUNT","BULK","BULK_LOGGED","BY","CACHE","CALL","CALLED","CALLER","CAP_CPU_PERCENT","CASCADE","CASE","CATALOG","CATCH","CELLS_PER_OBJECT","CERTIFICATE","CHANGE_RETENTION","CHANGE_TRACKING","CHANGES","CHAR","CHARACTER","CHECK","CHECK_CONSTRAINTS","CHECK_EXPIRATION","CHECK_POLICY","CHECKALLOC","CHECKCATALOG","CHECKCONSTRAINTS","CHECKDB","CHECKFILEGROUP","CHECKIDENT","CHECKPOINT","CHECKTABLE","CLASSIFIER_FUNCTION","CLEANTABLE","CLEANUP","CLEAR","CLOSE","CLUSTER","CLUSTERED","CODEPAGE","COLLATE","COLLECTION","COLUMN","COLUMN_SET","COLUMNS","COLUMNSTORE","COLUMNSTORE_ARCHIVE","COMMIT","COMMITTED","COMPATIBILITY_LEVEL","COMPRESSION","COMPUTE","CONCAT","CONCAT_NULL_YIELDS_NULL","CONFIGURATION","CONNECT","CONSTRAINT","CONTAINMENT","CONTENT","CONTEXT","CONTINUE","CONTINUE_AFTER_ERROR","CONTRACT","CONTRACT_NAME","CONTROL","CONVERSATION","COOKIE","COPY_ONLY","COUNTER","CPU","CREATE","CREATE_NEW","CREATION_DISPOSITION","CREDENTIAL","CRYPTOGRAPHIC","CUBE","CURRENT","CURRENT_DATE","CURSOR","CURSOR_CLOSE_ON_COMMIT","CURSOR_DEFAULT","CYCLE","DATA","DATA_COMPRESSION","DATA_PURITY","DATABASE","DATABASE_DEFAULT","DATABASE_MIRRORING","DATABASE_SNAPSHOT","DATAFILETYPE","DATE","DATE_CORRELATION_OPTIMIZATION","DATEFIRST","DATEFORMAT","DATETIME","DATETIME2","DATETIMEOFFSET","DAY","DAYOFYEAR","DAYS","DB_CHAINING","DBCC","DBREINDEX","DDL_DATABASE_LEVEL_EVENTS","DEADLOCK_PRIORITY","DEALLOCATE","DEC","DECIMAL","DECLARE","DECRYPTION","DEFAULT","DEFAULT_DATABASE","DEFAULT_FULLTEXT_LANGUAGE","DEFAULT_LANGUAGE","DEFAULT_SCHEMA","DEFINITION","DELAY","DELAYED_DURABILITY","DELETE","DELETED","DENSITY_VECTOR","DENY","DEPENDENTS","DES","DESC","DESCRIPTION","DESX","DHCP","DIAGNOSTICS","DIALOG","DIFFERENTIAL","DIRECTORY_NAME","DISABLE","DISABLE_BROKER","DISABLED","DISK","DISTINCT","DISTRIBUTED","DOCUMENT","DOUBLE","DROP","DROP_EXISTING","DROPCLEANBUFFERS","DUMP","DURABILITY","DYNAMIC","EDITION","ELEMENTS","ELSE","EMERGENCY","EMPTY","EMPTYFILE","ENABLE","ENABLE_BROKER","ENABLED","ENCRYPTION","END","ENDPOINT","ENDPOINT_URL","ERRLVL","ERROR","ERROR_BROKER_CONVERSATIONS","ERRORFILE","ESCAPE","ESTIMATEONLY","EVENT","EVENT_RETENTION_MODE","EXEC","EXECUTABLE","EXECUTE","EXIT","EXPAND","EXPIREDATE","EXPIRY_DATE","EXPLICIT","EXTENDED_LOGICAL_CHECKS","EXTENSION","EXTERNAL","EXTERNAL_ACCESS","FAIL_OPERATION","FAILOVER","FAILOVER_MODE","FAILURE_CONDITION_LEVEL","FALSE","FAN_IN","FAST","FAST_FORWARD","FETCH","FIELDTERMINATOR","FILE","FILEGROUP","FILEGROWTH","FILELISTONLY","FILENAME","FILEPATH","FILESTREAM","FILESTREAM_ON","FILETABLE_COLLATE_FILENAME","FILETABLE_DIRECTORY","FILETABLE_FULLPATH_UNIQUE_CONSTRAINT_NAME","FILETABLE_NAMESPACE","FILETABLE_PRIMARY_KEY_CONSTRAINT_NAME","FILETABLE_STREAMID_UNIQUE_CONSTRAINT_NAME","FILLFACTOR","FILTERING","FIRE_TRIGGERS","FIRST","FIRSTROW","FLOAT","FMTONLY","FOLLOWING","FOR","FORCE","FORCE_FAILOVER_ALLOW_DATA_LOSS","FORCE_SERVICE_ALLOW_DATA_LOSS","FORCED","FORCEPLAN","FORCESCAN","FORCESEEK","FOREIGN","FORMATFILE","FORMSOF","FORWARD_ONLY","FREE","FREEPROCCACHE","FREESESSIONCACHE","FREESYSTEMCACHE","FROM","FULL","FULLSCAN","FULLTEXT","FUNCTION","GB","GEOGRAPHY_AUTO_GRID","GEOGRAPHY_GRID","GEOMETRY_AUTO_GRID","GEOMETRY_GRID","GET","GLOBAL","GO","GOTO","GOVERNOR","GRANT","GRIDS","GROUP","GROUP_MAX_REQUESTS","HADR","HASH","HASHED","HAVING","HEADERONLY","HEALTH_CHECK_TIMEOUT","HELP","HIERARCHYID","HIGH","HINT","HISTOGRAM","HOLDLOCK","HONOR_BROKER_PRIORITY","HOUR","HOURS","IDENTITY","IDENTITY_INSERT","IDENTITY_VALUE","IDENTITYCOL","IF","IGNORE_CONSTRAINTS","IGNORE_DUP_KEY","IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX","IGNORE_TRIGGERS","IMAGE","IMMEDIATE","IMPERSONATE","IMPLICIT_TRANSACTIONS","IMPORTANCE","INCLUDE","INCREMENT","INCREMENTAL","INDEX","INDEXDEFRAG","INFINITE","INFLECTIONAL","INIT","INITIATOR","INPUT","INPUTBUFFER","INSENSITIVE","INSERT","INSERTED","INSTEAD","INT","INTEGER","INTO","IO","IP","ISABOUT","ISOLATION","JOB","KB","KEEP","KEEP_CDC","KEEP_NULLS","KEEP_REPLICATION","KEEPDEFAULTS","KEEPFIXED","KEEPIDENTITY","KEEPNULLS","KERBEROS","KEY","KEY_SOURCE","KEYS","KEYSET","KILL","KILOBYTES_PER_BATCH","LABELONLY","LANGUAGE","LAST","LASTROW","LEVEL","LEVEL_1","LEVEL_2","LEVEL_3","LEVEL_4","LIFETIME","LIMIT","LINENO","LIST","LISTENER","LISTENER_IP","LISTENER_PORT","LOAD","LOADHISTORY","LOB_COMPACTION","LOCAL","LOCAL_SERVICE_NAME","LOCK_ESCALATION","LOCK_TIMEOUT","LOGIN","LOGSPACE","LOOP","LOW","MANUAL","MARK","MARK_IN_USE_FOR_REMOVAL","MASTER","MAX_CPU_PERCENT","MAX_DISPATCH_LATENCY","MAX_DOP","MAX_DURATION","MAX_EVENT_SIZE","MAX_FILES","MAX_IOPS_PER_VOLUME","MAX_MEMORY","MAX_MEMORY_PERCENT","MAX_QUEUE_READERS","MAX_ROLLOVER_FILES","MAX_SIZE","MAXDOP","MAXERRORS","MAXLENGTH","MAXRECURSION","MAXSIZE","MAXTRANSFERSIZE","MAXVALUE","MB","MEDIADESCRIPTION","MEDIANAME","MEDIAPASSWORD","MEDIUM","MEMBER","MEMORY_OPTIMIZED","MEMORY_OPTIMIZED_DATA","MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT","MEMORY_PARTITION_MODE","MERGE","MESSAGE","MESSAGE_FORWARD_SIZE","MESSAGE_FORWARDING","MICROSECOND","MILLISECOND","MIN_CPU_PERCENT","MIN_IOPS_PER_VOLUME","MIN_MEMORY_PERCENT","MINUTE","MINUTES","MINVALUE","MIRROR","MIRROR_ADDRESS","MODIFY","MONEY","MONTH","MOVE","MULTI_USER","MUST_CHANGE","NAME","NANOSECOND","NATIONAL","NATIVE_COMPILATION","NCHAR","NEGOTIATE","NESTED_TRIGGERS","NEW_ACCOUNT","NEW_BROKER","NEW_PASSWORD","NEWNAME","NEXT","NO","NO_BROWSETABLE","NO_CHECKSUM","NO_COMPRESSION","NO_EVENT_LOSS","NO_INFOMSGS","NO_TRUNCATE","NO_WAIT","NOCHECK","NOCOUNT","NOEXEC","NOEXPAND","NOFORMAT","NOINDEX","NOINIT","NOLOCK","NON","NON_TRANSACTED_ACCESS","NONCLUSTERED","NONE","NORECOMPUTE","NORECOVERY","NORESEED","NORESET","NOREWIND","NORMAL","NOSKIP","NOTIFICATION","NOTRUNCATE","NOUNLOAD","NOWAIT","NTEXT","NTLM","NUMANODE","NUMERIC","NUMERIC_ROUNDABORT","NVARCHAR","OBJECT","OF","OFF","OFFLINE","OFFSET","OFFSETS","OLD_ACCOUNT","OLD_PASSWORD","ON","ON_FAILURE","ONLINE","ONLY","OPEN","OPEN_EXISTING","OPENTRAN","OPTIMISTIC","OPTIMIZE","OPTION","ORDER","OUT","OUTPUT","OUTPUTBUFFER","OVER","OVERRIDE","OWNER","OWNERSHIP","PAD_INDEX","PAGE","PAGE_VERIFY","PAGECOUNT","PAGLOCK","PARAMETERIZATION","PARSEONLY","PARTIAL","PARTITION","PARTITIONS","PARTNER","PASSWORD","PATH","PER_CPU","PER_NODE","PERCENT","PERMISSION_SET","PERSISTED","PHYSICAL_ONLY","PLAN","POISON_MESSAGE_HANDLING","POOL","POPULATION","PORT","PRECEDING","PRECISION","PRIMARY","PRIMARY_ROLE","PRINT","PRIOR","PRIORITY","PRIORITY_LEVEL","PRIVATE","PRIVILEGES","PROC","PROCCACHE","PROCEDURE","PROCEDURE_NAME","PROCESS","PROFILE","PROPERTY","PROPERTY_DESCRIPTION","PROPERTY_INT_ID","PROPERTY_SET_GUID","PROVIDER","PROVIDER_KEY_NAME","PUBLIC","PUT","QUARTER","QUERY","QUERY_GOVERNOR_COST_LIMIT","QUEUE","QUEUE_DELAY","QUOTED_IDENTIFIER","RAISERROR","RANGE","RAW","RC2","RC4","RC4_128","READ","READ_COMMITTED_SNAPSHOT","READ_ONLY","READ_ONLY_ROUTING_LIST","READ_ONLY_ROUTING_URL","READ_WRITE","READ_WRITE_FILEGROUPS","READCOMMITTED","READCOMMITTEDLOCK","READONLY","READPAST","READTEXT","READUNCOMMITTED","READWRITE","REAL","REBUILD","RECEIVE","RECOMPILE","RECONFIGURE","RECOVERY","RECURSIVE","RECURSIVE_TRIGGERS","REFERENCES","REGENERATE","RELATED_CONVERSATION","RELATED_CONVERSATION_GROUP","RELATIVE","REMOTE","REMOTE_PROC_TRANSACTIONS","REMOTE_SERVICE_NAME","REMOVE","REORGANIZE","REPAIR_ALLOW_DATA_LOSS","REPAIR_FAST","REPAIR_REBUILD","REPEATABLE","REPEATABLEREAD","REPLICA","REPLICATION","REQUEST_MAX_CPU_TIME_SEC","REQUEST_MAX_MEMORY_GRANT_PERCENT","REQUEST_MEMORY_GRANT_TIMEOUT_SEC","REQUIRED","RESAMPLE","RESEED","RESERVE_DISK_SPACE","RESET","RESOURCE","RESTART","RESTORE","RESTRICT","RESTRICTED_USER","RESULT","RESUME","RETAINDAYS","RETENTION","RETURN","RETURNS","REVERT","REVOKE","REWIND","REWINDONLY","ROBUST","ROLE","ROLLBACK","ROLLUP","ROOT","ROUTE","ROW","ROWCOUNT","ROWGUIDCOL","ROWLOCK","ROWS","ROWS_PER_BATCH","ROWTERMINATOR","ROWVERSION","RSA_1024","RSA_2048","RSA_512","RULE","SAFE","SAFETY","SAMPLE","SAVE","SCHEDULER","SCHEMA","SCHEMA_AND_DATA","SCHEMA_ONLY","SCHEMABINDING","SCHEME","SCROLL","SCROLL_LOCKS","SEARCH","SECOND","SECONDARY","SECONDARY_ONLY","SECONDARY_ROLE","SECONDS","SECRET","SECURITY_LOG","SECURITYAUDIT","SELECT","SELECTIVE","SELF","SEND","SENT","SEQUENCE","SERIALIZABLE","SERVER","SERVICE","SERVICE_BROKER","SERVICE_NAME","SESSION","SESSION_TIMEOUT","SET","SETS","SETUSER","SHOW_STATISTICS","SHOWCONTIG","SHOWPLAN","SHOWPLAN_ALL","SHOWPLAN_TEXT","SHOWPLAN_XML","SHRINKDATABASE","SHRINKFILE","SHUTDOWN","SID","SIGNATURE","SIMPLE","SINGLE_BLOB","SINGLE_CLOB","SINGLE_NCLOB","SINGLE_USER","SINGLETON","SIZE","SKIP","SMALLDATETIME","SMALLINT","SMALLMONEY","SNAPSHOT","SORT_IN_TEMPDB","SOURCE","SPARSE","SPATIAL","SPATIAL_WINDOW_MAX_CELLS","SPECIFICATION","SPLIT","SQL","SQL_VARIANT","SQLPERF","STANDBY","START","START_DATE","STARTED","STARTUP_STATE","STAT_HEADER","STATE","STATEMENT","STATIC","STATISTICAL_SEMANTICS","STATISTICS","STATISTICS_INCREMENTAL","STATISTICS_NORECOMPUTE","STATS","STATS_STREAM","STATUS","STATUSONLY","STOP","STOP_ON_ERROR","STOPAT","STOPATMARK","STOPBEFOREMARK","STOPLIST","STOPPED","SUBJECT","SUBSCRIPTION","SUPPORTED","SUSPEND","SWITCH","SYMMETRIC","SYNCHRONOUS_COMMIT","SYNONYM","SYSNAME","SYSTEM","TABLE","TABLERESULTS","TABLESAMPLE","TABLOCK","TABLOCKX","TAKE","TAPE","TARGET","TARGET_RECOVERY_TIME","TB","TCP","TEXT","TEXTIMAGE_ON","TEXTSIZE","THEN","THESAURUS","THROW","TIES","TIME","TIMEOUT","TIMER","TIMESTAMP","TINYINT","TO","TOP","TORN_PAGE_DETECTION","TRACEOFF","TRACEON","TRACESTATUS","TRACK_CAUSALITY","TRACK_COLUMNS_UPDATED","TRAN","TRANSACTION","TRANSFER","TRANSFORM_NOISE_WORDS","TRIGGER","TRIPLE_DES","TRIPLE_DES_3KEY","TRUE","TRUNCATE","TRUNCATEONLY","TRUSTWORTHY","TRY","TSQL","TWO_DIGIT_YEAR_CUTOFF","TYPE","TYPE_WARNING","UNBOUNDED","UNCHECKED","UNCOMMITTED","UNDEFINED","UNIQUE","UNIQUEIDENTIFIER","UNKNOWN","UNLIMITED","UNLOAD","UNSAFE","UPDATE","UPDATETEXT","UPDATEUSAGE","UPDLOCK","URL","USE","USED","USER","USEROPTIONS","USING","VALID_XML","VALIDATION","VALUE","VALUES","VARBINARY","VARCHAR","VARYING","VERIFYONLY","VERSION","VIEW","VIEW_METADATA","VIEWS","VISIBILITY","WAIT_AT_LOW_PRIORITY","WAITFOR","WEEK","WEIGHT","WELL_FORMED_XML","WHEN","WHERE","WHILE","WINDOWS","WITH","WITHIN","WITHOUT","WITNESS","WORK","WORKLOAD","WRITETEXT","XACT_ABORT","XLOCK","XMAX","XMIN","XML","XMLDATA","XMLNAMESPACES","XMLSCHEMA","XQUERY","XSINIL","YEAR","YMAX","YMIN"],operators:["ALL","AND","ANY","BETWEEN","EXISTS","IN","LIKE","NOT","OR","SOME","EXCEPT","INTERSECT","UNION","APPLY","CROSS","FULL","INNER","JOIN","LEFT","OUTER","RIGHT","CONTAINS","FREETEXT","IS","NULL","PIVOT","UNPIVOT","MATCHED"],builtinFunctions:["AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","SUM","STDEV","STDEVP","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","COLLATE","COLLATIONPROPERTY","TERTIARY_WEIGHTS","FEDERATION_FILTERING_VALUE","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","CURRENT_TIMESTAMP","DATEADD","DATEDIFF","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","CHOOSE","COALESCE","IIF","NULLIF","ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASE_PRINCIPAL_ID","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME","ASCII","CHAR","CHARINDEX","CONCAT","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STUFF","SUBSTRING","UNICODE","UPPER","BINARY_CHECKSUM","CHECKSUM","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","ERROR_LINE","ERROR_NUMBER","ERROR_MESSAGE","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GETANSINULL","GET_FILESTREAM_TRANSACTION_CONTEXT","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","XACT_STATE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","CHANGETABLE","CHANGE_TRACKING_CONTEXT","CHANGE_TRACKING_CURRENT_VERSION","CHANGE_TRACKING_IS_COLUMN_IN_MASK","CHANGE_TRACKING_MIN_VALID_VERSION","CONTAINSTABLE","FREETEXTTABLE","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","FILETABLEROOTPATH","GETFILENAMESPACEPATH","GETPATHLOCATOR","PATHNAME","GET_TRANSMISSION_STATUS"],builtinVariables:["@@DATEFIRST","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","@@CURSOR_ROWS","@@FETCH_STATUS","@@DATEFIRST","@@PROCID","@@ERROR","@@IDENTITY","@@ROWCOUNT","@@TRANCOUNT","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACKET_ERRORS","@@PACK_RECEIVED","@@PACK_SENT","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE"],pseudoColumns:["$ACTION","$IDENTITY","$ROWGUID","$PARTITION"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/(<)(where|set|foreach|if|trim|elseif|else)/,["delimiter",{token:"tag",next:"@xml"}]],[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i,"keyword"],[/BEGIN\s+TRY\b/i,{token:"keyword.try"}],[/END\s+TRY\b/i,{token:"keyword.try"}],[/BEGIN\s+CATCH\b/i,{token:"keyword.catch"}],[/END\s+CATCH\b/i,{token:"keyword.catch"}],[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]],xml:[[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@xmlEmbedded",nextEmbedded:"mybatis"}],[/[ \t\r\n]+/],[/(<\/)(where|if|set|foreach|trim|elseif|else)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],xmlEmbedded:[[/<\/(where|if|set|foreach|trim|elseif|else)/,{token:"tag",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}})},uo=()=>{co();const e="magicscript";W.register({id:e}),W.setLanguageConfiguration(e,{wordPattern:/(-?\d*\.\d\w*)|([^`~!#%^&*()\-=+[{\]}\\|;:'",.<>/?\s]+)/g,brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:W.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:W.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:W.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:W.IndentAction.None,removeText:1}}],comments:{lineComment:"//",blockComment:["/*","*/"]},operators:["<=",">=","==","!=","+","-","*","/","%","&","|","!","&&","||","?",":","++","--","+=","-=","*=","/="],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""',notIn:["string.multi"]},{open:"",close:""},{open:"'},{open:"'},{open:""},{open:"",close:""},{open:"",close:""},{open:"'},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]},{open:"/**",close:" */",notIn:["string"]}]}),W.setMonarchTokensProvider(e,vn),W.registerCompletionItemProvider(e,so),W.registerFoldingRangeProvider(e,oo),W.registerSignatureHelpProvider(e,ro),W.registerHoverProvider(e,lo),W.registerDocumentFormattingEditProvider(e,{provideDocumentFormattingEdits(t,n,a){return[{text:new oe(t.getValue()).beautify(),range:t.getFullModelRange()}]}}),W.registerCompletionItemProvider("html",{triggerCharacters:[">"],provideCompletionItems:(t,n)=>{var o;const s=(o=t.getValueInRange({startLineNumber:n.lineNumber,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column}).match(/.*<(\w+)>$/))==null?void 0:o[1];if(!s)return;const i=t.getWordUntilPosition(n);return{suggestions:[{label:`${s}>`,kind:W.CompletionItemKind.EnumMember,insertText:`$1${s}>`,insertTextRules:W.CompletionItemInsertTextRule.InsertAsSnippet,range:{startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:i.startColumn,endColumn:i.endColumn}}]}}})};function xe(e,t,n){var a={debug:!1,automaticOpen:!0,reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1.5,timeoutInterval:2e3,maxReconnectAttempts:null,binaryType:"blob"};n||(n={});for(var s in a)typeof n[s]!="undefined"?this[s]=n[s]:this[s]=a[s];this.url=e,this.reconnectAttempts=0,this.readyState=WebSocket.CONNECTING,this.protocol=null;var i=this,o,r=!1,l=!1,u=document.createElement("div");u.addEventListener("open",function(m){i.onopen(m)}),u.addEventListener("close",function(m){i.onclose(m)}),u.addEventListener("connecting",function(m){i.onconnecting(m)}),u.addEventListener("message",function(m){i.onmessage(m)}),u.addEventListener("error",function(m){i.onerror(m)}),this.addEventListener=u.addEventListener.bind(u),this.removeEventListener=u.removeEventListener.bind(u),this.dispatchEvent=u.dispatchEvent.bind(u);function p(m,f){var y=document.createEvent("CustomEvent");return y.initCustomEvent(m,!1,!1,f),y}this.open=function(m){if(o=new WebSocket(i.url,t||[]),o.binaryType=this.binaryType,m){if(this.maxReconnectAttempts&&this.reconnectAttempts>this.maxReconnectAttempts)return}else u.dispatchEvent(p("connecting")),this.reconnectAttempts=0;(i.debug||xe.debugAll)&&console.debug("ReconnectingWebSocket","attempt-connect",i.url);var f=o,y=setTimeout(function(){(i.debug||xe.debugAll)&&console.debug("ReconnectingWebSocket","connection-timeout",i.url),l=!0,f.close(),l=!1},i.timeoutInterval);o.onopen=function(E){clearTimeout(y),(i.debug||xe.debugAll)&&console.debug("ReconnectingWebSocket","onopen",i.url),i.protocol=o.protocol,i.readyState=WebSocket.OPEN,i.reconnectAttempts=0;var C=p("open");C.isReconnect=m,m=!1,u.dispatchEvent(C)},o.onclose=function(E){if(clearTimeout(I),o=null,r)i.readyState=WebSocket.CLOSED,u.dispatchEvent(p("close"));else{i.readyState=WebSocket.CONNECTING;var C=p("connecting");C.code=E.code,C.reason=E.reason,C.wasClean=E.wasClean,u.dispatchEvent(C),!m&&!l&&((i.debug||xe.debugAll)&&console.debug("ReconnectingWebSocket","onclose",i.url),u.dispatchEvent(p("close")));var I=i.reconnectInterval*Math.pow(i.reconnectDecay,i.reconnectAttempts);setTimeout(function(){i.reconnectAttempts++,i.open(!0)},I>i.maxReconnectInterval?i.maxReconnectInterval:I)}},o.onmessage=function(E){(i.debug||xe.debugAll)&&console.debug("ReconnectingWebSocket","onmessage",i.url,E.data);var C=p("message");C.data=E.data,u.dispatchEvent(C)},o.onerror=function(E){(i.debug||xe.debugAll)&&console.debug("ReconnectingWebSocket","onerror",i.url,E),u.dispatchEvent(p("error"))}},this.automaticOpen==!0&&this.open(!1),this.send=function(m){if(o)return(i.debug||xe.debugAll)&&console.debug("ReconnectingWebSocket","send",i.url,m),o.send(m);throw"INVALID_STATE_ERR : Pausing to reconnect websocket"},this.close=function(m,f){typeof m=="undefined"&&(m=1e3),r=!0,o&&o.close(m,f)},this.refresh=function(){o&&o.close()}}xe.prototype.onopen=function(e){};xe.prototype.onclose=function(e){};xe.prototype.onconnecting=function(e){};xe.prototype.onmessage=function(e){};xe.prototype.onerror=function(e){};xe.debugAll=!1;xe.CONNECTING=WebSocket.CONNECTING;xe.OPEN=WebSocket.OPEN;xe.CLOSING=WebSocket.CLOSING;xe.CLOSED=WebSocket.CLOSED;let fn={};function qt(e){if(fn[e])try{fn[e].close()}catch{}this.listeners={},this.future=new Promise(t=>{this.resolve=t,this.socket=new xe(e,null,{timeoutInterval:1e4}),fn[e]=this,this.socket.onmessage=this.messageReceived,this.socket.onconnecting=()=>{this.future=new Promise(n=>this.resolve=n),S.status("message.connectDebugServer")},this.socket.onopen=()=>{S.status("message.connectDebugServerSuccess"),S.$emit("ws_open"),this.resolve()},this.socket.onclose=()=>{S.status("message.debugServerClose"),S.$emit("ws_close")}})}qt.prototype.on=function(e,t){this.listeners[e]=this.listeners[e]||[],this.listeners[e].push(t)};qt.prototype.messageReceived=function(e){let t=e.data,n=t.indexOf(","),a=n===-1?t:t.substring(0,n),s=[];for(;n>-1;){if(t=t.substring(n+1),t.startsWith("[")||t.startsWith("{")){s.push(JSON.parse(t));break}n=t.indexOf(","),s.push(n===-1?t:t.substring(0,n))}S.$emit("ws_"+a,s)};qt.prototype.send=function(e){this.future.then(()=>{this.socket.send(e)})};qt.prototype.close=function(){this.socket.close()};var Re={OPEN:"open",BREAKPOINT:"breakpoint",LOGIN:"login",RESUME_BREAKPOINT:"resume_breakpoint",LOGIN_RESPONSE:"login_response",LOG:"log",LOGS:"logs",EXCEPTION:"exception",USER_LOGIN:"user_login",USER_LOGOUT:"user_logout",ONLINE_USERS:"online_users",SET_FILE_ID:"set_file_id",INTO_FILE_ID:"into_file_id",PING:"ping",PONG:"pong"},F={DO_SAVE:"doSave",DO_TEST:"doTest",LOGINED:"logined",LOGOUT:"logout",DO_DOWNLOAD:"do-download",DO_UPLOAD:"do-upload",DO_PUSH:"do-push",DO_RECENT:"do-recent",OPEN:"open",SELECT_NAVBAR_BY_ITEM:"select-navbar-by-item",OPEN_WITH_ID:"open-with-id",OPEN_ITEM:"open-item",DELETE_FILE:"delete-file",DEBUG_CONTINUE:"debug-continue",DEBUG_SETPINTO:"debug-setpinto",SWITCH_THEME:"switch-theme",OPEN_GROUP:"open-group",SWITCH_TOOLBAR:"switch-toolbar",STATUS:"status",MESSAGE:"message",CLOSE:"close",OPEN_EMPTY:"open-empty",LOAD_RESOURCES:"load-resources",REFRESH_RESOURCE:"refresh-resource",DO_SEARCH:"doSearch",NOTIFY:"notify",RELOAD_RESOURCES:"reload-resources",RELOAD_RESOURCES_FINISH:"reload-resources-finish",LOAD_RESOURCES_FINISH:"load-resources-finish",ADD_FOOTER_TOOLBAR:"add-footer-toolbar"};const po=A("div",{class:"magic-mounts"},null,-1),_o={props:{config:{type:Object,required:!0}},setup(e){const t=e;uo(),Ke("bus",S),self.MonacoEnvironment={getWorker:function(N,$){return $==="json"?new os:$==="html"?new rs:new ls}},t.config.header=t.config.header||{};const n=U(!1),a=U(null),s=U(null),i=U(!1),o=U(null);Ke("ELEMENT_ROOT",s),Ke("activateUserFiles",U({}));let r=null;const l=t.config;M.BASE_URL=l.baseURL||"",M.SERVER_URL=l.serverURL||"";let u=`${location.protocol}//${location.host}${location.pathname}`.replace("/index.html","");M.BASE_URL.startsWith("http")?u=M.BASE_URL:M.BASE_URL.startsWith("/")?u=`${location.protocol}/${location.host}${M.BASE_URL}`:u=u+"/"+M.BASE_URL,l.blockClose!==!1&&(window.onbeforeunload=()=>"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002");const p=l.request||{beforeSend:N=>N,onError:N=>Promise.reject(N)};z.getAxios().interceptors.request.use(N=>p.beforeSend&&p.beforeSend(N)||N,N=>p.onError&&p.onError(N)||Promise.reject(N));const m=l.response||{onSuccess:N=>N,onError:N=>Promise.reject(N)};z.getAxios().interceptors.response.use(N=>m.onSuccess&&m.onSuccess(N)||N,N=>m.onError&&m.onError(N)||Promise.reject(N)),z.setBaseURL(M.BASE_URL),M.AUTO_SAVE=l.autoSave!==!1,S.status("message.loadClass"),Ke("i18n.format",c);const f=()=>new Promise(N=>{z.sendGet("/plugins").success($=>Promise.all(($||[]).filter(Y=>Y.javascriptFilename).map(Y=>new Promise(re=>{S.status("plugin.loading",!0,Y.name),ri(it(u+"/plugins/"+Y.javascriptFilename)).then(()=>{M.PLUGINS.push(window[Y.globalName]({i18n:{add:xs,format:c},request:z,constants:M,Message:F,bus:S,modal:ve,JavaClass:ne,monaco:cs})),S.status("plugin.loaded",!0,Y.name),re()}).catch(ie=>{S.status("plugin.loadFailed",!1,Y.name),re()})}))).then(()=>N())).error(()=>N())}),y=St().appContext.app;Promise.all([ne.initClasses(),ne.initImportClass(),f()]).then(()=>S.status("message.loadClassFinish")).catch(N=>{S.status("message.loadClassError")}).finally(()=>{M.PLUGINS.forEach(N=>{N.datasources&&N.datasources.filter($=>$.component).forEach($=>{y.component(`magic-datasource-${$.type}`,$.component)})}),i.value=!0});const E=t.config.options||[];Ke("options",E),z.sendGet("/options").success(N=>{N.forEach($=>E.push($))});const C=()=>{M.LOGINED=!0,r=new qt(it(u.replace(/^http/,"ws")+"/console")),be(()=>a.value.loadResources())};S.$on(F.LOGINED,C);const I=()=>{fetch("https://console.ssssssss.org.cn/latest?group=org.ssssssss&artifactId=magic-api&from="+M.MAGIC_API_VERSION_TEXT).then(N=>{t.config.checkUpdate!==!1&&N.status===200&&N.json().then($=>{$.version&&$.version!=="unknown"&&M.config.version!==$.version?(S.status("message.newVersionRelease",!0,$.version),$.version!==Fe.get(M.IGNORE_VERSION)&&S.$emit(F.NOTIFY,{title:c("message.tips"),icon:"warning",content:c("message.versionUpdate",$.version),buttons:[{title:c("message.changelog"),onClick:()=>{window.open("http://www.ssssssss.org/magic-api/changelog.html")}},{title:c("message.ignore"),onClick:()=>{Fe.set(M.IGNORE_VERSION,$.version)}}]})):S.status("message.versionLastest")})})},O=()=>l.getMagicTokenValue&&l.getMagicTokenValue()||Fe.get(M.STORE.token)||M.HEADER_MAGIC_TOKEN_VALUE,v=()=>new Promise(N=>{M.HEADER_MAGIC_TOKEN_VALUE=O(),S.status("message.tryAutoLogin"),z.sendPost("/login").success($=>{n.value=!$,$&&be(()=>{S.status("message.autoLoginSuccess"),S.$emit(F.LOGINED)})}).end(N)}),T=()=>{typeof hideMaLoading=="function"&&hideMaLoading()},R=()=>{z.execute({url:"/config.json",method:"get"}).then(N=>{if(M.config=N.data,t.config.inJar&&location.href.indexOf(N.data.web)>-1){let $=location.href.substring(0,location.href.indexOf(N.data.web));M.SERVER_URL=it($+"/"+(N.data.prefix||""))}M.config.version&&M.config.version!==M.MAGIC_API_VERSION_TEXT&&(S.status("message.versionConflict",!1,M.MAGIC_API_VERSION_TEXT,M.config.version),S.$emit(F.NOTIFY,{icon:"error",title:c("message.versionCheck"),content:c("message.versionConflict",M.MAGIC_API_VERSION_TEXT,M.config.version)})),v().then(()=>{T(),I()})}).catch(N=>{console.error(N),T(),o.value=c("message.loadConfigError")})},D=()=>{const N=document.body;ce.bind(N,ce.Ctrl|ce.S,()=>S.$emit(F.DO_SAVE,!0)),ce.bind(N,ce.Ctrl|ce.Q,()=>S.$emit(F.DO_TEST)),ce.bind(N,ce.Ctrl|ce.E,()=>S.$emit(F.DO_RECENT)),ce.bind(N,ce.F8,()=>S.$emit(F.DEBUG_CONTINUE)),ce.bind(N,ce.F6,()=>S.$emit(F.DEBUG_SETPINTO)),ce.bind(N,ce.Ctrl|ce.Shift|ce.F,()=>S.$emit(F.DO_SEARCH))};ht(()=>{D()}),Xa(()=>ce.unbind());const L=Je({});return un("default",Ms),un("dark",Ps),Object.keys(l.themes||{}).forEach(N=>{un(N,l.themes[N])}),M.THEME=l.theme||"default",M.DEFAULT_EXPAND=l.defaultExpand!==!1,M.JDBC_DRIVERS=l.jdbcDrivers||M.JDBC_DRIVERS,M.DATASOURCE_TYPES=l.datasourceTypes||M.DATASOURCE_TYPES,l.editorFontFamily!==void 0&&(M.EDITOR_FONT_FAMILY=l.editorFontFamily),l.editorFontSize!==void 0&&(M.EDITOR_FONT_SIZE=l.editorFontSize),M.FONT_LIGATURES=l.fontLigatures!==!1,l.logMaxRows!==void 0&&(M.LOG_MAX_ROWS=Math.max(l.logMaxRows,10)),l.decorationTimeout!==void 0&&(M.DECORATION_TIMEOUT=l.decorationTimeout),S.$on(F.MESSAGE,(N,$)=>{r&&($?r.send(`${N},${$}`):r.send(N))}),S.$event(Re.OPEN,()=>{M.CLIENT_ID=ai(16),be(()=>S.send(Re.LOGIN,[O(),M.CLIENT_ID].join(",")))}),S.$event(Re.LOGIN_RESPONSE,([N,$])=>{N==="1"&&(M.user=$)}),S.$on(F.LOGOUT,()=>{n.value=!0,r&&r.close(),r=null}),(N,$)=>{const Y=b("magic-login"),re=b("magic-header"),ie=b("magic-main"),Q=b("magic-status-bar"),ye=b("magic-notify");return g(),w("div",{class:"magic-editor",style:ze(h(L)),onContextmenu:$[2]||($[2]=Se(()=>{},["prevent"])),ref_key:"root",ref:s},[yt(_(Y,{value:n.value,"onUpdate:value":$[0]||($[0]=Te=>n.value=Te),error:o.value,"onUpdate:error":$[1]||($[1]=Te=>o.value=Te)},null,8,["value","error"]),[[$t,n.value]]),i.value?(g(),j(re,{key:0,themeStyle:h(L),header:h(l).header,title:h(l).title},null,8,["themeStyle","header","title"])):X("",!0),i.value?(g(),j(ie,{key:1,ref_key:"componentMain",ref:a,onOnLoad:R},null,512)):X("",!0),i.value?(g(),j(Q,{key:2,config:h(l)},null,8,["config"])):X("",!0),i.value?(g(),j(ye,{key:3})):X("",!0),po],36)}}};var ho=Object.freeze(Object.defineProperty({__proto__:null,default:_o},Symbol.toStringTag,{value:"Module"}));var q=(e,t)=>{const n=e.__vccOpts||e;for(const[a,s]of t)n[a]=s;return n};const fo={props:{menus:Array,onDestory:Function,position:Object},data(){return{style:{left:this.position.x+"px",top:this.position.y+"px",element:U(null)}}},mounted(){document.addEventListener("click",this.onMouseup);const e=document.querySelector(".magic-editor").getBoundingClientRect(),t=e.x+e.width,n=e.y+e.height,a=this.$el.getBoundingClientRect();a.x+a.width>t&&(this.style.left=`${t-a.width}px`),a.y+a.height>n&&(this.style.top=`${n-a.height}px`)},unmounted(){document.removeEventListener("click",this.onMouseup)},methods:{onMouseup(){this.onDestory&&this.onDestory()}}},mo=["onClick"],go={key:0,class:"magic-context-menu-icon"},vo={class:"magic-context-menu-icon right"},Eo={class:"magic-context-menu none-select"},bo=["onClick"],yo={key:0,class:"magic-context-menu-icon"};function To(e,t,n,a,s,i){const o=b("magic-icon");return g(),w("ul",{class:"magic-context-menu none-select",style:ze(s.style),ref:"element"},[(g(!0),w(Z,null,he(n.menus,(r,l)=>(g(),w("li",{key:l,class:Ee({divided:r.divided}),onClick:Se(()=>{i.onMouseup(),r.onClick&&r.onClick()},["stop"])},[n.menus.some(u=>u.icon)?(g(),w("span",go,[r.icon?(g(),j(o,{key:0,icon:r.icon,size:"12px"},null,8,["icon"])):X("",!0)])):X("",!0),A("label",null,B(r.label),1),r.children?(g(),w(Z,{key:1},[A("span",vo,[_(o,{icon:"right",size:"12px"})]),A("ul",Eo,[(g(!0),w(Z,null,he(r.children,(u,p)=>(g(),w("li",{key:p,class:Ee({divided:u.divided}),onClick:Se(()=>{i.onMouseup(),u.onClick&&u.onClick()},["stop"])},[r.children.some(m=>m.icon)?(g(),w("span",yo,[u.icon?(g(),j(o,{key:0,icon:u.icon,size:"12px"},null,8,["icon"])):X("",!0)])):X("",!0),A("label",null,B(u.label),1)],10,bo))),128))])],64)):X("",!0)],10,mo))),128))],4)}var Ba=q(fo,[["render",To],["__scopeId","data-v-50740138"]]),So=Object.freeze(Object.defineProperty({__proto__:null,default:Ba},Symbol.toStringTag,{value:"Module"}));const Oo={class:"magic-empty"},xo={props:{text:{type:String,default:c("message.nodata")}},setup(e){return(t,n)=>(g(),w("div",Oo,[A("p",null,B(e.text),1)]))}};var Ro=q(xo,[["__scopeId","data-v-70308d5a"]]),Ao=Object.freeze(Object.defineProperty({__proto__:null,default:Ro},Symbol.toStringTag,{value:"Module"}));const Io={class:"icon"},Co={props:{loading:Boolean,loadingText:{type:String,default:c("message.loading")},style:Object},setup(e){return(t,n)=>{const a=b("magic-icon");return e.loading?(g(),w("div",{key:0,class:"magic-loading",style:ze(e.style)},[A("p",null,[A("span",Io,[_(a,{icon:"refresh",size:"20px"})]),_e(" "+B(e.loadingText),1)])],4)):Ot(t.$slots,"default",{key:1},void 0,!0)}}};var Lo=q(Co,[["__scopeId","data-v-19c11c56"]]),No=Object.freeze(Object.defineProperty({__proto__:null,default:Lo},Symbol.toStringTag,{value:"Module"}));const wo={props:{language:{type:String,required:!0},editorConfig:{type:Object,default:{}},value:Array},setup(){return{instance:null,instancePromise:null}},mounted(){this.instance=Be.createDiffEditor(this.$refs.editor,Ue(pe({},this.editorConfig),{enableSplitViewResizing:!1,language:this.language,minimap:{enabled:!1},folding:!1,lineDecorationsWidth:20,wordWrap:"on",fixedOverflowWidgets:!1,fontFamily:M.EDITOR_FONT_FAMILY,fontSize:M.EDITOR_FONT_SIZE,fontLigatures:M.FONT_LIGATURES,renderWhitespace:"none",theme:M.THEME,readOnly:this.readonly===!0,value:this.value||"",automaticLayout:!0})),this.instance.setModel({original:Be.createModel(this.value[0],this.language),modified:Be.createModel(this.value[1],this.language)}),tt(()=>this.language,()=>{nextTick(()=>this.instance.setModel({original:Be.createModel(this.value[0],this.language),modified:Be.createModel(this.value[1],this.language)}))})},methods:{getEditorDom(){return this.$refs.editor},getInstance(){return this.instance}},watch:{value(e){this.instance.setModel({original:Be.createModel(e[0],this.language),modified:Be.createModel(e[1],this.language)})}}},ko={class:"magic-monaco-editor",ref:"editor"};function Do(e,t,n,a,s,i){return g(),w("div",ko,null,512)}var Mo=q(wo,[["render",Do],["__scopeId","data-v-59a04eab"]]),Po=Object.freeze(Object.defineProperty({__proto__:null,default:Mo},Symbol.toStringTag,{value:"Module"}));const Uo={props:{language:{type:String,required:!0},editorConfig:{type:Object,default:{}},value:String,decorations:Array,readonly:{type:Boolean,default:!1},supportBreakpoint:{type:Boolean,default:!1},matches:String},setup(){return{instance:null,instancePromise:null}},emits:["update:value","change","update:decorations"],mounted(){this.instance=Be.create(this.$refs.editor,Ue(pe({},this.editorConfig),{language:this.language,minimap:{enabled:!1},folding:!0,lineDecorationsWidth:this.supportBreakpoint?35:void 0,wordWrap:"on",fontFamily:M.EDITOR_FONT_FAMILY,fontSize:M.EDITOR_FONT_SIZE,fontLigatures:M.FONT_LIGATURES,renderWhitespace:"none",theme:M.THEME,readOnly:this.readonly===!0,value:this.value||"",automaticLayout:!0})),tt(()=>this.language,()=>{be(()=>this.instance.setModel(Be.createModel(this.instance.getModel().getValue(),this.language)))}),this.instance.onDidChangeModelContent(e=>{this.$emit("update:value",this.instance.getValue()),this.$emit("change",e),this.doValidate()}),this.instance.addAction({id:"editor.action.triggerSuggest.extension",label:c("editor.triggerSuggest"),precondition:"!suggestWidgetVisible && !markersNavigationVisible && !parameterHintsVisible && !findWidgetVisible",run:()=>{this.instance.trigger(null,"editor.action.triggerSuggest",{})}}),Xn.registerCommand("editor.action.appendHead",(e,t)=>{var n;((n=this.value)==null?void 0:n.indexOf(t))>-1||(this.instance.executeEdits("command",[{forceMoveMarkers:!0,text:t,range:new ot(1,0,1,0)}]),this.instance.setScrollTop(this.instance.getScrollTop()-22))}),this.instance.addCommand(ut.Alt|gt.US_SLASH,()=>{let e=this.instance.getAction("editor.action.triggerParameterHints"),t=this.instance.getAction("editor.action.triggerSuggest.extension");e.run().then(()=>{setTimeout(()=>{t.isSupported()&&t.run()},0)})},"!findWidgetVisible && !inreferenceSearchEditor && !editorHasSelection"),this.initKeys(),this.initDecorations()},methods:{doValidate(){if(this.instance&&Be.setModelMarkers(this.instance.getModel(),"validate",[{}]),this.language==="magicscript")try{new Yt(new ft(zt(this.instance.getValue()))).parse()}catch(e){if(e.span){let t=e.span.getLine();Be.setModelMarkers(this.instance.getModel(),"validate",[{startLineNumber:t.lineNumber,endLineNumber:t.endLineNumber,startColumn:t.startCol,endColumn:t.endCol,message:e.message,severity:us.Error}])}}},getEditorDom(){return this.$refs.editor},getScrollTop(){return this.instance&&this.instance.getScrollTop()},setScrollTop(e){this.instance&&this.instance.setScrollTop(e)},match(){this.matches&&be(()=>{let e=this.instance.getModel().findMatches(this.matches);e&&e.length>0&&this.instance.setSelections(e.map(({range:t})=>({positionColumn:t.endColumn,positionLineNumber:t.endLineNumber,selectionStartColumn:t.startColumn,selectionStartLineNumber:t.startLineNumber})))})},initKeys(){[["editor.action.triggerParameterHints",ut.Alt|gt.US_SLASH],["editor.action.triggerSuggest",ut.Alt|gt.US_SLASH],["toggleSuggestionDetails",ut.Alt|gt.US_SLASH,ps.deserialize("suggestWidgetVisible && textInputFocus")],["editor.action.formatDocument",ut.CtrlCmd|ut.Alt|gt.KEY_L],["editor.action.marker.nextInFiles",ut.CtrlCmd|gt.F8]].forEach(t=>{var i;let n=t[0];const{handler:a,when:s}=(i=Xn.getCommand(n))!=null?i:{};if(a){let o=ln._coreKeybindings.findIndex(r=>r.command===n);o>0&&ln._coreKeybindings.splice(o,1),this.instance._standaloneKeybindingService.addDynamicKeybinding(n,t[1],a,s||t[2])}}),ln._cachedMergedKeybindings=null},getInstance(){return this.instance},initDecorations(){this.instance.onMouseDown(e=>{if(!e.target.element.classList.contains("codicon")&&e.target.detail&&e.target.detail.offsetX&&e.target.detail.offsetX>=0&&e.target.detail.offsetX<=65){var t=e.target.position.lineNumber;if(this.instance.getModel().getLineContent(t).trim()==="")return;let a=this.instance.getLineDecorations(t).filter(s=>s.options.linesDecorationsClassName==="breakpoints");a&&a.length>0?this.instance.getModel().deltaDecorations([a[0].id],[]):this.instance.getModel().deltaDecorations([],[{range:new ot(t,1,t,1),options:{isWholeLine:!0,linesDecorationsClassName:"breakpoints",className:"breakpoint-line"}}]),this.updateDecoration()}})},appendDecoration(e){const t=this.instance.deltaDecorations([],e);return this.updateDecoration(),t},removedDecorations(e){this.instance.deltaDecorations(e,[]),this.updateDecoration()},updateDecoration(){this.$emit("update:decorations",this.instance.getModel().getAllDecorations())}},watch:{value(e){e!==this.instance.getValue()&&(this.instance.setValue(e||""),this.match())},matches(){this.match()}}},$o={class:"magic-monaco-editor",ref:"editor"};function Bo(e,t,n,a,s,i){return g(),w("div",$o,null,512)}var Fo=q(Uo,[["render",Bo],["__scopeId","data-v-9b3f02a8"]]),Ho=Object.freeze(Object.defineProperty({__proto__:null,default:Fo},Symbol.toStringTag,{value:"Module"}));const jo={props:{max:Number,min:Number,value:Number,direction:String,reverse:{type:Boolean,default:!1}},setup(e){return{style:U({[e.direction==="x"?"width":"height"]:(e.value||e.min)+"px"})}},mounted(){new ResizeObserver(this.updateCss).observe(this.$refs.resizer)},methods:{updateCss(){try{const e=this.$refs.resizer.parentElement;this.$refs.resizer.style.setProperty("--width",e.offsetWidth+"px"),this.$refs.resizer.style.setProperty("--height",e.offsetHeight+"px")}catch{}},mousedown(e){const t=this.direction==="x",n=t?e.clientX:e.clientY,a=e.target.parentElement.getBoundingClientRect();document.onmousemove=s=>{let i=t?a.width:a.height;t?this.reverse?i=n-s.clientX+a.width:i=s.clientX-n+a.width:this.reverse?i=s.clientY-n+a.height:i=n-s.clientY+a.height,i>=this.min&&i<=this.max&&(this.style[t?"width":"height"]=`${i}px`)},document.onmouseup=()=>{document.onmousemove=document.onmouseup=null},e.stopPropagation(),e.preventDefault()}}};function Vo(e,t,n,a,s,i){return g(),w("div",{class:Ee(`magic-resizer-${this.direction}`),style:ze(a.style)},[Ot(e.$slots,"default",{},void 0,!0),A("div",{class:Ee(["magic-resizer-event",{reverse:n.reverse}]),onMousedown:t[0]||(t[0]=(...o)=>i.mousedown&&i.mousedown(...o)),ref:"resizer"},null,34)],6)}var Go=q(jo,[["render",Vo],["__scopeId","data-v-032bc45e"]]),zo=Object.freeze(Object.defineProperty({__proto__:null,default:Go},Symbol.toStringTag,{value:"Module"}));const Yo={class:"magic-navbar-item"},qo={props:{title:String,style:Object,show:{type:Boolean,default:!0},to:HTMLElement},setup(e){return(t,n)=>(g(),w("div",Yo,[Ot(t.$slots,"default",{},void 0,!0)]))}};var Ko=q(qo,[["__scopeId","data-v-30388e35"]]),Wo=Object.freeze(Object.defineProperty({__proto__:null,default:Ko},Symbol.toStringTag,{value:"Module"})),Xo=`/* \u5BFC\u822A\u6761 */\r
+.magic-navbar {\r
+ display: flex;\r
+ background-color: var(--main-background-color);\r
+ transition: 0.3s;\r
+}\r
+\r
+.magic-navbar .magic-navbar-body {\r
+ background-color: var(--navbar-body-background-color);\r
+ overflow: auto;\r
+}\r
+.magic-navbar .magic-navbar-header li:hover {\r
+ background-color: var(--main-hover-background-color);\r
+}\r
+.magic-navbar .magic-navbar-header li.selected {\r
+ background-color: var(--main-selected-background-color);\r
+ color: var(--main-selected-color);\r
+}\r
+.magic-navbar .magic-navbar-header li.selected svg text{\r
+ fill: var(--main-selected-color);\r
+}\r
+.magic-navbar .magic-navbar-header li svg text{\r
+ letter-spacing: 0px;\r
+ font-size: 10px;\r
+}\r
+/* \u5782\u76F4\u5BFC\u822A\u6761 */\r
+.magic-navbar__vertical.reverse {\r
+ flex-direction: row-reverse;\r
+}\r
+.magic-navbar__vertical .magic-navbar-header li {\r
+ display: flex;\r
+ flex-direction: column;\r
+ align-items: center;\r
+ overflow: hidden;\r
+ padding: 8px 3px;\r
+ cursor: pointer;\r
+ border-bottom: 1px solid var(--main-border-color);\r
+}\r
+.magic-navbar__vertical .magic-navbar-header {\r
+ width: 22px;\r
+ height: 100%;\r
+ letter-spacing: 2px;\r
+ text-align: center;\r
+ padding: 0;\r
+ border-right: 1px solid var(--main-border-color);\r
+}\r
+.magic-navbar__vertical.reverse .magic-navbar-header {\r
+ border-left: 1px solid var(--main-border-color);\r
+ border-right: none;\r
+}\r
+.magic-navbar__vertical.reverse .magic-navbar-header li {\r
+ display: flex;\r
+ flex-direction: column-reverse;\r
+}\r
+\r
+.magic-navbar__vertical .magic-navbar-header li {\r
+ line-height: 14px;\r
+ word-break: break-all;\r
+}\r
+\r
+.magic-navbar__vertical .magic-navbar-body {\r
+ flex: 1;\r
+}\r
+.magic-navbar__vertical .magic-navbar-body {\r
+ border-right: 1px solid var(--navbar-body-border-color);\r
+}\r
+.magic-navbar__vertical.reverse .magic-navbar-body {\r
+ border-left: 1px solid var(--navbar-body-border-color);\r
+ border-right: none;\r
+}\r
+\r
+/* \u6C34\u5E73\u5BFC\u822A\u6761 */\r
+.magic-navbar__horizontal > ul {\r
+ width: 100%;\r
+}\r
+.magic-navbar__horizontal > ul li {\r
+ display: inline-flex;\r
+ flex-direction: row-reverse;\r
+ padding: 0 8px;\r
+ height: 24px;\r
+ line-height: 24px;\r
+ cursor: pointer;\r
+ color: var(--main-color);\r
+}\r
+.magic-navbar__horizontal > ul li svg.magic-icon {\r
+ height: 100%;\r
+ margin-right: 4px;\r
+}\r
+.magic-navbar__horizontal > ul {\r
+ border-top: 1px solid var(--main-border-color);\r
+}\r
+.magic-navbar.magic-navbar__vertical .magic-navbar-title{\r
+ padding-bottom: 4px;\r
+}\r
+.magic-navbar.magic-navbar__vertical.reverse .magic-navbar-title{\r
+ padding-top: 4px;\r
+ padding-bottom: 0px;\r
+}\r
+`,Jo=Object.freeze(Object.defineProperty({__proto__:null,default:Xo},Symbol.toStringTag,{value:"Module"}));const Qo={"aria-hidden":"true",class:"magic-icon"},Zo=["xlink:href"],er={props:{prefix:{type:String,default:"magic-icon"},icon:String,size:String},setup(e){const t=e,n=me(()=>t.icon&&t.icon.startsWith("#")?t.icon:`#${t.prefix}-${t.icon}`),a=me(()=>t.icon&&t.icon.startsWith("#")?t.icon.substring(1):`${t.prefix}-${t.icon}`);return(s,i)=>(g(),w("svg",Qo,[A("use",{"xlink:href":h(n),class:Ee(h(a))},null,10,Zo)]))}};var Vn=q(er,[["__scopeId","data-v-15383e92"]]),tr=Object.freeze(Object.defineProperty({__proto__:null,default:Vn},Symbol.toStringTag,{value:"Module"}));var nr={props:{direction:{type:String,default:""},reverse:{type:Boolean,default:!1},defaultSelect:{type:Number,default:0},allowClose:{type:Boolean,default:!0},spliter:Boolean,value:Array,to:HTMLElement},setup(e,t){const n=U(e.defaultSelect);return{slots:me(()=>t.slots.default()[0].children),navbars:me(()=>t.slots.default()[0].children.flatMap(a=>a.props)),selectIndex:n}},methods:{select(e){this.selectIndex=e}},render(){const e=a=>{const s=parseInt(Math.random()*1e8),i=a.length*6;return le("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:22,height:i},[le("defs",le("path",{id:`path-text-${s}`,d:this.reverse?`M6,0 L6,${i}`:`M14,${i} L14,0`})),le("text",{fill:"var(--main-color)"},le("textPath",{"xlink:href":`#path-text-${s}`},a))])},t=a=>{if(this.spliter&&this.direction==="vertical"&&a.match(/\w/g)){const s=[];let i="",o=1,r;const l=a.split("");for(let u=0,p=l.length;u{const i=[le("div",{class:"magic-navbar-title"},[...t(a.title)])];a.icon&&i.push(le(Vn,{icon:a.icon}));const o=a.style||{};return a.show===!1&&(o.display="none"),le("li",{class:this.selectIndex===s?"selected":"",style:o,onClick:()=>{this.selectIndex===s&&this.allowClose?this.selectIndex=-1:this.selectIndex=s}},i)}))];return this.slots.forEach((a,s)=>{const i=s!==this.selectIndex||a.props.show===!1?{display:"none"}:{};this.to?n.push(le(ha,{to:this.to},le("div",{class:"magic-navbar-body",style:i},a))):n.push(le("div",{class:"magic-navbar-body",style:i},a))}),le("div",{class:`magic-navbar magic-navbar__${this.direction}`+(this.reverse?" reverse":"")},n)}},ar=Object.freeze(Object.defineProperty({__proto__:null,default:nr},Symbol.toStringTag,{value:"Module"})),sr=`.magic-tab {\r
+ width: 100%;\r
+ overflow: hidden;\r
+ flex-wrap: nowrap;\r
+ white-space: nowrap;\r
+ transition: 0.3s;\r
+}\r
+.magic-tab ul {\r
+ overflow-x: auto;\r
+}\r
+.magic-tab ul li {\r
+ display: inline-block;\r
+ cursor: pointer;\r
+ padding: 0 10px;\r
+ height: 24px;\r
+ line-height: 24px;\r
+}\r
+.magic-tab ul li.selected,\r
+.magic-tab ul li:hover,\r
+.magic-tab.magic-script-tab ul li.selected:hover,\r
+.magic-tab ul li.draggable-target-item {\r
+ background-color: var(--main-hover-background-color);\r
+}\r
+.magic-tab.magic-script-tab {\r
+ border-bottom: 1px solid var(--main-border-color);\r
+ height: 30px;\r
+ position: absolute;\r
+}\r
+.magic-tab.magic-script-tab ul li {\r
+ height: 30px;\r
+ line-height: 30px;\r
+ border-bottom: 3px solid transparent;\r
+}\r
+.magic-tab.magic-script-tab ul li.selected {\r
+ border-bottom-color: #4083c9;\r
+ background-color: var(--tab-selected-background-color);\r
+}\r
+`,ir=Object.freeze(Object.defineProperty({__proto__:null,default:sr},Symbol.toStringTag,{value:"Module"}));var or={props:{tabs:Array,className:String,value:Object,allowClose:{type:Boolean}},emits:["update:value","change","close","item-contextmenu","before-change"],setup(e){const t=U({}),n=U({});function a(o,r,l){switch(l){case"dragstart":t.value=o,r.stopPropagation();break;case"dragenter":n.value=o,r.stopPropagation();break;case"dragend":if(t.value!==n.value){const u=e.tabs.indexOf(t.value),p=e.tabs.indexOf(n.value);e.tabs.splice(u,1),e.tabs.splice(p,0,t.value)}n.value={},r.stopPropagation();break;case"dragover":t.value!==n.value&&r.preventDefault();break}}const s=U({});function i(o){let r=o.wheelDelta||o.detail;s.value.value.el.scrollLeft+=r>0?-100:100}return{selectIndex:U(0),draggableItem:t,draggableTargetItem:n,tabDraggable:a,scrollbar:s,scrollbarHandler:i,scrollId:"",scrollItem:U(null)}},mounted(){be(()=>{this.scrollbar.value.el.addEventListener("DOMMouseScroll",this.scrollbarHandler,!1),this.scrollbar.value.el.addEventListener("mousewheel",this.scrollbarHandler,!1)})},methods:{scrollIntoView(e){this.scrollId="s"+new Date().getTime()+parseInt(Math.random()*1e7),this.scrollItem=e,be(()=>{const t=document.querySelector("#"+this.scrollId);t&&t.scrollIntoView(!0)})}},destroyed(){be(()=>{this.scrollbar.value.el.removeEventListener("DOMMouseScroll",this.scrollbarHandler),this.scrollbar.value.el.removeEventListener("mousewheel",this.scrollbarHandler)})},render(){const e=this.tabs&&le("ul",this.tabs.map((t,n)=>{const a=[this.$slots.default({tab:t})];return this.allowClose&&a.push(le(Vn,{icon:"close",size:"12px",style:{marginLeft:"5px"},onClick:s=>{this.$emit("close",t),s.stopPropagation(),s.preventDefault()}})),le("li",{class:[this.value===t?"selected":"",t===this.draggableTargetItem?"draggable-target-item":""],id:this.scrollItem===t||this.scrollItem===t.id?this.scrollId:void 0,onClick:s=>{this.value!==t&&(this.$emit("before-change",this.value),this.$emit("update:value",t),this.$emit("change",t)),s.stopPropagation(),s.preventDefault()},onMousedown:s=>{s.which===2&&this.allowClose&&this.$emit("close",t)},onContextmenu:s=>{this.$emit("item-contextmenu",s,t,n),s.preventDefault()},draggable:!0,onDragenter:s=>this.tabDraggable(t,s,"dragenter"),onDragstart:s=>this.tabDraggable(t,s,"dragstart"),onDragend:s=>this.tabDraggable(t,s,"dragend"),onDragover:s=>this.tabDraggable(t,s,"dragover")},a)}));return this.scrollbar.value=e,le("div",{class:"magic-tab none-select"+(this.className?" "+this.className:"")},e)}},rr=Object.freeze(Object.defineProperty({__proto__:null,default:or},Symbol.toStringTag,{value:"Module"}));const lr={class:"magic-table-row"},Fa={props:{title:String,row:Object,flex:String,width:String,align:String},setup(e){return(t,n)=>(g(),w("div",lr,[Ot(t.$slots,"default",{row:e.row})]))}};var cr=Object.freeze(Object.defineProperty({__proto__:null,default:Fa},Symbol.toStringTag,{value:"Module"})),ur=`/* \u8868\u683C */\r
+.magic-table{\r
+ display: flex;\r
+ flex-direction: column;\r
+ box-sizing: border-box;\r
+}\r
+.magic-table .magic-table-body{\r
+ flex: 1;\r
+ overflow: auto;\r
+}\r
+.magic-table .magic-table-header,\r
+.magic-table .magic-table-body .magic-table-row {\r
+ display: flex;\r
+ height: 24px;\r
+ line-height: 24px;\r
+ border-bottom: 1px solid var(--main-border-color);\r
+}\r
+.magic-table .magic-table-body .magic-table-row:hover{\r
+ background-color: var(--main-hover-background-color);\r
+}\r
+.magic-table .magic-table-column {\r
+ flex: 1;\r
+ display: inline-flex;\r
+}\r
+\r
+.magic-table .magic-table-column span:last-child{\r
+ flex: 1;\r
+ overflow: hidden;\r
+ text-overflow: ellipsis;\r
+ width: 0px;\r
+ white-space: pre;\r
+}\r
+\r
+.magic-table .magic-table-column .magic-select{\r
+ width: 100%;\r
+}\r
+.magic-table__border .magic-table-body .magic-table-row{\r
+ border-bottom: 1px solid var(--table-border-color);\r
+}\r
+.magic-table__border .magic-table-column:not(:last-child){\r
+ border-right: 1px solid var(--table-border-color);\r
+}`,pr=Object.freeze(Object.defineProperty({__proto__:null,default:ur},Symbol.toStringTag,{value:"Module"}));var dr={props:{data:{type:Array,default:[]},width:String,border:{type:Boolean,default:!1},align:{type:String,default:"center"}},emits:["clickRow","contextmenu","loadNext"],render(){const e=this.$slots.default(),t=n=>{n=n||{};let a=[];if(n.width){let s=`width: ${n.width}`;!n.width.endsWith("%")&&!isNaN(n.width)&&(s+="px"),a.push(s),a.push("flex:none")}else n.flex&&a.push(`flex: ${n.flex}`);return(n.align||this.align)&&a.push(`justify-content: ${n.align||this.align};text-align: ${n.align||this.align}`),a.join(";")};return le("div",{class:"magic-table"+(this.border?" magic-table__border":"")},[le("div",{class:"magic-table-header none-select"},e.map(n=>le("div",{class:"magic-table-column",title:n.props.title,style:t(n.props)},le("span",n.props.title)))),le("div",{class:"magic-table-body",onScroll:n=>{n.target.scrollTop+n.target.offsetHeight+40>=n.target.scrollHeight&&this.$emit("loadNext")}},this.data.map((n,a)=>le(Fa,{row:n,onClick:()=>{this.$emit("clickRow",a)}},{default:()=>e.map(s=>le("div",{class:"magic-table-column",onContextmenu:i=>{this.$emit("contextmenu",i,n),i.stopPropagation(),i.preventDefault()},style:t(s.props)},s.children.default({row:n})))})))])}},_r=Object.freeze(Object.defineProperty({__proto__:null,default:dr},Symbol.toStringTag,{value:"Module"})),hr=`/* \u6811\u5F62\u83DC\u5355 */\r
+.magic-tree{\r
+ position: relative;\r
+ overflow: auto;\r
+}\r
+.magic-tree > ul {\r
+ position: absolute;\r
+ top: 0;\r
+ left: 0;\r
+}\r
+.magic-tree .magic-tree-item {\r
+ height: 20px;\r
+ line-height: 20px;\r
+ transition: 0.3s;\r
+ word-break: break-all;\r
+ white-space: nowrap;\r
+ /* display: inline-flex;\r
+ min-width: 100%; */\r
+}\r
+.magic-tree .magic-tree-item:hover,\r
+.magic-tree .magic-tree-item.selected,\r
+.magic-tree .magic-tree-item.draggable-target-item {\r
+ background-color: var(--tree-hover-background-color);\r
+}\r
+.magic-tree .magic-tree-item .magic-icon {\r
+ fill: var(--tree-icon-color);\r
+ margin-right: 2px\r
+}\r
+.magic-tree ul {\r
+ max-height: 99999px;\r
+ min-width: 100%;\r
+}\r
+.magic-tree li{\r
+ /* min-width: 100%; */\r
+ white-space: nowrap;\r
+ word-break: break-all;\r
+}\r
+.magic-tree .hide {\r
+ opacity: 0;\r
+ max-height: 0;\r
+ position: relative;\r
+ /* transition: 0.2s display ease1s; */\r
+}\r
+.magic-tree svg:not(.root) .magic-icon-datasource{\r
+ fill: #089910;\r
+}\r
+`,fr=Object.freeze(Object.defineProperty({__proto__:null,default:hr},Symbol.toStringTag,{value:"Module"}));var mr={props:{data:Array,sort:Boolean,descending:Boolean,filter:String,filterText:Function,selected:Object,draggable:{type:Boolean,default:!1},onMove:{type:Function,defeault:()=>new Promise(e=>e(!0))}},emits:["drag","contextmenu","onMove","itemClick"],setup(e,t){const n=t.emit,a=Je({item:{},itemParent:{},target:{},targetParent:{}});function s(i,o,r,l){function u(){return!(a.item===a.target||a.itemParent===a.target||!a.target.folder&&a.itemParent===a.targetParent)}switch(l){case"dragstart":a.item=o,a.itemParent=i,r.stopPropagation();break;case"dragenter":a.target=o,a.targetParent=i,r.stopPropagation();break;case"dragover":u()&&r.preventDefault();break;case"dragend":if(!u())break;e.onMove(o,a.target||a.targetParent).then(p=>{if(p){const m=a.itemParent||{children:e.data};m.children.splice(m.children.indexOf(o),1),a.target.folder?(a.target.children=a.target.children||[],a.target.children.push(a.item)):(a.targetParent.children=a.targetParent.children||[],a.targetParent.children.push(a.item)),e.sort&&Nt(a.target.folder?a.target.children:a.targetParent.children,e.descending,"name"),a.target={},a.targetParent={}}}),r.stopPropagation();break}n("drag",l,a,r)}return e.sort&&(Nt(e.data,e.descending,"name","children"),tt(()=>e.data,i=>{Nt(e.data,e.descending,"name","children")}),tt(()=>e.descending,i=>{Nt(e.data,e.descending,"name","children")})),{draggableItem:a,itemDraggable:s}},data(){return{scrollId:"",scrollItem:U(null)}},methods:{scrollIntoView(e){this.scrollId="s"+new Date().getTime()+parseInt(Math.random()*1e7),this.scrollItem=e;const t=n=>{let a=!1;for(const s in n){const i=n[s];if(a=i===e){i.opened!==void 0&&(i.opened=!0);break}else if(i.children&&i.children.length>0&&(a=t(i.children))){i.opened=!0;break}}return a};t(this.data)&&be(()=>{const n=document.querySelector("#"+this.scrollId);n&&n.scrollIntoView(!0)})}},render(){const e=n=>this.filter?this.filterText(je(n)).indexOf(this.filter)>-1||n.children&&n.children.some(a=>e(a)):!0,t=(n,a,s)=>{const i=s>0?{paddingLeft:`${s*17}px`}:{};return e(a)&&le("li",{onDblclick:o=>{a.folder&&(a.opened=!a.opened),o.stopPropagation(),o.preventDefault()},onClick:o=>{this.$emit("itemClick",a),o.stopPropagation(),o.preventDefault()},onContextmenu:o=>{this.$emit("contextmenu",a,o),o.stopPropagation(),o.preventDefault()},draggable:this.draggable,onDragenter:o=>this.itemDraggable(n,a,o,"dragenter"),onDragstart:o=>this.itemDraggable(n,a,o,"dragstart"),onDragend:o=>this.itemDraggable(n,a,o,"dragend"),onDragover:o=>this.itemDraggable(n,a,o,"dragover")},[le("div",{class:["magic-tree-item",a===this.draggableItem.target?"draggable-target-item":"",a===this.selected?"selected":""],style:i,id:this.scrollItem===a||this.scrollItem===a.id?this.scrollId:void 0},a.folder?this.$slots.folder({item:a}):this.$slots.file({item:a})),a.folder&&a.opened&&le("ul",{class:a.opened&&"opened"||"hide"},a.children&&a.children.map(o=>t(a,o,s+1)))])};return le("div",{class:"magic-tree none-select"},le("ul",{},this.data&&this.data.map(n=>t(null,n,0))))}},gr=Object.freeze(Object.defineProperty({__proto__:null,default:mr},Symbol.toStringTag,{value:"Module"}));const vr=["onMousedown"],Er={props:{value:{type:Boolean,default:!0},className:String,showClose:{type:Boolean,default:!0},shade:{type:Boolean,default:!0},padding:{type:String,default:"5px 10px"},height:{type:String,default:"auto"},width:{type:String,default:"auto"},moveable:{type:Boolean,default:!0},overflow:{type:String,default:"auto"},top:String,maxHeight:String,maxWidth:String,contentHeight:String,title:String,content:String,onClose:Function},emits:["update:value","onClose"],setup(e,{expose:t,emit:n}){const a=e,s=U(a.top||"auto"),i=U("auto"),o=U("relative"),r=U(null);function l(){n("update:value",!1)}const u=()=>{n("close"),typeof a.onClose=="function"&&a.onClose(),l()};let p,m=!1,f,y;function E(R){a.moveable&&(p=R,f=R.target.parentNode.getBoundingClientRect(),y=document.getElementsByClassName("magic-editor")[0].getBoundingClientRect(),m=!0)}function C(R){if(a.moveable&&m){let D=Math.min(Math.max(f.top+(R.pageY-p.pageY),y.y),y.y+y.height-f.height),L=Math.min(Math.max(f.left+(R.pageX-p.pageX),y.x),y.x+y.width-f.width);s.value=D+"px",i.value=L+"px",o.value="absolute"}}let I=!1;const O=()=>{!I&&r.value&&(o.value="absolute",i.value=r.value.getBoundingClientRect().x+"px"),I=!0};a.top&&Ja(O);const v=R=>{a.showClose&&R.keyCode===27&&u()};function T(R){m=!1}return t({close:u}),(R,D)=>{const L=b("magic-icon");return e.value?(g(),j(ha,{key:0,to:".magic-editor"},[A("div",{class:Ee(["magic-dialog",(e.shade?"magic-dialog__shade":"")+(e.className?" "+e.className:"")]),tabindex:"1",onMousemove:C,onMouseup:T,onKeydown:v},[A("div",{class:"magic-dialog-main",style:ze({position:o.value,top:s.value,left:i.value,width:e.width,height:e.height,"max-width":e.maxWidth}),ref_key:"dialog",ref:r},[A("div",{class:Ee(["magic-dialog-header none-select",{moveable:e.moveable}]),onMousedown:E},[_e(B(e.title)+" ",1),e.showClose?(g(),w("span",{key:0,onMousedown:Se(u,["stop"])},[_(L,{icon:"close"})],40,vr)):X("",!0)],34),A("div",{class:"magic-dialog-body",style:ze({padding:e.padding,"max-height":e.maxHeight,height:e.contentHeight,overflow:e.overflow})},[e.content?(g(),w(Z,{key:0},[_e(B(e.content),1)],64)):Ot(R.$slots,"default",{key:1},void 0,!0)],4)],4)],34)])):X("",!0)}}};var br=q(Er,[["__scopeId","data-v-3e8f0d71"]]),yr=Object.freeze(Object.defineProperty({__proto__:null,default:br},Symbol.toStringTag,{value:"Module"}));const Tr={class:"magic-notify"},Sr=["onClick"],Or=["innerHTML"],xr=["innerHTML"],Rr={setup(e){const t={error:'',warning:'',info:''},n=Je([]),a=i=>{const o=n.findIndex(r=>i.id===r.id);return o>-1&&n.splice(o,1),!0},s=i=>{i.icon=t[i.icon]||t.info,i.id=parseInt(Math.random()*1e7),n.push(i),i.duration&&setTimeout(()=>a(i),parseInt(i.duration))};return S.$on(F.NOTIFY,s),(i,o)=>{const r=b("magic-icon"),l=b("magic-button"),u=b("magic-button-group");return g(),w("div",Tr,[(g(!0),w(Z,null,he(h(n),(p,m)=>(g(),w("div",{class:"magic-notify-item",key:m},[A("div",{class:"close",onClick:f=>a(p)},[_(r,{icon:"close"})],8,Sr),A("h3",null,[(g(),w("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",innerHTML:p.icon},null,8,Or)),_e(B(p.title),1)]),A("p",{innerHTML:p.content},null,8,xr),p.buttons?(g(),j(u,{key:0},{default:k(()=>[(g(!0),w(Z,null,he(p.buttons,(f,y)=>(g(),j(l,{key:y,value:f.title,type:"link",onClick:()=>a(p)&&f.onClick()},null,8,["value","onClick"]))),128))]),_:2},1024)):X("",!0)]))),128))])}}};var Ar=q(Rr,[["__scopeId","data-v-11ebc230"]]),Ir=Object.freeze(Object.defineProperty({__proto__:null,default:Ar},Symbol.toStringTag,{value:"Module"}));const Cr={props:{align:{type:String,default:"left"}},setup(e){return(t,n)=>(g(),w("div",{class:Ee(["magic-button-group",e.align])},[Ot(t.$slots,"default",{},void 0,!0)],2))}};var Lr=q(Cr,[["__scopeId","data-v-70c60ab6"]]),Nr=Object.freeze(Object.defineProperty({__proto__:null,default:Lr},Symbol.toStringTag,{value:"Module"}));const wr={props:{value:String,type:String},setup(e){return(t,n)=>(g(),w("button",{onClick:n[0]||(n[0]=Se(a=>t.$emit("onClick"),["stop"])),class:Ee(["magic-button",e.type]),type:"button"},B(e.value),3))}};var kr=q(wr,[["__scopeId","data-v-2e4c463a"]]),Dr=Object.freeze(Object.defineProperty({__proto__:null,default:kr},Symbol.toStringTag,{value:"Module"}));const Mr=["checked"],Pr={props:{value:{type:[Number,Boolean],default:()=>!1},checkedHalf:{type:Boolean,default:!1}},setup(e){const t=new Date().getTime()+""+Math.floor(Math.random()*1e3);return(n,a)=>(g(),w("div",{class:"magic-checkbox",onClick:a[1]||(a[1]=Se(s=>n.$emit("click",s),["stop"]))},[A("input",{id:t,ref:"checkbox",type:"checkbox",onChange:a[0]||(a[0]=()=>{n.$emit("update:value",n.$refs.checkbox.checked),n.$emit("change",n.$refs.checkbox.checked)}),checked:e.value},null,40,Mr),A("label",{for:t,class:Ee({checkedHalf:e.checkedHalf&&e.value})},null,2)]))}};var Ur=q(Pr,[["__scopeId","data-v-22b807f1"]]),$r=Object.freeze(Object.defineProperty({__proto__:null,default:Ur},Symbol.toStringTag,{value:"Module"}));const Br={class:"magic-file"},Fr=["accept","multiple"],Hr={props:{value:[Object,String],placeholder:{type:String,default:c("message.chooseFile")},accept:String,multiple:{type:Boolean,default:!1},border:{type:Boolean,default:!0}},emits:["update:value"],setup(e,{emit:t}){const n=e,a=U(null),s=U(null),i=()=>{a.value.files[0]&&(s.value=Array.from(a.value.files).map(o=>o.name).join(",")),t("update:value",n.multiple?a.value.files:a.value.files[0])};return(o,r)=>{const l=b("magic-input"),u=b("magic-icon");return g(),w("div",Br,[A("input",{type:"file",style:{display:"none"},ref_key:"file",ref:a,onChange:i,accept:e.accept,multiple:e.multiple},null,40,Fr),_(l,{readonly:!0,style:{width:"100%"},placeholder:e.placeholder,onClick:()=>o.$refs.file.click(),value:s.value,border:e.border},null,8,["placeholder","onClick","value","border"]),_(u,{icon:"upload"})])}}};var jr=q(Hr,[["__scopeId","data-v-62524fc2"]]),Vr=Object.freeze(Object.defineProperty({__proto__:null,default:jr},Symbol.toStringTag,{value:"Module"}));const Gr=["value","placeholder","readonly","type","autocomplete"],zr={props:{value:[String,Number,Object],placeholder:String,defaultValue:[String,Number,Object],readonly:{type:Boolean,default:!1},type:{type:String,default:"text"},width:{type:String,default:"100%"},border:{type:Boolean,default:!0},onEnter:{type:Function,default:()=>{}}},emits:["update:value"],setup(e,{emit:t}){const n=e,a=Qa(()=>n.type==="password"?"new-password":null);!n.value&&n.defaultValue&&t("update:value",n.defaultValue);const s={width:n.width};return(i,o)=>(g(),w("input",{class:Ee(["magic-input",{"magic-input__border":e.border}]),value:e.value,placeholder:e.placeholder,readonly:e.readonly,style:s,type:e.type,onInput:o[0]||(o[0]=r=>i.$emit("update:value",r.target.value)),autocomplete:h(a),onKeypress:o[1]||(o[1]=Za(Se((...r)=>e.onEnter&&e.onEnter(...r),["stop"]),["enter"]))},null,42,Gr))}};var Yr=q(zr,[["__scopeId","data-v-f43ad66a"]]),qr=Object.freeze(Object.defineProperty({__proto__:null,default:Yr},Symbol.toStringTag,{value:"Module"}));const Kr={key:0},Wr=["placeholder"],Xr=["onClick"],Jr={props:{value:[Object,String,Number],options:Array,defaultSelect:[Object,String,Number],width:String,border:{type:Boolean,default:!0},placeholder:String,inputable:{type:Boolean,default:!1}},emits:["update:value","select"],setup(e,{emit:t}){const n=e;document.body.addEventListener("click",()=>s.value=!1);const a=U("-2px"),s=U(!1),i=U("auto"),o=U("0px"),r=me(()=>{const f=n.options.find(y=>y.value===n.value)||n.options.find(y=>y.value===n.defaultSelect);return f&&f.text||""}),l=f=>{t("update:value",f),t("select",f),s.value=!1},u=se("ELEMENT_ROOT"),p=(f,y)=>y+f.scrollTop>0?f.scrollTop:f.parentElement?p(f.parentElement,y+f.scrollTop):f.scrollTop,m=(f,y)=>{a.value=-p(f,0)-1+"px",s.value=!0,be(()=>{o.value=-(window.pageXOffset+1)+"px",i.value=f.clientWidth+"px";let E=y.offsetHeight;y.offsetTop+E+20>u.value.offsetTop+u.value.offsetHeight&&(a.value=-(E+f.offsetHeight)+"px")})};return(f,y)=>{const E=b("magic-icon");return g(),w("div",{class:Ee([{inputable:e.inputable,border:e.border},"magic-select not-select"]),style:ze({width:e.width}),onClick:y[2]||(y[2]=Se(C=>m(f.$refs.container,f.$refs.selectList),["stop"])),ref:"container"},[e.inputable?X("",!0):(g(),w("span",Kr,B(h(r)),1)),e.inputable?yt((g(),w("input",{key:1,ref:"input","onUpdate:modelValue":y[0]||(y[0]=C=>fa(value)?value.value=C:null),autocomplete:"off",type:"text",onInput:y[1]||(y[1]=C=>l(C.target.value)),placeholder:e.placeholder},null,40,Wr)),[[es,e.value]]):X("",!0),yt(A("ul",{style:ze({width:i.value,marginTop:a.value,marginLeft:o.value}),ref:"selectList"},[(g(!0),w(Z,null,he(e.options,C=>(g(),w("li",{key:C.value,onClick:Se(I=>l(C.value),["stop"])},B(C.text),9,Xr))),128))],4),[[$t,s.value]]),_(E,{icon:"arrow-bottom"})],6)}}};var Qr=q(Jr,[["__scopeId","data-v-249fb96c"]]),Zr=Object.freeze(Object.defineProperty({__proto__:null,default:Qr},Symbol.toStringTag,{value:"Module"}));const el=["placeholder","value"],tl={props:{value:String,placeholder:String},setup(e){return(t,n)=>(g(),w("textarea",{class:"magic-textarea",placeholder:e.placeholder,value:e.value,onInput:n[0]||(n[0]=a=>t.$emit("update:value",a.target.value))},null,40,el))}};var nl=q(tl,[["__scopeId","data-v-ca6693f6"]]),al=Object.freeze(Object.defineProperty({__proto__:null,default:nl},Symbol.toStringTag,{value:"Module"}));const sl={props:{users:Array,max:Number,size:{type:Number,default:22}},setup(e){const t=e,n=me(()=>({height:t.size+"px",lineHeight:t.size+"px"})),a=me(()=>t.users.slice(0,t.max||t.users.length));return(s,i)=>{const o=b("magic-avatar");return t.users&&t.users.length>0?(g(),w("div",{key:0,class:"magic-avatar-group",style:ze(h(n))},[(g(!0),w(Z,null,he(h(a),(r,l)=>(g(),j(o,{key:l,user:r,size:e.size},null,8,["user","size"]))),128)),t.users.length>h(a).length?(g(),j(o,{key:0,text:`${e.max}+`,size:e.size},null,8,["text","size"])):X("",!0)],4)):X("",!0)}}};var il=q(sl,[["__scopeId","data-v-511f7f80"]]),ol=Object.freeze(Object.defineProperty({__proto__:null,default:il},Symbol.toStringTag,{value:"Module"}));const rl=["title"],ll={props:{user:Object,text:String,size:{type:Number,default:22}},setup(e){const t=e,n=["#1abc9c","#2ecc71","#3498db","#9b59b6","#16a085","#27ae60","#2980b9","#8e44ad","#f1c40f","#e67e22","#e74c3c","#eca0f1","#95a5a6","#f39c12","#d35400","#c0392b","#bdc3c7","#7f8c8d"],a=me(()=>({width:t.size+"px",height:t.size+"px",lineHeight:t.size+"px",borderRadius:t.size/2+"px",backgroundColor:t.text&&"#bdc3c7"||n[oi(`${t.user.cid}`)%n.length]})),s=me(()=>t.text||t.user.username.substring(0,1)),i=me(()=>t.user?`${c("message.username")}\uFF1A${t.user.username}
+IP\uFF1A${t.user.ip||"unknown"}`:void 0);return(o,r)=>(g(),w("div",{class:"magic-avatar",style:ze(h(a)),title:h(i)},B(h(s)),13,rl))}};var cl=q(ll,[["__scopeId","data-v-73f02f44"]]),ul=Object.freeze(Object.defineProperty({__proto__:null,default:cl},Symbol.toStringTag,{value:"Module"}));const pl=["width"],dl=["x","fill"],_l={props:{icon:String|Array},setup(e){const t=e,n={GET:"#0cbb52",POST:"#FFB400",DELETE:["DEL","#EB2013"],PUT:"#097BED",function:["Fn","#9012FE"]},a=me(()=>{let s=t.icon,i=Array.isArray(s);i||(s=n[t.icon],i=s!==void 0&&Array.isArray(s));const o=i?s[0]:t.icon,r=o.length*9,l=i?s[1]:s||"var(--main-icon-color)";return{width:r,color:l,text:o}});return(s,i)=>(g(),w("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:h(a).width,height:"12","font-size":"10","font-weight":"bolder","font-family":"inherit"},[A("text",{x:h(a).width/2,y:"8",fill:h(a).color,style:{"dominant-baseline":"middle","text-anchor":"middle"}},B(h(a).text),9,dl)],8,pl))}};var hl=Object.freeze(Object.defineProperty({__proto__:null,default:_l},Symbol.toStringTag,{value:"Module"}));const fl={props:{opened:Object},setup(e){const t=[{title:"Json",icon:"json",component:te("magic-api-request-body")},{title:c("message.view"),icon:"structure",component:te("magic-api-request-structure")}];return(n,a)=>{const s=b("magic-navbar-item"),i=b("magic-navbar");return g(),j(i,{spliter:!0,direction:"vertical","allow-close":!1},{default:k(()=>[(g(),w(Z,null,he(t,(o,r)=>_(s,dt({key:r},o),{default:k(()=>[(g(),j(te(o.component)))]),_:2},1040)),64))]),_:1})}}};var ml=q(fl,[["__scopeId","data-v-41b9c04c"]]),gl=Object.freeze(Object.defineProperty({__proto__:null,default:ml},Symbol.toStringTag,{value:"Module"}));const vl={setup(e){const t=se("info");return(n,a)=>{const s=b("magic-textarea");return g(),j(s,{value:h(t).description,"onUpdate:value":a[0]||(a[0]=i=>h(t).description=i)},null,8,["value"])}}};var El=Object.freeze(Object.defineProperty({__proto__:null,default:vl},Symbol.toStringTag,{value:"Module"}));const bl={class:"magic-api-group"},yl={setup(e){const t=se("info"),n=[{title:c("api.navbars.path"),component:te("magic-api-path")},{title:c("api.navbars.groupOption"),component:te("magic-api-option")}],a=()=>{const s=t.value;z.sendJson("/resource/folder/save",{id:s.id,name:s.name,parentId:s.parentId,type:s.type,path:s.path,paths:s.paths,options:s.options})};return(s,i)=>{const o=b("magic-input"),r=b("magic-button"),l=b("magic-navbar-item"),u=b("magic-navbar");return g(),w(Z,null,[A("div",bl,[A("form",null,[A("label",null,B(h(c)("resource.form.groupName")),1),_(o,{value:h(t).name,"onUpdate:value":i[0]||(i[0]=p=>h(t).name=p),placeholder:h(c)("resource.form.placeholder.name",h(c)("api.name")),width:"250px"},null,8,["value","placeholder"]),A("label",null,B(h(c)("resource.form.groupPath")),1),_(o,{value:h(t).path,"onUpdate:value":i[1]||(i[1]=p=>h(t).path=p),placeholder:h(c)("resource.form.placeholder.path",h(c)("api.name")),width:"auto",style:{flex:"1"}},null,8,["value","placeholder"]),_(r,{value:h(c)("message.save"),onOnClick:a},null,8,["value"])])]),_(u,{direction:"horizontal",ref:"navbar",style:{flex:"1"},"allow-close":!1},{default:k(()=>[(g(),w(Z,null,he(n,(p,m)=>_(l,dt({key:m},p),{default:k(()=>[(g(),j(te(p.component)))]),_:2},1040)),64))]),_:1},512)],64)}}};var Tl=q(yl,[["__scopeId","data-v-07a9bc9f"]]),Sl=Object.freeze(Object.defineProperty({__proto__:null,default:Tl},Symbol.toStringTag,{value:"Module"}));const Ol={class:"magic-panel-api"},xl={setup(e){const t=se("info"),n=U(-1);return(a,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-checkbox"),r=b("magic-table-column"),l=b("magic-input"),u=b("magic-select"),p=b("magic-table");return g(),w("div",Ol,[_(i,{index:n.value,"onUpdate:index":s[0]||(s[0]=m=>n.value=m),value:h(t).headers},null,8,["index","value"]),_(p,{data:h(t).headers,border:"",onClickRow:s[1]||(s[1]=m=>n.value=m),align:"center"},{default:k(()=>[_(r,{title:h(c)("message.required"),width:"65"},{default:k(({row:m})=>[_(o,{value:m.required,"onUpdate:value":f=>m.required=f},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:"Key"},{default:k(({row:m})=>[_(l,{value:m.name,"onUpdate:value":f=>m.name=f,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(r,{title:"Value"},{default:k(({row:m})=>[_(l,{value:m.value,"onUpdate:value":f=>m.value=f,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(r,{title:h(c)("message.parameterType"),width:"135"},{default:k(({row:m})=>[_(u,{options:a.$REQUEST_SIMPLE_TYPES,value:m.dataType,"onUpdate:value":f=>m.dataType=f,"default-select":a.$DEFAULT_REQUEST_SIMPLE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("message.defaultValue")},{default:k(({row:m})=>[_(l,{value:m.defaultValue,"onUpdate:value":f=>m.defaultValue=f,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validateType"),width:"115"},{default:k(({row:m})=>[_(u,{options:a.$VALIDATE_TYPES,value:m.validateType,"onUpdate:value":f=>m.validateType=f,"default-select":a.$DEFAULT_VALIDATE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("api.expression"),width:"220"},{default:k(({row:m})=>[_(l,{value:m.expression,"onUpdate:value":f=>m.expression=f,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validate"),width:"165"},{default:k(({row:m})=>[_(l,{value:m.error,"onUpdate:value":f=>m.error=f,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("message.description"),flex:"2"},{default:k(({row:m})=>[_(l,{value:m.description,"onUpdate:value":f=>m.description=f,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"])]),_:1},8,["data"])])}}};var Rl=Object.freeze(Object.defineProperty({__proto__:null,default:xl},Symbol.toStringTag,{value:"Module"}));const Al={class:"magic-api-info"},Il={setup(e){const t=se("info"),n=[{title:c("api.navbars.parameter"),component:te("magic-api-parameter")},{title:c("api.navbars.header"),component:te("magic-api-header")},{title:c("api.navbars.path"),component:te("magic-api-path")},{title:c("api.navbars.body"),component:te("magic-api-body")},{title:c("api.navbars.option"),component:te("magic-api-option")},{title:c("api.navbars.description"),component:te("magic-api-description")}];return(a,s)=>{const i=b("magic-select"),o=b("magic-input"),r=b("magic-navbar-item"),l=b("magic-navbar");return g(),w(Z,null,[A("div",Al,[A("form",null,[A("label",null,B(h(c)("api.form.method")),1),_(i,{width:"100px",options:a.$REQUEST_METHODS,"default-select":a.$DEFAULT_REQUEST_METHOD,value:h(t).method,"onUpdate:value":s[0]||(s[0]=u=>h(t).method=u)},null,8,["options","default-select","value"]),A("label",null,B(h(c)("api.form.name")),1),_(o,{value:h(t).name,"onUpdate:value":s[1]||(s[1]=u=>h(t).name=u),placeholder:h(c)("api.form.placeholder.name"),width:"200px"},null,8,["value","placeholder"]),A("label",null,B(h(c)("api.form.path")),1),_(o,{value:h(t).path,"onUpdate:value":s[2]||(s[2]=u=>h(t).path=u),placeholder:h(c)("api.form.placeholder.path"),width:"auto",style:{flex:"1"}},null,8,["value","placeholder"])])]),_(l,{direction:"horizontal",ref:"navbar",style:{flex:"1"},"allow-close":!1},{default:k(()=>[(g(),w(Z,null,he(n,(u,p)=>_(r,dt({key:p},u),{default:k(()=>[(g(),j(te(u.component)))]),_:2},1040)),64))]),_:1},512)],64)}}};var Cl=q(Il,[["__scopeId","data-v-8ed3340e"]]),Ll=Object.freeze(Object.defineProperty({__proto__:null,default:Cl},Symbol.toStringTag,{value:"Module"}));const Nl={class:"magic-panel-api"},wl={setup(e){const t=se("info"),n=se("options")||[],a=me(()=>n.map(o=>({text:o[0],value:o[0],description:o[1],defaultValue:o[2]}))),s=U(-1),i=(o,r)=>{const l=n.find(u=>u[0]===o);l&&(r.description=l[1]||"",r.value=l[2]||"")};return(o,r)=>{const l=b("magic-panel-common-toolbar"),u=b("magic-select"),p=b("magic-table-column"),m=b("magic-input"),f=b("magic-table");return g(),w("div",Nl,[_(l,{index:s.value,"onUpdate:index":r[0]||(r[0]=y=>s.value=y),value:h(t).options},null,8,["index","value"]),_(f,{data:h(t).options,border:"",onClickRow:r[1]||(r[1]=y=>s.value=y)},{default:k(()=>[_(p,{title:"Key",width:"20%"},{default:k(({row:y})=>[_(u,{options:h(a),value:y.name,"onUpdate:value":E=>y.name=E,"default-select":o.$DEFAULT_REQUEST_SIMPLE_TYPE,border:!1,inputable:"",onSelect:E=>i(E,y)},null,8,["options","value","onUpdate:value","default-select","onSelect"])]),_:1}),_(p,{title:"Value",width:"60%"},{default:k(({row:y})=>[_(m,{value:y.value,"onUpdate:value":E=>y.value=E,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(p,{title:h(c)("message.description"),width:"20%"},{default:k(({row:y})=>[_(m,{value:y.description,"onUpdate:value":E=>y.description=E,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"])]),_:1},8,["data"])])}}};var kl=Object.freeze(Object.defineProperty({__proto__:null,default:wl},Symbol.toStringTag,{value:"Module"}));const Dl={class:"magic-panel-api"},Ml={setup(e){const t=U(-1),n=se("info");return(a,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-checkbox"),r=b("magic-table-column"),l=b("magic-input"),u=b("magic-file"),p=b("magic-select"),m=b("magic-table");return g(),w("div",Dl,[_(i,{index:t.value,"onUpdate:index":s[0]||(s[0]=f=>t.value=f),value:h(n).parameters},null,8,["index","value"]),_(m,{data:h(n).parameters,border:"",onClickRow:s[1]||(s[1]=f=>t.value=f),align:"center"},{default:k(()=>[_(r,{title:h(c)("message.required"),width:"65"},{default:k(({row:f})=>[_(o,{value:f.required,"onUpdate:value":y=>f.required=y},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:"Key"},{default:k(({row:f})=>[_(l,{value:f.name,"onUpdate:value":y=>f.name=y,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(r,{title:"Value"},{default:k(({row:f})=>[f.dataType==="MultipartFile"?(g(),j(u,{key:0,value:f.value,"onUpdate:value":y=>f.value=y,border:!1},null,8,["value","onUpdate:value"])):f.dataType==="MultipartFiles"?(g(),j(u,{key:1,value:f.value,"onUpdate:value":y=>f.value=y,border:!1,multiple:""},null,8,["value","onUpdate:value"])):(g(),j(l,{key:2,value:f.value,"onUpdate:value":y=>f.value=y,border:!1},null,8,["value","onUpdate:value"]))]),_:1}),_(r,{title:h(c)("message.parameterType"),width:"135"},{default:k(({row:f})=>[_(p,{options:a.$REQUEST_PARAMETER_TYPES,value:f.dataType,"onUpdate:value":y=>f.dataType=y,"default-select":a.$DEFAULT_REQUEST_PARAMETER_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("message.defaultValue")},{default:k(({row:f})=>[_(l,{value:f.defaultValue,"onUpdate:value":y=>f.defaultValue=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validateType"),width:"115"},{default:k(({row:f})=>[_(p,{options:a.$VALIDATE_TYPES,value:f.validateType,"onUpdate:value":y=>f.validateType=y,"default-select":a.$DEFAULT_VALIDATE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("api.expression"),width:"220"},{default:k(({row:f})=>[_(l,{value:f.expression,"onUpdate:value":y=>f.expression=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validate"),width:"165"},{default:k(({row:f})=>[_(l,{value:f.error,"onUpdate:value":y=>f.error=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("message.description"),flex:"2"},{default:k(({row:f})=>[_(l,{value:f.description,"onUpdate:value":y=>f.description=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"])]),_:1},8,["data"])])}}};var Pl=Object.freeze(Object.defineProperty({__proto__:null,default:Ml},Symbol.toStringTag,{value:"Module"}));const Ul={class:"magic-panel-api"},$l={setup(e){const t=U(-1),n=se("info");return(a,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-input"),r=b("magic-table-column"),l=b("magic-select"),u=b("magic-table");return g(),w("div",Ul,[_(i,{index:t.value,"onUpdate:index":s[0]||(s[0]=p=>t.value=p),value:h(n).paths},null,8,["index","value"]),_(u,{data:h(n).paths,border:"",onClickRow:s[1]||(s[1]=p=>t.value=p),align:"center"},{default:k(()=>[_(r,{title:"Key"},{default:k(({row:p})=>[_(o,{value:p.name,"onUpdate:value":m=>p.name=m,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(r,{title:"Value"},{default:k(({row:p})=>[_(o,{value:p.value,"onUpdate:value":m=>p.value=m,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(r,{title:h(c)("message.parameterType"),width:"135"},{default:k(({row:p})=>[_(l,{options:a.$REQUEST_SIMPLE_TYPES,value:p.dataType,"onUpdate:value":m=>p.dataType=m,"default-select":a.$DEFAULT_REQUEST_SIMPLE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validateType"),width:"115"},{default:k(({row:p})=>[_(l,{options:a.$VALIDATE_TYPES,value:p.validateType,"onUpdate:value":m=>p.validateType=m,"default-select":a.$DEFAULT_VALIDATE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("api.expression"),width:"220"},{default:k(({row:p})=>[_(o,{value:p.expression,"onUpdate:value":m=>p.expression=m,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validate"),width:"165"},{default:k(({row:p})=>[_(o,{value:p.error,"onUpdate:value":m=>p.error=m,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("message.description"),flex:"2"},{default:k(({row:p})=>[_(o,{value:p.description,"onUpdate:value":m=>p.description=m,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"])]),_:1},8,["data"])])}}};var Bl=Object.freeze(Object.defineProperty({__proto__:null,default:$l},Symbol.toStringTag,{value:"Module"}));const Fl={setup(e){const t=se("info"),n=se("opened"),a=s=>{if(s.isFlush)return;const i=Ua(t.value.requestBody,t.value.requestBodyDefinition);i&&(t.value.requestBodyDefinition=i,n.value.requestBodyTree=an(i))};return(s,i)=>{const o=b("magic-monaco-editor");return g(),j(o,{value:h(t).requestBody,"onUpdate:value":i[0]||(i[0]=r=>h(t).requestBody=r),language:"json",onChange:a},null,8,["value"])}}};var Hl=q(Fl,[["__scopeId","data-v-0fba1ea3"]]),jl=Object.freeze(Object.defineProperty({__proto__:null,default:Hl},Symbol.toStringTag,{value:"Module"}));const Vl=["onClick"],Gl=["title"],zl={key:0,align:"center",style:{flex:"1"}},Yl={key:1,align:"center",style:{flex:"1"}},ql={setup(e){const t=se("opened"),n=me(()=>{var s,i;return!t.value.requestBodyTree&&((i=(s=t.value)==null?void 0:s.item)==null?void 0:i.requestBodyDefinition)&&(t.value.requestBodyTree=an(t.value.item.requestBodyDefinition)),(t.value.requestBodyTree||[]).filter(o=>o.display)}),a=s=>{const i=t.value.requestBodyTree.findIndex(r=>r===s),o=s.level;s.expand=!s.expand;for(let r=i+1,l=t.value.requestBodyTree.length;ro)u.display=s.expand;else break}};return(s,i)=>{const o=b("magic-icon"),r=b("magic-table-column"),l=b("magic-checkbox"),u=b("magic-select"),p=b("magic-input"),m=b("magic-table");return g(),j(m,{data:h(n),border:""},{default:k(()=>[_(r,{title:h(c)("api.field")},{default:k(({row:f})=>[A("span",{style:ze({paddingLeft:`${(f.level+(f.folder?0:1))*16}px`}),onClick:y=>a(f)},[f.folder?(g(),j(o,{key:0,icon:f.expand?"arrow-bottom":"arrow-right"},null,8,["icon"])):X("",!0)],12,Vl),A("span",{title:f.name||"-"},B(f.name||"-"),9,Gl)]),_:1},8,["title"]),_(r,{title:h(c)("message.required"),width:"65"},{default:k(({row:f})=>[_(l,{value:f.node.required,"onUpdate:value":y=>f.node.required=y},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("message.type"),width:"80"},{default:k(({row:f})=>[_(u,{options:s.$BODY_DATA_TYPES,value:f.node.dataType,"onUpdate:value":y=>f.node.dataType=y,border:!1},null,8,["options","value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:"Value",flex:"2"},{default:k(({row:f})=>{var y;return[f.folder?(g(),w("p",zl,"-")):(g(),w("span",{key:1,class:Ee(["magic-data-type",(y=f.node.dataType)==null?void 0:y.toLowerCase()])},B(f.node.value),3))]}),_:1}),_(r,{title:h(c)("message.defaultValue")},{default:k(({row:f})=>[_(p,{value:f.node.defaultValue,"onUpdate:value":y=>f.node.defaultValue=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validateType"),width:"115"},{default:k(({row:f})=>[_(u,{options:s.$VALIDATE_TYPES,value:f.node.validateType,"onUpdate:value":y=>f.node.validateType=y,"default-select":s.$DEFAULT_VALIDATE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("api.expression")},{default:k(({row:f})=>[_(p,{value:f.node.expression,"onUpdate:value":y=>f.node.expression=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validate")},{default:k(({row:f})=>[_(p,{value:f.node.error,"onUpdate:value":y=>f.node.error=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("message.description")},{default:k(({row:f})=>[f.name?(g(),j(p,{key:0,value:f.node.description,"onUpdate:value":y=>f.node.description=y,border:!1},null,8,["value","onUpdate:value"])):(g(),w("p",Yl,"-"))]),_:1},8,["title"])]),_:1},8,["data"])}}};var Kl=q(ql,[["__scopeId","data-v-bda6618c"]]),Wl=Object.freeze(Object.defineProperty({__proto__:null,default:Kl},Symbol.toStringTag,{value:"Module"}));const Xl=["src"],Jl={setup(e){const t=se("info"),n=se("opened"),a=U(null),s=se("ELEMENT_ROOT"),i=me(()=>t.value.responseBody||""),o=me(()=>{if(n.value.responseBlob){const l=n.value.responseHeaders["content-disposition"];if(l){const u=l.replace(/.*filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/,"$1");Hn(n.value.responseBlobValue,u);return}return URL.createObjectURL(n.value.responseBlobValue)}}),r=l=>{const u=getComputedStyle(s.value),p=a.value.contentWindow.document.body.style;p.color=u.getPropertyValue("--main-color"),p.backgroundColor=u.getPropertyValue("--main-background-color")};return(l,u)=>{const p=b("magic-monaco-editor"),m=b("magic-empty");return h(n).responseBlob?h(o)?(g(),w("iframe",{key:1,src:h(o),onLoad:r,ref_key:"iframe",ref:a},null,40,Xl)):(g(),j(m,{key:2,text:h(c)("message.empty",h(c)("message.responseBody"))},null,8,["text"])):(g(),j(p,{key:0,value:h(i),"onUpdate:value":u[0]||(u[0]=f=>fa(i)?i.value=f:null),language:"json",readonly:!0},null,8,["value"]))}}};var Ql=q(Jl,[["__scopeId","data-v-27b4e47a"]]),Zl=Object.freeze(Object.defineProperty({__proto__:null,default:Ql},Symbol.toStringTag,{value:"Module"}));const ec=["title"],tc=["title"],nc={setup(e){const t=se("opened"),n=me(()=>Object.keys(t.value.responseHeaders||{}).map(a=>({key:a,value:t.value.responseHeaders[a]})));return(a,s)=>{const i=b("magic-table-column"),o=b("magic-table");return g(),j(o,{data:h(n),border:""},{default:k(()=>[_(i,{title:"Key"},{default:k(({row:r})=>[A("span",{title:r.key},B(r.key),9,ec)]),_:1}),_(i,{title:"Value"},{default:k(({row:r})=>[A("span",{title:r.value},B(r.value),9,tc)]),_:1})]),_:1},8,["data"])}}};var ac=q(nc,[["__scopeId","data-v-76813707"]]),sc=Object.freeze(Object.defineProperty({__proto__:null,default:ac},Symbol.toStringTag,{value:"Module"}));const ic=["onClick"],oc={key:0,align:"center",style:{flex:"1"}},rc={key:1,align:"center",style:{flex:"1"}},lc={setup(e){const t=se("opened"),n=s=>{const i=t.value.responseBodyTree.findIndex(r=>r===s),o=s.level;s.expand=!s.expand;for(let r=i+1,l=t.value.responseBodyTree.length;ro)u.display=s.expand;else break}},a=me(()=>{var s,i;return!t.value.responseBodyTree&&((i=(s=t.value)==null?void 0:s.item)==null?void 0:i.responseBodyDefinition)&&(t.value.responseBodyTree=an(t.value.item.responseBodyDefinition)),(t.value.responseBodyTree||[]).filter(o=>o.display)});return(s,i)=>{const o=b("magic-icon"),r=b("magic-table-column"),l=b("magic-select"),u=b("magic-input"),p=b("magic-table"),m=b("magic-empty");return h(a).length?(g(),j(p,{key:0,data:h(a),border:""},{default:k(()=>[_(r,{title:h(c)("api.field")},{default:k(({row:f})=>[A("span",{style:ze({paddingLeft:`${(f.level+(f.folder?0:1))*16}px`}),onClick:y=>n(f)},[f.folder?(g(),j(o,{key:0,icon:f.expand?"arrow-bottom":"arrow-right"},null,8,["icon"])):X("",!0)],12,ic),A("span",null,B(f.name||"-"),1)]),_:1},8,["title"]),_(r,{title:h(c)("message.type"),width:"80"},{default:k(({row:f})=>[_(l,{options:s.$BODY_DATA_TYPES,value:f.node.dataType,"onUpdate:value":y=>f.node.dataType=y,border:!1},null,8,["options","value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:"Value",flex:"3"},{default:k(({row:f})=>{var y;return[f.folder?(g(),w("p",oc,"-")):(g(),w("span",{key:1,class:Ee(["magic-data-type",(y=f.node.dataType)==null?void 0:y.toLowerCase()])},B(f.node.value),3))]}),_:1}),_(r,{title:h(c)("message.description")},{default:k(({row:f})=>[f.name?(g(),j(u,{key:0,value:f.node.description,"onUpdate:value":y=>f.node.description=y,border:!1},null,8,["value","onUpdate:value"])):(g(),w("p",rc,"-"))]),_:1},8,["title"])]),_:1},8,["data"])):(g(),j(m,{key:1,text:h(c)("message.empty",h(c)("message.responseBody"))},null,8,["text"]))}}};var cc=q(lc,[["__scopeId","data-v-051e4f5a"]]),uc=Object.freeze(Object.defineProperty({__proto__:null,default:cc},Symbol.toStringTag,{value:"Module"}));const pc={class:"magic-panel-api-response"},dc={props:{opened:Object},setup(e){const t=[{title:c("message.responseBody"),component:te("magic-api-response-body")},{title:c("message.responseHeader"),component:te("magic-api-response-header")},{title:c("message.responseStructure"),component:te("magic-api-response-structure")}];return(n,a)=>{const s=b("magic-navbar-item"),i=b("magic-navbar");return g(),w("div",pc,[_(i,{direction:"horizontal",ref:"navbar",style:{flex:"1"},"allow-close":!1},{default:k(()=>[(g(),w(Z,null,he(t,(o,r)=>_(s,{key:r,title:o.title},{default:k(()=>[(g(),j(ts,null,[(g(),j(te(o.component),{opened:e.opened},null,8,["opened"]))],1024))]),_:2},1032,["title"])),64))]),_:1},512)])}}};var _c=q(dc,[["__scopeId","data-v-a23b6466"]]),hc=Object.freeze(Object.defineProperty({__proto__:null,default:_c},Symbol.toStringTag,{value:"Module"}));const fc={class:"magic-panel-global"},mc={setup(e){const t=U(M.GLOBAL),n=U(-1);return(a,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-input"),r=b("magic-table-column"),l=b("magic-table");return g(),w("div",fc,[_(i,{index:n.value,"onUpdate:index":s[0]||(s[0]=u=>n.value=u),value:t.value.headers},null,8,["index","value"]),_(l,{data:t.value.headers,border:"",onClickRow:s[1]||(s[1]=u=>n.value=u)},{default:k(()=>[_(r,{title:"Key"},{default:k(({row:u})=>[_(o,{value:u.name,"onUpdate:value":p=>u.name=p,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(r,{title:"Value"},{default:k(({row:u})=>[_(o,{value:u.value,"onUpdate:value":p=>u.value=p,border:!1},null,8,["value","onUpdate:value"])]),_:1})]),_:1},8,["data"])])}}};var gc=Object.freeze(Object.defineProperty({__proto__:null,default:mc},Symbol.toStringTag,{value:"Module"}));const vc={class:"magic-panel-global"},Ec={setup(e){const t=U(-1),n=U(M.GLOBAL);return(a,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-input"),r=b("magic-table-column"),l=b("magic-file"),u=b("magic-table");return g(),w("div",vc,[_(i,{index:t.value,"onUpdate:index":s[0]||(s[0]=p=>t.value=p),value:n.value.parameters},null,8,["index","value"]),_(u,{data:n.value.parameters,border:"",onClickRow:s[1]||(s[1]=p=>t.value=p)},{default:k(()=>[_(r,{title:"Key"},{default:k(({row:p})=>[_(o,{value:p.name,"onUpdate:value":m=>p.name=m,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(r,{title:"Value"},{default:k(({row:p})=>[p.dataType==="MultipartFile"?(g(),j(l,{key:0,value:p.value,"onUpdate:value":m=>p.value=m,border:!1},null,8,["value","onUpdate:value"])):p.dataType==="MultipartFiles"?(g(),j(l,{key:1,value:p.value,"onUpdate:value":m=>p.value=m,border:!1,multiple:""},null,8,["value","onUpdate:value"])):(g(),j(o,{key:2,value:p.value,"onUpdate:value":m=>p.value=m,border:!1},null,8,["value","onUpdate:value"]))]),_:1})]),_:1},8,["data"])])}}};var bc=Object.freeze(Object.defineProperty({__proto__:null,default:Ec},Symbol.toStringTag,{value:"Module"}));const yc={class:"magic-global"},Tc={setup(e){const t=[{title:"\u5168\u5C40\u8BF7\u6C42\u53C2\u6570",component:te("magic-global-parameter")},{title:"\u5168\u5C40\u8BF7\u6C42Header",component:te("magic-global-header")}];return(n,a)=>{const s=b("magic-navbar-item"),i=b("magic-navbar");return g(),w("div",yc,[_(i,{direction:"horizontal",ref:"navbar",style:{flex:"1"},"allow-close":!1},{default:k(()=>[(g(),w(Z,null,he(t,(o,r)=>_(s,dt({key:r},o),{default:k(()=>[(g(),j(te(o.component)))]),_:2},1040)),64))]),_:1},512)])}}};var Sc=q(Tc,[["__scopeId","data-v-03e7bbcc"]]),Oc=Object.freeze(Object.defineProperty({__proto__:null,default:Sc},Symbol.toStringTag,{value:"Module"}));const xc={props:{value:Array,index:Number},emits:["update:index"],setup(e,{emit:t}){const n=e,a=[{title:c("message.addRow"),icon:"plus",onClick(){n.value.push({}),t("update:index",n.value.length-1)}},{title:c("message.removeRow"),icon:"minus",onClick(){n.value.length>0&&(n.value.splice(n.index==-1?n.value.length-1:n.index,1),t("update:index",-1))}}];return(s,i)=>{const o=b("magic-panel-toolbar");return g(),j(o,{toolbars:a})}}};var Rc=Object.freeze(Object.defineProperty({__proto__:null,default:xc},Symbol.toStringTag,{value:"Module"}));const Ac={class:"magic-panel-toolbar"},Ic=["title","onClick"],Cc={props:{toolbars:Array},setup(e){const t=n=>{n.selectable?n.disabled!==!0&&(n.selected=n.selected!==!0,n.onSelect&&n.onSelect(n.selected)):n.disabled!==!0&&n.onClick()};return(n,a)=>{const s=b("magic-icon");return g(),w("ul",Ac,[(g(!0),w(Z,null,he(e.toolbars,(i,o)=>(g(),w("li",{key:o,title:i.title,onClick:Se(r=>t(i),["stop"]),class:Ee({disabled:i.disabled,selected:i.selected})},[_(s,{icon:i.icon},null,8,["icon"])],10,Ic))),128))])}}};var Lc=q(Cc,[["__scopeId","data-v-56150b69"]]),Nc=Object.freeze(Object.defineProperty({__proto__:null,default:Lc},Symbol.toStringTag,{value:"Module"}));const wc={class:"magic-resource-choose"},kc={key:0},Dc={key:2},Mc={props:{value:[Array,Object],type:String,single:{type:Boolean,default:()=>!1},file:{type:Boolean,default:()=>!0}},emits:["update:value"],setup(e,{expose:t,emit:n}){const a=e,s=se("resources"),i=se("service"),o=U([]),r=()=>{let E=[],C=I=>{I.id.endsWith("-root")?E.push({type:"root",id:I.type}):E.push({type:I.folder?"group":I.type,id:I.id}),I.children&&I.children.filter(O=>O.selected).forEach(O=>C(O))};o.value.filter(I=>I.selected).forEach(I=>C(I)),n("update:value",a.single?E[0]:E)},l=(E,C)=>{let I=[];return E&&E.filter(O=>O.id).forEach(O=>{var v;if(O.folder||a.file){if(O.folder)O.icon="list";else{const T=(v=i[C.type])==null?void 0:v.getIcon;O.icon=T&&T(O)||C.icon,O.textIcon=T!==void 0,O.type=C.type}I.push(O)}O.folder&&O.children&&(O.children=l(O.children,C))}),I},u=E=>{let C=E,I=[],O=v=>{v.forEach(T=>{T.id===C?(I.push(T),C=T.parentId||T.groupId,O(o.value)):T.children&&T.children.length>0&&O(T.children)})};return O(o.value),I},p=(E,C)=>{C!==void 0&&(E.selected=C);let I=O=>{O.selected=a.single?!1:E.selected,O.checkedHalf=a.single?!1:!E.selected,O.children&&O.children.forEach(v=>I(v))};E.children&&E.children.forEach(O=>I(O)),E.folder&&(E.checkedHalf=!1),u(E.folder?E.parentId:E.groupId).forEach(O=>{O.selected=a.single?!1:O.children.some(v=>v.selected),O.checkedHalf=a.single?!1:O.children.some(v=>!v.selected||v.checkedHalf)}),a.single?n("update:value",E.selected?E:void 0):r()},m=E=>p(E,!E.selected);return s().filter(E=>!a.type||a.type===E.navbar.type).forEach(E=>{const C=E.navbar.type,I=l(E.tree,E.navbar);I.forEach(O=>{O.folder?O.parentId=C+"-root":O.groupId=C+"-root"}),o.value.push({icon:E.navbar.icon,name:E.navbar.title,iconClass:"root",folder:!0,opened:!0,type:E.navbar.type,id:C+"-root",children:I})}),t({selectAll:E=>et(o.value,C=>{C.checkedHalf=!1,C.selected=E,C.children&&C.children.forEach(I=>I.selected=E),r()}),expand:E=>et(o.value,C=>{C.folder&&(C.opened=E)})}),(E,C)=>{const I=b("magic-checkbox"),O=b("magic-icon"),v=b("magic-text-icon"),T=b("magic-tree");return g(),w("div",wc,[_(T,{data:o.value,sort:!1,onItemClick:m},{folder:k(({item:R})=>[_(I,{value:R.selected,"onUpdate:value":D=>R.selected=D,"checked-half":R.checkedHalf,onChange:D=>p(R)},null,8,["value","onUpdate:value","checked-half","onChange"]),_(O,{icon:R.opened?"arrow-bottom":"arrow-right",onClick:Se(D=>R.opened=!R.opened,["stop"])},null,8,["icon","onClick"]),_(O,{icon:R.icon,class:Ee(R.iconClass)},null,8,["icon","class"]),A("label",null,B(R.name),1),R.path?(g(),w("span",kc,"("+B(R.path)+")",1)):X("",!0)]),file:k(({item:R})=>[_(I,{value:R.selected,"onUpdate:value":D=>R.selected=D,"checked-half":R.checkedHalf,onChange:D=>p(R)},null,8,["value","onUpdate:value","checked-half","onChange"]),R.textIcon?(g(),j(v,{key:0,icon:R.icon},null,8,["icon"])):(g(),j(O,{key:1,icon:R.icon},null,8,["icon"])),A("label",null,B(R.name),1),R.path?(g(),w("span",Dc,"("+B(R.path)+")",1)):X("",!0)]),_:1},8,["data"])])}}};var Pc=q(Mc,[["__scopeId","data-v-4852fc0e"]]),Uc=Object.freeze(Object.defineProperty({__proto__:null,default:Pc},Symbol.toStringTag,{value:"Module"}));const $c={class:"magic-form-row"},Bc={class:"magic-form-row"},Fc=A("label",null,"Key",-1),Hc={class:"magic-form-row"},jc=A("label",null,"URL",-1),Vc={class:"magic-form-row"},Gc={class:"magic-form-row"},zc={class:"magic-form-row"},Yc={class:"magic-form-row"},qc={class:"magic-form-row"},Kc=A("label",null,"maxRows",-1),Wc={class:"magic-form-row"},Xc={props:{info:Object},setup(e){const{info:t}=e,n=U(JSON.stringify(t.properties||{}));return tt(n,a=>{try{t.properties=JSON.parse(a)}catch{t.properties={}}}),(a,s)=>{const i=b("magic-input"),o=b("magic-select"),r=b("magic-monaco-editor");return g(),w(Z,null,[A("div",$c,[A("label",null,B(h(c)("message.name")),1),_(i,{value:e.info.name,"onUpdate:value":s[0]||(s[0]=l=>e.info.name=l),placeholder:h(c)("datasource.form.placeholder.name")},null,8,["value","placeholder"])]),A("div",Bc,[Fc,_(i,{value:e.info.key,"onUpdate:value":s[1]||(s[1]=l=>e.info.key=l),placeholder:h(c)("datasource.form.placeholder.key")},null,8,["value","placeholder"])]),A("div",Hc,[jc,_(i,{value:e.info.url,"onUpdate:value":s[2]||(s[2]=l=>e.info.url=l),placeholder:h(c)("datasource.form.placeholder.url")},null,8,["value","placeholder"])]),A("div",Vc,[A("label",null,B(h(c)("message.username")),1),_(i,{value:e.info.username,"onUpdate:value":s[3]||(s[3]=l=>e.info.username=l),placeholder:h(c)("datasource.form.placeholder.username")},null,8,["value","placeholder"])]),A("div",Gc,[A("label",null,B(h(c)("message.password")),1),_(i,{value:e.info.password,"onUpdate:value":s[4]||(s[4]=l=>e.info.password=l),type:"password",placeholder:h(c)("datasource.form.placeholder.password")},null,8,["value","placeholder"])]),A("div",zc,[A("label",null,B(h(c)("datasource.form.driver")),1),_(o,{inputable:"",value:e.info.driverClassName,"onUpdate:value":s[5]||(s[5]=l=>e.info.driverClassName=l),width:"100%",options:h(M).JDBC_DRIVERS.map(l=>({text:l,value:l})),placeholder:h(c)("datasource.form.placeholder.driver")},null,8,["value","options","placeholder"])]),A("div",Yc,[A("label",null,B(h(c)("datasource.form.type")),1),_(o,{inputable:"",value:e.info.type,"onUpdate:value":s[6]||(s[6]=l=>e.info.type=l),width:"100%",options:h(M).DATASOURCE_TYPES.map(l=>({text:l,value:l})),placeholder:h(c)("datasource.form.placeholder.type")},null,8,["value","options","placeholder"])]),A("div",qc,[Kc,_(i,{value:e.info.maxRows,"onUpdate:value":s[7]||(s[7]=l=>e.info.maxRows=l),placeholder:h(c)("datasource.form.placeholder.maxRows"),"default-value":-1,type:"number"},null,8,["value","placeholder"])]),A("div",Wc,[A("label",null,B(h(c)("datasource.form.other")),1),_(r,{language:"json",value:n.value,"onUpdate:value":s[8]||(s[8]=l=>n.value=l),style:{height:"150px"}},null,8,["value"])])],64)}}};var Jc=Object.freeze(Object.defineProperty({__proto__:null,default:Xc},Symbol.toStringTag,{value:"Module"}));const Qc={class:"magic-backup-file"},Zc={class:"magic-backup-file-diff-container"},eu={props:{id:String},setup(e){const t=e,n=se("service"),a=U(""),s=U(!0),i=U(!0),o=Je([]),r=U({}),l=U([]),u=U(""),p=()=>{u.value=n[r.value.type].language||"magicscript";const E=[];i.value=!0,a.value||E.push(new Promise(C=>z.sendGet("/resource/file/"+t.id).success(I=>a.value=I).end(()=>C()))),E.push(new Promise(C=>z.sendGet("/backup",{id:t.id,timestamp:r.value.createDate}).success(I=>r.value.script=I).end(()=>C()))),Promise.all(E).then(()=>{var C;i.value=!1,l.value=[r.value.script,(C=a.value)==null?void 0:C.script]}).catch(C=>{console.error(C),i.value=!1})},m=()=>{s.value=!0,z.sendGet("/backup/"+t.id).success(E=>{E&&E.length>0&&(o.length=0,o.push(...E),r.value=o[0]||{},r.value&&p()),s.value=!1})};m(),tt(()=>t.id,m);const f=()=>{const E=`${r.value.name}(${We(r.value.createDate)})`;z.sendPost("/backup/rollback",{id:t.id,timestamp:r.value.createDate}).success(C=>{C?(ve.alert(c("backup.rollbackSuccess",E)),S.status("backup.rollbackSuccess",!0,E),S.$emit(F.REFRESH_RESOURCE,t.id)):(ve.alert(c("backup.rollbackFailed",E)),S.status("backup.rollbackFailed",!1,E))})},y=E=>{r.value=o[E],p()};return(E,C)=>{const I=b("magic-table-column"),O=b("magic-table"),v=b("magic-button"),T=b("magic-monaco-diff-editor"),R=b("magic-loading"),D=b("magic-empty");return g(),j(R,{loading:s.value},{default:k(()=>[A("div",Qc,[h(o).length>0?(g(),w(Z,{key:0},[_(O,{data:h(o),border:!0,onClickRow:y},{default:k(()=>[_(I,{title:h(c)("message.date"),width:"160",class:"selected"},{default:k(({row:L})=>[_e(B(h(We)(L.createDate)),1)]),_:1},8,["title"]),_(I,{title:h(c)("history.operator"),width:"100"},{default:k(({row:L})=>[_e(B(L.createBy||"guest"),1)]),_:1},8,["title"])]),_:1},8,["data"]),A("div",Zc,[A("ul",null,[A("li",null,[_e(B(h(We)(r.value.createDate))+" by "+B(r.value.createBy||"guest")+" ",1),_(v,{value:h(c)("backup.rollback"),type:"active",onClick:f},null,8,["value"])]),A("li",null,[_e(B(h(c)("backup.current")),1),a.value?(g(),w(Z,{key:0},[_e("("+B(h(We)(a.value.updateTime||a.value.createTime))+" by "+B(a.value.updateBy||a.value.createBy||"guest")+")",1)],64)):X("",!0)])]),i.value?(g(),j(R,{key:1,loading:i.value},null,8,["loading"])):(g(),j(T,{key:0,value:l.value,"onUpdate:value":C[0]||(C[0]=L=>l.value=L),language:u.value},null,8,["value","language"]))])],64)):(g(),j(D,{key:1,text:h(c)("message.empty",h(c)("history.name"))},null,8,["text"]))])]),_:1},8,["loading"])}}};var tu=q(eu,[["__scopeId","data-v-ef606938"]]),nu=Object.freeze(Object.defineProperty({__proto__:null,default:tu},Symbol.toStringTag,{value:"Module"}));const au={class:"magic-backup"},su={class:"magic-backup-diff-container"},iu={class:"magic-backup-diff-header"},ou={setup(e){const t=te("magic-backup-file"),n=U(!0),a=[{icon:"refresh",title:c("message.refresh"),onClick(){E()}},{icon:"copy",title:c("backup.full"),onClick(){z.sendPost("/backup/full").success(()=>{S.status("backup.backupSuccess"),E()})}}],s=U([]),i=U([]),o=U(!1),r=U(!0),l=U(""),u=U({}),p=U("magicscript");let m=!1,f=!1,y;const E=N=>{n.value=!0,z.sendGet("/backups",{timestamp:N}).success($=>{N?i.value.push(...$):i.value=$,(f=$.length>=100)&&(y=$[$.length-1].createDate),n.value=!1})},C=se("service"),I=U({}),O=N=>{var $,Y;return N.endsWith("-group")?c("message.group",(($=C[N.replace("-group","")])==null?void 0:$.name)||"Unknown"):N==="full"?c("backup.full"):((Y=C[N])==null?void 0:Y.name)||N};let v=!1;S.$on(F.LOAD_RESOURCES_FINISH,N=>N||E());const T=()=>{f&&!m&&E(y)};ht(()=>{!v&&M.LOGINED&&E(),v=!0});const{proxy:R}=St(),D=(N,$)=>{const Y=[],re=C[$.type];$.id!=="full"&&!($.type&&$.type.endsWith("-group"))&&!(re&&re.requireScript===!1)&&(Y.push({icon:"difference",label:c("backup.difference"),onClick(){l.value=We($.createDate),o.value=!0,r.value=!0,p.value=C[$.type].language||"magicscript",Promise.all([new Promise(ie=>z.sendGet("/backup",{id:$.id,timestamp:$.createDate}).success(Q=>ie(Q))),new Promise(ie=>z.sendGet("/resource/file/"+$.id).success(Q=>ie(Q)))]).then(ie=>{var Q;I.value=ie[1],u.value=$,r.value=!1,s.value=[ie[0],(Q=ie[1])==null?void 0:Q.script]}).catch(ie=>{console.error(ie),o.value=!1})}}),Y.push({label:c("toolbars.history"),icon:"history",onClick:()=>{S.$emit(F.ADD_FOOTER_TOOLBAR,{component:$e(t),id:"backup-file",icon:"history",title:c("toolbars.viewHistory",$.name),allowClose:!0,data:{id:$.id}})}})),($.id==="full"||!$.type.endsWith("-group"))&&Y.push({icon:"rollback",label:c("backup.rollback"),onClick(){const ie=`${$.name}(${We($.createDate)})`;ve.confirm(c("backup.rollback"),c("backup.rollbackConfirm"),()=>{z.sendPost("/backup/rollback",{id:$.id,timestamp:$.createDate}).success(Q=>{Q?(S.status("backup.rollbackSuccess",!0,ie),S.$emit(F.LOAD_RESOURCES)):(ve.alert(c("backup.rollbackFailed",ie)),S.status("backup.rollbackFailed",!1,ie))})})}}),Y.length>0&&R.$contextmenu({event:N,menus:Y})},L=()=>{o.value=!1;const N=`${u.value.name}(${We(u.value.createDate)})`;z.sendPost("/backup/rollback",{id:u.value.id,timestamp:u.value.createDate}).success($=>{$?(ve.alert(c("backup.rollbackSuccess",N)),S.status("backup.rollbackSuccess",!0,N),S.$emit(F.REFRESH_RESOURCE,u.value.id)):(ve.alert(c("backup.rollbackFailed",N)),S.status("backup.rollbackFailed",!1,N))})};return(N,$)=>{const Y=b("magic-panel-toolbar"),re=b("magic-loading"),ie=b("magic-table-column"),Q=b("magic-table"),ye=b("magic-empty"),Te=b("magic-monaco-diff-editor"),Rt=b("magic-button"),At=b("magic-button-group"),ke=b("magic-dialog");return g(),w(Z,null,[A("div",au,[_(Y,{toolbars:a}),A("div",null,[_(re,{loading:n.value},null,8,["loading"]),i.value.length>0?(g(),j(Q,{key:0,data:i.value,border:!0,onContextmenu:D,onLoadNext:T},{default:k(()=>[_(ie,{title:h(c)("message.date"),width:"160"},{default:k(({row:Ne})=>[_e(B(h(We)(Ne.createDate)),1)]),_:1},8,["title"]),_(ie,{title:h(c)("message.type"),width:"90"},{default:k(({row:Ne})=>[A("span",null,B(O(Ne.type)),1)]),_:1},8,["title"]),_(ie,{title:h(c)("history.operator"),width:"100"},{default:k(({row:Ne})=>[_e(B(Ne.createBy||"guest"),1)]),_:1},8,["title"]),_(ie,{title:h(c)("message.name"),align:"left"},{default:k(({row:Ne})=>[_e(B(Ne.name),1)]),_:1},8,["title"])]),_:1},8,["data"])):(g(),j(ye,{key:1,text:h(c)("message.empty",h(c)("history.name"))},null,8,["text"]))])]),_(ke,{value:o.value,"onUpdate:value":$[1]||($[1]=Ne=>o.value=Ne),title:h(c)("history.name"),width:"80%",maxWidth:"100%",top:"60px",height:"80%",className:"magic-dialog-diff"},{default:k(()=>[A("div",su,[A("div",iu,[A("div",null,B(l.value)+" by "+B(u.value.createBy||"guest"),1),A("div",null,B(h(c)("backup.current"))+"("+B(h(We)(I.value.updateTime||I.value.createTime))+" by "+B(I.value.updateBy||I.value.createBy||"guest")+")",1)]),r.value?(g(),j(re,{key:1,loading:r.value},null,8,["loading"])):(g(),j(Te,{key:0,value:s.value,"onUpdate:value":$[0]||($[0]=Ne=>s.value=Ne),language:p.value},null,8,["value","language"]))]),_(At,{align:"right"},{default:k(()=>[_(Rt,{value:h(c)("backup.rollback"),type:"active",onClick:L},null,8,["value"])]),_:1})]),_:1},8,["value","title"])],64)}}};var ru=q(ou,[["__scopeId","data-v-b15945c0"]]),lu=Object.freeze(Object.defineProperty({__proto__:null,default:ru},Symbol.toStringTag,{value:"Module"}));const ct=e=>(Dn("data-v-71b796dc"),e=e(),Mn(),e),cu={class:"magic-debug"},uu={class:"magic-debug-variables"},pu={key:0,viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},du=ct(()=>A("path",{d:"M201.472 320h-49.6V129.408l-59.2 18.368v-40.32L196.16 70.4h5.312V320z m50.816 320.128H81.024v-33.92l80.832-86.208c6.016-6.656 11.136-12.672 15.36-18.176a133.76 133.76 0 0 0 10.112-15.104 57.728 57.728 0 0 0 5.504-12.8 42.88 42.88 0 0 0 1.6-11.392c0-11.136-2.816-19.84-8.384-26.24-5.632-6.272-13.632-9.472-24.064-9.472a36.224 36.224 0 0 0-15.488 3.2 31.808 31.808 0 0 0-11.328 8.704 39.232 39.232 0 0 0-6.976 13.312 56.32 56.32 0 0 0-2.368 16.832h-49.792c0-11.2 1.984-21.76 6.016-31.744 3.968-9.984 9.792-18.624 17.28-26.112 7.616-7.424 16.704-13.312 27.392-17.664 10.688-4.352 22.784-6.528 36.16-6.528 13.12 0 24.768 1.664 34.88 4.928 10.176 3.2 18.624 7.872 25.536 13.952 6.848 6.08 12.032 13.504 15.616 22.336 3.52 8.768 5.312 18.688 5.312 29.696 0 8.32-1.28 16.384-3.968 24.192-2.56 7.744-6.336 15.552-11.136 23.296a190.08 190.08 0 0 1-17.408 23.68 528.64 528.64 0 0 1-22.784 24.768l-44.096 46.464h107.456v40zM131.456 812.8h26.432c12.608 0 21.888-3.136 27.968-9.408a34.56 34.56 0 0 0 9.088-25.088 38.656 38.656 0 0 0-2.048-12.8 26.304 26.304 0 0 0-16.832-16.704 42.112 42.112 0 0 0-14.912-2.432 41.792 41.792 0 0 0-12.928 1.984 33.664 33.664 0 0 0-10.688 5.568 25.6 25.6 0 0 0-9.856 20.608H78.08a60.8 60.8 0 0 1 6.4-28.032c4.352-8.448 10.176-15.552 17.536-21.44 7.424-5.888 16-10.496 25.984-13.76 9.984-3.2 20.608-4.864 32-4.864 12.544 0 24 1.472 34.368 4.48 10.368 3.072 19.2 7.616 26.688 13.632 7.424 5.952 13.184 13.44 17.28 22.272 4.16 8.896 6.208 19.2 6.208 30.848a52.8 52.8 0 0 1-9.856 30.72 67.968 67.968 0 0 1-28.032 22.976 62.08 62.08 0 0 1 31.488 22.656 61.44 61.44 0 0 1 10.368 35.712 66.56 66.56 0 0 1-25.408 54.336c-7.872 6.208-17.28 10.88-28.032 14.208a121.024 121.024 0 0 1-66.368 0.64 81.92 81.92 0 0 1-27.2-13.248 68.032 68.032 0 0 1-19.2-22.4 66.304 66.304 0 0 1-7.296-32h49.6a29.824 29.824 0 0 0 10.368 22.912 36.48 36.48 0 0 0 11.584 6.592 48.64 48.64 0 0 0 30.4 0 30.336 30.336 0 0 0 19.392-17.792 46.208 46.208 0 0 0-0.256-31.04 28.544 28.544 0 0 0-8.192-11.584 34.304 34.304 0 0 0-12.928-6.592 63.104 63.104 0 0 0-17.088-2.176h-26.432V812.8z",fill:"#9AA7B0"},null,-1)),_u=ct(()=>A("path",{d:"M384 128h512v192H384zM384 768h512v192H384zM384 448h512v192H384z",fill:"#40B6E0","fill-opacity":".7"},null,-1)),hu=[du,_u],fu={key:1,viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},mu=ct(()=>A("path",{d:"M192 128h640v192H192zM192 384h640v192H192zM192 640h640v192H192z",fill:"#F4AF3D","fill-opacity":".6"},null,-1)),gu=[mu],vu={class:"key"},Eu=ct(()=>A("label",{class:"separator"},"=",-1)),bu={key:2,class:"object-type"},yu={key:3,class:"object-type"},Tu={key:0,viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Su=ct(()=>A("path",{d:"M128 128h768v768H128z",fill:"#40B6E0","fill-opacity":".6","p-id":"8251"},null,-1)),Ou=ct(()=>A("path",{d:"M691.968 704V422.912l-62.464 15.36L613.12 373.76l102.912-30.72h53.76V704h-77.824z m-284.288 6.144c-95.744 0-158.72-80.384-158.72-184.32V524.8c0-103.936 64.512-185.344 159.744-185.344 94.72 0 158.72 80.384 158.72 184.32V524.8c0 103.936-64 185.344-159.744 185.344z m1.408-71.168c47.616 0 77.824-48.128 77.824-113.152V524.8c0-65.024-31.744-114.176-78.848-114.176S330.24 458.24 330.24 523.776V524.8c0 65.536 31.232 114.176 78.848 114.176z",fill:"#231F20","fill-opacity":".7","p-id":"8252"},null,-1)),xu=[Su,Ou],Ru={key:1,viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Au=ct(()=>A("path",{d:"M192 128h640v192H192zM192 384h640v192H192zM192 640h640v192H192z",fill:"#F4AF3D","fill-opacity":".6"},null,-1)),Iu=[Au],Cu={class:"key"},Lu=ct(()=>A("label",{class:"separator"},"=",-1)),Nu={key:2,class:"object-type"},wu={setup(e){const t=se("opened"),n=me(()=>!t.value.variables),a=U([{title:c("editor.tooltip.resume")+"(F8)",icon:"continue",disabled:n,onClick(){S.$emit(F.DEBUG_CONTINUE)}},{title:c("editor.tooltip.stepInto")+"(F6)",icon:"step-over",disabled:n,onClick(){S.$emit(F.DEBUG_SETPINTO)}},{title:c("resource.header.expand"),icon:"expand-all",disabled:n,onClick:()=>et(t.value.variables,s=>s.opened=!0)},{title:c("resource.header.collapse"),icon:"collapse-all",disabled:n,onClick:()=>et(t.value.variables,s=>s.opened=!1)}]);return(s,i)=>{const o=b("magic-panel-toolbar"),r=b("magic-icon"),l=b("magic-tree"),u=b("magic-empty");return g(),w("div",cu,[_(o,{toolbars:a.value},null,8,["toolbars"]),A("div",uu,[h(t).variables?(g(),j(l,{key:0,data:h(t).variables},{folder:k(({item:p})=>[_(r,{icon:p.opened?"arrow-bottom":"arrow-right",onClick:Se(m=>p.opened=!p.opened,["stop"])},null,8,["icon","onClick"]),p.dataType==="array"?(g(),w("svg",pu,hu)):(g(),w("svg",fu,gu)),A("label",vu,B(p.name),1),Eu,p.size?(g(),w("span",bu,"("+B(p.size)+")",1)):X("",!0),p.type?(g(),w("span",yu,B(`{${p.type}}`),1)):X("",!0)]),file:k(({item:p})=>[_(r,{icon:"empty"}),p.dataType==="number"?(g(),w("svg",Tu,xu)):(g(),w("svg",Ru,Iu)),A("label",Cu,B(p.name),1),Lu,A("span",{class:Ee(["magic-data-type",p.dataType])},B(p.value),3),p.type&&!p.isNull?(g(),w("span",Nu," ("+B(p.type)+")",1)):X("",!0)]),_:1},8,["data"])):(g(),j(u,{key:1,text:h(c)("message.empty",h(c)("message.variable"))},null,8,["text"]))])])}}};var ku=q(wu,[["__scopeId","data-v-71b796dc"]]),Du=Object.freeze(Object.defineProperty({__proto__:null,default:ku},Symbol.toStringTag,{value:"Module"}));const Mu={class:"magic-event"},Pu=["innerHTML"],Uu={setup(e){const t=S.getStatusLog(),n=[{title:c("message.clear"),icon:"clear",onClick:()=>{S.clearStatusLog()}}];return(a,s)=>{const i=b("magic-panel-toolbar"),o=b("magic-table-column"),r=b("magic-table");return g(),w("div",Mu,[_(i,{toolbars:n}),A("div",null,[_(r,{data:h(t),border:"",align:"left"},{default:k(()=>[_(o,{title:h(c)("message.date"),width:"180"},{default:k(({row:l})=>[_e(B(l.timestamp),1)]),_:1},8,["title"]),_(o,{title:h(c)("event.message")},{default:k(({row:l})=>[A("div",{innerHTML:l.content},null,8,Pu)]),_:1},8,["title"])]),_:1},8,["data"])])])}}};var $u=q(Uu,[["__scopeId","data-v-06d5ba36"]]),Bu=Object.freeze(Object.defineProperty({__proto__:null,default:$u},Symbol.toStringTag,{value:"Module"}));const Fu={class:"magic-log-wrapper"},Hu=["innerHTML"],ju=["onClick"],Vu={setup(e){const t=U([]),n=U(!1),a=U([{icon:"expand-all",title:c("resource.header.expand"),onClick:()=>t.value.forEach(p=>p.showMore=!0)},{icon:"collapse-all",title:c("resource.header.collapse"),onClick:()=>t.value.forEach(p=>p.showMore=!1)},{icon:"delete",title:c("message.clear"),onClick:()=>t.value.splice(0)},{icon:"scroll-down",title:c("log.scrollEnd"),selectable:!0,onSelect:p=>{n.value=p,o()}}]),s=U(null),{proxy:i}=St(),o=()=>{n.value&&be(()=>{s.value&&(s.value.scrollTop=s.value.scrollHeight)})},r=p=>{i.$contextmenu({event:p,menus:[{icon:"delete",label:c("message.clear"),onClick:()=>t.value.splice(0)},{icon:"expand-all",label:c("resource.header.expand"),onClick:()=>t.value.forEach(m=>m.showMore=!0)},{icon:"collapse-all",label:c("resource.header.collapse"),onClick:()=>t.value.forEach(m=>m.showMore=!1)}]})},l=p=>{const m=p.map(f=>{let y=f.replace(/[&<>]/gm,function(C){return C==="&"?"&":C==="<"?"<":C===">"?">":""});y=y.replace(/(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}.\d{3}\s+)([^\s]+)( --- \[)(.{15})(] )(.{40})/gm,'$1 $2$3$4$5$6'),y=y.replace(/(https?:\/\/[^\s]+)/gm,'$1'),y=y.replace(/(\tat .*\()(.*?:\d+)(\).*?[\r\n])/g,'$1$2$3');let E=f.split(`
+`).length;return{html:y,multiple:E>3,lines:E-3,showMore:!1}});m&&(t.value.push(...m),M.LOG_MAX_ROWS!==1/0&&t.value.length>M.LOG_MAX_ROWS&&t.value.splice(0,t.value.length-M.LOG_MAX_ROWS),o())};S.$event(Re.LOGS,([p])=>l(p)),S.$event(Re.LOG,([p])=>l(p));const u=new IntersectionObserver(()=>{o()});return ht(()=>{u.observe(s.value)}),(p,m)=>{const f=b("magic-panel-toolbar"),y=b("magic-empty");return g(),w("div",Fu,[_(f,{toolbars:a.value},null,8,["toolbars"]),!t.value||t.value.length===0?(g(),j(y,{key:0,text:h(c)("message.empty",h(c)("message.log"))},null,8,["text"])):X("",!0),yt(A("div",{class:"magic-log",ref_key:"element",ref:s,onContextmenu:m[0]||(m[0]=Se(E=>r(E),["prevent"]))},[(g(!0),w(Z,null,he(t.value,(E,C)=>(g(),w("div",{class:Ee({multiple:E.multiple,more:E.showMore}),key:"run_log_"+C},[A("pre",{innerHTML:E.html},null,8,Hu),E.multiple?(g(),w("span",{key:0,class:"multiple",onClick:I=>E.showMore=!E.showMore},B(E.showMore?h(c)("log.hide"):h(c)("log.show",E.lines)),9,ju)):X("",!0)],2))),128))],544),[[$t,t.value&&t.value.length>0]])])}}};var Gu=Object.freeze(Object.defineProperty({__proto__:null,default:Vu},Symbol.toStringTag,{value:"Module"}));const zu={class:"magic-online"},Yu={setup(e){const t=Je([]),n=se("activateUserFiles"),a=(i,o)=>{const r=t.find(l=>l.cid===i);r&&(Object.values(n.value).forEach(l=>{const u=l.findIndex(p=>p.cid===i);u>-1&&l.splice(u,1)}),n.value[o]=n.value[o]||[],n.value[o].push(r))},s=i=>{t.some(o=>o.cid===i.cid)||t.push(i)};return S.$event(Re.LOGIN_RESPONSE,([i,o])=>{n.value={},t.splice(0,t.length),i==="1"&&s(o)}),S.$event(Re.PING,()=>{S.send(Re.PONG)}),S.$event(Re.USER_LOGIN,([i])=>{M.CLIENT_ID!==i.cid&&(S.$emit(F.NOTIFY,{title:c("online.login"),content:c("online.loginTips",i.username,i.ip),duration:3e3}),S.status("online.loginTips",!0,i.username,i.ip)),s(i)}),S.$event(Re.USER_LOGOUT,([i])=>{M.CLIENT_ID!==i.cid&&(S.$emit(F.NOTIFY,{title:c("online.logout"),content:c("online.logoutTips",i.username,i.ip),duration:3e3}),S.status("online.logoutTips",!0,i.username,i.ip));const o=t.findIndex(r=>r.cid===i.cid);a(i.cid,"0"),o>-1&&t.splice(o,1)}),S.$event(Re.ONLINE_USERS,([i])=>{i.forEach(o=>{M.CLIENT_ID!==o.cid&&(s(o),o.fileId&&a(o.cid,o.fileId))})}),S.$event(Re.INTO_FILE_ID,([i,o])=>a(i,o)),(i,o)=>{const r=b("magic-avatar-group");return g(),w("div",zu,[_(r,{users:h(t),max:9},null,8,["users"]),A("span",null,B(h(c)("online.onlines",h(t).length)),1)])}}};var qu=q(Yu,[["__scopeId","data-v-0c296fa2"]]),Ku=Object.freeze(Object.defineProperty({__proto__:null,default:qu},Symbol.toStringTag,{value:"Module"}));const Wu={class:"magic-status-bar"},Xu=["innerHTML"],Ju=["title","onClick"],Qu={props:{config:Object},setup(e){const t=e,n=U(null),a=[{icon:"gitee",title:"Gitee",displayKey:"repo",onClick:()=>window.open("https://gitee.com/ssssssss-team/magic-api")},{icon:"git",title:"Github",displayKey:"repo",onClick:()=>window.open("https://github.com/ssssssss-team/magic-api")},{icon:"qq",title:c("message.joinGroup"),displayKey:"qqGroup",onClick:()=>window.open("https://qm.qq.com/cgi-bin/qm/qr?k=Q6dLmVS8cHwoaaP18A3tteK_o0244e6B&jump_from=webapi")},{icon:"help",title:c("message.document"),displayKey:"document",onClick:()=>window.open("https://ssssssss.org/magic-api")}],s=me(()=>{const o=a.filter(r=>t.config.header[r.displayKey]!==!1);return n.value&&n.value.id&&n.value.username&&o.push({icon:"logout",title:n.value.username,onClick:()=>ve.confirm(c("message.logout"),c("message.logoutConfirm",n.value.username),()=>z.sendPost("/logout").success(()=>{n.value=null,M.HEADER_MAGIC_TOKEN_VALUE="unauthorization",M.LOGINED=!1,Fe.remove(M.STORE.token),S.$emit(F.LOGOUT),S.status("message.logoutSuccess")}))}),o}),i=U("");return S.$on(F.LOGINED,()=>{S.status("message.getCurrentLoginUser"),z.send("/user").success(o=>n.value=o)}),S.$on(F.STATUS,o=>i.value=o),(o,r)=>{const l=b("magic-online"),u=b("magic-icon");return g(),w("div",Wu,[A("div",{class:"message",innerHTML:i.value},null,8,Xu),_(l),A("ul",null,[(g(!0),w(Z,null,he(h(s),(p,m)=>(g(),w("li",{title:p.title,key:m,onClick:Se(p.onClick,["stop"])},[_(u,{icon:p.icon},null,8,["icon"])],8,Ju))),128))])])}}};var Zu=q(Qu,[["__scopeId","data-v-49bc4fc3"]]),e1=Object.freeze(Object.defineProperty({__proto__:null,default:Zu},Symbol.toStringTag,{value:"Module"}));const t1={class:"magic-todo"},n1={key:3},a1={class:"todo"},s1={setup(e){const t=U(!0),n=[{icon:"refresh",title:c("message.refresh"),onClick(){p()}},{icon:"expand-all",title:c("message.expand"),onClick:()=>et(a.value,f=>f.opened=!0)},{icon:"collapse-all",title:c("message.collapse"),onClick:()=>et(a.value,f=>f.opened=!1)}],a=U([]),s=se("resources"),i={},o=f=>{(f.groupId||f.line)&&S.$emit(F.OPEN_WITH_ID,f.id)},r=(f,y)=>{let E=f.find(C=>C.id===y);if(!E)for(let C=0;C{let y=[];return f.forEach(E=>{E.line>0?y.push(E):E.folder&&E.children&&(E.children=l(E.children),E.children.length&&y.push(E))}),y},u=se("service"),p=()=>{a.value=[],t.value=!0,z.sendGet("/todo").success(f=>{const y=s();y.forEach(C=>i[C.navbar.type]=C.navbar);let E=!1;f.forEach(C=>{for(let I=0;IC.display).map(C=>({folder:!0,icon:C.navbar.icon,name:C.navbar.title,children:C.tree,root:!0}))),et(a.value,C=>C.opened=!0)),t.value=!1})};let m=!1;return S.$on(F.LOAD_RESOURCES_FINISH,p),ht(()=>{!m&&M.LOGINED&&p(),m=!0}),(f,y)=>{const E=b("magic-panel-toolbar"),C=b("magic-loading"),I=b("magic-icon"),O=b("magic-text-icon"),v=b("magic-tree"),T=b("magic-empty");return g(),w("div",t1,[_(E,{toolbars:n}),A("div",null,[_(C,{loading:t.value},null,8,["loading"]),a.value.length>0?(g(),j(v,{key:0,data:a.value,onItemClick:o},{folder:k(({item:R})=>[_(I,{icon:R.opened?"arrow-bottom":"arrow-right",onClick:Se(D=>R.opened=!R.opened,["stop"])},null,8,["icon","onClick"]),R.root?(g(),j(I,{key:0,icon:R.icon},null,8,["icon"])):R.icon?(g(),j(O,{key:1,icon:R.icon},null,8,["icon"])):(g(),j(I,{key:2,icon:"list"})),A("label",null,B(R.name),1),R.path?(g(),w("span",n1,"("+B(R.path)+")",1)):X("",!0)]),file:k(({item:R})=>[_(I),_(I,{icon:"todo"}),A("label",a1,B(R.text),1)]),_:1},8,["data"])):(g(),j(T,{key:1,text:h(c)("message.empty","TODO")},null,8,["text"]))])])}}};var i1=q(s1,[["__scopeId","data-v-29308d9b"]]),o1=Object.freeze(Object.defineProperty({__proto__:null,default:i1},Symbol.toStringTag,{value:"Module"}));const r1={class:"magic-toolbar"},l1={class:"magic-toolbar-header"},c1={class:"magic-toolbar-header-buttons"},u1={setup(e){const t=U(null),n=Je([{type:"api",title:c("api.title"),icon:"parameter",component:$e(te("magic-api-info"))},{id:"response",type:"api",title:c("toolbars.response"),icon:"run",component:$e(te("magic-api-response"))},{type:"function",title:c("fn.title"),icon:"parameter",component:$e(te("magic-function-info"))},{type:"group-api",title:c("message.group",c("api.name")),icon:"parameter",component:$e(te("magic-api-group"))},{id:"debug",type:["api","task"],title:c("toolbars.debug"),icon:"debug-info",component:$e(te("magic-debug"))},{id:"log",title:c("toolbars.log"),icon:"log",component:$e(te("magic-log"))},{type:"api",title:c("toolbars.global"),icon:"settings",component:$e(te("magic-global"))},{id:"todo",title:"TODO",icon:"todo",component:$e(te("magic-todo"))},{id:"history",title:c("toolbars.history"),icon:"history",component:$e(te("magic-backup"))},{id:"event",title:c("toolbars.event"),icon:"event",component:$e(te("magic-event")),style:{float:"right"}}]);M.PLUGINS.filter(r=>r.toolbars&&r.toolbars.length>0).map(r=>r.toolbars).forEach(r=>r.forEach(l=>{n.unshift({id:l.id,type:l.type,icon:l.icon,title:c(l.title),component:$e(l.component)})}));const a=U({}),s=U({});Ke("opened",a),Ke("info",s);const i=(r,l)=>{n.forEach(u=>u.show=u.type===void 0||(Array.isArray(u.type)?u.type.find(p=>p.type===r):u.type===r)),t.value&&l&&t.value.select(n.findIndex(u=>u.show))};i("");const o=r=>{const l=n.findIndex(u=>u.id===r.id);l>-1&&n.splice(l,1),t.value.select(-1)};return S.$on(F.ADD_FOOTER_TOOLBAR,r=>{r.id&&o(r),t.value.select(n.push(r)-1)}),S.$on(F.OPEN_EMPTY,()=>i("")),S.$on(F.OPEN,(r,l)=>{r.responseBlobValue=null,a.value=r,s.value=r.item,i(r.type,l)}),S.$on(F.OPEN_GROUP,r=>{i("group-"+r.type,!0),s.value=r}),S.$on(F.SWITCH_TOOLBAR,r=>{const l=n.findIndex(u=>u.id===r);l>-1&&t.value.select(l)}),(r,l)=>{const u=b("magic-icon"),p=b("magic-resizer"),m=b("magic-navbar-item"),f=b("magic-navbar");return g(),w("div",r1,[_(f,{direction:"horizontal",ref_key:"navbar",ref:t},{default:k(()=>[(g(!0),w(Z,null,he(h(n),(y,E)=>(g(),j(m,dt({key:E},y),{default:k(()=>[_(p,{direction:"y",max:700,min:150,value:250},{default:k(()=>[A("div",l1,[A("label",null,B(y.title),1),A("div",c1,[_(u,{icon:"minimize",size:"14px",title:h(c)("message.hide"),onClick:l[0]||(l[0]=C=>t.value.select(-1))},null,8,["title"]),y.allowClose?(g(),j(u,{key:0,icon:"close",title:h(c)("editor.tab.close"),onClick:C=>o(y)},null,8,["title","onClick"])):X("",!0)])]),(g(),j(te(y.component),ns(as(y.data)),null,16))]),_:2},1024)]),_:2},1040))),128))]),_:1},512)])}}};var p1=q(u1,[["__scopeId","data-v-200d8d00"]]),d1=Object.freeze(Object.defineProperty({__proto__:null,default:p1},Symbol.toStringTag,{value:"Module"}));const _1={class:"magic-function-info"},h1={setup(e){const t=se("info"),n=[{title:c("fn.parameter"),component:te("magic-function-parameter")},{title:c("fn.description"),component:te("magic-api-description")}];return(a,s)=>{const i=b("magic-select"),o=b("magic-input"),r=b("magic-navbar-item"),l=b("magic-navbar");return g(),w(Z,null,[A("div",_1,[A("form",null,[A("label",null,B(h(c)("fn.returnValue")),1),_(i,{width:"100px",options:a.$FUNCTION_RETURN_TYPES,"default-select":a.$DEFAULT_FUNCTION_RETURN_TYPE,value:h(t).method,"onUpdate:value":s[0]||(s[0]=u=>h(t).method=u)},null,8,["options","default-select","value"]),A("label",null,B(h(c)("fn.form.name")),1),_(o,{value:h(t).name,"onUpdate:value":s[1]||(s[1]=u=>h(t).name=u),placeholder:h(c)("fn.form.placeholder.name"),width:"200px"},null,8,["value","placeholder"]),A("label",null,B(h(c)("fn.form.path")),1),_(o,{value:h(t).path,"onUpdate:value":s[2]||(s[2]=u=>h(t).path=u),placeholder:h(c)("fn.form.placeholder.path"),width:"auto",style:{flex:"1"}},null,8,["value","placeholder"])])]),_(l,{direction:"horizontal",ref:"navbar",style:{flex:"1"},"allow-close":!1},{default:k(()=>[(g(),w(Z,null,he(n,(u,p)=>_(r,{key:p,title:u.title},{default:k(()=>[(g(),j(te(u.component),{info:h(t)},null,8,["info"]))]),_:2},1032,["title"])),64))]),_:1},512)],64)}}};var f1=q(h1,[["__scopeId","data-v-bc8654ec"]]),m1=Object.freeze(Object.defineProperty({__proto__:null,default:f1},Symbol.toStringTag,{value:"Module"}));const g1={class:"magic-panel-function"},v1={setup(e){const t=se("info"),n=U(-1);return(a,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-input"),r=b("magic-table-column"),l=b("magic-select"),u=b("magic-table");return g(),w("div",g1,[_(i,{index:n.value,"onUpdate:index":s[0]||(s[0]=p=>n.value=p),value:h(t).parameters},null,8,["index","value"]),_(u,{data:h(t).parameters,border:"",onClickRow:s[1]||(s[1]=p=>n.value=p)},{default:k(()=>[_(r,{title:h(c)("message.name"),width:"20%"},{default:k(({row:p})=>[_(o,{value:p.name,"onUpdate:value":m=>p.name=m,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("message.parameterType"),width:"20%"},{default:k(({row:p})=>[_(l,{options:a.$FUNCTION_RETURN_TYPES,value:p.type,"onUpdate:value":m=>p.type=m,"default-select":a.$DEFAULT_FUNCTION_RETURN_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("message.description"),flex:"1"},{default:k(({row:p})=>[_(o,{value:p.description,"onUpdate:value":m=>p.description=m,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"])]),_:1},8,["data"])])}}};var E1=Object.freeze(Object.defineProperty({__proto__:null,default:v1},Symbol.toStringTag,{value:"Module"}));const b1={setup(e){const t=U(!1),n=U([]);S.$on(F.DO_DOWNLOAD,()=>t.value=!0);const a=()=>{n.value.length?z.sendJson("/download",n.value,{method:"post",headers:{"Content-Type":"application/json"},transformRequest:[],responseType:"blob"}).success(s=>{Hn(s,"magic-api.zip"),S.status("message.exported"),t.value=!1}):ve.alert(c("message.exportNoneSelect"))};return(s,i)=>{const o=b("magic-resource-choose"),r=b("magic-button"),l=b("magic-button-group"),u=b("magic-dialog");return g(),j(u,{title:h(c)("message.export"),value:t.value,"onUpdate:value":i[5]||(i[5]=p=>t.value=p),shade:!1,padding:"0",width:"480px",top:"60px",overflow:"hidden"},{default:k(()=>[_(o,{ref:"resource",value:n.value,"onUpdate:value":i[0]||(i[0]=p=>n.value=p)},null,8,["value"]),_(l,{align:"right",style:{margin:"5px 0","margin-right":"5px"}},{default:k(()=>[_(r,{value:h(c)("message.expand"),onOnClick:i[1]||(i[1]=p=>s.$refs.resource.expand(!0))},null,8,["value"]),_(r,{value:h(c)("message.collapse"),onOnClick:i[2]||(i[2]=p=>s.$refs.resource.expand(!1))},null,8,["value"]),_(r,{value:h(c)("message.selectAll"),onOnClick:i[3]||(i[3]=p=>s.$refs.resource.selectAll(!0))},null,8,["value"]),_(r,{value:h(c)("message.deselectAll"),onOnClick:i[4]||(i[4]=p=>s.$refs.resource.selectAll(!1))},null,8,["value"]),_(r,{type:"active",value:h(c)("message.export"),onOnClick:a},null,8,["value"])]),_:1})]),_:1},8,["title","value"])}}};var y1=q(b1,[["__scopeId","data-v-097eba83"]]),T1=Object.freeze(Object.defineProperty({__proto__:null,default:y1},Symbol.toStringTag,{value:"Module"}));const S1="modulepreload",da={},O1="./",_a=function(t,n){return!n||n.length===0?t():Promise.all(n.map(a=>{if(a=`${O1}${a}`,a in da)return;da[a]=!0;const s=a.endsWith(".css"),i=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${i}`))return;const o=document.createElement("link");if(o.rel=s?"stylesheet":S1,s||(o.as="script",o.crossOrigin=""),o.href=a,document.head.appendChild(o),s)return new Promise((r,l)=>{o.addEventListener("load",r),o.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t())};const x1={class:"magic-header"},R1={class:"magic-logo"},A1=["title"],I1=["title"],C1={class:"magic-header-title"},L1=["title","onClick"],N1={class:"magic-skin-selector"},w1=["onClick"],k1={class:"magic-locale-selector"},D1=["onClick"],M1={props:{title:{type:String,default:"magic-api"},themeStyle:Object,header:Object},setup(e){const t=e,n={"../../../scripts/i18n/en.js":()=>_a(()=>Promise.resolve().then(function(){return Ts}),void 0),"../../../scripts/i18n/zh-cn.js":()=>_a(()=>Promise.resolve().then(function(){return Ss}),void 0)},a=Je([]);for(let y in n)n[y]().then(E=>{a.push({id:y.replace(/(.*?i18n\/)(.*)(\.js)/g,"$2"),name:E.default.name})});const s=M.MAGIC_API_VERSION_TEXT,i=U(!1),o=U(!1),r=U({}),l=U("");S.$on(F.OPEN_EMPTY,()=>{l.value="",r.value={}}),S.$on(F.OPEN,y=>{r.value=y,l.value=y.path(),tt(y,()=>{r.value===y&&(l.value=y.path())})});const u=me(()=>[{name:`${c("message.run")}(Ctrl + Q)`,icon:"run",disabled:()=>r.value.runnable!==!0||r.value.running===!0,onClick:()=>S.$emit(F.DO_TEST)},{name:`${c("message.save")}(Ctrl + S)`,icon:"save",onClick:()=>S.$emit(F.DO_SAVE,!0)},{name:`${c("message.search")}(Ctrl + Shift + F)`,icon:"search",onClick:()=>S.$emit(F.DO_SEARCH)},{name:c("message.upload"),icon:"upload",onClick:()=>S.$emit(F.DO_UPLOAD)},{name:c("message.export"),icon:"download",onClick:()=>S.$emit(F.DO_DOWNLOAD)},{name:c("message.push"),icon:"push",onClick:()=>S.$emit(F.DO_PUSH)},{name:c("message.skin"),displayKey:"skin",icon:"skin",onClick:()=>{i.value=!i.value,o.value=!1}},{name:c("message.i18n"),icon:"i18n",onClick:()=>{o.value=!o.value,i.value=!1}},{name:c("message.reload"),icon:"refresh",onClick:()=>S.$emit(F.RELOAD_RESOURCES)}].filter(y=>t.header[y.displayKey]!==!1)),p=y=>{M.THEME=y,S.$emit(F.SWITCH_THEME,y),S.status("message.switchSkin",!0,y),Be.setTheme(y),Object.keys(t.themeStyle).forEach(C=>t.themeStyle[C]=void 0);let E=Kt[y];Fe.set(M.STORE.theme,y),Object.keys(E).forEach(C=>t.themeStyle[`--${C}`]=E[C]),i.value=!1},m=Fe.get(M.STORE.theme);Kt[m]?p(m):p(M.THEME);const f=({id:y,name:E})=>{o.value=!1,Fe.set("locale",y),ve.confirm(c("message.tips"),c("message.switchLocale",E),()=>{location.reload()})};return(y,E)=>{const C=b("magic-icon");return g(),w(Z,null,[A("div",x1,[A("div",R1,[A("label",{title:e.title},B(e.title),9,A1),A("label",{title:h(s)},B(h(s)),9,I1)]),A("div",C1,B(l.value),1),A("ul",null,[(g(!0),w(Z,null,he(h(u),(I,O)=>(g(),w("li",{key:O,title:I.name,onClick:Se(v=>I.disabled!==!0&&I.onClick(),["stop"]),class:Ee({disabled:I.disabled&&I.disabled()===!0})},[_(C,{icon:I.icon},null,8,["icon"])],10,L1))),128))])]),yt(A("div",N1,[A("ul",null,[(g(!0),w(Z,null,he(Object.keys(h(Kt)),I=>(g(),w("li",{key:"theme_"+I,onClick:O=>p(I)},B(I),9,w1))),128))])],512),[[$t,i.value]]),yt(A("div",k1,[A("ul",null,[(g(!0),w(Z,null,he(h(a),I=>(g(),w("li",{key:"locale_"+I.id,onClick:O=>f(I)},B(I.name),9,D1))),128))])],512),[[$t,o.value]])],64)}}};var P1=q(M1,[["__scopeId","data-v-4e11654b"]]),U1=Object.freeze(Object.defineProperty({__proto__:null,default:P1},Symbol.toStringTag,{value:"Module"}));const $1={class:"magic-push-form"},B1={setup(e){const t=U(!1),n=U([]),a=U("http://host:port/_magic-api-sync"),s=U("123456789");S.$on(F.DO_PUSH,()=>t.value=!0);const i=r=>{z.sendJson("/push",n.value,{method:"post",headers:{"magic-push-target":a.value,"magic-push-secret-key":s.value,"magic-push-mode":r,"Content-Type":"application/json"},transformRequest:[]}).success(()=>{const l=c(r==="full"?"push.full":"push.increment");S.status("push.success",!0,l),t.value=!1,S.$emit(F.LOAD_RESOURCES)})},o=r=>{n.value.length?r==="full"?ve.confirm(c("message.push"),c("message.pushWarning"),()=>i(r)):i(r):ve.alert(c("message.pushNoneSelect"))};return(r,l)=>{const u=b("magic-resource-choose"),p=b("magic-input"),m=b("magic-button"),f=b("magic-button-group"),y=b("magic-dialog");return g(),j(y,{title:h(c)("message.push"),value:t.value,"onUpdate:value":l[7]||(l[7]=E=>t.value=E),shade:!1,padding:"0",width:"450px",top:"60px",overflow:"hidden"},{default:k(()=>[_(u,{ref:"resource",value:n.value,"onUpdate:value":l[0]||(l[0]=E=>n.value=E)},null,8,["value"]),A("div",$1,[A("div",null,[A("label",null,B(h(c)("message.remote"))+"\uFF1A",1),_(p,{value:a.value,"onUpdate:value":l[1]||(l[1]=E=>a.value=E)},null,8,["value"])]),A("div",null,[A("label",null,B(h(c)("message.secret"))+"\uFF1A",1),_(p,{value:s.value,"onUpdate:value":l[2]||(l[2]=E=>s.value=E),type:"password"},null,8,["value"])])]),_(f,{align:"right",style:{margin:"5px 0","margin-right":"5px"}},{default:k(()=>[_(m,{value:h(c)("message.selectAll"),onOnClick:l[3]||(l[3]=E=>r.$refs.resource.selectAll(!0))},null,8,["value"]),_(m,{value:h(c)("message.deselectAll"),onOnClick:l[4]||(l[4]=E=>r.$refs.resource.selectAll(!1))},null,8,["value"]),_(m,{value:h(c)("push.increment"),onOnClick:l[5]||(l[5]=E=>o("increment")),type:"active"},null,8,["value"]),_(m,{value:h(c)("push.full"),onOnClick:l[6]||(l[6]=E=>o("full"))},null,8,["value"])]),_:1})]),_:1},8,["title","value"])}}};var F1=q(B1,[["__scopeId","data-v-e421c192"]]),H1=Object.freeze(Object.defineProperty({__proto__:null,default:F1},Symbol.toStringTag,{value:"Module"}));const j1={class:"magic-search-result"},V1=["onClick","onDblclick"],G1=["innerHTML"],z1={class:"name"},Y1=["textContent"],q1={class:"display-text"},K1={setup(e){const t=U(""),n=U(!1),a=se("findResource"),s=se("service"),i=U([]),o=U({}),r=me(()=>o.value.name+(o.value.path?`(${o.value.path})`:"")),l=I=>{I.script||z.sendGet(`/resource/file/${I.id}`).success(O=>{I.script=O.script})},u=(I,O)=>{o.value=I,l(I),O&&(S.$emit(F.OPEN_WITH_ID,I.id),n.value=!1,i.value=[],t.value="")};S.$on(F.DO_SEARCH,()=>{i.value=[],t.value="",n.value=!n.value});let p=null;const m=I=>{const O=[...I.childNodes],v=[];for(;O.length;){const T=O.shift();T.nodeType===T.TEXT_NODE?v.push(T):O.unshift(...T.childNodes)}return v},f=I=>{let O=0;return I.map(v=>{let T=O,R=O+v.wholeText.length;return O=R,{text:v.wholeText,startIdx:T,endIdx:R}})},y=(I,O)=>{const v=[..."[]()?.+*^${}:"].reduce((R,D)=>(R[D]=!0,R),{});O=O.split("").map(R=>v[R]?`\\${R}`:R).join("[\\s\\n]*");const T=new RegExp(O,"gmi");return[...I.matchAll(T)]},E=(I,O,v)=>{for(let T=v.length-1;T>=0;T--){const R=v[T],D=R.index,L=D+R[0].length;for(let N=0;N=L)break;let ie=I[N];const Q=Math.max(0,D-Y),ye=Math.min(re,L)-Y-Q;Q>0&&(ie=ie.splitText(Q)),ye{if(!O)return I;const v=document.createElement("div");v.innerHTML=I;const T=m(v),R=f(T),D=R.map(({text:N})=>N).join(""),L=y(D,O);return E(T,R,L),v.innerHTML};return tt(t,I=>{const O=I.trim();clearTimeout(p),O&&(p=setTimeout(()=>{z.send("/search",{keyword:O},{method:"POST"}).success(async v=>{const T=[];for(let R=0;R0&&(o.value=T[0],l(o.value)),i.value=T})},600))}),(I,O)=>{const v=b("magic-input"),T=b("magic-text-icon"),R=b("magic-monaco-editor"),D=b("magic-dialog");return g(),j(D,{title:h(c)("message.search"),value:n.value,"onUpdate:value":O[1]||(O[1]=L=>n.value=L),shade:!1,padding:"0",width:"700px",top:"60px"},{default:k(()=>[_(v,{value:t.value,"onUpdate:value":O[0]||(O[0]=L=>t.value=L),placeholder:h(c)("message.searchText")},null,8,["value","placeholder"]),i.value.length>0?(g(),w(Z,{key:0},[A("div",j1,[(g(!0),w(Z,null,he(i.value,(L,N)=>(g(),w("div",{key:N,class:Ee(["magic-search-result-item",{selected:o.value===L}]),onClick:$=>u(L),onDblclick:$=>u(L,!0)},[A("div",{class:"label",innerHTML:L.text},null,8,G1),A("div",z1,[_(T,{icon:L.icon},null,8,["icon"]),_e(B(L.name),1)]),A("div",{class:"line",textContent:B(L.line)},null,8,Y1)],42,V1))),128))]),A("div",q1,[_(T,{icon:o.value.icon},null,8,["icon"]),_e(B(h(r)),1)]),_(R,{readonly:"",value:o.value.script,language:o.value.language,style:{width:"100%",height:"300px"},matches:t.value},null,8,["value","language","matches"])],64)):X("",!0)]),_:1},8,["title","value"])}}};var W1=q(K1,[["__scopeId","data-v-4bbc2d10"]]),X1=Object.freeze(Object.defineProperty({__proto__:null,default:W1},Symbol.toStringTag,{value:"Module"}));const J1={setup(e){const t=U(!1),n=U(null),a=s=>{if(n.value){const i=new FormData;i.append("file",n.value,n.value.name),i.append("mode",s);const o=()=>{z.send("/upload",i,{method:"post",headers:{"Content-Type":"multipart/form-data"}}).success(r=>{const l=c(s==="full"?"upload.full":"upload.increment");r?(S.status("upload.success",!0,l),t.value=!1,S.$emit(F.LOAD_RESOURCES)):S.status("upload.failed",!1,l)})};s==="full"?ve.confirm(c("message.upload"),c("message.uploadWarning"),o):o()}};return S.$on(F.DO_UPLOAD,()=>t.value=!0),(s,i)=>{const o=b("magic-file"),r=b("magic-button"),l=b("magic-button-group"),u=b("magic-dialog");return g(),j(u,{title:h(c)("message.upload"),value:t.value,"onUpdate:value":i[3]||(i[3]=p=>t.value=p)},{default:k(()=>[_(o,{value:n.value,"onUpdate:value":i[0]||(i[0]=p=>n.value=p),accept:"application/x-zip-compressed"},null,8,["value"]),_(l,{align:"right",style:{"margin-top":"5px"}},{default:k(()=>[_(r,{value:h(c)("upload.increment"),type:"active",onClick:i[1]||(i[1]=p=>a("increment"))},null,8,["value"]),_(r,{value:h(c)("upload.full"),onClick:i[2]||(i[2]=p=>a("full"))},null,8,["value"])]),_:1})]),_:1},8,["title","value"])}}};var Q1=Object.freeze(Object.defineProperty({__proto__:null,default:J1},Symbol.toStringTag,{value:"Module"}));const Z1={class:"magic-data-resource"},ep={class:"magic-data-resource-header"},tp=["title","onClick"],np={key:1},ap=["onContextmenu"],sp={props:{type:String,title:String,data:Array},setup(e){const t=e,n=te(`magic-datasource-${t.type}`),a=U(!1),s=U(""),i=U({}),o=U(""),r=U(""),l=U(!0),u=me(()=>t.data&&t.data.length>0&&t.data[0].children&&t.data[0].children.filter(T=>T.name.indexOf(o.value)>-1||T.key.indexOf(o.value)>-1)||[]),p=se("service")[t.type],m=[{name:c("message.createDataSource",t.title),icon:"plus",onClick:()=>{s.value=c("message.createDataSource",t.title),r.value=c("message.create"),i.value={},a.value=!0,l.value=!1}}],f=()=>{p.doTest(i.value)},{proxy:y}=St(),E=(T,R,D)=>{T.groupId=`${t.type}:0`,z.sendJson(`/resource/file/${t.type}/save`,T).success(L=>{if(L){T.id!==L&&S.loading(3),T.id=L,S.status(R+"Success",!0,D),t.data[0].children=t.data[0].children||[];const N=t.data[0].children.find($=>$.id===T.id);N?Object.keys(T).forEach($=>N[$]=T[$]):t.data[0].children.push(T),a.value=!1}else S.status(R+"Failed",!1,D),y.$alert(c(R+"Failed",D))})},C=()=>{const T=pe({},i.value);E(T,"message.save",`${t.title}\u300C${I(T)}\u300D`)},I=T=>`${T.name}(${T.key})`,O=T=>{const R=t.data[0].children.findIndex(D=>D===T);R>-1&&t.data[0].children.splice(R,1)},v=(T,R)=>{const D=[];T.id&&([{label:c("message.update"),icon:"update",divided:!0,onClick:()=>{l.value=!0,s.value=c("message.updateTips",t.title),r.value=c("message.update"),a.value=!0,S.status("message.getDetail",`${t.title}\u300C${I(T)}\u300D`),z.sendGet(`/resource/file/${T.id}`).success(L=>i.value=L).end(()=>{l.value=!1})}},{label:c("resource.contextmenu.delete"),icon:"delete",onClick:()=>{const L=`${t.title}\u300C${I(T)}\u300D`;y.$confirm(c("message.deleteTips",t.title),c("message.deleteConfirm",L),()=>{z.send("/resource/delete",{id:T.id}).success(N=>{S.status(N?"message.deleteSuccess":"message.deleteFailed",N,L),N?O(T):y.$alert(N?"message.deleteSuccess":"message.deleteFailed",L)})})}},{label:c("message.copy"),icon:"copy",divided:!0,onClick:()=>{z.send(`/resource/file/${T.id}`).success(L=>{L.id=void 0,L.name=L.name+`(${c("message.copy")})`,L.key=L.key+"_copy",E(L,"datasource.copy",`${t.title}\u300C${I(L)}\u300D`)})}}].forEach(L=>D.push(L)),T.lock===M.LOCKED?D.push({label:c("resource.contextmenu.unlock"),icon:"unlock",onClick:()=>z.sendPost("/resource/unlock",{id:T.id}).success(L=>{S.status(L?"message.unlockSuccess":"message.unlockFailed",L,`${t.title}\u300C${I(T)}\u300D`),L&&(T.lock=M.UNLOCK)})}):D.push({label:c("resource.contextmenu.lock"),icon:"lock",onClick:()=>z.sendPost("/resource/lock",{id:T.id}).success(L=>{S.status(L?"message.lockSuccess":"message.lockFailed",L,`${t.title}\u300C${I(T)}\u300D`),L&&(T.lock=M.LOCKED)})})),M.PLUGINS.forEach(L=>{if(L.contextmenu&&typeof L.contextmenu=="function"){const N=L.contextmenu(Ue(pe({},T),{menuType:"datasource"}));N&&N.length&&N.forEach($=>D.push($))}}),D.length&&y.$contextmenu({menus:D,event:R})};return(T,R)=>{const D=b("magic-icon"),L=b("magic-input"),N=b("magic-empty"),$=b("magic-button"),Y=b("magic-button-group"),re=b("magic-loading"),ie=b("magic-dialog");return g(),w(Z,null,[A("div",Z1,[A("div",ep,[A("ul",null,[(g(),w(Z,null,he(m,(Q,ye)=>(g(),w(Z,{key:ye},[!Q.show||Q.show()?(g(),w("li",{key:0,title:Q.name||"",onClick:Te=>Q.onClick&&Q.onClick(),class:Ee({separator:Q.separator})},[Q.separator?X("",!0):(g(),j(D,{key:0,icon:Q.icon},null,8,["icon"]))],10,tp)):X("",!0)],64))),64))]),_(L,{value:o.value,"onUpdate:value":R[0]||(R[0]=Q=>o.value=Q),placeholder:h(c)("message.searchText"),width:"100%"},null,8,["value","placeholder"]),_(D,{icon:"search",size:"14px"})]),h(u).length===0?(g(),j(N,{key:0,text:h(c)("message.empty",e.title)},null,8,["text"])):(g(),w("ul",np,[(g(!0),w(Z,null,he(h(u),(Q,ye)=>(g(),w("li",{key:ye,onContextmenu:Se(Te=>v(Q,Te),["prevent"])},[_(D,{icon:"datasource"}),A("label",null,B(Q.name||h(c)("datasource.primary")),1),A("span",null,"("+B(Q.key||"default")+")",1),Q.lock==="1"?(g(),j(D,{key:0,icon:"lock"})):X("",!0)],40,ap))),128))]))]),_(ie,{value:a.value,"onUpdate:value":R[4]||(R[4]=Q=>a.value=Q),title:s.value,width:"550px"},{default:k(()=>[_(re,{loading:l.value,style:{"min-height":"200px"}},{default:k(()=>[(g(),j(te(h(n)),{info:i.value},null,8,["info"])),_(Y,{align:"right",style:{padding:"5px 0"}},{default:k(()=>[_($,{value:r.value,type:"active",onOnClick:R[1]||(R[1]=Q=>C())},null,8,["value"]),_($,{value:h(c)("datasource.test"),onOnClick:R[2]||(R[2]=Q=>f())},null,8,["value"]),_($,{value:h(c)("message.cancel"),onOnClick:R[3]||(R[3]=Q=>a.value=!1)},null,8,["value"])]),_:1})]),_:1},8,["loading"])]),_:1},8,["value","title"])],64)}}};var ip=q(sp,[["__scopeId","data-v-2ca47240"]]),op=Object.freeze(Object.defineProperty({__proto__:null,default:ip},Symbol.toStringTag,{value:"Module"}));const Ha=e=>(Dn("data-v-f15aae88"),e=e(),Mn(),e),rp={class:"magic-login"},lp={class:"magic-login-box"},cp=Ha(()=>A("div",{class:"magic-login-logo"},null,-1)),up={class:"magic-login-text"},pp=_e("Magic-API "),dp={key:0},_p={key:0,class:"magic-login-row error"},hp={class:"magic-login-row"},fp={class:"magic-login-row"},mp={class:"magic-login-row"},gp={class:"magic-login-copyright"},vp=Ha(()=>A("a",{href:"https://ssssssss.org.cn",target:"_blank"},"ssssssss.org.cn",-1)),Ep=_e(" All rights reserved."),bp={props:{value:Boolean,error:String},emits:["update:value","update:error"],setup(e,{emit:t}){const n=U(""),a=U("");S.$on();const s=()=>{n.value&&a.value&&(t("update:error",null),z.sendPost("/login",{username:n.value,password:a.value}).success((i,o)=>{i&&(t("update:value",!1),M.HEADER_MAGIC_TOKEN_VALUE=o.headers[M.HEADER_MAGIC_TOKEN],Fe.set(M.STORE.token,M.HEADER_MAGIC_TOKEN_VALUE),S.$emit(F.LOGINED),n.value="",a.value="")}).exception((i,o)=>{i!=401&&(o=translateCode(i,o)),t("update:error",o)}).error((i,o,r)=>{if(r){let l="";r.response?l=JSON.stringify(r.response.data||"")||c("code.invalid",r.response.status):l=r.message,t("update:error",l)}}))};return(i,o)=>{const r=b("magic-icon"),l=b("magic-input"),u=b("magic-button");return g(),w("div",rp,[A("div",lp,[cp,A("div",up,[pp,h(M).MAGIC_API_VERSION_TEXT?(g(),w("span",dp,"v"+B(h(M).MAGIC_API_VERSION_TEXT),1)):X("",!0)]),e.error?(g(),w("div",_p,[_(r,{icon:"error"}),A("span",null,B(e.error),1)])):X("",!0),A("div",hp,[_(r,{icon:"user"}),_(l,{onEnter:s,value:n.value,"onUpdate:value":o[0]||(o[0]=p=>n.value=p),placeholder:h(c)("message.username")},null,8,["value","placeholder"])]),A("div",fp,[_(r,{icon:"password"}),_(l,{onEnter:s,value:a.value,"onUpdate:value":o[1]||(o[1]=p=>a.value=p),type:"password",placeholder:h(c)("message.password")},null,8,["value","placeholder"])]),A("div",mp,[_(u,{value:h(c)("message.login"),onOnClick:s},null,8,["value"])])]),A("div",gp,[_e("Copyright \xA9 2020-"+B(new Date().getYear()+1900)+" ",1),vp,Ep])])}}};var yp=q(bp,[["__scopeId","data-v-f15aae88"]]),Tp=Object.freeze(Object.defineProperty({__proto__:null,default:yp},Symbol.toStringTag,{value:"Module"}));function Sp(e,t){S.$emit(F.SWITCH_TOOLBAR,"log"),t.headers[M.HEADER_REQUEST_CLIENT_ID]=M.CLIENT_ID,t.headers[M.HEADER_REQUEST_SCRIPT_ID]=e.item.id,t.headers[M.HEADER_MAGIC_TOKEN]=M.HEADER_MAGIC_TOKEN_VALUE,t.headers[M.HEADER_REQUEST_BREAKPOINTS]=(e.decorations||[]).filter(i=>i.options.linesDecorationsClassName==="breakpoints").map(i=>i.range.startLineNumber).join(","),t.responseType="blob",t.validateStatus=()=>!0;let n=0;t.transformResponse=[function(i,o){return n=i.size,o["content-disposition"]?new Promise(r=>r(i)):new Promise(r=>{const l=new FileReader;l.readAsText(i),l.onload=function(){try{JSON.parse(this.result),r(this.result)}catch{r(i)}}})}];const a=e.path();S.status("api.test.begin",!0,a);const s=new Date().getTime();z.execute(t).then(i=>i.data.then(o=>{if(S.status("api.test.success",!0,a,i.status,ii(n),new Date().getTime()-s),e.running=!1,e.responseBlob=o instanceof Blob)e.responseBlobValue=o,e.item.responseBody=null,e.item.responseBodyDefinition=null,e.responseBodyTree=null;else{e.item.responseBody=li(o);let r=Ua(e.item.responseBody,e.item.responseBodyDefinition);e.item.responseBodyDefinition=r,e.responseBodyTree=an(r)}e.responseHeaders=i.headers,be(()=>S.$emit(F.SWITCH_TOOLBAR,"response"))})).catch(i=>{S.status("api.test.requestError",!1,a),e.running=!1,z.processError(i)})}function Op(e){e.running=!0;const t=e.item,n={baseURL:M.SERVER_URL,url:e.requestPath(),method:t.method,headers:{},responseType:"json",withCredentials:!0},a=i=>i.filter(o=>o.value&&o.value.trim()).forEach(o=>n.url=n.url.replace(new RegExp(`\\{${o.name}}`,"g"),o.value.trim()));if(e.getGroups().filter(i=>i.paths&&i.paths.length>0).map(i=>i.paths).forEach(i=>a(i)),a(t.paths||[]),n.url.indexOf("{")>-1){ve.alert(c("api.test.missPath")),e.running=!1;return}M.GLOBAL.headers.filter(i=>i.name).forEach(i=>n.headers[i.name]=i.value),t.headers.filter(i=>i.name).forEach(i=>n.headers[i.name]=i.value);const s={};if(M.GLOBAL.parameters.filter(i=>i.name).forEach(i=>s[i.name]=i.value),t.parameters.filter(i=>i.name).forEach(i=>s[i.name]=i.value),Object.values(s).some(i=>i instanceof FileList||i instanceof File)){n.headers["Content-Type"]="multipart/form-data";const i=new FormData;Object.keys(s).forEach(o=>{let r=s[o];r instanceof FileList?Array.from(r).forEach(l=>i.append(o,l,l.name)):r instanceof File?i.append(o,r,r.name):i.append(o,r)}),n.data=i}else{n.headers["Content-Type"]="application/x-www-form-urlencoded",n.method!=="POST"||t.requestBody?n.params=s:n.data=s;try{if(t.requestBody){const i=JSON.parse(t.requestBody);(Array.isArray(i)&&i.length>0||typeof i=="object"&&Object.keys(i).length>0)&&(n.params=s,n.data=t.requestBody,n.headers["Content-Type"]="application/json",n.transformRequest=[])}}catch{e.running=!1,ve.alert(c("api.test.requestBodyError"))}}Sp(e,n)}var xp={doTest:Op,getIcon:e=>e.method||"GET",runnable:!0,requirePath:!0,name:c("api.name"),merge:e=>(e.method=e.method||M.DEFAULT_REQUEST_METHOD,e.parameters=e.parameters||[],e.headers=e.headers||[],e.paths=e.paths||[],e.options=e.options||[],e),processSave:e=>{const t=M.config.persistenceResponseBody!==!1;return{id:e.id,name:e.name,path:e.path,groupId:e.groupId,lock:e.lock,method:e.method,description:e.description,createBy:e.createBy,createDate:e.createDate,properties:e.properties,script:e.script,responseBody:t&&e.responseBody||void 0,responseBodyDefinition:t&&e.responseBodyDefinition||void 0,requestBody:e.requestBody,requestBodyDefinition:e.requestBodyDefinition,parameters:e.parameters.filter(n=>n.name),headers:e.headers.filter(n=>n.name),paths:e.paths.filter(n=>n.name),options:e.options.filter(n=>n.name)}}},Rp={getIcon:e=>"function",name:c("fn.name"),runnable:!1,requirePath:!0,merge:e=>(e.parameters=e.parameters||[],e)};let Nn;ne.setExtensionAttribute("org.ssssssss.magicapi.modules.db.SQLModule",()=>{var e;return Nn&&(((e=Nn("datasource")[0])==null?void 0:e.children)||[]).filter(t=>t.key).map(t=>({name:t.key,type:"org.ssssssss.magicapi.modules.db.SQLModule",comment:t.name}))||[]});var Ap={injectResources:e=>Nn=e,requireScript:!1,doTest:e=>{z.sendJson("/datasource/jdbc/test",e).success(t=>{t==="ok"?ve.alert(c("datasource.connected"),c("datasource.test")):ve.alert(c("datasource.connectFailed",t),c("datasource.test"))})}};const Ip={class:"magic-main"},Cp={class:"magic-main-body-wrapper"},Lp={class:"magic-main-body"},Np={ref:"mrl",class:"magic-navbar magic-navbar__vertical"},wp={ref:"mrr",class:"magic-navbar magic-navbar__vertical reverse"},kp={emits:["onLoad"],setup(e,{expose:t,emit:n}){const a=U(!1),s=U({}),i=U(!0),o=U(null),r=(v,T,R)=>{for(let D=0,L=v.length;D{const T=Object.entries(s.value);for(let R=0,D=T.length;R0)return{item:L[0],type:N[0],name:it("/"+L.reverse().map($=>$.name).join("/")),path:it("/"+L.reverse().map($=>$.path||"").join("/"))}}};Ke("findResource",l);const u=[{type:"api",title:c("api.name"),icon:"api"},{type:"function",title:c("fn.name"),icon:"function"}],p={api:xp,function:Rp,datasource:Ap};M.PLUGINS.filter(v=>v.resource&&v.resource.length>0).map(v=>v.resource).forEach(v=>v.forEach(T=>{u.push({type:T.type,icon:T.icon,title:c(T.title)}),T.service&&(p[T.type]=T.service)})),Ke("service",p),u.map(v=>v.type).forEach(v=>s.value[v]=[]);const m=[{type:"datasource",title:c("datasource.title"),icon:"datasource",name:c("datasource.name")}];M.PLUGINS.filter(v=>v.datasources&&v.datasources.length>0).map(v=>v.datasources).forEach(v=>v.forEach(T=>{m.push({type:T.type,icon:T.icon,title:T.title,name:T.name})})),m.map(v=>v.type).forEach(v=>s.value[v]=[]),Ke("resources",()=>{const v=[...u,...m],T=R=>R.length===1&&R[0].id.endsWith(":0")?R[0].children:R;return v.map(R=>({key:R.type,navbar:R,tree:T(JSON.parse(JSON.stringify(s.value[R.type]||[])))}))}),Object.values(p).forEach(v=>v.injectResources&&v.injectResources(T=>s.value[T])),be(()=>a.value=!0);const f=v=>Ue(pe({},v.node),{folder:v.node.parentId!==void 0,opened:v.node.parentId!==void 0&&M.DEFAULT_EXPAND===!0,children:v.children&&v.children.length?v.children.map(T=>f(T)):void 0}),y=(v,T)=>{var D;i.value=!0,s.value={};const R=v?((D=u.find(L=>L.type===v)||m.find(L=>L.type===v))==null?void 0:D.title)||"":c("message.all");S.status("message.getResource",!0,R),z.send("/resource").success(L=>{[...u,...m].filter(N=>!v||N.type===v).forEach(N=>{var $,Y;s.value[N.type]=((Y=($=L[N.type])==null?void 0:$.children)==null?void 0:Y.map(re=>f(re)))||[]}),i.value=!1,S.status("message.getResourceFinish",!0,R),be(()=>T())})};S.$on(F.RELOAD_RESOURCES,()=>{i.value=!0,z.sendGet("/reload").success(()=>{S.status("message.reloadResourceSuccess"),y(null,()=>S.$emit(F.RELOAD_RESOURCES_FINISH))}).end(()=>i.value=!1)});const E=v=>y(v,()=>S.$emit(F.LOAD_RESOURCES_FINISH,v));S.$on(F.LOAD_RESOURCES,E),S.$on(F.RELOAD_RESOURCES_FINISH,E);const C=v=>{let T;return Object.values(s.value).some(R=>{const D=[];if(r(R,v,D)){T=D[0];const L=u.findIndex(N=>N.type===D[D.length-1].type);return o.value&&o.value.select(L),!0}return!1}),T};S.$on(F.SELECT_NAVBAR_BY_ITEM,C),S.$on(F.OPEN_WITH_ID,v=>{const T=C(v);T&&S.$emit(F.OPEN_ITEM,T)}),S.$on(F.LOGOUT,()=>s.value={}),t({loadResources:E}),ht(()=>n("onLoad"));let I=0;const O=()=>{if(++I%u.length===0)try{JSON.parse(Fe.get(M.RECENT_OPENED_TAB)||"[]").forEach(v=>{S.$emit(F.OPEN_WITH_ID,v)})}catch(v){console.error(v)}};return S.$on(F.REFRESH_RESOURCE,v=>{const T=l(v);T&&z.sendGet(`/resource/file/${v}`).success(R=>{Object.keys(R).forEach(D=>T.item[D]=R[D])})}),(v,T)=>{const R=b("magic-resource"),D=b("magic-loading"),L=b("magic-resizer"),N=b("magic-navbar-item"),$=b("magic-navbar"),Y=b("magic-script-editor"),re=b("magic-toolbar"),ie=b("magic-data-resource"),Q=b("magic-search"),ye=b("magic-export"),Te=b("magic-upload"),Rt=b("magic-push"),At=b("magic-recent-opened");return g(),w("div",Ip,[a.value?(g(),j($,{key:0,direction:"vertical",to:v.$refs.mrl,ref_key:"mnl",ref:o,spliter:!0},{default:k(()=>[(g(),w(Z,null,he(u,(ke,Ne)=>_(N,dt({key:Ne},ke),{default:k(()=>[_(L,{max:750,min:270,direction:"x"},{default:k(()=>[_(D,{loading:i.value},{default:k(()=>[_(R,dt(ke,{data:s.value[ke.type],onClose:T[0]||(T[0]=Gn=>v.$refs.mnl.select(-1)),onOnLoad:O}),null,16,["data"])]),_:2},1032,["loading"])]),_:2},1024)]),_:2},1040)),64))]),_:1},8,["to"])):X("",!0),A("div",Cp,[A("div",Lp,[A("div",Np,null,512),_(Y),A("div",wp,null,512)]),_(re)]),_($,{reverse:!0,"default-select":-1,direction:"vertical",to:v.$refs.mrr,spliter:!0},{default:k(()=>[(g(),w(Z,null,he(m,(ke,Ne)=>_(N,{key:Ne,title:ke.title,icon:ke.icon},{default:k(()=>[a.value?(g(),j(L,{key:0,max:420,min:140,value:200,direction:"x",reverse:!0},{default:k(()=>[_(D,{loading:i.value},{default:k(()=>[_(ie,{type:ke.type,title:ke.name,data:s.value[ke.type]},null,8,["type","title","data"])]),_:2},1032,["loading"])]),_:2},1024)):X("",!0)]),_:2},1032,["title","icon"])),64))]),_:1},8,["to"]),_(Q),_(ye),_(Te),_(Rt),_(At)])}}};var Dp=q(kp,[["__scopeId","data-v-718a97af"]]),Mp=Object.freeze(Object.defineProperty({__proto__:null,default:Dp},Symbol.toStringTag,{value:"Module"}));const Pp={class:"magic-recent-opened"},Up=["onClick"],$p={key:1},Bp={key:0,style:{width:"100%",height:"100px"}},Fp={setup(e){const t=Je([]),n=U(!1),a=se("findResource"),s=se("service");try{JSON.parse(Fe.get(M.RECENT_OPENED)||"[]").forEach(r=>t.push(r))}catch{}const i=me(()=>t.map(r=>a(r)).filter(r=>r&&s[r.type])),o=r=>{S.$emit(F.OPEN_WITH_ID,r),n.value=!1};return S.$on(F.DO_RECENT,()=>n.value=!n.value),S.$on(F.CLOSE,r=>{if(r.id){const l=t.findIndex(u=>u===r.id);l>-1&&t.splice(l,1),t.unshift(r.id),t.length>20&&t.splice(t.length-1,1),Fe.set(M.RECENT_OPENED,je(t))}}),(r,l)=>{const u=b("magic-text-icon"),p=b("magic-empty"),m=b("magic-dialog");return g(),j(m,{value:n.value,"onUpdate:value":l[0]||(l[0]=f=>n.value=f),title:h(c)("editor.tooltip.recent"),padding:"0",shade:!1},{default:k(()=>[A("ul",Pp,[(g(!0),w(Z,null,he(h(i),(f,y)=>(g(),w("li",{key:y,onClick:Se(E=>o(f.item.id),["stop"])},[h(s)[f.type]&&h(s)[f.type].getIcon?(g(),j(u,{key:0,icon:h(s)[f.type].getIcon(f.item)},null,8,["icon"])):X("",!0),A("label",null,B(f.name),1),h(s)[f.type].requirePath&&f.path?(g(),w("span",$p,"("+B(f.path)+")",1)):X("",!0)],8,Up))),128))]),h(i).length===0?(g(),w("div",Bp,[_(p,{text:"empty."})])):X("",!0)]),_:1},8,["value","title"])}}};var Hp=q(Fp,[["__scopeId","data-v-44903aa6"]]),jp=Object.freeze(Object.defineProperty({__proto__:null,default:Hp},Symbol.toStringTag,{value:"Module"}));const Vp={class:"magic-resource-header"},Gp=["title","onClick"],zp={key:0},Yp={key:0},qp={class:"magic-create-group"},Kp={key:0},Wp={props:{type:String,title:String,data:Array},emits:["close","onLoad"],setup(e,{emit:t}){const n=e,a=te("magic-backup-file"),s=se("service")[n.type],i=s.requirePath,o=s.getIcon,r=U(""),l=U(!0),u=U(!1),p=U(""),m=U(null),f=se("activateUserFiles"),y=me(()=>l.value?c("resource.createGroup"):c("resource.updateGroup")),E=U(!0),C=U({}),I=U({}),O=U(!1),v=U({type:n.type}),T=me(()=>n.data),R=U([{name:c("resource.createGroup"),icon:"group-add",onClick:()=>{v.value={type:n.type,parentId:"0"},l.value=!0,O.value=!0}},{name:c("resource.header.expand"),icon:"expand-all",onClick:()=>et(T.value,P=>P.opened=!0)},{name:c("resource.header.collapse"),icon:"collapse-all",onClick:()=>et(T.value,P=>P.opened=!1)},{name:c("resource.header.desc"),icon:"descending",show:()=>E.value,onClick:()=>E.value=!1},{name:c("resource.header.asc"),icon:"ascending",show:()=>!E.value,onClick:()=>E.value=!0},{separator:!0},{name:c("resource.header.position"),icon:"position",onClick:()=>{I.value&&C.value&&(S.$emit(F.SELECT_NAVBAR_BY_ITEM,C.value),I.value.scrollIntoView(C.value))}},{name:c("message.hide"),icon:"minimize",onClick:()=>t("close")}]),D=(P,V,G,H,ue)=>{ue=ue||[],V=V||[];let Oe=V.find(at=>at===P||at.id===P);if(Oe)return G.push(Oe.name),ue.push(Oe),s.requirePath&&Oe.path&&H.push(Oe.path),Oe;for(let at=0,on=V.length;at{const G=[],H=[];D(je(P),je(T.value),G,H);const ue=H.length>0?it(`/${H.join("/")}`):"";return V?ue:`/${G.join("/")}${s.requirePath?`(${ue})`:""}`},N=P=>L(P),$=[],Y=(P,V)=>{if(P)if(P.folder)S.$emit(F.OPEN_GROUP,P);else{let G=$.find(H=>H.item==P);G||(G=Je({type:n.type,title:n.title,language:s.language||"magicscript",item:s.merge(P),path:()=>L(P),requestPath:()=>{const H=[];return D(je(P),je(T.value),[],H),it(`/${H.join("/")}`)},getGroups:()=>{const H=[];return D(je(P),je(T.value),[],[],H),H},getIcon:s.getIcon,runnable:s.runnable,doTest:s.doTest,processSave:s.processSave||(H=>H)}),$.push(G)),S.$emit(F.OPEN,G,V)}};S.$on(F.OPEN,P=>C.value=P.item),S.$on(F.OPEN_EMPTY,()=>C.value=null);const{proxy:re}=St(),ie=()=>{const P=pe({},v.value);delete P.children,delete P.opened,delete P.folder,z.sendJson("/resource/folder/save",P).success(V=>{if(V){const G=Ue(pe({},je(v.value)),{folder:!0,id:V});G.options=G.options||[],G.paths=G.paths||[],Te(G),S.status("resource.saveGroupSuccess",!0,n.title,L(V)),O.value=!1,S.loading(2)}else{const G=L(v.value);S.status("resource.saveGroupFailed",!1,n.title,G),re.$alert(c("resource.saveGroupFailed",n.title,G))}})},Q=(P,V)=>new Promise(G=>z.send("/resource/move",{src:P.id,groupId:V.groupId||V.id}).success(H=>{const ue=P.folder?"resource.moveGroup":"resource.moveResource",Oe=L(P);H?(P.folder?S.status(ue+"Success",!0,n.title,Oe):S.status(ue+"Success",!0,Oe),P[P.folder?"parentId":"groupId"]=V.groupId||V.id):P.folder?(S.status(ue+"Failed",!1,n.title,Oe),re.$alert(c(ue+"Failed",n.title,Oe))):(S.status(ue+"Failed",!1,Oe),re.$alert(c(ue+"Failed",Oe))),G(H)})),ye=(P,V)=>{V=V||T.value;const G=V.findIndex(H=>H===P||H.id===P.id);G>-1?V.splice(G,1):V.forEach(H=>ye(P,H.children||[]))},Te=(P,V)=>{V=V||T.value||[];const G=V.find(H=>H.id===P.id||P.groupId===H.id);if(G)return G.children=G.children||[],G.opened=!0,G.id===P.id?(G.name=P.name,G.path=P.path,G.parentId=P.parentId):G.children.push(P),!0;if(P.parentId==="0")return V.push(P),!0;{if(V.some(ue=>Te(P,ue.children||[])))return!0;const H=P.parentId!==void 0&&V.find(ue=>ue.id===P.parentId);if(H)return H.children.push(P),!0}return!1};S.$on(F.OPEN_ITEM,P=>{const V=je(T.value);V&&Y(D(je(P),V,[],[]),!0)});const Rt=(P,V)=>{if(P&&V){const G=[];P.folder?(G.push.apply(G,[{label:c("resource.contextmenu.newFile",n.title),icon:"plus",onClick(){const H={groupId:P.id,name:c("message.untitled"),script:s.defaultScript||"return 'Hello magic-api'",path:s.requirePath?"":void 0};Te(H),Y(H,!0)}},{label:c("resource.createGroup"),icon:"group-add",onClick(){l.value=!0,v.value={parentId:P.id,type:n.type},O.value=!0}},{label:c("resource.updateGroup"),icon:"update",onClick(){l.value=!1,v.value=pe({},P),O.value=!0}},{label:c("resource.copyGroup"),icon:"copy",onClick(){p.value=P.id,u.value=!0}},{label:c("resource.contextmenu.deleteGroup"),icon:"delete",onClick(){re.$confirm(c("resource.contextmenu.deleteGroup"),c("resource.deleteGroupConfirm",n.title,L(P)),()=>{P.id?z.send("/resource/delete",{id:P.id}).success(H=>{H?(S.status("resource.deleteGroupSuccess",!0,n.title,L(P)),ye(P)):(re.$alert("resource.deleteGroupFailed",n.title,L(P)),S.status("resource.deleteGroupFailed",!1,n.title,L(P)))}):ye(P)})}},{label:c("resource.contextmenu.exportGroup"),icon:"download",onClick(){z.send(`/download?groupId=${P.id}`,null,{headers:{"Content-Type":"application/json"},responseType:"blob"}).success(H=>{Hn(H,`${P.name}.zip`),S.status("resource.groupExport",!0,P.name,n.title)})}}]),P.parentId!=="0"&&G.push({label:c("resource.contextmenu.moveToRoot"),icon:"move",onClick(){re.$confirm(c("resource.moveGroup"),c("resource.moveRootGroupConfirm",L(P)),()=>{z.send("/resource/move",{src:P.id,groupId:"0"}).success(H=>{H?(S.status("resource.moveRootSuccess",!0,n.title,L(P)),P.parentId="0",ye(P),Te(P)):(re.$alert(c("resource.moveRootFailed",n.title,L(P))),S.status("resource.moveRootFailed",!1,n.title,L(P)))})})}})):(G.push.apply(G,[{label:c("resource.contextmenu.copy",n.title),icon:"copy",divided:!0,onClick:()=>{z.send(`/resource/file/${P.id}`).success(H=>{H.id=`copy${new Date().getTime()}d${parseInt(Math.random()*1e5)}`,Te(H),Y(H,!0),H.name=H.name+`(${c("message.copy")})`,s.requirePath&&(H.path=H.path+"_copy")})}}]),s.requirePath&&(n.type==="api"&&G.push({label:c("resource.contextmenu.copyWithPath"),icon:"copy",onClick:()=>{let H=L(P,!0);H&&(H=it(M.SERVER_URL+"/"+H),Zn(H)?S.status("resource.copyPathSuccess",!0,n.title,H):S.status("resource.copyPathFailed",!1,n.title,H))}}),G.push.apply(G,[{label:c("resource.contextmenu.copyRelativePath"),icon:"copy",divided:!0,onClick:()=>{const H=L(P,!0);H&&(Zn(H)?S.status("resource.copyRelativePathSuccess",!0,n.title,H):S.status("resource.copyRelativePathFailed",!1,n.title,H))}}]),P.lock===M.LOCKED?G.push({label:c("resource.contextmenu.unlock"),icon:"unlock",onClick:()=>z.sendPost("/resource/unlock",{id:P.id}).success(H=>{S.status(H?"message.unlockSuccess":"message.unlockFailed",H,L(P)),H&&(P.lock=M.UNLOCK)})}):G.push({label:c("resource.contextmenu.lock"),icon:"lock",onClick:()=>z.sendPost("/resource/lock",{id:P.id}).success(H=>{S.status(H?"message.lockSuccess":"message.lockFailed",H,L(P)),H&&(P.lock=M.LOCKED)})})),P.id&&G.push({label:c("toolbars.history"),icon:"history",onClick:()=>{S.$emit(F.ADD_FOOTER_TOOLBAR,{component:$e(a),id:"backup-file",icon:"history",title:c("toolbars.viewHistory",L(P)),allowClose:!0,data:{id:P.id}})}}),G.push.apply(G,[{label:c("message.refresh"),icon:"refresh",onClick:()=>{S.$emit(F.REFRESH_RESOURCE,P.id)}},{label:c("resource.contextmenu.delete"),icon:"delete",onClick:()=>{const H=`${n.title}\u300C${L(P)}\u300D`;re.$confirm(c("message.deleteTips",n.title),c("message.deleteConfirm",H),()=>{P.id?z.send("/resource/delete",{id:P.id}).success(ue=>{ue?(S.status("message.deleteSuccess",!0,H),ye(P),S.$emit(F.DELETE_FILE,P)):(S.status("message.deleteFailed",!1,H),re.$alert(c("message.deleteFailed",H)))}):(S.status("message.deleteSuccess",!0,H),ye(P),S.$emit(F.DELETE_FILE,P))})}}])),M.PLUGINS.forEach(H=>{if(H.contextmenu&&typeof H.contextmenu=="function"){const ue=H.contextmenu(Ue(pe({},P),{menuType:"resource"}));ue&&ue.length&&ue.forEach(Oe=>G.push(Oe))}}),re.$contextmenu({menus:G,event:V})}},At=P=>{re.$contextmenu({event:P,menus:R.value.slice(0,5).filter(V=>!V.show||V.show()).map(V=>({icon:V.icon,label:V.name,onClick:V.onClick}))})};let ke=null;const Ne=()=>{m.value&&z.sendPost("/resource/folder/copy",{src:p.value,target:m.value.id.endsWith("-root")?"0":m.value.id}).success(P=>{ke=P,u.value=!1,S.$emit(F.LOAD_RESOURCES)})},Gn=se("findResource");return S.$on(F.LOAD_RESOURCES_FINISH,()=>{ke&&be(()=>{const P=Gn(ke);S.$emit(F.SELECT_NAVBAR_BY_ITEM,P.item),S.$emit(F.OPEN_GROUP,P.item)})}),ht(()=>t("onLoad")),(P,V)=>{const G=b("magic-icon"),H=b("magic-input"),ue=b("magic-empty"),Oe=b("magic-text-icon"),at=b("magic-avatar-group"),on=b("magic-tree"),Pe=b("magic-button"),zn=b("magic-button-group"),Yn=b("magic-dialog"),Ga=b("magic-resource-choose");return g(),w("div",{class:"magic-resource",onContextmenu:V[10]||(V[10]=Se(ee=>At(ee),["prevent"]))},[A("div",Vp,[_(G,{icon:"search",size:"14px"}),_(H,{value:r.value,"onUpdate:value":V[0]||(V[0]=ee=>r.value=ee),placeholder:h(c)("message.searchText"),width:"100%"},null,8,["value","placeholder"]),A("ul",null,[(g(!0),w(Z,null,he(R.value,(ee,qn)=>(g(),w(Z,{key:qn},[!ee.show||ee.show()?(g(),w("li",{key:0,title:ee.name||"",onClick:Ed=>ee.onClick&&ee.onClick(),class:Ee({separator:ee.separator})},[ee.separator?X("",!0):(g(),j(G,{key:0,icon:ee.icon},null,8,["icon"]))],10,Gp)):X("",!0)],64))),128))])]),!e.data||e.data.length===0?(g(),j(ue,{key:0,text:h(c)("message.empty",e.title)},null,8,["text"])):(g(),j(on,{key:1,ref_key:"treeObj",ref:I,data:h(T),onItemClick:Y,onContextmenu:Rt,draggable:!0,sort:!0,descending:E.value,onMove:Q,filter:r.value,"filter-text":N,selected:C.value},{folder:k(({item:ee})=>[_(G,{icon:ee.opened?"arrow-bottom":"arrow-right",onClick:Se(qn=>ee.opened=!ee.opened,["stop"])},null,8,["icon","onClick"]),_(G,{icon:"list"}),A("label",null,B(ee.name),1),h(i)&&ee.path?(g(),w("span",zp,"("+B(ee.path)+")",1)):X("",!0)]),file:k(({item:ee})=>[_(Oe,{icon:h(o)(ee)},null,8,["icon"]),A("label",null,B(ee.name),1),h(i)&&ee.path?(g(),w("span",Yp,"("+B(ee.path)+")",1)):X("",!0),ee.lock==="1"?(g(),j(G,{key:1,icon:"lock"})):X("",!0),_(at,{users:h(f)[ee.id]||[],max:3,size:20},null,8,["users"])]),_:1},8,["data","descending","filter","selected"])),_(Yn,{title:h(y),value:O.value,"onUpdate:value":V[5]||(V[5]=ee=>O.value=ee),width:"350px"},{default:k(()=>[A("ul",qp,[A("li",null,[A("label",null,B(h(c)("resource.form.groupName"))+"\uFF1A",1),_(H,{value:v.value.name,"onUpdate:value":V[1]||(V[1]=ee=>v.value.name=ee),placeholder:h(c)("resource.form.placeholder.name",e.title)},null,8,["value","placeholder"])]),h(i)?(g(),w("li",Kp,[A("label",null,B(h(c)("resource.form.groupPath"))+"\uFF1A",1),_(H,{value:v.value.path,"onUpdate:value":V[2]||(V[2]=ee=>v.value.path=ee),placeholder:h(c)("resource.form.placeholder.path",e.title)},null,8,["value","placeholder"])])):X("",!0)]),_(zn,{align:"right",style:{padding:"5px 0"}},{default:k(()=>[_(Pe,{value:h(y),type:"active",onOnClick:V[3]||(V[3]=ee=>ie())},null,8,["value"]),_(Pe,{value:h(c)("message.cancel"),onOnClick:V[4]||(V[4]=ee=>O.value=!1)},null,8,["value"])]),_:1})]),_:1},8,["title","value"]),_(Yn,{value:u.value,"onUpdate:value":V[9]||(V[9]=ee=>u.value=ee),title:h(c)("resource.copyGroup"),shade:!1,padding:"0",width:"400px",overflow:"hidden"},{default:k(()=>[_(Ga,{ref:"chooseGroup",value:m.value,"onUpdate:value":V[6]||(V[6]=ee=>m.value=ee),file:!1,type:e.type,single:!0},null,8,["value","type"]),_(zn,{align:"right",style:{"margin-right":"5px","margin-bottom":"5px"}},{default:k(()=>[_(Pe,{value:h(c)("message.expand"),onOnClick:V[7]||(V[7]=ee=>P.$refs.chooseGroup.expand(!0))},null,8,["value"]),_(Pe,{value:h(c)("message.collapse"),onOnClick:V[8]||(V[8]=ee=>P.$refs.chooseGroup.expand(!1))},null,8,["value"]),_(Pe,{type:"active",value:h(c)("message.copy"),onOnClick:Ne},null,8,["value"])]),_:1})]),_:1},8,["value","title"])],32)}}};var Xp=q(Wp,[["__scopeId","data-v-1db99e04"]]),Jp=Object.freeze(Object.defineProperty({__proto__:null,default:Xp},Symbol.toStringTag,{value:"Module"}));const He=e=>(Dn("data-v-1401171b"),e=e(),Mn(),e),Qp={class:"magic-script-editor"},Zp={key:0,class:"magic-empty-container"},ed={class:"magic-hot-key"},td=He(()=>A("em",null,"Ctrl + S",-1)),nd=He(()=>A("br",null,null,-1)),ad=He(()=>A("em",null,"Ctrl + Q",-1)),sd=He(()=>A("br",null,null,-1)),id=He(()=>A("em",null,"Alt + /",-1)),od=He(()=>A("br",null,null,-1)),rd=He(()=>A("em",null,"F8",-1)),ld=He(()=>A("br",null,null,-1)),cd=He(()=>A("em",null,"F6",-1)),ud=He(()=>A("br",null,null,-1)),pd=He(()=>A("em",null,"Ctrl + Alt + L",-1)),dd=He(()=>A("br",null,null,-1)),_d=He(()=>A("em",null,"Ctrl + E",-1)),hd={key:0},fd={class:"magic-monaco-editor-wrapper"},md={emits:["onLoad"],setup(e,{emit:t}){const{proxy:n}=St(),a=Je([]),s=U({}),i=U(!0),o=U(null),r=U(null),l=se("activateUserFiles"),u={String:"java.lang.String",Integer:"java.lang.Integer",Double:"java.lang.Double",Long:"java.lang.Long",Byte:"java.lang.Byte",Short:"java.lang.Short",Float:"java.lang.Float",MultipartFile:"org.springframework.web.multipart.MultipartFile",MultipartFiles:"java.util.List"};sn.setEnvironment(()=>{var R;const O={},v=(R=s.value)==null?void 0:R.item,T=D=>D&&Array.isArray(D)&&D.forEach(L=>{L&&typeof L.name=="string"&&L.dataType&&(O[L.name]=u[L.dataType]||"java.lang.Object")});return v&&(T(v==null?void 0:v.parameters),T(v==null?void 0:v.paths)),O});const p=O=>{let v=a.findIndex(T=>T===O);if(a.splice(v,1),O===s.value){let T=a.length;v0&&S.$emit(F.OPEN,a[v-1])}S.$emit(F.CLOSE,O.item),a.length===0&&(S.$emit(F.OPEN_EMPTY),s.value={})};tt(a,O=>{Fe.set(M.RECENT_OPENED_TAB,O.filter(v=>{var T;return(T=v.item)==null?void 0:T.id}).map(v=>v.item.id))});const m=O=>{const v=s.value;if(v&&v.item){const T=s.value.processSave(v.item);return Object.keys(T).forEach(R=>v.item[R]=T[R]),z.sendJson(`/resource/file/${s.value.type}/save?auto=${O?0:1}`,T).success(R=>{const D=`${v.title}\u300C${v.path()}\u300D`;R?(S.status("message.saveSuccess",!0,D),v.tmpObject=JSON.parse(JSON.stringify(T)),v.item.id!==R&&S.loading(1),v.item.id=R):(S.status("message.saveFailed",!1,D),n.$alert(c("message.saveFailed",D)))})}},f=()=>s.value.doTest(s.value),y=O=>{if(s.value.debuging){o.value.removedDecorations(s.value.debugDecorations),s.value.debuging=!1,s.value.variables=null;const v=(s.value.decorations||[]).filter(T=>T.options.linesDecorationsClassName==="breakpoints").map(T=>T.range.startLineNumber).join("|");S.send(Re.RESUME_BREAKPOINT,[s.value.item.id,O===!0?"1":"0",v].join(","))}},E=(O,v,T)=>{const R=[{label:c("editor.tab.close"),divided:!0,onClick(){p(v)}},{label:c("editor.tab.closeOther"),divided:!0,onClick(){[...a].forEach((D,L)=>L!=T&&p(D))}},{label:c("editor.tab.closeLeft"),onClick(){[...a].forEach((D,L)=>LL>T&&p(D))}},{label:c("editor.tab.closeAll"),onClick(){[...a].forEach(D=>p(D))}}];M.PLUGINS.forEach(D=>{if(D.contextmenu&&typeof D.contextmenu=="function"){const L=D.contextmenu(Ue(pe({},v),{menuType:"editorTab"}));L&&L.length&&L.forEach(N=>R.push(N))}}),n.$contextmenu({menus:R,event:O})},C=O=>Object.keys(O.tmpObject||{}).some(v=>{const T=O.tmpObject[v],R=O.item[v];return T===R||v==="properties"||v==="responseBody"||v==="responseBodyDefinition"?!1:typeof T=="object"||typeof R=="object"?JSON.stringify(T)!==JSON.stringify(R):T!==R});S.$on(F.LOGOUT,()=>[...a].forEach(O=>p(O))),S.$on(F.DELETE_FILE,O=>{const v=a.findIndex(T=>T.item===O);v>-1&&p(a[v])}),S.$on(F.RELOAD_RESOURCES_FINISH,()=>[...a].forEach(O=>p(O))),S.$event(Re.LOGIN_RESPONSE,()=>{var O;s.value&&S.send(Re.SET_FILE_ID,((O=s.value.item)==null?void 0:O.id)||"0")});const I=O=>{O&&o.value&&(O.scrollTop=o.value.getScrollTop())};return S.$on(F.OPEN,O=>{let v=a.find(T=>T.item===O.item||T.item.id&&T.item.id===O.item.id);S.send(Re.SET_FILE_ID,O.item.id||"0"),v?(s.value=v,i.value=!1,be(()=>o.value.setScrollTop(v.scrollTop||0))):(a.push(O),s.value=O,O.item.id&&!O.item.script?(i.value=!0,z.sendGet(`/resource/file/${O.item.id}`).success(T=>{S.status("message.getDetail",!0,`${O.title}\u300C${O.path()}\u300D`),Object.keys(T).forEach(R=>O.item[R]=T[R]),O.tmpObject=JSON.parse(JSON.stringify(O.processSave(T))),i.value=!1,be(()=>o.value.setScrollTop(0))})):(O.tmpObject=JSON.parse(JSON.stringify(O.processSave(O.item))),i.value=!1,be(()=>o.value.setScrollTop(0)))),s.value.decorations&&s.value.decorations.length>0&&be(()=>{const T=je(s.value.decorations);s.value.debugDecorations=o.value.appendDecoration(T).map((R,D)=>{var L;return((L=T[D].options)==null?void 0:L.className)==="debug-line"?R:null}).filter(R=>R!==null)||[]}),be(()=>r.value&&r.value.scrollIntoView(O))}),S.$on(F.DO_SAVE,m),S.$on(F.DO_TEST,()=>{const O=s.value;O&&O.item&&O.runnable&&O.doTest&&O.running!==!0&&(M.AUTO_SAVE&&O.item.lock!=="1"?m().end(v=>v&&f()):f())}),S.$event(Re.BREAKPOINT,([O,{range:v,variables:T}])=>{var R,D;if(((D=(R=s.value)==null?void 0:R.item)==null?void 0:D.id)!==O){const L=a.find(N=>N.item.id===O);L&&S.$emit(F.OPEN,L)}be(()=>{s.value.variables=si(T),s.value.debuging=!0,s.value.debugDecorations=[o.value.appendDecoration([{range:new ot(v[0],1,v[0],1),options:{isWholeLine:!0,inlineClassName:"debug-line",className:"debug-line"}}])],S.$emit(F.SWITCH_TOOLBAR,"debug")})}),S.$on(F.DEBUG_CONTINUE,y),S.$on(F.DEBUG_SETPINTO,()=>y(!0)),S.$event(Re.EXCEPTION,([[O,v,T]])=>{var R,D;if(((D=(R=s.value)==null?void 0:R.item)==null?void 0:D.id)===O){const L=new ot(T[0],T[2],T[1],T[3]+1),N=o.value.getInstance(),$=N.deltaDecorations([],[{range:L,options:{hoverMessage:{value:v},inlineClassName:"squiggly-error"}}]);N.revealRangeInCenter(L),N.focus(),M.DECORATION_TIMEOUT>=0&&setTimeout(()=>N.deltaDecorations($,[]),M.DECORATION_TIMEOUT)}}),ht(()=>t("onLoad")),(O,v)=>{const T=b("magic-text-icon"),R=b("magic-icon"),D=b("magic-avatar-group"),L=b("magic-tab"),N=b("magic-monaco-editor"),$=b("magic-loading");return g(),w("div",Qp,[h(a).length===0?(g(),w("div",Zp,[A("div",ed,[A("p",null,[_e(B(h(c)("message.save")),1),td,nd,_e(" "+B(h(c)("message.run")),1),ad,sd,_e(" "+B(h(c)("editor.tooltip.complection")),1),id,od,_e(" "+B(h(c)("editor.tooltip.resume")),1),rd,ld,_e(" "+B(h(c)("editor.tooltip.stepInto")),1),cd,ud,_e(" "+B(h(c)("editor.tooltip.format")),1),pd,dd,_e(" "+B(h(c)("editor.tooltip.recent")),1),_d])])])):(g(),w(Z,{key:1},[_(L,{value:s.value,"onUpdate:value":v[0]||(v[0]=Y=>s.value=Y),tabs:h(a),className:"magic-script-tab",ref_key:"tab",ref:r,"allow-close":!0,onClose:p,onChange:v[1]||(v[1]=Y=>h(S).$emit(h(F).OPEN,Y)),onBeforeChange:I,onItemContextmenu:E},{default:k(({tab:Y})=>[_(T,{icon:Y.getIcon(Y.item)},null,8,["icon"]),_e(B(Y.item.name),1),C(Y)?(g(),w("span",hd,"*")):X("",!0),Y.item.lock===O.$LOCKED?(g(),j(R,{key:1,icon:"lock"})):X("",!0),_(D,{users:h(l)[Y.item.id]||[],max:3,size:20},null,8,["users"])]),_:1},8,["value","tabs"]),_($,{loading:i.value},{default:k(()=>[A("div",fd,[_(N,{ref_key:"editor",ref:o,value:s.value.item.script,"onUpdate:value":v[2]||(v[2]=Y=>s.value.item.script=Y),decorations:s.value.decorations,"onUpdate:decorations":v[3]||(v[3]=Y=>s.value.decorations=Y),language:s.value.language,"support-breakpoint":!0},null,8,["value","decorations","language"])])]),_:1},8,["loading"])],64))])}}};var gd=q(md,[["__scopeId","data-v-1401171b"]]),vd=Object.freeze(Object.defineProperty({__proto__:null,default:gd},Symbol.toStringTag,{value:"Module"}));const ja={};Object.entries({"./components/magic-editor.vue":ho,"./components/common/magic-context-menu.vue":So,"./components/common/magic-empty.vue":Ao,"./components/common/magic-loading.vue":No,"./components/common/magic-monaco-diff-editor.vue":Po,"./components/common/magic-monaco-editor.vue":Ho,"./components/common/magic-resizer.vue":zo,"./components/common/data/magic-navbar-item.vue":Wo,"./components/common/data/magic-navbar.css":Jo,"./components/common/data/magic-navbar.js":ar,"./components/common/data/magic-tab.css":ir,"./components/common/data/magic-tab.js":rr,"./components/common/data/magic-table-column.vue":cr,"./components/common/data/magic-table.css":pr,"./components/common/data/magic-table.js":_r,"./components/common/data/magic-tree.css":fr,"./components/common/data/magic-tree.js":gr,"./components/common/dialog/magic-alert.vue":Cs,"./components/common/dialog/magic-confirm.vue":Ns,"./components/common/dialog/magic-dialog.vue":yr,"./components/common/dialog/magic-modal.js":ws,"./components/common/dialog/magic-notify.vue":Ir,"./components/common/form/magic-button-group.vue":Nr,"./components/common/form/magic-button.vue":Dr,"./components/common/form/magic-checkbox.vue":$r,"./components/common/form/magic-file.vue":Vr,"./components/common/form/magic-input.vue":qr,"./components/common/form/magic-select.vue":Zr,"./components/common/form/magic-textarea.vue":al,"./components/common/icon/magic-avatar-group.vue":ol,"./components/common/icon/magic-avatar.vue":ul,"./components/common/icon/magic-icon.vue":tr,"./components/common/icon/magic-text-icon.vue":hl,"./components/panel/api/magic-api-body.vue":gl,"./components/panel/api/magic-api-description.vue":El,"./components/panel/api/magic-api-group.vue":Sl,"./components/panel/api/magic-api-header.vue":Rl,"./components/panel/api/magic-api-info.vue":Ll,"./components/panel/api/magic-api-option.vue":kl,"./components/panel/api/magic-api-parameter.vue":Pl,"./components/panel/api/magic-api-path.vue":Bl,"./components/panel/api/magic-api-request-body.vue":jl,"./components/panel/api/magic-api-request-structure.vue":Wl,"./components/panel/api/magic-api-response-body.vue":Zl,"./components/panel/api/magic-api-response-header.vue":sc,"./components/panel/api/magic-api-response-structure.vue":uc,"./components/panel/api/magic-api-response.vue":hc,"./components/panel/api/magic-global-header.vue":gc,"./components/panel/api/magic-global-parameter.vue":bc,"./components/panel/api/magic-global.vue":Oc,"./components/panel/common/magic-panel-common-toolbar.vue":Rc,"./components/panel/common/magic-panel-toolbar.vue":Nc,"./components/panel/common/magic-resource-choose.vue":Uc,"./components/panel/datasource/magic-datasource-datasource.vue":Jc,"./components/panel/footer/magic-backup-file.vue":nu,"./components/panel/footer/magic-backup.vue":lu,"./components/panel/footer/magic-debug.vue":Du,"./components/panel/footer/magic-event.vue":Bu,"./components/panel/footer/magic-log.vue":Gu,"./components/panel/footer/magic-online.vue":Ku,"./components/panel/footer/magic-status-bar.vue":e1,"./components/panel/footer/magic-todo.vue":o1,"./components/panel/footer/magic-toolbar.vue":d1,"./components/panel/function/magic-function-info.vue":m1,"./components/panel/function/magic-function-parameter.vue":E1,"./components/panel/header/magic-export.vue":T1,"./components/panel/header/magic-header.vue":U1,"./components/panel/header/magic-push.vue":H1,"./components/panel/header/magic-search.vue":X1,"./components/panel/header/magic-upload.vue":Q1,"./components/panel/main/magic-data-resource.vue":op,"./components/panel/main/magic-login.vue":Tp,"./components/panel/main/magic-main.vue":Mp,"./components/panel/main/magic-recent-opened.vue":jp,"./components/panel/main/magic-resource.vue":Jp,"./components/panel/main/magic-script-editor.vue":vd}).forEach(([e,t])=>ja[e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("."))]=t.default);const wn=e=>{let t;Object.entries(ja).forEach(([n,a])=>{e.component(n,a)}),e.config.globalProperties.$contextmenu=n=>{t!=null&&t.unmount(),t=kn(Ba,{menus:n.menus,position:{x:n.event.clientX,y:n.event.clientY},onDestory:()=>{t&&t.unmount(),t=null}}),wn(t),t.mount(".magic-editor .magic-mounts")},Object.keys(M).forEach(n=>e.config.globalProperties[`$${n}`]=M[n]),ba(e,wn)};if(typeof window!="undefined"){let e=function(){var t=document.body,n=document.getElementById("__svg__icons__dom__1649592439117__");n||(n=document.createElementNS("http://www.w3.org/2000/svg","svg"),n.style.position="absolute",n.style.width="0",n.style.height="0",n.id="__svg__icons__dom__1649592439117__",n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("xmlns:link","http://www.w3.org/1999/xlink")),n.innerHTML='',t.insertBefore(n,t.firstChild)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}window.Vue=ss;const Va=kn(hs);Va.use(wn);Va.mount("#app");
diff --git a/magic-editor/src/main/resources/magic-editor/assets/axios.23e7b955.js b/magic-editor/src/main/resources/magic-editor/assets/axios.23e7b955.js
index 9c68baf3..2b449338 100644
--- a/magic-editor/src/main/resources/magic-editor/assets/axios.23e7b955.js
+++ b/magic-editor/src/main/resources/magic-editor/assets/axios.23e7b955.js
@@ -1,2 +1,2 @@
-function gr(r){if(r.__esModule)return r;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(r).forEach(function(t){var a=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:function(){return r[t]}})}),e}var D={exports:{}},K=function(e,t){return function(){for(var n=new Array(arguments.length),s=0;s=0)return;a==="set-cookie"?t[a]=(t[a]?t[a]:[]).concat([n]):t[a]=t[a]?t[a]+", "+n:n}}),t},te=h,Ke=te.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),a;function n(s){var o=s;return e&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return a=n(window.location.href),function(o){var u=te.isString(o)?n(o):o;return u.protocol===a.protocol&&u.host===a.host}}():function(){return function(){return!0}}();function H(r){this.message=r}H.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};H.prototype.__CANCEL__=!0;var $=H,P=h,Ge=Me,Ye=ke,Qe=Z,Ze=Ve,er=Xe,rr=Ke,I=re,tr=U,nr=$,ne=function(e){return new Promise(function(a,n){var s=e.data,o=e.headers,u=e.responseType,f;function v(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}P.isFormData(s)&&delete o["Content-Type"];var i=new XMLHttpRequest;if(e.auth){var l=e.auth.username||"",d=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(l+":"+d)}var R=Ze(e.baseURL,e.url);i.open(e.method.toUpperCase(),Qe(R,e.params,e.paramsSerializer),!0),i.timeout=e.timeout;function W(){if(!!i){var m="getAllResponseHeaders"in i?er(i.getAllResponseHeaders()):null,w=!u||u==="text"||u==="json"?i.responseText:i.response,b={data:w,status:i.status,statusText:i.statusText,headers:m,config:e,request:i};Ge(function(L){a(L),v()},function(L){n(L),v()},b),i=null}}if("onloadend"in i?i.onloadend=W:i.onreadystatechange=function(){!i||i.readyState!==4||i.status===0&&!(i.responseURL&&i.responseURL.indexOf("file:")===0)||setTimeout(W)},i.onabort=function(){!i||(n(I("Request aborted",e,"ECONNABORTED",i)),i=null)},i.onerror=function(){n(I("Network Error",e,null,i)),i=null},i.ontimeout=function(){var w=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",b=e.transitional||tr.transitional;e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),n(I(w,e,b.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",i)),i=null},P.isStandardBrowserEnv()){var X=(e.withCredentials||rr(R))&&e.xsrfCookieName?Ye.read(e.xsrfCookieName):void 0;X&&(o[e.xsrfHeaderName]=X)}"setRequestHeader"in i&&P.forEach(o,function(w,b){typeof s=="undefined"&&b.toLowerCase()==="content-type"?delete o[b]:i.setRequestHeader(b,w)}),P.isUndefined(e.withCredentials)||(i.withCredentials=!!e.withCredentials),u&&u!=="json"&&(i.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&i.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&i.upload&&i.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(m){!i||(n(!m||m&&m.type?new nr("canceled"):m),i.abort(),i=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),s||(s=null),i.send(s)})},c=h,ae=_e,ar=ee,sr={"Content-Type":"application/x-www-form-urlencoded"};function se(r,e){!c.isUndefined(r)&&c.isUndefined(r["Content-Type"])&&(r["Content-Type"]=e)}function ir(){var r;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(r=ne),r}function or(r,e,t){if(c.isString(r))try{return(e||JSON.parse)(r),c.trim(r)}catch(a){if(a.name!=="SyntaxError")throw a}return(t||JSON.stringify)(r)}var T={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:ir(),transformRequest:[function(e,t){return ae(t,"Accept"),ae(t,"Content-Type"),c.isFormData(e)||c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)?e:c.isArrayBufferView(e)?e.buffer:c.isURLSearchParams(e)?(se(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):c.isObject(e)||t&&t["Content-Type"]==="application/json"?(se(t,"application/json"),or(e)):e}],transformResponse:[function(e){var t=this.transitional||T.transitional,a=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,s=!a&&this.responseType==="json";if(s||n&&c.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?ar(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};c.forEach(["delete","get","head"],function(e){T.headers[e]={}});c.forEach(["post","put","patch"],function(e){T.headers[e]=c.merge(sr)});var U=T,ur=h,fr=U,lr=function(e,t,a){var n=this||fr;return ur.forEach(a,function(o){e=o.call(n,e,t)}),e},ie=function(e){return!!(e&&e.__CANCEL__)},oe=h,J=lr,cr=ie,dr=U,hr=$;function z(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new hr("canceled")}var pr=function(e){z(e),e.headers=e.headers||{},e.data=J.call(e,e.data,e.headers,e.transformRequest),e.headers=oe.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),oe.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var t=e.adapter||dr.adapter;return t(e).then(function(n){return z(e),n.data=J.call(e,n.data,n.headers,e.transformResponse),n},function(n){return cr(n)||(z(e),n&&n.response&&(n.response.data=J.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})},p=h,ue=function(e,t){t=t||{};var a={};function n(i,l){return p.isPlainObject(i)&&p.isPlainObject(l)?p.merge(i,l):p.isPlainObject(l)?p.merge({},l):p.isArray(l)?l.slice():l}function s(i){if(p.isUndefined(t[i])){if(!p.isUndefined(e[i]))return n(void 0,e[i])}else return n(e[i],t[i])}function o(i){if(!p.isUndefined(t[i]))return n(void 0,t[i])}function u(i){if(p.isUndefined(t[i])){if(!p.isUndefined(e[i]))return n(void 0,e[i])}else return n(void 0,t[i])}function f(i){if(i in t)return n(e[i],t[i]);if(i in e)return n(void 0,e[i])}var v={url:o,method:o,data:o,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f};return p.forEach(Object.keys(e).concat(Object.keys(t)),function(l){var d=v[l]||s,R=d(l);p.isUndefined(R)&&d!==f||(a[l]=R)}),a},fe={version:"0.24.0"},mr=fe.version,V={};["object","boolean","number","function","string","symbol"].forEach(function(r,e){V[r]=function(a){return typeof a===r||"a"+(e<1?"n ":" ")+r}});var le={};V.transitional=function(e,t,a){function n(s,o){return"[Axios v"+mr+"] Transitional option '"+s+"'"+o+(a?". "+a:"")}return function(s,o,u){if(e===!1)throw new Error(n(o," has been removed"+(t?" in "+t:"")));return t&&!le[o]&&(le[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,o,u):!0}};function vr(r,e,t){if(typeof r!="object")throw new TypeError("options must be an object");for(var a=Object.keys(r),n=a.length;n-- >0;){var s=a[n],o=e[s];if(o){var u=r[s],f=u===void 0||o(u,s,r);if(f!==!0)throw new TypeError("option "+s+" must be "+f);continue}if(t!==!0)throw Error("Unknown option "+s)}}var yr={assertOptions:vr,validators:V},ce=h,br=Z,de=Le,he=pr,j=ue,pe=yr,O=pe.validators;function x(r){this.defaults=r,this.interceptors={request:new de,response:new de}}x.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=j(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;t!==void 0&&pe.assertOptions(t,{silentJSONParsing:O.transitional(O.boolean),forcedJSONParsing:O.transitional(O.boolean),clarifyTimeoutError:O.transitional(O.boolean)},!1);var a=[],n=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(e)===!1||(n=n&&d.synchronous,a.unshift(d.fulfilled,d.rejected))});var s=[];this.interceptors.response.forEach(function(d){s.push(d.fulfilled,d.rejected)});var o;if(!n){var u=[he,void 0];for(Array.prototype.unshift.apply(u,a),u=u.concat(s),o=Promise.resolve(e);u.length;)o=o.then(u.shift(),u.shift());return o}for(var f=e;a.length;){var v=a.shift(),i=a.shift();try{f=v(f)}catch(l){i(l);break}}try{o=he(f)}catch(l){return Promise.reject(l)}for(;s.length;)o=o.then(s.shift(),s.shift());return o};x.prototype.getUri=function(e){return e=j(this.defaults,e),br(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};ce.forEach(["delete","get","head","options"],function(e){x.prototype[e]=function(t,a){return this.request(j(a||{},{method:e,url:t,data:(a||{}).data}))}});ce.forEach(["post","put","patch"],function(e){x.prototype[e]=function(t,a,n){return this.request(j(n||{},{method:e,url:t,data:a}))}});var Er=x,wr=$;function C(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(n){e=n});var t=this;this.promise.then(function(a){if(!!t._listeners){var n,s=t._listeners.length;for(n=0;n=0)return;a==="set-cookie"?t[a]=(t[a]?t[a]:[]).concat([n]):t[a]=t[a]?t[a]+", "+n:n}}),t},G=p,Ke=G.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),a;function n(s){var o=s;return e&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return a=n(window.location.href),function(o){var u=G.isString(o)?n(o):o;return u.protocol===a.protocol&&u.host===a.host}}():function(){return function(){return!0}}();function z(r){this.message=r}z.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};z.prototype.__CANCEL__=!0;var T=z,g=p,Ge=Me,Ye=ke,Qe=ue,Ze=Ve,er=Xe,rr=Ke,_=le,tr=j,nr=T,Y=function(e){return new Promise(function(a,n){var s=e.data,o=e.headers,u=e.responseType,f;function v(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}g.isFormData(s)&&delete o["Content-Type"];var i=new XMLHttpRequest;if(e.auth){var l=e.auth.username||"",d=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(l+":"+d)}var R=Ze(e.baseURL,e.url);i.open(e.method.toUpperCase(),Qe(R,e.params,e.paramsSerializer),!0),i.timeout=e.timeout;function W(){if(!!i){var m="getAllResponseHeaders"in i?er(i.getAllResponseHeaders()):null,w=!u||u==="text"||u==="json"?i.responseText:i.response,b={data:w,status:i.status,statusText:i.statusText,headers:m,config:e,request:i};Ge(function(L){a(L),v()},function(L){n(L),v()},b),i=null}}if("onloadend"in i?i.onloadend=W:i.onreadystatechange=function(){!i||i.readyState!==4||i.status===0&&!(i.responseURL&&i.responseURL.indexOf("file:")===0)||setTimeout(W)},i.onabort=function(){!i||(n(_("Request aborted",e,"ECONNABORTED",i)),i=null)},i.onerror=function(){n(_("Network Error",e,null,i)),i=null},i.ontimeout=function(){var w=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",b=e.transitional||tr.transitional;e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),n(_(w,e,b.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",i)),i=null},g.isStandardBrowserEnv()){var X=(e.withCredentials||rr(R))&&e.xsrfCookieName?Ye.read(e.xsrfCookieName):void 0;X&&(o[e.xsrfHeaderName]=X)}"setRequestHeader"in i&&g.forEach(o,function(w,b){typeof s=="undefined"&&b.toLowerCase()==="content-type"?delete o[b]:i.setRequestHeader(b,w)}),g.isUndefined(e.withCredentials)||(i.withCredentials=!!e.withCredentials),u&&u!=="json"&&(i.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&i.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&i.upload&&i.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(m){!i||(n(!m||m&&m.type?new nr("canceled"):m),i.abort(),i=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),s||(s=null),i.send(s)})},c=p,Q=_e,ar=fe,sr={"Content-Type":"application/x-www-form-urlencoded"};function Z(r,e){!c.isUndefined(r)&&c.isUndefined(r["Content-Type"])&&(r["Content-Type"]=e)}function ir(){var r;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(r=Y),r}function or(r,e,t){if(c.isString(r))try{return(e||JSON.parse)(r),c.trim(r)}catch(a){if(a.name!=="SyntaxError")throw a}return(t||JSON.stringify)(r)}var U={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:ir(),transformRequest:[function(e,t){return Q(t,"Accept"),Q(t,"Content-Type"),c.isFormData(e)||c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)?e:c.isArrayBufferView(e)?e.buffer:c.isURLSearchParams(e)?(Z(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):c.isObject(e)||t&&t["Content-Type"]==="application/json"?(Z(t,"application/json"),or(e)):e}],transformResponse:[function(e){var t=this.transitional||U.transitional,a=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,s=!a&&this.responseType==="json";if(s||n&&c.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?ar(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};c.forEach(["delete","get","head"],function(e){U.headers[e]={}});c.forEach(["post","put","patch"],function(e){U.headers[e]=c.merge(sr)});var j=U,ur=p,fr=j,lr=function(e,t,a){var n=this||fr;return ur.forEach(a,function(o){e=o.call(n,e,t)}),e},ce=function(e){return!!(e&&e.__CANCEL__)},ee=p,q=lr,cr=ce,dr=j,hr=T;function F(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new hr("canceled")}var pr=function(e){F(e),e.headers=e.headers||{},e.data=q.call(e,e.data,e.headers,e.transformRequest),e.headers=ee.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),ee.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var t=e.adapter||dr.adapter;return t(e).then(function(n){return F(e),n.data=q.call(e,n.data,n.headers,e.transformResponse),n},function(n){return cr(n)||(F(e),n&&n.response&&(n.response.data=q.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})},h=p,de=function(e,t){t=t||{};var a={};function n(i,l){return h.isPlainObject(i)&&h.isPlainObject(l)?h.merge(i,l):h.isPlainObject(l)?h.merge({},l):h.isArray(l)?l.slice():l}function s(i){if(h.isUndefined(t[i])){if(!h.isUndefined(e[i]))return n(void 0,e[i])}else return n(e[i],t[i])}function o(i){if(!h.isUndefined(t[i]))return n(void 0,t[i])}function u(i){if(h.isUndefined(t[i])){if(!h.isUndefined(e[i]))return n(void 0,e[i])}else return n(void 0,t[i])}function f(i){if(i in t)return n(e[i],t[i]);if(i in e)return n(void 0,e[i])}var v={url:o,method:o,data:o,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f};return h.forEach(Object.keys(e).concat(Object.keys(t)),function(l){var d=v[l]||s,R=d(l);h.isUndefined(R)&&d!==f||(a[l]=R)}),a},he={version:"0.24.0"},mr=he.version,V={};["object","boolean","number","function","string","symbol"].forEach(function(r,e){V[r]=function(a){return typeof a===r||"a"+(e<1?"n ":" ")+r}});var re={};V.transitional=function(e,t,a){function n(s,o){return"[Axios v"+mr+"] Transitional option '"+s+"'"+o+(a?". "+a:"")}return function(s,o,u){if(e===!1)throw new Error(n(o," has been removed"+(t?" in "+t:"")));return t&&!re[o]&&(re[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,o,u):!0}};function vr(r,e,t){if(typeof r!="object")throw new TypeError("options must be an object");for(var a=Object.keys(r),n=a.length;n-- >0;){var s=a[n],o=e[s];if(o){var u=r[s],f=u===void 0||o(u,s,r);if(f!==!0)throw new TypeError("option "+s+" must be "+f);continue}if(t!==!0)throw Error("Unknown option "+s)}}var yr={assertOptions:vr,validators:V},pe=p,br=ue,te=Le,ne=pr,B=de,me=yr,O=me.validators;function x(r){this.defaults=r,this.interceptors={request:new te,response:new te}}x.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=B(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;t!==void 0&&me.assertOptions(t,{silentJSONParsing:O.transitional(O.boolean),forcedJSONParsing:O.transitional(O.boolean),clarifyTimeoutError:O.transitional(O.boolean)},!1);var a=[],n=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(e)===!1||(n=n&&d.synchronous,a.unshift(d.fulfilled,d.rejected))});var s=[];this.interceptors.response.forEach(function(d){s.push(d.fulfilled,d.rejected)});var o;if(!n){var u=[ne,void 0];for(Array.prototype.unshift.apply(u,a),u=u.concat(s),o=Promise.resolve(e);u.length;)o=o.then(u.shift(),u.shift());return o}for(var f=e;a.length;){var v=a.shift(),i=a.shift();try{f=v(f)}catch(l){i(l);break}}try{o=ne(f)}catch(l){return Promise.reject(l)}for(;s.length;)o=o.then(s.shift(),s.shift());return o};x.prototype.getUri=function(e){return e=B(this.defaults,e),br(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};pe.forEach(["delete","get","head","options"],function(e){x.prototype[e]=function(t,a){return this.request(B(a||{},{method:e,url:t,data:(a||{}).data}))}});pe.forEach(["post","put","patch"],function(e){x.prototype[e]=function(t,a,n){return this.request(B(n||{},{method:e,url:t,data:a}))}});var Er=x,wr=T;function C(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(n){e=n});var t=this;this.promise.then(function(a){if(!!t._listeners){var n,s=t._listeners.length;for(n=0;n{throw t.stack?new Error(t.message+`
-
-`+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const Kt=new Ot;function en(e){tn(e)||Kt.onUnexpectedError(e)}function Qe(e){if(e instanceof Error){let{name:t,message:n}=e;const s=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:s}}return e}const Ze="Canceled";function tn(e){return e instanceof Error&&e.name===Ze&&e.message===Ze}function nn(e){const t=this;let n=!1,s;return function(){return n||(n=!0,s=e.apply(t,arguments)),s}}var we;(function(e){function t(d){return d&&typeof d=="object"&&typeof d[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function s(){return n}e.empty=s;function*r(d){yield d}e.single=r;function i(d){return d||n}e.from=i;function l(d){return!d||d[Symbol.iterator]().next().done===!0}e.isEmpty=l;function u(d){return d[Symbol.iterator]().next().value}e.first=u;function a(d,h){for(const g of d)if(h(g))return!0;return!1}e.some=a;function o(d,h){for(const g of d)if(h(g))return g}e.find=o;function*f(d,h){for(const g of d)h(g)&&(yield g)}e.filter=f;function*c(d,h){let g=0;for(const _ of d)yield h(_,g++)}e.map=c;function*m(...d){for(const h of d)for(const g of h)yield g}e.concat=m;function*L(d){for(const h of d)for(const g of h)yield g}e.concatNested=L;function b(d,h,g){let _=g;for(const A of d)_=h(_,A);return _}e.reduce=b;function*w(d,h,g=d.length){for(h<0&&(h+=d.length),g<0?g+=d.length:g>d.length&&(g=d.length);h_===A){const _=d[Symbol.iterator](),A=h[Symbol.iterator]();for(;;){const S=_.next(),N=A.next();if(S.done!==N.done)return!1;if(S.done)return!0;if(!g(S.value,N.value))return!1}}e.equals=P})(we||(we={}));function sn(e){return e}function rn(e,t){}class ln extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function Xe(e){if(we.is(e)){let t=[];for(const n of e)if(n)try{n.dispose()}catch(s){t.push(s)}if(t.length===1)throw t[0];if(t.length>1)throw new ln(t);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function un(...e){return Je(()=>Xe(e))}function Je(e){return sn({dispose:nn(()=>{e()})})}class le{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{Xe(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?le.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}}le.DISABLE_DISPOSED_WARNING=!1;class Oe{constructor(){this._store=new le,rn(this._store)}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}Oe.None=Object.freeze({dispose(){}});var Ce;const he="en";let ve=!1,Me=!1,Pe=!1,me,pe=he,an,Z;const T=typeof self=="object"?self:typeof global=="object"?global:{};let k;typeof T.vscode!="undefined"&&typeof T.vscode.process!="undefined"?k=T.vscode.process:typeof process!="undefined"&&(k=process);const on=typeof((Ce=k==null?void 0:k.versions)===null||Ce===void 0?void 0:Ce.electron)=="string"&&k.type==="renderer";if(typeof navigator=="object"&&!on)Z=navigator.userAgent,ve=Z.indexOf("Windows")>=0,Me=Z.indexOf("Macintosh")>=0,(Z.indexOf("Macintosh")>=0||Z.indexOf("iPad")>=0||Z.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Pe=Z.indexOf("Linux")>=0,me=navigator.language,pe=me;else if(typeof k=="object"){ve=k.platform==="win32",Me=k.platform==="darwin",Pe=k.platform==="linux",Pe&&!!k.env.SNAP&&k.env.SNAP_REVISION,me=he,pe=he;const e=k.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),n=t.availableLanguages["*"];me=t.locale,pe=n||he,an=t._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const ue=ve,cn=Me,Ke=function(){if(T.setImmediate)return T.setImmediate.bind(T);if(typeof T.postMessage=="function"&&!T.importScripts){let n=[];T.addEventListener("message",r=>{if(r.data&&r.data.vscodeSetImmediateId)for(let i=0,l=n.length;i{const i=++s;n.push({id:i,callback:r}),T.postMessage({vscodeSetImmediateId:i},"*")}}if(typeof(k==null?void 0:k.nextTick)=="function")return k.nextTick.bind(k);const t=Promise.resolve();return n=>t.then(n)}();function fn(e){let t=[],n=Object.getPrototypeOf(e);for(;Object.prototype!==n;)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}function Re(e){const t=[];for(const n of fn(e))typeof e[n]=="function"&&t.push(n);return t}function et(e,t){const n=r=>function(){const i=Array.prototype.slice.call(arguments,0);return t(r,i)};let s={};for(const r of e)s[r]=n(r);return s}const hn="$initialize";class mn{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(t){this._workerId=t}sendMessage(t,n){let s=String(++this._lastSentReq);return new Promise((r,i)=>{this._pendingReplies[s]={resolve:r,reject:i},this._send({vsWorker:this._workerId,req:s,method:t,args:n})})}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){if(t.seq){let i=t;if(!this._pendingReplies[i.seq]){console.warn("Got reply to unknown seq");return}let l=this._pendingReplies[i.seq];if(delete this._pendingReplies[i.seq],i.err){let u=i.err;i.err.$isError&&(u=new Error,u.name=i.err.name,u.message=i.err.message,u.stack=i.err.stack),l.reject(u);return}l.resolve(i.res);return}let n=t,s=n.req;this._handler.handleMessage(n.method,n.args).then(i=>{this._send({vsWorker:this._workerId,seq:s,res:i,err:void 0})},i=>{i.detail instanceof Error&&(i.detail=Qe(i.detail)),this._send({vsWorker:this._workerId,seq:s,res:void 0,err:Qe(i)})})}_send(t){let n=[];if(t.req){const s=t;for(let r=0;r{t(s,r)},handleMessage:(s,r)=>this._handleMessage(s,r)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n){if(t===hn)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._requestHandler[t].apply(this._requestHandler,n))}catch(s){return Promise.reject(s)}}initialize(t,n,s,r){this._protocol.setWorkerId(t);const l=et(r,(u,a)=>this._protocol.sendMessage(u,a));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(l),Promise.resolve(Re(this._requestHandler))):(n&&(typeof n.baseUrl!="undefined"&&delete n.baseUrl,typeof n.paths!="undefined"&&typeof n.paths.vs!="undefined"&&delete n.paths.vs,typeof n.trustedTypesPolicy!==void 0&&delete n.trustedTypesPolicy,n.catchError=!0,self.require.config(n)),new Promise((u,a)=>{self.require([s],o=>{if(this._requestHandler=o.create(l),!this._requestHandler){a(new Error("No RequestHandler!"));return}u(Re(this._requestHandler))},a)}))}}class ${constructor(t,n,s,r){this.originalStart=t,this.originalLength=n,this.modifiedStart=s,this.modifiedLength=r}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function gn(e){return e.split(/\r\n|\r|\n/)}function _n(e){for(let t=0,n=e.length;t=0;n--){const s=e.charCodeAt(n);if(s!==32&&s!==9)return n}return-1}function tt(e,t){return(t<<5)-t+e|0}function Nn(e,t){t=tt(149417,t);for(let n=0,s=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new $(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class z{constructor(t,n,s=null){this.ContinueProcessingPredicate=s,this._originalSequence=t,this._modifiedSequence=n;const[r,i,l]=z._getElements(t),[u,a,o]=z._getElements(n);this._hasStrings=l&&o,this._originalStringElements=r,this._originalElementsOrHash=i,this._modifiedStringElements=u,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const n=t.getElements();if(z._isStringArray(n)){const s=new Int32Array(n.length);for(let r=0,i=n.length;r=t&&r>=s&&this.ElementsAreEqual(n,r);)n--,r--;if(t>n||s>r){let c;return s<=r?(K.Assert(t===n+1,"originalStart should only be one more than originalEnd"),c=[new $(t,0,s,r-s+1)]):t<=n?(K.Assert(s===r+1,"modifiedStart should only be one more than modifiedEnd"),c=[new $(t,n-t+1,s,0)]):(K.Assert(t===n+1,"originalStart should only be one more than originalEnd"),K.Assert(s===r+1,"modifiedStart should only be one more than modifiedEnd"),c=[]),c}const l=[0],u=[0],a=this.ComputeRecursionPoint(t,n,s,r,l,u,i),o=l[0],f=u[0];if(a!==null)return a;if(!i[0]){const c=this.ComputeDiffRecursive(t,o,s,f,i);let m=[];return i[0]?m=[new $(o+1,n-(o+1)+1,f+1,r-(f+1)+1)]:m=this.ComputeDiffRecursive(o+1,n,f+1,r,i),this.ConcatenateChanges(c,m)}return[new $(t,n-t+1,s,r-s+1)]}WALKTRACE(t,n,s,r,i,l,u,a,o,f,c,m,L,b,w,M,P,d){let h=null,g=null,_=new st,A=n,S=s,N=L[0]-M[0]-r,p=-1073741824,I=this.m_forwardHistory.length-1;do{const R=N+t;R===A||R=0&&(o=this.m_forwardHistory[I],t=o[0],A=1,S=o.length-1)}while(--I>=-1);if(h=_.getReverseChanges(),d[0]){let R=L[0]+1,C=M[0]+1;if(h!==null&&h.length>0){const Q=h[h.length-1];R=Math.max(R,Q.getOriginalEnd()),C=Math.max(C,Q.getModifiedEnd())}g=[new $(R,m-R+1,C,w-C+1)]}else{_=new st,A=l,S=u,N=L[0]-M[0]-a,p=1073741824,I=P?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const R=N+i;R===A||R=f[R+1]?(c=f[R+1]-1,b=c-N-a,c>p&&_.MarkNextChange(),p=c+1,_.AddOriginalElement(c+1,b+1),N=R+1-i):(c=f[R-1],b=c-N-a,c>p&&_.MarkNextChange(),p=c,_.AddModifiedElement(c+1,b+1),N=R-1-i),I>=0&&(f=this.m_reverseHistory[I],i=f[0],A=1,S=f.length-1)}while(--I>=-1);g=_.getChanges()}return this.ConcatenateChanges(h,g)}ComputeRecursionPoint(t,n,s,r,i,l,u){let a=0,o=0,f=0,c=0,m=0,L=0;t--,s--,i[0]=0,l[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const b=n-t+(r-s),w=b+1,M=new Int32Array(w),P=new Int32Array(w),d=r-s,h=n-t,g=t-s,_=n-r,S=(h-d)%2==0;M[d]=t,P[h]=n,u[0]=!1;for(let N=1;N<=b/2+1;N++){let p=0,I=0;f=this.ClipDiagonalBound(d-N,N,d,w),c=this.ClipDiagonalBound(d+N,N,d,w);for(let C=f;C<=c;C+=2){C===f||Cp+I&&(p=a,I=o),!S&&Math.abs(C-h)<=N-1&&a>=P[C])return i[0]=a,l[0]=o,Q<=P[C]&&1447>0&&N<=1447+1?this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u):null}const R=(p-t+(I-s)-N)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(p,R))return u[0]=!0,i[0]=p,l[0]=I,R>0&&1447>0&&N<=1447+1?this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u):(t++,s++,[new $(t,n-t+1,s,r-s+1)]);m=this.ClipDiagonalBound(h-N,N,h,w),L=this.ClipDiagonalBound(h+N,N,h,w);for(let C=m;C<=L;C+=2){C===m||C=P[C+1]?a=P[C+1]-1:a=P[C-1],o=a-(C-h)-_;const Q=a;for(;a>t&&o>s&&this.ElementsAreEqual(a,o);)a--,o--;if(P[C]=a,S&&Math.abs(C-d)<=N&&a<=M[C])return i[0]=a,l[0]=o,Q>=M[C]&&1447>0&&N<=1447+1?this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u):null}if(N<=1447){let C=new Int32Array(c-f+2);C[0]=d-f+1,ee.Copy2(M,f,C,1,c-f+1),this.m_forwardHistory.push(C),C=new Int32Array(L-m+2),C[0]=h-m+1,ee.Copy2(P,m,C,1,L-m+1),this.m_reverseHistory.push(C)}}return this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u)}PrettifyChanges(t){for(let n=0;n0,u=s.modifiedLength>0;for(;s.originalStart+s.originalLength=0;n--){const s=t[n];let r=0,i=0;if(n>0){const c=t[n-1];r=c.originalStart+c.originalLength,i=c.modifiedStart+c.modifiedLength}const l=s.originalLength>0,u=s.modifiedLength>0;let a=0,o=this._boundaryScore(s.originalStart,s.originalLength,s.modifiedStart,s.modifiedLength);for(let c=1;;c++){const m=s.originalStart-c,L=s.modifiedStart-c;if(mo&&(o=w,a=c)}s.originalStart-=a,s.modifiedStart-=a;const f=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],f)){t[n-1]=f[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,s=t.length;n0&&L>a&&(a=L,o=c,f=m)}return a>0?[o,f]:null}_contiguousSequenceScore(t,n,s){let r=0;for(let i=0;i=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){const s=t+n;if(this._OriginalIsBoundary(s-1)||this._OriginalIsBoundary(s))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){const s=t+n;if(this._ModifiedIsBoundary(s-1)||this._ModifiedIsBoundary(s))return!0}return!1}_boundaryScore(t,n,s,r){const i=this._OriginalRegionIsBoundary(t,n)?1:0,l=this._ModifiedRegionIsBoundary(s,r)?1:0;return i+l}ConcatenateChanges(t,n){let s=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],s)){const r=new Array(t.length+n.length-1);return ee.Copy(t,0,r,0,t.length-1),r[t.length-1]=s[0],ee.Copy(n,1,r,t.length,n.length-1),r}else{const r=new Array(t.length+n.length);return ee.Copy(t,0,r,0,t.length),ee.Copy(n,0,r,t.length,n.length),r}}ChangesOverlap(t,n,s){if(K.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),K.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){const r=t.originalStart;let i=t.originalLength;const l=t.modifiedStart;let u=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(i=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(u=n.modifiedStart+n.modifiedLength-t.modifiedStart),s[0]=new $(r,i,l,u),!0}else return s[0]=null,!1}ClipDiagonalBound(t,n,s,r){if(t>=0&&t=An&&e<=Cn||e>=wn&&e<=vn}function de(e,t,n,s){let r="",i=0,l=-1,u=0,a=0;for(let o=0;o<=e.length;++o){if(o2){const f=r.lastIndexOf(n);f===-1?(r="",i=0):(r=r.slice(0,f),i=r.length-1-r.lastIndexOf(n)),l=o,u=0;continue}else if(r.length!==0){r="",i=0,l=o,u=0;continue}}t&&(r+=r.length>0?`${n}..`:"..",i=2)}else r.length>0?r+=`${n}${e.slice(l+1,o)}`:r=e.slice(l+1,o),i=o-l-1;l=o,u=0}else a===G&&u!==-1?++u:u=-1}return r}function it(e,t){if(t===null||typeof t!="object")throw new rt("pathObject","Object",t);const n=t.dir||t.root,s=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${s}`:`${n}${e}${s}`:s}const H={resolve(...e){let t="",n="",s=!1;for(let r=e.length-1;r>=-1;r--){let i;if(r>=0){if(i=e[r],D(i,"path"),i.length===0)continue}else t.length===0?i=Ue():(i=bn[`=${t}`]||Ue(),(i===void 0||i.slice(0,2).toLowerCase()!==t.toLowerCase()&&i.charCodeAt(2)===q)&&(i=`${t}\\`));const l=i.length;let u=0,a="",o=!1;const f=i.charCodeAt(0);if(l===1)v(f)&&(u=1,o=!0);else if(v(f))if(o=!0,v(i.charCodeAt(1))){let c=2,m=c;for(;c2&&v(i.charCodeAt(2))&&(o=!0,u=3));if(a.length>0)if(t.length>0){if(a.toLowerCase()!==t.toLowerCase())continue}else t=a;if(s){if(t.length>0)break}else if(n=`${i.slice(u)}\\${n}`,s=o,o&&t.length>0)break}return n=de(n,!s,"\\",v),s?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){D(e,"path");const t=e.length;if(t===0)return".";let n=0,s,r=!1;const i=e.charCodeAt(0);if(t===1)return xe(i)?"\\":e;if(v(i))if(r=!0,v(e.charCodeAt(1))){let u=2,a=u;for(;u2&&v(e.charCodeAt(2))&&(r=!0,n=3));let l=n0&&v(e.charCodeAt(t-1))&&(l+="\\"),s===void 0?r?`\\${l}`:l:r?`${s}\\${l}`:`${s}${l}`},isAbsolute(e){D(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return v(n)||t>2&&y(n)&&e.charCodeAt(1)===j&&v(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let i=0;i0&&(t===void 0?t=n=l:t+=`\\${l}`)}if(t===void 0)return".";let s=!0,r=0;if(typeof n=="string"&&v(n.charCodeAt(0))){++r;const i=n.length;i>1&&v(n.charCodeAt(1))&&(++r,i>2&&(v(n.charCodeAt(2))?++r:s=!1))}if(s){for(;r=2&&(t=`\\${t.slice(r)}`)}return H.normalize(t)},relative(e,t){if(D(e,"from"),D(t,"to"),e===t)return"";const n=H.resolve(e),s=H.resolve(t);if(n===s||(e=n.toLowerCase(),t=s.toLowerCase(),e===t))return"";let r=0;for(;rr&&e.charCodeAt(i-1)===q;)i--;const l=i-r;let u=0;for(;uu&&t.charCodeAt(a-1)===q;)a--;const o=a-u,f=lf){if(t.charCodeAt(u+m)===q)return s.slice(u+m+1);if(m===2)return s.slice(u+m)}l>f&&(e.charCodeAt(r+m)===q?c=m:m===2&&(c=3)),c===-1&&(c=0)}let L="";for(m=r+c+1;m<=i;++m)(m===i||e.charCodeAt(m)===q)&&(L+=L.length===0?"..":"\\..");return u+=c,L.length>0?`${L}${s.slice(u,a)}`:(s.charCodeAt(u)===q&&++u,s.slice(u,a))},toNamespacedPath(e){if(typeof e!="string")return e;if(e.length===0)return"";const t=H.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===q){if(t.charCodeAt(1)===q){const n=t.charCodeAt(2);if(n!==Mn&&n!==G)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(y(t.charCodeAt(0))&&t.charCodeAt(1)===j&&t.charCodeAt(2)===q)return`\\\\?\\${t}`;return e},dirname(e){D(e,"path");const t=e.length;if(t===0)return".";let n=-1,s=0;const r=e.charCodeAt(0);if(t===1)return v(r)?e:".";if(v(r)){if(n=s=1,v(e.charCodeAt(1))){let u=2,a=u;for(;u2&&v(e.charCodeAt(2))?3:2,s=n);let i=-1,l=!0;for(let u=t-1;u>=s;--u)if(v(e.charCodeAt(u))){if(!l){i=u;break}}else l=!1;if(i===-1){if(n===-1)return".";i=n}return e.slice(0,i)},basename(e,t){t!==void 0&&D(t,"ext"),D(e,"path");let n=0,s=-1,r=!0,i;if(e.length>=2&&y(e.charCodeAt(0))&&e.charCodeAt(1)===j&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,u=-1;for(i=e.length-1;i>=n;--i){const a=e.charCodeAt(i);if(v(a)){if(!r){n=i+1;break}}else u===-1&&(r=!1,u=i+1),l>=0&&(a===t.charCodeAt(l)?--l==-1&&(s=i):(l=-1,s=u))}return n===s?s=u:s===-1&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=n;--i)if(v(e.charCodeAt(i))){if(!r){n=i+1;break}}else s===-1&&(r=!1,s=i+1);return s===-1?"":e.slice(n,s)},extname(e){D(e,"path");let t=0,n=-1,s=0,r=-1,i=!0,l=0;e.length>=2&&e.charCodeAt(1)===j&&y(e.charCodeAt(0))&&(t=s=2);for(let u=e.length-1;u>=t;--u){const a=e.charCodeAt(u);if(v(a)){if(!i){s=u+1;break}continue}r===-1&&(i=!1,r=u+1),a===G?n===-1?n=u:l!==1&&(l=1):n!==-1&&(l=-1)}return n===-1||r===-1||l===0||l===1&&n===r-1&&n===s+1?"":e.slice(n,r)},format:it.bind(null,"\\"),parse(e){D(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.length;let s=0,r=e.charCodeAt(0);if(n===1)return v(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(v(r)){if(s=1,v(e.charCodeAt(1))){let c=2,m=c;for(;c0&&(t.root=e.slice(0,s));let i=-1,l=s,u=-1,a=!0,o=e.length-1,f=0;for(;o>=s;--o){if(r=e.charCodeAt(o),v(r)){if(!a){l=o+1;break}continue}u===-1&&(a=!1,u=o+1),r===G?i===-1?i=o:f!==1&&(f=1):i!==-1&&(f=-1)}return u!==-1&&(i===-1||f===0||f===1&&i===u-1&&i===l+1?t.base=t.name=e.slice(l,u):(t.name=e.slice(l,i),t.base=e.slice(l,u),t.ext=e.slice(i,u))),l>0&&l!==s?t.dir=e.slice(0,l-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},W={resolve(...e){let t="",n=!1;for(let s=e.length-1;s>=-1&&!n;s--){const r=s>=0?e[s]:Ue();D(r,"path"),r.length!==0&&(t=`${r}/${t}`,n=r.charCodeAt(0)===F)}return t=de(t,!n,"/",xe),n?`/${t}`:t.length>0?t:"."},normalize(e){if(D(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===F,n=e.charCodeAt(e.length-1)===F;return e=de(e,!t,"/",xe),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return D(e,"path"),e.length>0&&e.charCodeAt(0)===F},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=s:t+=`/${s}`)}return t===void 0?".":W.normalize(t)},relative(e,t){if(D(e,"from"),D(t,"to"),e===t||(e=W.resolve(e),t=W.resolve(t),e===t))return"";const n=1,s=e.length,r=s-n,i=1,l=t.length-i,u=ru){if(t.charCodeAt(i+o)===F)return t.slice(i+o+1);if(o===0)return t.slice(i+o)}else r>u&&(e.charCodeAt(n+o)===F?a=o:o===0&&(a=0));let f="";for(o=n+a+1;o<=s;++o)(o===s||e.charCodeAt(o)===F)&&(f+=f.length===0?"..":"/..");return`${f}${t.slice(i+a)}`},toNamespacedPath(e){return e},dirname(e){if(D(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===F;let n=-1,s=!0;for(let r=e.length-1;r>=1;--r)if(e.charCodeAt(r)===F){if(!s){n=r;break}}else s=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&D(t,"ext"),D(e,"path");let n=0,s=-1,r=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,u=-1;for(i=e.length-1;i>=0;--i){const a=e.charCodeAt(i);if(a===F){if(!r){n=i+1;break}}else u===-1&&(r=!1,u=i+1),l>=0&&(a===t.charCodeAt(l)?--l==-1&&(s=i):(l=-1,s=u))}return n===s?s=u:s===-1&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===F){if(!r){n=i+1;break}}else s===-1&&(r=!1,s=i+1);return s===-1?"":e.slice(n,s)},extname(e){D(e,"path");let t=-1,n=0,s=-1,r=!0,i=0;for(let l=e.length-1;l>=0;--l){const u=e.charCodeAt(l);if(u===F){if(!r){n=l+1;break}continue}s===-1&&(r=!1,s=l+1),u===G?t===-1?t=l:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||s===-1||i===0||i===1&&t===s-1&&t===n+1?"":e.slice(t,s)},format:it.bind(null,"/"),parse(e){D(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===F;let s;n?(t.root="/",s=1):s=0;let r=-1,i=0,l=-1,u=!0,a=e.length-1,o=0;for(;a>=s;--a){const f=e.charCodeAt(a);if(f===F){if(!u){i=a+1;break}continue}l===-1&&(u=!1,l=a+1),f===G?r===-1?r=a:o!==1&&(o=1):r!==-1&&(o=-1)}if(l!==-1){const f=i===0&&n?1:i;r===-1||o===0||o===1&&r===l-1&&r===i+1?t.base=t.name=e.slice(f,l):(t.name=e.slice(f,r),t.base=e.slice(f,l),t.ext=e.slice(r,l))}return i>0?t.dir=e.slice(0,i-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};W.win32=H.win32=H,W.posix=H.posix=W,X==="win32"?H.normalize:W.normalize,X==="win32"?H.resolve:W.resolve,X==="win32"?H.relative:W.relative,X==="win32"?H.dirname:W.dirname,X==="win32"?H.basename:W.basename,X==="win32"?H.extname:W.extname,X==="win32"?H.sep:W.sep;const Pn=/^\w[\w\d+.-]*$/,pn=/^\//,Rn=/^\/\//;function lt(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!Pn.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!pn.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Rn.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Un(e,t){return!e&&!t?"file":e}function xn(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Y&&(t=Y+t):t=Y;break}return t}const x="",Y="/",En=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class J{constructor(t,n,s,r,i,l=!1){typeof t=="object"?(this.scheme=t.scheme||x,this.authority=t.authority||x,this.path=t.path||x,this.query=t.query||x,this.fragment=t.fragment||x):(this.scheme=Un(t,l),this.authority=n||x,this.path=xn(this.scheme,s||x),this.query=r||x,this.fragment=i||x,lt(this,l))}static isUri(t){return t instanceof J?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}get fsPath(){return Ee(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:s,path:r,query:i,fragment:l}=t;return n===void 0?n=this.scheme:n===null&&(n=x),s===void 0?s=this.authority:s===null&&(s=x),r===void 0?r=this.path:r===null&&(r=x),i===void 0?i=this.query:i===null&&(i=x),l===void 0?l=this.fragment:l===null&&(l=x),n===this.scheme&&s===this.authority&&r===this.path&&i===this.query&&l===this.fragment?this:new ne(n,s,r,i,l)}static parse(t,n=!1){const s=En.exec(t);return s?new ne(s[2]||x,ge(s[4]||x),ge(s[5]||x),ge(s[7]||x),ge(s[9]||x),n):new ne(x,x,x,x,x)}static file(t){let n=x;if(ue&&(t=t.replace(/\\/g,Y)),t[0]===Y&&t[1]===Y){const s=t.indexOf(Y,2);s===-1?(n=t.substring(2),t=Y):(n=t.substring(2,s),t=t.substring(s)||Y)}return new ne("file",n,t,x,x)}static from(t){const n=new ne(t.scheme,t.authority,t.path,t.query,t.fragment);return lt(n,!0),n}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let s;return ue&&t.scheme==="file"?s=J.file(H.join(Ee(t,!0),...n)).path:s=W.join(t.path,...n),t.with({path:s})}toString(t=!1){return De(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof J)return t;{const n=new ne(t);return n._formatted=t.external,n._fsPath=t._sep===ut?t.fsPath:null,n}}else return t}}const ut=ue?1:void 0;class ne extends J{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Ee(this,!1)),this._fsPath}toString(t=!1){return t?De(this,!0):(this._formatted||(this._formatted=De(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=ut),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const at={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function ot(e,t){let n,s=-1;for(let r=0;r=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||i===45||i===46||i===95||i===126||t&&i===47)s!==-1&&(n+=encodeURIComponent(e.substring(s,r)),s=-1),n!==void 0&&(n+=e.charAt(r));else{n===void 0&&(n=e.substr(0,r));const l=at[i];l!==void 0?(s!==-1&&(n+=encodeURIComponent(e.substring(s,r)),s=-1),n+=l):s===-1&&(s=r)}}return s!==-1&&(n+=encodeURIComponent(e.substring(s))),n!==void 0?n:e}function Dn(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,ue&&(n=n.replace(/\//g,"\\")),n}function De(e,t){const n=t?Dn:ot;let s="",{scheme:r,authority:i,path:l,query:u,fragment:a}=e;if(r&&(s+=r,s+=":"),(i||r==="file")&&(s+=Y,s+=Y),i){let o=i.indexOf("@");if(o!==-1){const f=i.substr(0,o);i=i.substr(o+1),o=f.indexOf(":"),o===-1?s+=n(f,!1):(s+=n(f.substr(0,o),!1),s+=":",s+=n(f.substr(o+1),!1)),s+="@"}i=i.toLowerCase(),o=i.indexOf(":"),o===-1?s+=n(i,!1):(s+=n(i.substr(0,o),!1),s+=i.substr(o))}if(l){if(l.length>=3&&l.charCodeAt(0)===47&&l.charCodeAt(2)===58){const o=l.charCodeAt(1);o>=65&&o<=90&&(l=`/${String.fromCharCode(o+32)}:${l.substr(3)}`)}else if(l.length>=2&&l.charCodeAt(1)===58){const o=l.charCodeAt(0);o>=65&&o<=90&&(l=`${String.fromCharCode(o+32)}:${l.substr(2)}`)}s+=n(l,!0)}return u&&(s+="?",s+=n(u,!1)),a&&(s+="#",s+=t?a:ot(a,!1)),s}function ct(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+ct(e.substr(3)):e}}const ft=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ge(e){return e.match(ft)?e.replace(ft,t=>ct(t)):e}class B{constructor(t,n){this.lineNumber=t,this.column=n}with(t=this.lineNumber,n=this.column){return t===this.lineNumber&&n===this.column?this:new B(t,n)}delta(t=0,n=0){return this.with(this.lineNumber+t,this.column+n)}equals(t){return B.equals(this,t)}static equals(t,n){return!t&&!n?!0:!!t&&!!n&&t.lineNumber===n.lineNumber&&t.column===n.column}isBefore(t){return B.isBefore(this,t)}static isBefore(t,n){return t.lineNumbers||t===s&&n>r?(this.startLineNumber=s,this.startColumn=r,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=s,this.endColumn=r)}isEmpty(){return E.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return E.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}containsRange(t){return E.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return E.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return E.plusRange(this,t)}static plusRange(t,n){let s,r,i,l;return n.startLineNumbert.endLineNumber?(i=n.endLineNumber,l=n.endColumn):n.endLineNumber===t.endLineNumber?(i=n.endLineNumber,l=Math.max(n.endColumn,t.endColumn)):(i=t.endLineNumber,l=t.endColumn),new E(s,r,i,l)}intersectRanges(t){return E.intersectRanges(this,t)}static intersectRanges(t,n){let s=t.startLineNumber,r=t.startColumn,i=t.endLineNumber,l=t.endColumn,u=n.startLineNumber,a=n.startColumn,o=n.endLineNumber,f=n.endColumn;return so?(i=o,l=f):i===o&&(l=Math.min(l,f)),s>i||s===i&&r>l?null:new E(s,r,i,l)}equalsRange(t){return E.equalsRange(this,t)}static equalsRange(t,n){return!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return E.getEndPosition(this)}static getEndPosition(t){return new B(t.endLineNumber,t.endColumn)}getStartPosition(){return E.getStartPosition(this)}static getStartPosition(t){return new B(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new E(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new E(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return E.collapseToStart(this)}static collapseToStart(t){return new E(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}static fromPositions(t,n=t){return new E(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new E(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}}const kn=3;function ht(e,t,n,s){return new z(e,t,n).ComputeDiff(s)}class mt{constructor(t){const n=[],s=[];for(let r=0,i=t.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&i()){const L=s.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),b=r.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);let w=ht(L,b,i,!0).changes;u&&(w=Tn(w)),m=[];for(let M=0,P=w.length;M1&&w>1;){const M=m.charCodeAt(b-2),P=L.charCodeAt(w-2);if(M!==P)break;b--,w--}(b>1||w>1)&&this._pushTrimWhitespaceCharChange(r,i+1,1,b,l+1,1,w)}{let b=Fe(m,1),w=Fe(L,1);const M=m.length+1,P=L.length+1;for(;b!0;const t=Date.now();return()=>Date.now()-t255?255:e|0}function se(e){return e<0?0:e>4294967295?4294967295:e|0}class Hn{constructor(t,n){this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}}class qn{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=se(t);const s=this.values,r=this.prefixSum,i=n.length;return i===0?!1:(this.values=new Uint32Array(s.length+i),this.values.set(s.subarray(0,t),0),this.values.set(s.subarray(t),t+i),this.values.set(n,t),t-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(t,n){return t=se(t),n=se(n),this.values[t]===n?!1:(this.values[t]=n,t-1=s.length)return!1;let i=s.length-t;return n>=i&&(n=i),n===0?!1:(this.values=new Uint32Array(s.length-n),this.values.set(s.subarray(0,t),0),this.values.set(s.subarray(t+n),t),this.prefixSum=new Uint32Array(this.values.length),t-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=se(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),t>=this.values.length&&(t=this.values.length-1);for(let s=n;s<=t;s++)this.prefixSum[s]=this.prefixSum[s-1]+this.values[s];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let n=0,s=this.values.length-1,r=0,i=0,l=0;for(;n<=s;)if(r=n+(s-n)/2|0,i=this.prefixSum[r],l=i-this.values[r],t=i)n=r+1;else break;return new Hn(r,t-l)}}class Wn{constructor(t,n,s,r){this._uri=t,this._lines=n,this._eol=s,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const n=t.changes;for(const s of n)this._acceptDeleteRange(s.range),this._acceptInsertText(new B(s.range.startLineNumber,s.range.startColumn),s.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,n=this._lines.length,s=new Uint32Array(n);for(let r=0;r/?";function Yn(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of Bn)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const Vn=Yn();function $n(e){let t=Vn;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const zn={maxLen:1e3,windowSize:15,timeBudget:150};function _t(e,t,n,s,r=zn){if(n.length>r.maxLen){let o=e-r.maxLen/2;return o<0?o=0:s+=o,n=n.substring(o,e+r.maxLen/2),_t(e,t,n,s,r)}const i=Date.now(),l=e-1-s;let u=-1,a=null;for(let o=1;!(Date.now()-i>=r.timeBudget);o++){const f=l-r.windowSize*o;t.lastIndex=Math.max(0,f);const c=Gn(t,n,l,u);if(!c&&a||(a=c,f<=0))break;u=f}if(a){let o={word:a[0],startColumn:s+1+a.index,endColumn:s+1+a.index+a[0].length};return t.lastIndex=0,o}return null}function Gn(e,t,n,s){let r;for(;r=e.exec(t);){const i=r.index||0;if(i<=n&&e.lastIndex>=n)return r;if(s>0&&i>s)return null}return null}class Te{constructor(t){let n=gt(t);this._defaultValue=n,this._asciiMap=Te._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){let n=new Uint8Array(256);for(let s=0;s<256;s++)n[s]=t;return n}set(t,n){let s=gt(n);t>=0&&t<256?this._asciiMap[t]=s:this._map.set(t,s)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}}class jn{constructor(t,n,s){const r=new Uint8Array(t*n);for(let i=0,l=t*n;in&&(n=a),u>s&&(s=u),o>s&&(s=o)}n++,s++;let r=new jn(s,n,0);for(let i=0,l=t.length;i=this._maxCharCode?0:this._states.get(t,n)}}let Ie=null;function Qn(){return Ie===null&&(Ie=new yn([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Ie}let ce=null;function Zn(){if(ce===null){ce=new Te(0);const e=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let n=0;nr);if(r>0){const u=n.charCodeAt(r-1),a=n.charCodeAt(l);(u===40&&a===41||u===91&&a===93||u===123&&a===125)&&l--}return{range:{startLineNumber:s,startColumn:r+1,endLineNumber:s,endColumn:l+2},url:n.substring(r,l+1)}}static computeLinks(t,n=Qn()){const s=Zn();let r=[];for(let i=1,l=t.getLineCount();i<=l;i++){const u=t.getLineContent(i),a=u.length;let o=0,f=0,c=0,m=1,L=!1,b=!1,w=!1,M=!1;for(;o=0?(r+=s?1:-1,r<0?r=t.length-1:r%=t.length,t[r]):null}}He.INSTANCE=new He;class U{constructor(t){this.element=t,this.next=U.Undefined,this.prev=U.Undefined}}U.Undefined=new U(void 0);class Lt{constructor(){this._first=U.Undefined,this._last=U.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===U.Undefined}clear(){let t=this._first;for(;t!==U.Undefined;){const n=t.next;t.prev=U.Undefined,t.next=U.Undefined,t=n}this._first=U.Undefined,this._last=U.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){const s=new U(t);if(this._first===U.Undefined)this._first=s,this._last=s;else if(n){const i=this._last;this._last=s,s.prev=i,i.next=s}else{const i=this._first;this._first=s,s.next=i,i.prev=s}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(s))}}shift(){if(this._first!==U.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==U.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==U.Undefined&&t.next!==U.Undefined){const n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===U.Undefined&&t.next===U.Undefined?(this._first=U.Undefined,this._last=U.Undefined):t.next===U.Undefined?(this._last=this._last.prev,this._last.next=U.Undefined):t.prev===U.Undefined&&(this._first=this._first.next,this._first.prev=U.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==U.Undefined;)yield t.element,t=t.next}}const Jn=T.performance&&typeof T.performance.now=="function";class Le{constructor(t){this._highResolution=Jn&&t,this._startTime=this._now(),this._stopTime=-1}static create(t=!0){return new Le(t)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?T.performance.now():Date.now()}}var qe;(function(e){e.None=()=>Oe.None;function t(d){return(h,g=null,_)=>{let A=!1,S;return S=d(N=>{if(!A)return S?S.dispose():A=!0,h.call(g,N)},null,_),A&&S.dispose(),S}}e.once=t;function n(d,h){return a((g,_=null,A)=>d(S=>g.call(_,h(S)),null,A))}e.map=n;function s(d,h){return a((g,_=null,A)=>d(S=>{h(S),g.call(_,S)},null,A))}e.forEach=s;function r(d,h){return a((g,_=null,A)=>d(S=>h(S)&&g.call(_,S),null,A))}e.filter=r;function i(d){return d}e.signal=i;function l(...d){return(h,g=null,_)=>un(...d.map(A=>A(S=>h.call(g,S),null,_)))}e.any=l;function u(d,h,g){let _=g;return n(d,A=>(_=h(_,A),_))}e.reduce=u;function a(d){let h;const g=new O({onFirstListenerAdd(){h=d(g.fire,g)},onLastListenerRemove(){h.dispose()}});return g.event}function o(d,h,g=100,_=!1,A){let S,N,p,I=0;const R=new O({leakWarningThreshold:A,onFirstListenerAdd(){S=d(C=>{I++,N=h(N,C),_&&!p&&(R.fire(N),N=void 0),clearTimeout(p),p=setTimeout(()=>{const Q=N;N=void 0,p=void 0,(!_||I>1)&&R.fire(Q),I=0},g)})},onLastListenerRemove(){S.dispose()}});return R.event}e.debounce=o;function f(d,h=(g,_)=>g===_){let g=!0,_;return r(d,A=>{const S=g||!h(A,_);return g=!1,_=A,S})}e.latch=f;function c(d,h){return[e.filter(d,h),e.filter(d,g=>!h(g))]}e.split=c;function m(d,h=!1,g=[]){let _=g.slice(),A=d(p=>{_?_.push(p):N.fire(p)});const S=()=>{_&&_.forEach(p=>N.fire(p)),_=null},N=new O({onFirstListenerAdd(){A||(A=d(p=>N.fire(p)))},onFirstListenerDidAdd(){_&&(h?setTimeout(S):S())},onLastListenerRemove(){A&&A.dispose(),A=null}});return N.event}e.buffer=m;class L{constructor(h){this.event=h}map(h){return new L(n(this.event,h))}forEach(h){return new L(s(this.event,h))}filter(h){return new L(r(this.event,h))}reduce(h,g){return new L(u(this.event,h,g))}latch(){return new L(f(this.event))}debounce(h,g=100,_=!1,A){return new L(o(this.event,h,g,_,A))}on(h,g,_){return this.event(h,g,_)}once(h,g,_){return t(this.event)(h,g,_)}}function b(d){return new L(d)}e.chain=b;function w(d,h,g=_=>_){const _=(...p)=>N.fire(g(...p)),A=()=>d.on(h,_),S=()=>d.removeListener(h,_),N=new O({onFirstListenerAdd:A,onLastListenerRemove:S});return N.event}e.fromNodeEventEmitter=w;function M(d,h,g=_=>_){const _=(...p)=>N.fire(g(...p)),A=()=>d.addEventListener(h,_),S=()=>d.removeEventListener(h,_),N=new O({onFirstListenerAdd:A,onLastListenerRemove:S});return N.event}e.fromDOMEventEmitter=M;function P(d){return new Promise(h=>t(d)(h))}e.toPromise=P})(qe||(qe={}));class Ne{constructor(t){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${t}_${Ne._idPool++}`}start(t){this._stopWatch=new Le(!0),this._listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this._elapsedOverall+=t,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${t.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Ne._idPool=0;class O{constructor(t){var n;this._disposed=!1,this._options=t,this._leakageMon=void 0,this._perfMon=((n=this._options)===null||n===void 0?void 0:n._profName)?new Ne(this._options._profName):void 0}get event(){return this._event||(this._event=(t,n,s)=>{var r;this._listeners||(this._listeners=new Lt);const i=this._listeners.isEmpty();i&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const l=this._listeners.push(n?[t,n]:t);i&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,t,n);const u=(r=this._leakageMon)===null||r===void 0?void 0:r.check(this._listeners.size),a=Je(()=>{u&&u(),this._disposed||(l(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return s instanceof le?s.add(a):Array.isArray(s)&&s.push(a),a}),this._event}fire(t){var n,s;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Lt);for(let r of this._listeners)this._deliveryQueue.push([r,t]);for((n=this._perfMon)===null||n===void 0||n.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[r,i]=this._deliveryQueue.shift();try{typeof r=="function"?r.call(void 0,i):r[0].call(r[1],i)}catch(l){en(l)}}(s=this._perfMon)===null||s===void 0||s.stop()}}dispose(){var t,n,s,r,i;this._disposed||(this._disposed=!0,(t=this._listeners)===null||t===void 0||t.clear(),(n=this._deliveryQueue)===null||n===void 0||n.clear(),(r=(s=this._options)===null||s===void 0?void 0:s.onLastListenerRemove)===null||r===void 0||r.call(s),(i=this._leakageMon)===null||i===void 0||i.dispose())}}const Nt=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var Se;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof be?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:qe.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Nt})})(Se||(Se={}));class be{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Nt:(this._emitter||(this._emitter=new O),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class On{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new be),this._token}cancel(){this._token?this._token instanceof be&&this._token.cancel():this._token=Se.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof be&&this._token.dispose():this._token=Se.None}}class We{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const Be=new We,Ye=new We,Ve=new We;(function(){function e(t,n,s=n,r=s){Be.define(t,n),Ye.define(t,s),Ve.define(t,r)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})();var St;(function(e){function t(l){return Be.keyCodeToStr(l)}e.toString=t;function n(l){return Be.strToKeyCode(l)}e.fromString=n;function s(l){return Ye.keyCodeToStr(l)}e.toUserSettingsUS=s;function r(l){return Ve.keyCodeToStr(l)}e.toUserSettingsGeneral=r;function i(l){return Ye.strToKeyCode(l)||Ve.strToKeyCode(l)}e.fromUserSettings=i})(St||(St={}));function Kn(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}class V extends E{constructor(t,n,s,r){super(t,n,s,r);this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=s,this.positionColumn=r}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return V.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new V(this.startLineNumber,this.startColumn,t,n):new V(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new B(this.positionLineNumber,this.positionColumn)}setStartPosition(t,n){return this.getDirection()===0?new V(t,n,this.endLineNumber,this.endColumn):new V(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new V(t.lineNumber,t.column,n.lineNumber,n.column)}static liftSelection(t){return new V(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let s=0,r=t.length;sthis._lines.length)n=this._lines.length,s=this._lines[n-1].length+1,r=!0;else{let i=this._lines[n-1].length+1;s<1?(s=1,r=!0):s>i&&(s=i,r=!0)}return r?{lineNumber:n,column:s}:t}}class ie{constructor(t,n){this._host=t,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(t){return this._models[t]}_getModels(){let t=[];return Object.keys(this._models).forEach(n=>t.push(this._models[n])),t}acceptNewModel(t){this._models[t.url]=new ns(J.parse(t.url),t.lines,t.EOL,t.versionId)}acceptModelChanged(t,n){if(!this._models[t])return;this._models[t].onEvents(n)}acceptRemovedModel(t){!this._models[t]||delete this._models[t]}computeDiff(t,n,s,r){return re(this,void 0,void 0,function*(){const i=this._getModel(t),l=this._getModel(n);if(!i||!l)return null;const u=i.getLinesContent(),a=l.getLinesContent(),f=new In(u,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:s,shouldMakePrettyDiff:!0,maxComputationTime:r}).computeDiff(),c=f.changes.length>0?!1:this._modelsAreIdentical(i,l);return{quitEarly:f.quitEarly,identical:c,changes:f.changes}})}_modelsAreIdentical(t,n){const s=t.getLineCount(),r=n.getLineCount();if(s!==r)return!1;for(let i=1;i<=s;i++){const l=t.getLineContent(i),u=n.getLineContent(i);if(l!==u)return!1}return!0}computeMoreMinimalEdits(t,n){return re(this,void 0,void 0,function*(){const s=this._getModel(t);if(!s)return n;const r=[];let i;n=n.slice(0).sort((l,u)=>{if(l.range&&u.range)return E.compareRangesUsingStarts(l.range,u.range);let a=l.range?0:1,o=u.range?0:1;return a-o});for(let{range:l,text:u,eol:a}of n){if(typeof a=="number"&&(i=a),E.isEmpty(l)&&!u)continue;const o=s.getValueInRange(l);if(u=u.replace(/\r\n|\n|\r/g,s.eol),o===u)continue;if(Math.max(u.length,o.length)>ie._diffLimit){r.push({range:l,text:u});continue}const f=Sn(o,u,!1),c=s.offsetAt(E.lift(l).getStartPosition());for(const m of f){const L=s.positionAt(c+m.originalStart),b=s.positionAt(c+m.originalStart+m.originalLength),w={text:u.substr(m.modifiedStart,m.modifiedLength),range:{startLineNumber:L.lineNumber,startColumn:L.column,endLineNumber:b.lineNumber,endColumn:b.column}};s.getValueInRange(w.range)!==w.text&&r.push(w)}}return typeof i=="number"&&r.push({eol:i,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r})}computeLinks(t){return re(this,void 0,void 0,function*(){let n=this._getModel(t);return n?Xn(n):null})}textualSuggest(t,n,s,r){return re(this,void 0,void 0,function*(){const i=new Le(!0),l=new RegExp(s,r),u=new Set;e:for(let a of t){const o=this._getModel(a);if(!!o){for(let f of o.words(l))if(!(f===n||!isNaN(Number(f)))&&(u.add(f),u.size>ie._suggestionsLimit))break e}}return{words:Array.from(u),duration:i.elapsed()}})}computeWordRanges(t,n,s,r){return re(this,void 0,void 0,function*(){let i=this._getModel(t);if(!i)return Object.create(null);const l=new RegExp(s,r),u=Object.create(null);for(let a=n.startLineNumber;athis._host.fhr(u,a)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(l,n),Promise.resolve(Re(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(t,n){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,n))}catch(s){return Promise.reject(s)}}}ie._diffLimit=1e5,ie._suggestionsLimit=1e4,typeof importScripts=="function"&&(T.monaco=ts());let ye=!1;function Jt(e){if(ye)return;ye=!0;const t=new dn(n=>{self.postMessage(n)},n=>new ie(n,e));self.onmessage=n=>{t.onmessage(n.data)}}return self.onmessage=e=>{ye||Jt(null)},Ae.initialize=Jt,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae})({});
diff --git a/magic-editor/src/main/resources/magic-editor/assets/editor.worker.7ef0e0c2.js b/magic-editor/src/main/resources/magic-editor/assets/editor.worker.7ef0e0c2.js
new file mode 100644
index 00000000..3f322c18
--- /dev/null
+++ b/magic-editor/src/main/resources/magic-editor/assets/editor.worker.7ef0e0c2.js
@@ -0,0 +1,3 @@
+(function(){"use strict";class Xt{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?new Error(t.message+`
+
+`+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const Jt=new Xt;function Ot(e){Kt(e)||Jt.onUnexpectedError(e)}function ye(e){if(e instanceof Error){let{name:t,message:n}=e;const s=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:s}}return e}const Qe="Canceled";function Kt(e){return e instanceof Error&&e.name===Qe&&e.message===Qe}function en(e){const t=this;let n=!1,s;return function(){return n||(n=!0,s=e.apply(t,arguments)),s}}var Ae;(function(e){function t(d){return d&&typeof d=="object"&&typeof d[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function s(){return n}e.empty=s;function*r(d){yield d}e.single=r;function i(d){return d||n}e.from=i;function l(d){return!d||d[Symbol.iterator]().next().done===!0}e.isEmpty=l;function u(d){return d[Symbol.iterator]().next().value}e.first=u;function a(d,h){for(const g of d)if(h(g))return!0;return!1}e.some=a;function o(d,h){for(const g of d)if(h(g))return g}e.find=o;function*f(d,h){for(const g of d)h(g)&&(yield g)}e.filter=f;function*c(d,h){let g=0;for(const _ of d)yield h(_,g++)}e.map=c;function*m(...d){for(const h of d)for(const g of h)yield g}e.concat=m;function*L(d){for(const h of d)for(const g of h)yield g}e.concatNested=L;function b(d,h,g){let _=g;for(const A of d)_=h(_,A);return _}e.reduce=b;function*w(d,h,g=d.length){for(h<0&&(h+=d.length),g<0?g+=d.length:g>d.length&&(g=d.length);h_===A){const _=d[Symbol.iterator](),A=h[Symbol.iterator]();for(;;){const S=_.next(),N=A.next();if(S.done!==N.done)return!1;if(S.done)return!0;if(!g(S.value,N.value))return!1}}e.equals=P})(Ae||(Ae={}));function es(e){return e}function ts(e,t){}class tn extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function Ze(e){if(Ae.is(e)){let t=[];for(const n of e)if(n)try{n.dispose()}catch(s){t.push(s)}if(t.length===1)throw t[0];if(t.length>1)throw new tn(t);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function nn(...e){return Xe(()=>Ze(e))}function Xe(e){return{dispose:en(()=>{e()})}}class le{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{Ze(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?le.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}}le.DISABLE_DISPOSED_WARNING=!1;class Je{constructor(){this._store=new le,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}Je.None=Object.freeze({dispose(){}});var we;const he="en";let Ce=!1,ve=!1,Me=!1,me,Pe=he,sn,Z;const T=typeof self=="object"?self:typeof global=="object"?global:{};let k;typeof T.vscode!="undefined"&&typeof T.vscode.process!="undefined"?k=T.vscode.process:typeof process!="undefined"&&(k=process);const rn=typeof((we=k==null?void 0:k.versions)===null||we===void 0?void 0:we.electron)=="string"&&k.type==="renderer";if(typeof navigator=="object"&&!rn)Z=navigator.userAgent,Ce=Z.indexOf("Windows")>=0,ve=Z.indexOf("Macintosh")>=0,(Z.indexOf("Macintosh")>=0||Z.indexOf("iPad")>=0||Z.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Me=Z.indexOf("Linux")>=0,me=navigator.language,Pe=me;else if(typeof k=="object"){Ce=k.platform==="win32",ve=k.platform==="darwin",Me=k.platform==="linux",Me&&!!k.env.SNAP&&k.env.SNAP_REVISION,me=he,Pe=he;const e=k.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),n=t.availableLanguages["*"];me=t.locale,Pe=n||he,sn=t._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const ue=Ce,ln=ve,Oe=function(){if(T.setImmediate)return T.setImmediate.bind(T);if(typeof T.postMessage=="function"&&!T.importScripts){let n=[];T.addEventListener("message",r=>{if(r.data&&r.data.vscodeSetImmediateId)for(let i=0,l=n.length;i{const i=++s;n.push({id:i,callback:r}),T.postMessage({vscodeSetImmediateId:i},"*")}}if(typeof(k==null?void 0:k.nextTick)=="function")return k.nextTick.bind(k);const t=Promise.resolve();return n=>t.then(n)}();function un(e){let t=[],n=Object.getPrototypeOf(e);for(;Object.prototype!==n;)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}function pe(e){const t=[];for(const n of un(e))typeof e[n]=="function"&&t.push(n);return t}function Ke(e,t){const n=r=>function(){const i=Array.prototype.slice.call(arguments,0);return t(r,i)};let s={};for(const r of e)s[r]=n(r);return s}const an="$initialize";class on{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(t){this._workerId=t}sendMessage(t,n){let s=String(++this._lastSentReq);return new Promise((r,i)=>{this._pendingReplies[s]={resolve:r,reject:i},this._send({vsWorker:this._workerId,req:s,method:t,args:n})})}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){if(t.seq){let i=t;if(!this._pendingReplies[i.seq]){console.warn("Got reply to unknown seq");return}let l=this._pendingReplies[i.seq];if(delete this._pendingReplies[i.seq],i.err){let u=i.err;i.err.$isError&&(u=new Error,u.name=i.err.name,u.message=i.err.message,u.stack=i.err.stack),l.reject(u);return}l.resolve(i.res);return}let n=t,s=n.req;this._handler.handleMessage(n.method,n.args).then(i=>{this._send({vsWorker:this._workerId,seq:s,res:i,err:void 0})},i=>{i.detail instanceof Error&&(i.detail=ye(i.detail)),this._send({vsWorker:this._workerId,seq:s,res:void 0,err:ye(i)})})}_send(t){let n=[];if(t.req){const s=t;for(let r=0;r{t(s,r)},handleMessage:(s,r)=>this._handleMessage(s,r)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n){if(t===an)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._requestHandler[t].apply(this._requestHandler,n))}catch(s){return Promise.reject(s)}}initialize(t,n,s,r){this._protocol.setWorkerId(t);const l=Ke(r,(u,a)=>this._protocol.sendMessage(u,a));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(l),Promise.resolve(pe(this._requestHandler))):(n&&(typeof n.baseUrl!="undefined"&&delete n.baseUrl,typeof n.paths!="undefined"&&typeof n.paths.vs!="undefined"&&delete n.paths.vs,typeof n.trustedTypesPolicy!==void 0&&delete n.trustedTypesPolicy,n.catchError=!0,self.require.config(n)),new Promise((u,a)=>{self.require([s],o=>{if(this._requestHandler=o.create(l),!this._requestHandler){a(new Error("No RequestHandler!"));return}u(pe(this._requestHandler))},a)}))}}class ${constructor(t,n,s,r){this.originalStart=t,this.originalLength=n,this.modifiedStart=s,this.modifiedLength=r}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function fn(e){return e.split(/\r\n|\r|\n/)}function hn(e){for(let t=0,n=e.length;t=0;n--){const s=e.charCodeAt(n);if(s!==32&&s!==9)return n}return-1}function et(e,t){return(t<<5)-t+e|0}function dn(e,t){t=et(149417,t);for(let n=0,s=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new $(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class z{constructor(t,n,s=null){this.ContinueProcessingPredicate=s,this._originalSequence=t,this._modifiedSequence=n;const[r,i,l]=z._getElements(t),[u,a,o]=z._getElements(n);this._hasStrings=l&&o,this._originalStringElements=r,this._originalElementsOrHash=i,this._modifiedStringElements=u,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const n=t.getElements();if(z._isStringArray(n)){const s=new Int32Array(n.length);for(let r=0,i=n.length;r=t&&r>=s&&this.ElementsAreEqual(n,r);)n--,r--;if(t>n||s>r){let c;return s<=r?(K.Assert(t===n+1,"originalStart should only be one more than originalEnd"),c=[new $(t,0,s,r-s+1)]):t<=n?(K.Assert(s===r+1,"modifiedStart should only be one more than modifiedEnd"),c=[new $(t,n-t+1,s,0)]):(K.Assert(t===n+1,"originalStart should only be one more than originalEnd"),K.Assert(s===r+1,"modifiedStart should only be one more than modifiedEnd"),c=[]),c}const l=[0],u=[0],a=this.ComputeRecursionPoint(t,n,s,r,l,u,i),o=l[0],f=u[0];if(a!==null)return a;if(!i[0]){const c=this.ComputeDiffRecursive(t,o,s,f,i);let m=[];return i[0]?m=[new $(o+1,n-(o+1)+1,f+1,r-(f+1)+1)]:m=this.ComputeDiffRecursive(o+1,n,f+1,r,i),this.ConcatenateChanges(c,m)}return[new $(t,n-t+1,s,r-s+1)]}WALKTRACE(t,n,s,r,i,l,u,a,o,f,c,m,L,b,w,M,P,d){let h=null,g=null,_=new nt,A=n,S=s,N=L[0]-M[0]-r,p=-1073741824,I=this.m_forwardHistory.length-1;do{const R=N+t;R===A||R=0&&(o=this.m_forwardHistory[I],t=o[0],A=1,S=o.length-1)}while(--I>=-1);if(h=_.getReverseChanges(),d[0]){let R=L[0]+1,C=M[0]+1;if(h!==null&&h.length>0){const Q=h[h.length-1];R=Math.max(R,Q.getOriginalEnd()),C=Math.max(C,Q.getModifiedEnd())}g=[new $(R,m-R+1,C,w-C+1)]}else{_=new nt,A=l,S=u,N=L[0]-M[0]-a,p=1073741824,I=P?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const R=N+i;R===A||R=f[R+1]?(c=f[R+1]-1,b=c-N-a,c>p&&_.MarkNextChange(),p=c+1,_.AddOriginalElement(c+1,b+1),N=R+1-i):(c=f[R-1],b=c-N-a,c>p&&_.MarkNextChange(),p=c,_.AddModifiedElement(c+1,b+1),N=R-1-i),I>=0&&(f=this.m_reverseHistory[I],i=f[0],A=1,S=f.length-1)}while(--I>=-1);g=_.getChanges()}return this.ConcatenateChanges(h,g)}ComputeRecursionPoint(t,n,s,r,i,l,u){let a=0,o=0,f=0,c=0,m=0,L=0;t--,s--,i[0]=0,l[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const b=n-t+(r-s),w=b+1,M=new Int32Array(w),P=new Int32Array(w),d=r-s,h=n-t,g=t-s,_=n-r,S=(h-d)%2===0;M[d]=t,P[h]=n,u[0]=!1;for(let N=1;N<=b/2+1;N++){let p=0,I=0;f=this.ClipDiagonalBound(d-N,N,d,w),c=this.ClipDiagonalBound(d+N,N,d,w);for(let C=f;C<=c;C+=2){C===f||Cp+I&&(p=a,I=o),!S&&Math.abs(C-h)<=N-1&&a>=P[C])return i[0]=a,l[0]=o,Q<=P[C]&&1447>0&&N<=1447+1?this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u):null}const R=(p-t+(I-s)-N)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(p,R))return u[0]=!0,i[0]=p,l[0]=I,R>0&&1447>0&&N<=1447+1?this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u):(t++,s++,[new $(t,n-t+1,s,r-s+1)]);m=this.ClipDiagonalBound(h-N,N,h,w),L=this.ClipDiagonalBound(h+N,N,h,w);for(let C=m;C<=L;C+=2){C===m||C=P[C+1]?a=P[C+1]-1:a=P[C-1],o=a-(C-h)-_;const Q=a;for(;a>t&&o>s&&this.ElementsAreEqual(a,o);)a--,o--;if(P[C]=a,S&&Math.abs(C-d)<=N&&a<=M[C])return i[0]=a,l[0]=o,Q>=M[C]&&1447>0&&N<=1447+1?this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u):null}if(N<=1447){let C=new Int32Array(c-f+2);C[0]=d-f+1,ee.Copy2(M,f,C,1,c-f+1),this.m_forwardHistory.push(C),C=new Int32Array(L-m+2),C[0]=h-m+1,ee.Copy2(P,m,C,1,L-m+1),this.m_reverseHistory.push(C)}}return this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u)}PrettifyChanges(t){for(let n=0;n0,u=s.modifiedLength>0;for(;s.originalStart+s.originalLength=0;n--){const s=t[n];let r=0,i=0;if(n>0){const c=t[n-1];r=c.originalStart+c.originalLength,i=c.modifiedStart+c.modifiedLength}const l=s.originalLength>0,u=s.modifiedLength>0;let a=0,o=this._boundaryScore(s.originalStart,s.originalLength,s.modifiedStart,s.modifiedLength);for(let c=1;;c++){const m=s.originalStart-c,L=s.modifiedStart-c;if(mo&&(o=w,a=c)}s.originalStart-=a,s.modifiedStart-=a;const f=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],f)){t[n-1]=f[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,s=t.length;n0&&L>a&&(a=L,o=c,f=m)}return a>0?[o,f]:null}_contiguousSequenceScore(t,n,s){let r=0;for(let i=0;i=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){const s=t+n;if(this._OriginalIsBoundary(s-1)||this._OriginalIsBoundary(s))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){const s=t+n;if(this._ModifiedIsBoundary(s-1)||this._ModifiedIsBoundary(s))return!0}return!1}_boundaryScore(t,n,s,r){const i=this._OriginalRegionIsBoundary(t,n)?1:0,l=this._ModifiedRegionIsBoundary(s,r)?1:0;return i+l}ConcatenateChanges(t,n){let s=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],s)){const r=new Array(t.length+n.length-1);return ee.Copy(t,0,r,0,t.length-1),r[t.length-1]=s[0],ee.Copy(n,1,r,t.length,n.length-1),r}else{const r=new Array(t.length+n.length);return ee.Copy(t,0,r,0,t.length),ee.Copy(n,0,r,t.length,n.length),r}}ChangesOverlap(t,n,s){if(K.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),K.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){const r=t.originalStart;let i=t.originalLength;const l=t.modifiedStart;let u=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(i=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(u=n.modifiedStart+n.modifiedLength-t.modifiedStart),s[0]=new $(r,i,l,u),!0}else return s[0]=null,!1}ClipDiagonalBound(t,n,s,r){if(t>=0&&t=Ln&&e<=Sn||e>=Nn&&e<=bn}function de(e,t,n,s){let r="",i=0,l=-1,u=0,a=0;for(let o=0;o<=e.length;++o){if(o2){const f=r.lastIndexOf(n);f===-1?(r="",i=0):(r=r.slice(0,f),i=r.length-1-r.lastIndexOf(n)),l=o,u=0;continue}else if(r.length!==0){r="",i=0,l=o,u=0;continue}}t&&(r+=r.length>0?`${n}..`:"..",i=2)}else r.length>0?r+=`${n}${e.slice(l+1,o)}`:r=e.slice(l+1,o),i=o-l-1;l=o,u=0}else a===G&&u!==-1?++u:u=-1}return r}function rt(e,t){if(t===null||typeof t!="object")throw new st("pathObject","Object",t);const n=t.dir||t.root,s=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${s}`:`${n}${e}${s}`:s}const H={resolve(...e){let t="",n="",s=!1;for(let r=e.length-1;r>=-1;r--){let i;if(r>=0){if(i=e[r],D(i,"path"),i.length===0)continue}else t.length===0?i=Re():(i=_n[`=${t}`]||Re(),(i===void 0||i.slice(0,2).toLowerCase()!==t.toLowerCase()&&i.charCodeAt(2)===q)&&(i=`${t}\\`));const l=i.length;let u=0,a="",o=!1;const f=i.charCodeAt(0);if(l===1)v(f)&&(u=1,o=!0);else if(v(f))if(o=!0,v(i.charCodeAt(1))){let c=2,m=c;for(;c2&&v(i.charCodeAt(2))&&(o=!0,u=3));if(a.length>0)if(t.length>0){if(a.toLowerCase()!==t.toLowerCase())continue}else t=a;if(s){if(t.length>0)break}else if(n=`${i.slice(u)}\\${n}`,s=o,o&&t.length>0)break}return n=de(n,!s,"\\",v),s?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){D(e,"path");const t=e.length;if(t===0)return".";let n=0,s,r=!1;const i=e.charCodeAt(0);if(t===1)return Ue(i)?"\\":e;if(v(i))if(r=!0,v(e.charCodeAt(1))){let u=2,a=u;for(;u2&&v(e.charCodeAt(2))&&(r=!0,n=3));let l=n0&&v(e.charCodeAt(t-1))&&(l+="\\"),s===void 0?r?`\\${l}`:l:r?`${s}\\${l}`:`${s}${l}`},isAbsolute(e){D(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return v(n)||t>2&&y(n)&&e.charCodeAt(1)===j&&v(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let i=0;i0&&(t===void 0?t=n=l:t+=`\\${l}`)}if(t===void 0)return".";let s=!0,r=0;if(typeof n=="string"&&v(n.charCodeAt(0))){++r;const i=n.length;i>1&&v(n.charCodeAt(1))&&(++r,i>2&&(v(n.charCodeAt(2))?++r:s=!1))}if(s){for(;r=2&&(t=`\\${t.slice(r)}`)}return H.normalize(t)},relative(e,t){if(D(e,"from"),D(t,"to"),e===t)return"";const n=H.resolve(e),s=H.resolve(t);if(n===s||(e=n.toLowerCase(),t=s.toLowerCase(),e===t))return"";let r=0;for(;rr&&e.charCodeAt(i-1)===q;)i--;const l=i-r;let u=0;for(;uu&&t.charCodeAt(a-1)===q;)a--;const o=a-u,f=lf){if(t.charCodeAt(u+m)===q)return s.slice(u+m+1);if(m===2)return s.slice(u+m)}l>f&&(e.charCodeAt(r+m)===q?c=m:m===2&&(c=3)),c===-1&&(c=0)}let L="";for(m=r+c+1;m<=i;++m)(m===i||e.charCodeAt(m)===q)&&(L+=L.length===0?"..":"\\..");return u+=c,L.length>0?`${L}${s.slice(u,a)}`:(s.charCodeAt(u)===q&&++u,s.slice(u,a))},toNamespacedPath(e){if(typeof e!="string")return e;if(e.length===0)return"";const t=H.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===q){if(t.charCodeAt(1)===q){const n=t.charCodeAt(2);if(n!==An&&n!==G)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(y(t.charCodeAt(0))&&t.charCodeAt(1)===j&&t.charCodeAt(2)===q)return`\\\\?\\${t}`;return e},dirname(e){D(e,"path");const t=e.length;if(t===0)return".";let n=-1,s=0;const r=e.charCodeAt(0);if(t===1)return v(r)?e:".";if(v(r)){if(n=s=1,v(e.charCodeAt(1))){let u=2,a=u;for(;u2&&v(e.charCodeAt(2))?3:2,s=n);let i=-1,l=!0;for(let u=t-1;u>=s;--u)if(v(e.charCodeAt(u))){if(!l){i=u;break}}else l=!1;if(i===-1){if(n===-1)return".";i=n}return e.slice(0,i)},basename(e,t){t!==void 0&&D(t,"ext"),D(e,"path");let n=0,s=-1,r=!0,i;if(e.length>=2&&y(e.charCodeAt(0))&&e.charCodeAt(1)===j&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,u=-1;for(i=e.length-1;i>=n;--i){const a=e.charCodeAt(i);if(v(a)){if(!r){n=i+1;break}}else u===-1&&(r=!1,u=i+1),l>=0&&(a===t.charCodeAt(l)?--l===-1&&(s=i):(l=-1,s=u))}return n===s?s=u:s===-1&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=n;--i)if(v(e.charCodeAt(i))){if(!r){n=i+1;break}}else s===-1&&(r=!1,s=i+1);return s===-1?"":e.slice(n,s)},extname(e){D(e,"path");let t=0,n=-1,s=0,r=-1,i=!0,l=0;e.length>=2&&e.charCodeAt(1)===j&&y(e.charCodeAt(0))&&(t=s=2);for(let u=e.length-1;u>=t;--u){const a=e.charCodeAt(u);if(v(a)){if(!i){s=u+1;break}continue}r===-1&&(i=!1,r=u+1),a===G?n===-1?n=u:l!==1&&(l=1):n!==-1&&(l=-1)}return n===-1||r===-1||l===0||l===1&&n===r-1&&n===s+1?"":e.slice(n,r)},format:rt.bind(null,"\\"),parse(e){D(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.length;let s=0,r=e.charCodeAt(0);if(n===1)return v(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(v(r)){if(s=1,v(e.charCodeAt(1))){let c=2,m=c;for(;c0&&(t.root=e.slice(0,s));let i=-1,l=s,u=-1,a=!0,o=e.length-1,f=0;for(;o>=s;--o){if(r=e.charCodeAt(o),v(r)){if(!a){l=o+1;break}continue}u===-1&&(a=!1,u=o+1),r===G?i===-1?i=o:f!==1&&(f=1):i!==-1&&(f=-1)}return u!==-1&&(i===-1||f===0||f===1&&i===u-1&&i===l+1?t.base=t.name=e.slice(l,u):(t.name=e.slice(l,i),t.base=e.slice(l,u),t.ext=e.slice(i,u))),l>0&&l!==s?t.dir=e.slice(0,l-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},W={resolve(...e){let t="",n=!1;for(let s=e.length-1;s>=-1&&!n;s--){const r=s>=0?e[s]:Re();D(r,"path"),r.length!==0&&(t=`${r}/${t}`,n=r.charCodeAt(0)===F)}return t=de(t,!n,"/",Ue),n?`/${t}`:t.length>0?t:"."},normalize(e){if(D(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===F,n=e.charCodeAt(e.length-1)===F;return e=de(e,!t,"/",Ue),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return D(e,"path"),e.length>0&&e.charCodeAt(0)===F},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=s:t+=`/${s}`)}return t===void 0?".":W.normalize(t)},relative(e,t){if(D(e,"from"),D(t,"to"),e===t||(e=W.resolve(e),t=W.resolve(t),e===t))return"";const n=1,s=e.length,r=s-n,i=1,l=t.length-i,u=ru){if(t.charCodeAt(i+o)===F)return t.slice(i+o+1);if(o===0)return t.slice(i+o)}else r>u&&(e.charCodeAt(n+o)===F?a=o:o===0&&(a=0));let f="";for(o=n+a+1;o<=s;++o)(o===s||e.charCodeAt(o)===F)&&(f+=f.length===0?"..":"/..");return`${f}${t.slice(i+a)}`},toNamespacedPath(e){return e},dirname(e){if(D(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===F;let n=-1,s=!0;for(let r=e.length-1;r>=1;--r)if(e.charCodeAt(r)===F){if(!s){n=r;break}}else s=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&D(t,"ext"),D(e,"path");let n=0,s=-1,r=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,u=-1;for(i=e.length-1;i>=0;--i){const a=e.charCodeAt(i);if(a===F){if(!r){n=i+1;break}}else u===-1&&(r=!1,u=i+1),l>=0&&(a===t.charCodeAt(l)?--l===-1&&(s=i):(l=-1,s=u))}return n===s?s=u:s===-1&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===F){if(!r){n=i+1;break}}else s===-1&&(r=!1,s=i+1);return s===-1?"":e.slice(n,s)},extname(e){D(e,"path");let t=-1,n=0,s=-1,r=!0,i=0;for(let l=e.length-1;l>=0;--l){const u=e.charCodeAt(l);if(u===F){if(!r){n=l+1;break}continue}s===-1&&(r=!1,s=l+1),u===G?t===-1?t=l:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||s===-1||i===0||i===1&&t===s-1&&t===n+1?"":e.slice(t,s)},format:rt.bind(null,"/"),parse(e){D(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===F;let s;n?(t.root="/",s=1):s=0;let r=-1,i=0,l=-1,u=!0,a=e.length-1,o=0;for(;a>=s;--a){const f=e.charCodeAt(a);if(f===F){if(!u){i=a+1;break}continue}l===-1&&(u=!1,l=a+1),f===G?r===-1?r=a:o!==1&&(o=1):r!==-1&&(o=-1)}if(l!==-1){const f=i===0&&n?1:i;r===-1||o===0||o===1&&r===l-1&&r===i+1?t.base=t.name=e.slice(f,l):(t.name=e.slice(f,r),t.base=e.slice(f,l),t.ext=e.slice(r,l))}return i>0?t.dir=e.slice(0,i-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};W.win32=H.win32=H,W.posix=H.posix=W,X==="win32"?H.normalize:W.normalize,X==="win32"?H.resolve:W.resolve,X==="win32"?H.relative:W.relative,X==="win32"?H.dirname:W.dirname,X==="win32"?H.basename:W.basename,X==="win32"?H.extname:W.extname,X==="win32"?H.sep:W.sep;const wn=/^\w[\w\d+.-]*$/,Cn=/^\//,vn=/^\/\//;function it(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!wn.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Cn.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(vn.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Mn(e,t){return!e&&!t?"file":e}function Pn(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Y&&(t=Y+t):t=Y;break}return t}const x="",Y="/",pn=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class J{constructor(t,n,s,r,i,l=!1){typeof t=="object"?(this.scheme=t.scheme||x,this.authority=t.authority||x,this.path=t.path||x,this.query=t.query||x,this.fragment=t.fragment||x):(this.scheme=Mn(t,l),this.authority=n||x,this.path=Pn(this.scheme,s||x),this.query=r||x,this.fragment=i||x,it(this,l))}static isUri(t){return t instanceof J?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}get fsPath(){return xe(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:s,path:r,query:i,fragment:l}=t;return n===void 0?n=this.scheme:n===null&&(n=x),s===void 0?s=this.authority:s===null&&(s=x),r===void 0?r=this.path:r===null&&(r=x),i===void 0?i=this.query:i===null&&(i=x),l===void 0?l=this.fragment:l===null&&(l=x),n===this.scheme&&s===this.authority&&r===this.path&&i===this.query&&l===this.fragment?this:new ne(n,s,r,i,l)}static parse(t,n=!1){const s=pn.exec(t);return s?new ne(s[2]||x,ge(s[4]||x),ge(s[5]||x),ge(s[7]||x),ge(s[9]||x),n):new ne(x,x,x,x,x)}static file(t){let n=x;if(ue&&(t=t.replace(/\\/g,Y)),t[0]===Y&&t[1]===Y){const s=t.indexOf(Y,2);s===-1?(n=t.substring(2),t=Y):(n=t.substring(2,s),t=t.substring(s)||Y)}return new ne("file",n,t,x,x)}static from(t){const n=new ne(t.scheme,t.authority,t.path,t.query,t.fragment);return it(n,!0),n}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let s;return ue&&t.scheme==="file"?s=J.file(H.join(xe(t,!0),...n)).path:s=W.join(t.path,...n),t.with({path:s})}toString(t=!1){return Ee(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof J)return t;{const n=new ne(t);return n._formatted=t.external,n._fsPath=t._sep===lt?t.fsPath:null,n}}else return t}}const lt=ue?1:void 0;class ne extends J{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=xe(this,!1)),this._fsPath}toString(t=!1){return t?Ee(this,!0):(this._formatted||(this._formatted=Ee(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=lt),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const ut={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function at(e,t){let n,s=-1;for(let r=0;r=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||i===45||i===46||i===95||i===126||t&&i===47)s!==-1&&(n+=encodeURIComponent(e.substring(s,r)),s=-1),n!==void 0&&(n+=e.charAt(r));else{n===void 0&&(n=e.substr(0,r));const l=ut[i];l!==void 0?(s!==-1&&(n+=encodeURIComponent(e.substring(s,r)),s=-1),n+=l):s===-1&&(s=r)}}return s!==-1&&(n+=encodeURIComponent(e.substring(s))),n!==void 0?n:e}function Rn(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,ue&&(n=n.replace(/\//g,"\\")),n}function Ee(e,t){const n=t?Rn:at;let s="",{scheme:r,authority:i,path:l,query:u,fragment:a}=e;if(r&&(s+=r,s+=":"),(i||r==="file")&&(s+=Y,s+=Y),i){let o=i.indexOf("@");if(o!==-1){const f=i.substr(0,o);i=i.substr(o+1),o=f.indexOf(":"),o===-1?s+=n(f,!1):(s+=n(f.substr(0,o),!1),s+=":",s+=n(f.substr(o+1),!1)),s+="@"}i=i.toLowerCase(),o=i.indexOf(":"),o===-1?s+=n(i,!1):(s+=n(i.substr(0,o),!1),s+=i.substr(o))}if(l){if(l.length>=3&&l.charCodeAt(0)===47&&l.charCodeAt(2)===58){const o=l.charCodeAt(1);o>=65&&o<=90&&(l=`/${String.fromCharCode(o+32)}:${l.substr(3)}`)}else if(l.length>=2&&l.charCodeAt(1)===58){const o=l.charCodeAt(0);o>=65&&o<=90&&(l=`${String.fromCharCode(o+32)}:${l.substr(2)}`)}s+=n(l,!0)}return u&&(s+="?",s+=n(u,!1)),a&&(s+="#",s+=t?a:at(a,!1)),s}function ot(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+ot(e.substr(3)):e}}const ct=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ge(e){return e.match(ct)?e.replace(ct,t=>ot(t)):e}class B{constructor(t,n){this.lineNumber=t,this.column=n}with(t=this.lineNumber,n=this.column){return t===this.lineNumber&&n===this.column?this:new B(t,n)}delta(t=0,n=0){return this.with(this.lineNumber+t,this.column+n)}equals(t){return B.equals(this,t)}static equals(t,n){return!t&&!n?!0:!!t&&!!n&&t.lineNumber===n.lineNumber&&t.column===n.column}isBefore(t){return B.isBefore(this,t)}static isBefore(t,n){return t.lineNumbers||t===s&&n>r?(this.startLineNumber=s,this.startColumn=r,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=s,this.endColumn=r)}isEmpty(){return E.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return E.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}containsRange(t){return E.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return E.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return E.plusRange(this,t)}static plusRange(t,n){let s,r,i,l;return n.startLineNumbert.endLineNumber?(i=n.endLineNumber,l=n.endColumn):n.endLineNumber===t.endLineNumber?(i=n.endLineNumber,l=Math.max(n.endColumn,t.endColumn)):(i=t.endLineNumber,l=t.endColumn),new E(s,r,i,l)}intersectRanges(t){return E.intersectRanges(this,t)}static intersectRanges(t,n){let s=t.startLineNumber,r=t.startColumn,i=t.endLineNumber,l=t.endColumn,u=n.startLineNumber,a=n.startColumn,o=n.endLineNumber,f=n.endColumn;return so?(i=o,l=f):i===o&&(l=Math.min(l,f)),s>i||s===i&&r>l?null:new E(s,r,i,l)}equalsRange(t){return E.equalsRange(this,t)}static equalsRange(t,n){return!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return E.getEndPosition(this)}static getEndPosition(t){return new B(t.endLineNumber,t.endColumn)}getStartPosition(){return E.getStartPosition(this)}static getStartPosition(t){return new B(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new E(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new E(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return E.collapseToStart(this)}static collapseToStart(t){return new E(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}static fromPositions(t,n=t){return new E(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new E(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}}const Un=3;function ft(e,t,n,s){return new z(e,t,n).ComputeDiff(s)}class ht{constructor(t){const n=[],s=[];for(let r=0,i=t.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&i()){const L=s.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),b=r.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);let w=ft(L,b,i,!0).changes;u&&(w=En(w)),m=[];for(let M=0,P=w.length;M1&&w>1;){const M=m.charCodeAt(b-2),P=L.charCodeAt(w-2);if(M!==P)break;b--,w--}(b>1||w>1)&&this._pushTrimWhitespaceCharChange(r,i+1,1,b,l+1,1,w)}{let b=ke(m,1),w=ke(L,1);const M=m.length+1,P=L.length+1;for(;b!0;const t=Date.now();return()=>Date.now()-t255?255:e|0}function se(e){return e<0?0:e>4294967295?4294967295:e|0}class kn{constructor(t,n){this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}}class Fn{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=se(t);const s=this.values,r=this.prefixSum,i=n.length;return i===0?!1:(this.values=new Uint32Array(s.length+i),this.values.set(s.subarray(0,t),0),this.values.set(s.subarray(t),t+i),this.values.set(n,t),t-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(t,n){return t=se(t),n=se(n),this.values[t]===n?!1:(this.values[t]=n,t-1=s.length)return!1;let i=s.length-t;return n>=i&&(n=i),n===0?!1:(this.values=new Uint32Array(s.length-n),this.values.set(s.subarray(0,t),0),this.values.set(s.subarray(t+n),t),this.prefixSum=new Uint32Array(this.values.length),t-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=se(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),t>=this.values.length&&(t=this.values.length-1);for(let s=n;s<=t;s++)this.prefixSum[s]=this.prefixSum[s-1]+this.values[s];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let n=0,s=this.values.length-1,r=0,i=0,l=0;for(;n<=s;)if(r=n+(s-n)/2|0,i=this.prefixSum[r],l=i-this.values[r],t=i)n=r+1;else break;return new kn(r,t-l)}}class Tn{constructor(t,n,s,r){this._uri=t,this._lines=n,this._eol=s,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const n=t.changes;for(const s of n)this._acceptDeleteRange(s.range),this._acceptInsertText(new B(s.range.startLineNumber,s.range.startColumn),s.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,n=this._lines.length,s=new Uint32Array(n);for(let r=0;r/?";function Hn(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of In)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const qn=Hn();function Wn(e){let t=qn;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const Bn={maxLen:1e3,windowSize:15,timeBudget:150};function gt(e,t,n,s,r=Bn){if(n.length>r.maxLen){let o=e-r.maxLen/2;return o<0?o=0:s+=o,n=n.substring(o,e+r.maxLen/2),gt(e,t,n,s,r)}const i=Date.now(),l=e-1-s;let u=-1,a=null;for(let o=1;!(Date.now()-i>=r.timeBudget);o++){const f=l-r.windowSize*o;t.lastIndex=Math.max(0,f);const c=Yn(t,n,l,u);if(!c&&a||(a=c,f<=0))break;u=f}if(a){let o={word:a[0],startColumn:s+1+a.index,endColumn:s+1+a.index+a[0].length};return t.lastIndex=0,o}return null}function Yn(e,t,n,s){let r;for(;r=e.exec(t);){const i=r.index||0;if(i<=n&&e.lastIndex>=n)return r;if(s>0&&i>s)return null}return null}class Fe{constructor(t){let n=dt(t);this._defaultValue=n,this._asciiMap=Fe._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){let n=new Uint8Array(256);for(let s=0;s<256;s++)n[s]=t;return n}set(t,n){let s=dt(n);t>=0&&t<256?this._asciiMap[t]=s:this._map.set(t,s)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}}class Vn{constructor(t,n,s){const r=new Uint8Array(t*n);for(let i=0,l=t*n;in&&(n=a),u>s&&(s=u),o>s&&(s=o)}n++,s++;let r=new Vn(s,n,0);for(let i=0,l=t.length;i=this._maxCharCode?0:this._states.get(t,n)}}let Te=null;function zn(){return Te===null&&(Te=new $n([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Te}let ce=null;function Gn(){if(ce===null){ce=new Fe(0);const e=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let n=0;nr);if(r>0){const u=n.charCodeAt(r-1),a=n.charCodeAt(l);(u===40&&a===41||u===91&&a===93||u===123&&a===125)&&l--}return{range:{startLineNumber:s,startColumn:r+1,endLineNumber:s,endColumn:l+2},url:n.substring(r,l+1)}}static computeLinks(t,n=zn()){const s=Gn();let r=[];for(let i=1,l=t.getLineCount();i<=l;i++){const u=t.getLineContent(i),a=u.length;let o=0,f=0,c=0,m=1,L=!1,b=!1,w=!1,M=!1;for(;o=0?(r+=s?1:-1,r<0?r=t.length-1:r%=t.length,t[r]):null}}Ie.INSTANCE=new Ie;class U{constructor(t){this.element=t,this.next=U.Undefined,this.prev=U.Undefined}}U.Undefined=new U(void 0);class _t{constructor(){this._first=U.Undefined,this._last=U.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===U.Undefined}clear(){let t=this._first;for(;t!==U.Undefined;){const n=t.next;t.prev=U.Undefined,t.next=U.Undefined,t=n}this._first=U.Undefined,this._last=U.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){const s=new U(t);if(this._first===U.Undefined)this._first=s,this._last=s;else if(n){const i=this._last;this._last=s,s.prev=i,i.next=s}else{const i=this._first;this._first=s,s.next=i,i.prev=s}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(s))}}shift(){if(this._first!==U.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==U.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==U.Undefined&&t.next!==U.Undefined){const n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===U.Undefined&&t.next===U.Undefined?(this._first=U.Undefined,this._last=U.Undefined):t.next===U.Undefined?(this._last=this._last.prev,this._last.next=U.Undefined):t.prev===U.Undefined&&(this._first=this._first.next,this._first.prev=U.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==U.Undefined;)yield t.element,t=t.next}}const yn=T.performance&&typeof T.performance.now=="function";class Le{constructor(t){this._highResolution=yn&&t,this._startTime=this._now(),this._stopTime=-1}static create(t=!0){return new Le(t)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?T.performance.now():Date.now()}}var He;(function(e){e.None=()=>Je.None;function t(d){return(h,g=null,_)=>{let A=!1,S;return S=d(N=>{if(!A)return S?S.dispose():A=!0,h.call(g,N)},null,_),A&&S.dispose(),S}}e.once=t;function n(d,h){return a((g,_=null,A)=>d(S=>g.call(_,h(S)),null,A))}e.map=n;function s(d,h){return a((g,_=null,A)=>d(S=>{h(S),g.call(_,S)},null,A))}e.forEach=s;function r(d,h){return a((g,_=null,A)=>d(S=>h(S)&&g.call(_,S),null,A))}e.filter=r;function i(d){return d}e.signal=i;function l(...d){return(h,g=null,_)=>nn(...d.map(A=>A(S=>h.call(g,S),null,_)))}e.any=l;function u(d,h,g){let _=g;return n(d,A=>(_=h(_,A),_))}e.reduce=u;function a(d){let h;const g=new O({onFirstListenerAdd(){h=d(g.fire,g)},onLastListenerRemove(){h.dispose()}});return g.event}function o(d,h,g=100,_=!1,A){let S,N,p,I=0;const R=new O({leakWarningThreshold:A,onFirstListenerAdd(){S=d(C=>{I++,N=h(N,C),_&&!p&&(R.fire(N),N=void 0),clearTimeout(p),p=setTimeout(()=>{const Q=N;N=void 0,p=void 0,(!_||I>1)&&R.fire(Q),I=0},g)})},onLastListenerRemove(){S.dispose()}});return R.event}e.debounce=o;function f(d,h=(g,_)=>g===_){let g=!0,_;return r(d,A=>{const S=g||!h(A,_);return g=!1,_=A,S})}e.latch=f;function c(d,h){return[e.filter(d,h),e.filter(d,g=>!h(g))]}e.split=c;function m(d,h=!1,g=[]){let _=g.slice(),A=d(p=>{_?_.push(p):N.fire(p)});const S=()=>{_&&_.forEach(p=>N.fire(p)),_=null},N=new O({onFirstListenerAdd(){A||(A=d(p=>N.fire(p)))},onFirstListenerDidAdd(){_&&(h?setTimeout(S):S())},onLastListenerRemove(){A&&A.dispose(),A=null}});return N.event}e.buffer=m;class L{constructor(h){this.event=h}map(h){return new L(n(this.event,h))}forEach(h){return new L(s(this.event,h))}filter(h){return new L(r(this.event,h))}reduce(h,g){return new L(u(this.event,h,g))}latch(){return new L(f(this.event))}debounce(h,g=100,_=!1,A){return new L(o(this.event,h,g,_,A))}on(h,g,_){return this.event(h,g,_)}once(h,g,_){return t(this.event)(h,g,_)}}function b(d){return new L(d)}e.chain=b;function w(d,h,g=_=>_){const _=(...p)=>N.fire(g(...p)),A=()=>d.on(h,_),S=()=>d.removeListener(h,_),N=new O({onFirstListenerAdd:A,onLastListenerRemove:S});return N.event}e.fromNodeEventEmitter=w;function M(d,h,g=_=>_){const _=(...p)=>N.fire(g(...p)),A=()=>d.addEventListener(h,_),S=()=>d.removeEventListener(h,_),N=new O({onFirstListenerAdd:A,onLastListenerRemove:S});return N.event}e.fromDOMEventEmitter=M;function P(d){return new Promise(h=>t(d)(h))}e.toPromise=P})(He||(He={}));class Ne{constructor(t){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${t}_${Ne._idPool++}`}start(t){this._stopWatch=new Le(!0),this._listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this._elapsedOverall+=t,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${t.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Ne._idPool=0;class O{constructor(t){var n;this._disposed=!1,this._options=t,this._leakageMon=void 0,this._perfMon=!((n=this._options)===null||n===void 0)&&n._profName?new Ne(this._options._profName):void 0}get event(){return this._event||(this._event=(t,n,s)=>{var r;this._listeners||(this._listeners=new _t);const i=this._listeners.isEmpty();i&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const l=this._listeners.push(n?[t,n]:t);i&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,t,n);const u=(r=this._leakageMon)===null||r===void 0?void 0:r.check(this._listeners.size),a=Xe(()=>{u&&u(),this._disposed||(l(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return s instanceof le?s.add(a):Array.isArray(s)&&s.push(a),a}),this._event}fire(t){var n,s;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new _t);for(let r of this._listeners)this._deliveryQueue.push([r,t]);for((n=this._perfMon)===null||n===void 0||n.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[r,i]=this._deliveryQueue.shift();try{typeof r=="function"?r.call(void 0,i):r[0].call(r[1],i)}catch(l){Ot(l)}}(s=this._perfMon)===null||s===void 0||s.stop()}}dispose(){var t,n,s,r,i;this._disposed||(this._disposed=!0,(t=this._listeners)===null||t===void 0||t.clear(),(n=this._deliveryQueue)===null||n===void 0||n.clear(),(r=(s=this._options)===null||s===void 0?void 0:s.onLastListenerRemove)===null||r===void 0||r.call(s),(i=this._leakageMon)===null||i===void 0||i.dispose())}}const Lt=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var Se;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof be?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:He.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Lt})})(Se||(Se={}));class be{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Lt:(this._emitter||(this._emitter=new O),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Qn{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new be),this._token}cancel(){this._token?this._token instanceof be&&this._token.cancel():this._token=Se.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof be&&this._token.dispose():this._token=Se.None}}class qe{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const We=new qe,Be=new qe,Ye=new qe;(function(){function e(t,n,s=n,r=s){We.define(t,n),Be.define(t,s),Ye.define(t,r)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})();var Nt;(function(e){function t(l){return We.keyCodeToStr(l)}e.toString=t;function n(l){return We.strToKeyCode(l)}e.fromString=n;function s(l){return Be.keyCodeToStr(l)}e.toUserSettingsUS=s;function r(l){return Ye.keyCodeToStr(l)}e.toUserSettingsGeneral=r;function i(l){return Be.strToKeyCode(l)||Ye.strToKeyCode(l)}e.fromUserSettings=i})(Nt||(Nt={}));function Zn(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}class V extends E{constructor(t,n,s,r){super(t,n,s,r);this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=s,this.positionColumn=r}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return V.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new V(this.startLineNumber,this.startColumn,t,n):new V(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new B(this.positionLineNumber,this.positionColumn)}setStartPosition(t,n){return this.getDirection()===0?new V(t,n,this.endLineNumber,this.endColumn):new V(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new V(t.lineNumber,t.column,n.lineNumber,n.column)}static liftSelection(t){return new V(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let s=0,r=t.length;sthis._lines.length)n=this._lines.length,s=this._lines[n-1].length+1,r=!0;else{let i=this._lines[n-1].length+1;s<1?(s=1,r=!0):s>i&&(s=i,r=!0)}return r?{lineNumber:n,column:s}:t}}class ie{constructor(t,n){this._host=t,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(t){return this._models[t]}_getModels(){let t=[];return Object.keys(this._models).forEach(n=>t.push(this._models[n])),t}acceptNewModel(t){this._models[t.url]=new On(J.parse(t.url),t.lines,t.EOL,t.versionId)}acceptModelChanged(t,n){if(!this._models[t])return;this._models[t].onEvents(n)}acceptRemovedModel(t){!this._models[t]||delete this._models[t]}computeDiff(t,n,s,r){return re(this,void 0,void 0,function*(){const i=this._getModel(t),l=this._getModel(n);if(!i||!l)return null;const u=i.getLinesContent(),a=l.getLinesContent(),f=new Dn(u,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:s,shouldMakePrettyDiff:!0,maxComputationTime:r}).computeDiff(),c=f.changes.length>0?!1:this._modelsAreIdentical(i,l);return{quitEarly:f.quitEarly,identical:c,changes:f.changes}})}_modelsAreIdentical(t,n){const s=t.getLineCount(),r=n.getLineCount();if(s!==r)return!1;for(let i=1;i<=s;i++){const l=t.getLineContent(i),u=n.getLineContent(i);if(l!==u)return!1}return!0}computeMoreMinimalEdits(t,n){return re(this,void 0,void 0,function*(){const s=this._getModel(t);if(!s)return n;const r=[];let i;n=n.slice(0).sort((l,u)=>{if(l.range&&u.range)return E.compareRangesUsingStarts(l.range,u.range);let a=l.range?0:1,o=u.range?0:1;return a-o});for(let{range:l,text:u,eol:a}of n){if(typeof a=="number"&&(i=a),E.isEmpty(l)&&!u)continue;const o=s.getValueInRange(l);if(u=u.replace(/\r\n|\n|\r/g,s.eol),o===u)continue;if(Math.max(u.length,o.length)>ie._diffLimit){r.push({range:l,text:u});continue}const f=gn(o,u,!1),c=s.offsetAt(E.lift(l).getStartPosition());for(const m of f){const L=s.positionAt(c+m.originalStart),b=s.positionAt(c+m.originalStart+m.originalLength),w={text:u.substr(m.modifiedStart,m.modifiedLength),range:{startLineNumber:L.lineNumber,startColumn:L.column,endLineNumber:b.lineNumber,endColumn:b.column}};s.getValueInRange(w.range)!==w.text&&r.push(w)}}return typeof i=="number"&&r.push({eol:i,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r})}computeLinks(t){return re(this,void 0,void 0,function*(){let n=this._getModel(t);return n?jn(n):null})}textualSuggest(t,n,s,r){return re(this,void 0,void 0,function*(){const i=new Le(!0),l=new RegExp(s,r),u=new Set;e:for(let a of t){const o=this._getModel(a);if(!!o){for(let f of o.words(l))if(!(f===n||!isNaN(Number(f)))&&(u.add(f),u.size>ie._suggestionsLimit))break e}}return{words:Array.from(u),duration:i.elapsed()}})}computeWordRanges(t,n,s,r){return re(this,void 0,void 0,function*(){let i=this._getModel(t);if(!i)return Object.create(null);const l=new RegExp(s,r),u=Object.create(null);for(let a=n.startLineNumber;athis._host.fhr(u,a)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(l,n),Promise.resolve(pe(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(t,n){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,n))}catch(s){return Promise.reject(s)}}}ie._diffLimit=1e5,ie._suggestionsLimit=1e4,typeof importScripts=="function"&&(T.monaco=Jn());let je=!1;function Kn(e){if(je)return;je=!0;const t=new cn(n=>{self.postMessage(n)},n=>new ie(n,e));self.onmessage=n=>{t.onmessage(n.data)}}self.onmessage=e=>{je||Kn(null)}})();
diff --git a/magic-editor/src/main/resources/magic-editor/assets/html.worker.ca00066f.js b/magic-editor/src/main/resources/magic-editor/assets/html.worker.ca00066f.js
new file mode 100644
index 00000000..f2dcd26d
--- /dev/null
+++ b/magic-editor/src/main/resources/magic-editor/assets/html.worker.ca00066f.js
@@ -0,0 +1,446 @@
+(function(){"use strict";class Sr{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?new Error(t.message+`
+
+`+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const Ar=new Sr;function Lr(e){Cr(e)||Ar.onUnexpectedError(e)}function gn(e){if(e instanceof Error){let{name:t,message:n}=e;const r=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:r}}return e}const bn="Canceled";function Cr(e){return e instanceof Error&&e.name===bn&&e.message===bn}function xr(e){const t=this;let n=!1,r;return function(){return n||(n=!0,r=e.apply(t,arguments)),r}}var Et;(function(e){function t(f){return f&&typeof f=="object"&&typeof f[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function r(){return n}e.empty=r;function*i(f){yield f}e.single=i;function a(f){return f||n}e.from=a;function o(f){return!f||f[Symbol.iterator]().next().done===!0}e.isEmpty=o;function u(f){return f[Symbol.iterator]().next().value}e.first=u;function s(f,v){for(const A of f)if(v(A))return!0;return!1}e.some=s;function l(f,v){for(const A of f)if(v(A))return A}e.find=l;function*h(f,v){for(const A of f)v(A)&&(yield A)}e.filter=h;function*c(f,v){let A=0;for(const D of f)yield v(D,A++)}e.map=c;function*d(...f){for(const v of f)for(const A of v)yield A}e.concat=d;function*p(f){for(const v of f)for(const A of v)yield A}e.concatNested=p;function _(f,v,A){let D=A;for(const H of f)D=v(D,H);return D}e.reduce=_;function*b(f,v,A=f.length){for(v<0&&(v+=f.length),A<0?A+=f.length:A>f.length&&(A=f.length);vD===H){const D=f[Symbol.iterator](),H=v[Symbol.iterator]();for(;;){const g=D.next(),m=H.next();if(g.done!==m.done)return!1;if(g.done)return!0;if(!A(g.value,m.value))return!1}}e.equals=k})(Et||(Et={}));function Vs(e){return e}function Ys(e,t){}class Dr extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function _n(e){if(Et.is(e)){let t=[];for(const n of e)if(n)try{n.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new Dr(t);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Er(...e){return vn(()=>_n(e))}function vn(e){return{dispose:xr(()=>{e()})}}class Ve{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{_n(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Ve.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}}Ve.DISABLE_DISPOSED_WARNING=!1;class wn{constructor(){this._store=new Ve,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}wn.None=Object.freeze({dispose(){}});var Mt;const at="en";let Rt=!1,Nt=!1,Ut=!1,st,Ht=at,Mr,Ee;const ie=typeof self=="object"?self:typeof global=="object"?global:{};let ee;typeof ie.vscode!="undefined"&&typeof ie.vscode.process!="undefined"?ee=ie.vscode.process:typeof process!="undefined"&&(ee=process);const Rr=typeof((Mt=ee==null?void 0:ee.versions)===null||Mt===void 0?void 0:Mt.electron)=="string"&&ee.type==="renderer";if(typeof navigator=="object"&&!Rr)Ee=navigator.userAgent,Rt=Ee.indexOf("Windows")>=0,Nt=Ee.indexOf("Macintosh")>=0,(Ee.indexOf("Macintosh")>=0||Ee.indexOf("iPad")>=0||Ee.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Ut=Ee.indexOf("Linux")>=0,st=navigator.language,Ht=st;else if(typeof ee=="object"){Rt=ee.platform==="win32",Nt=ee.platform==="darwin",Ut=ee.platform==="linux",Ut&&!!ee.env.SNAP&&ee.env.SNAP_REVISION,st=at,Ht=at;const e=ee.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),n=t.availableLanguages["*"];st=t.locale,Ht=n||at,Mr=t._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const Ye=Rt,Nr=Nt,yn=function(){if(ie.setImmediate)return ie.setImmediate.bind(ie);if(typeof ie.postMessage=="function"&&!ie.importScripts){let n=[];ie.addEventListener("message",i=>{if(i.data&&i.data.vscodeSetImmediateId)for(let a=0,o=n.length;a{const a=++r;n.push({id:a,callback:i}),ie.postMessage({vscodeSetImmediateId:a},"*")}}if(typeof(ee==null?void 0:ee.nextTick)=="function")return ee.nextTick.bind(ee);const t=Promise.resolve();return n=>t.then(n)}();function Ur(e){let t=[],n=Object.getPrototypeOf(e);for(;Object.prototype!==n;)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}function zt(e){const t=[];for(const n of Ur(e))typeof e[n]=="function"&&t.push(n);return t}function Tn(e,t){const n=i=>function(){const a=Array.prototype.slice.call(arguments,0);return t(i,a)};let r={};for(const i of e)r[i]=n(i);return r}const Hr="$initialize";class zr{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(t){this._workerId=t}sendMessage(t,n){let r=String(++this._lastSentReq);return new Promise((i,a)=>{this._pendingReplies[r]={resolve:i,reject:a},this._send({vsWorker:this._workerId,req:r,method:t,args:n})})}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){if(t.seq){let a=t;if(!this._pendingReplies[a.seq]){console.warn("Got reply to unknown seq");return}let o=this._pendingReplies[a.seq];if(delete this._pendingReplies[a.seq],a.err){let u=a.err;a.err.$isError&&(u=new Error,u.name=a.err.name,u.message=a.err.message,u.stack=a.err.stack),o.reject(u);return}o.resolve(a.res);return}let n=t,r=n.req;this._handler.handleMessage(n.method,n.args).then(a=>{this._send({vsWorker:this._workerId,seq:r,res:a,err:void 0})},a=>{a.detail instanceof Error&&(a.detail=gn(a.detail)),this._send({vsWorker:this._workerId,seq:r,res:void 0,err:gn(a)})})}_send(t){let n=[];if(t.req){const r=t;for(let i=0;i{t(r,i)},handleMessage:(r,i)=>this._handleMessage(r,i)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n){if(t===Hr)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._requestHandler[t].apply(this._requestHandler,n))}catch(r){return Promise.reject(r)}}initialize(t,n,r,i){this._protocol.setWorkerId(t);const o=Tn(i,(u,s)=>this._protocol.sendMessage(u,s));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(o),Promise.resolve(zt(this._requestHandler))):(n&&(typeof n.baseUrl!="undefined"&&delete n.baseUrl,typeof n.paths!="undefined"&&typeof n.paths.vs!="undefined"&&delete n.paths.vs,typeof n.trustedTypesPolicy!==void 0&&delete n.trustedTypesPolicy,n.catchError=!0,self.require.config(n)),new Promise((u,s)=>{self.require([r],l=>{if(this._requestHandler=l.create(o),!this._requestHandler){s(new Error("No RequestHandler!"));return}u(zt(this._requestHandler))},s)}))}}class ye{constructor(t,n,r,i){this.originalStart=t,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function Wr(e){return e.split(/\r\n|\r|\n/)}function Pr(e){for(let t=0,n=e.length;t=0;n--){const r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function kn(e,t){return(t<<5)-t+e|0}function Fr(e,t){t=kn(149417,t);for(let n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new ye(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class Te{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;const[i,a,o]=Te._getElements(t),[u,s,l]=Te._getElements(n);this._hasStrings=o&&l,this._originalStringElements=i,this._originalElementsOrHash=a,this._modifiedStringElements=u,this._modifiedElementsOrHash=s,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const n=t.getElements();if(Te._isStringArray(n)){const r=new Int32Array(n.length);for(let i=0,a=n.length;i=t&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(t>n||r>i){let c;return r<=i?(ze.Assert(t===n+1,"originalStart should only be one more than originalEnd"),c=[new ye(t,0,r,i-r+1)]):t<=n?(ze.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),c=[new ye(t,n-t+1,r,0)]):(ze.Assert(t===n+1,"originalStart should only be one more than originalEnd"),ze.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),c=[]),c}const o=[0],u=[0],s=this.ComputeRecursionPoint(t,n,r,i,o,u,a),l=o[0],h=u[0];if(s!==null)return s;if(!a[0]){const c=this.ComputeDiffRecursive(t,l,r,h,a);let d=[];return a[0]?d=[new ye(l+1,n-(l+1)+1,h+1,i-(h+1)+1)]:d=this.ComputeDiffRecursive(l+1,n,h+1,i,a),this.ConcatenateChanges(c,d)}return[new ye(t,n-t+1,r,i-r+1)]}WALKTRACE(t,n,r,i,a,o,u,s,l,h,c,d,p,_,b,T,k,f){let v=null,A=null,D=new An,H=n,g=r,m=p[0]-T[0]-i,w=-1073741824,B=this.m_forwardHistory.length-1;do{const R=m+t;R===H||R=0&&(l=this.m_forwardHistory[B],t=l[0],H=1,g=l.length-1)}while(--B>=-1);if(v=D.getReverseChanges(),f[0]){let R=p[0]+1,N=T[0]+1;if(v!==null&&v.length>0){const I=v[v.length-1];R=Math.max(R,I.getOriginalEnd()),N=Math.max(N,I.getModifiedEnd())}A=[new ye(R,d-R+1,N,b-N+1)]}else{D=new An,H=o,g=u,m=p[0]-T[0]-s,w=1073741824,B=k?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const R=m+a;R===H||R=h[R+1]?(c=h[R+1]-1,_=c-m-s,c>w&&D.MarkNextChange(),w=c+1,D.AddOriginalElement(c+1,_+1),m=R+1-a):(c=h[R-1],_=c-m-s,c>w&&D.MarkNextChange(),w=c,D.AddModifiedElement(c+1,_+1),m=R-1-a),B>=0&&(h=this.m_reverseHistory[B],a=h[0],H=1,g=h.length-1)}while(--B>=-1);A=D.getChanges()}return this.ConcatenateChanges(v,A)}ComputeRecursionPoint(t,n,r,i,a,o,u){let s=0,l=0,h=0,c=0,d=0,p=0;t--,r--,a[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const _=n-t+(i-r),b=_+1,T=new Int32Array(b),k=new Int32Array(b),f=i-r,v=n-t,A=t-r,D=n-i,g=(v-f)%2===0;T[f]=t,k[v]=n,u[0]=!1;for(let m=1;m<=_/2+1;m++){let w=0,B=0;h=this.ClipDiagonalBound(f-m,m,f,b),c=this.ClipDiagonalBound(f+m,m,f,b);for(let N=h;N<=c;N+=2){N===h||Nw+B&&(w=s,B=l),!g&&Math.abs(N-v)<=m-1&&s>=k[N])return a[0]=s,o[0]=l,I<=k[N]&&1447>0&&m<=1447+1?this.WALKTRACE(f,h,c,A,v,d,p,D,T,k,s,n,a,l,i,o,g,u):null}const R=(w-t+(B-r)-m)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(w,R))return u[0]=!0,a[0]=w,o[0]=B,R>0&&1447>0&&m<=1447+1?this.WALKTRACE(f,h,c,A,v,d,p,D,T,k,s,n,a,l,i,o,g,u):(t++,r++,[new ye(t,n-t+1,r,i-r+1)]);d=this.ClipDiagonalBound(v-m,m,v,b),p=this.ClipDiagonalBound(v+m,m,v,b);for(let N=d;N<=p;N+=2){N===d||N=k[N+1]?s=k[N+1]-1:s=k[N-1],l=s-(N-v)-D;const I=s;for(;s>t&&l>r&&this.ElementsAreEqual(s,l);)s--,l--;if(k[N]=s,g&&Math.abs(N-f)<=m&&s<=T[N])return a[0]=s,o[0]=l,I>=T[N]&&1447>0&&m<=1447+1?this.WALKTRACE(f,h,c,A,v,d,p,D,T,k,s,n,a,l,i,o,g,u):null}if(m<=1447){let N=new Int32Array(c-h+2);N[0]=f-h+1,Ie.Copy2(T,h,N,1,c-h+1),this.m_forwardHistory.push(N),N=new Int32Array(p-d+2),N[0]=v-d+1,Ie.Copy2(k,d,N,1,p-d+1),this.m_reverseHistory.push(N)}}return this.WALKTRACE(f,h,c,A,v,d,p,D,T,k,s,n,a,l,i,o,g,u)}PrettifyChanges(t){for(let n=0;n0,u=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){const r=t[n];let i=0,a=0;if(n>0){const c=t[n-1];i=c.originalStart+c.originalLength,a=c.modifiedStart+c.modifiedLength}const o=r.originalLength>0,u=r.modifiedLength>0;let s=0,l=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let c=1;;c++){const d=r.originalStart-c,p=r.modifiedStart-c;if(dl&&(l=b,s=c)}r.originalStart-=s,r.modifiedStart-=s;const h=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],h)){t[n-1]=h[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=t.length;n0&&p>s&&(s=p,l=c,h=d)}return s>0?[l,h]:null}_contiguousSequenceScore(t,n,r){let i=0;for(let a=0;a=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(t,n,r,i){const a=this._OriginalRegionIsBoundary(t,n)?1:0,o=this._ModifiedRegionIsBoundary(r,i)?1:0;return a+o}ConcatenateChanges(t,n){let r=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],r)){const i=new Array(t.length+n.length-1);return Ie.Copy(t,0,i,0,t.length-1),i[t.length-1]=r[0],Ie.Copy(n,1,i,t.length,n.length-1),i}else{const i=new Array(t.length+n.length);return Ie.Copy(t,0,i,0,t.length),Ie.Copy(n,0,i,t.length,n.length),i}}ChangesOverlap(t,n,r){if(ze.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),ze.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){const i=t.originalStart;let a=t.originalLength;const o=t.modifiedStart;let u=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(a=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(u=n.modifiedStart+n.modifiedLength-t.modifiedStart),r[0]=new ye(i,a,o,u),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,i){if(t>=0&&t=jr&&e<=Vr||e>=Gr&&e<=Yr}function ot(e,t,n,r){let i="",a=0,o=-1,u=0,s=0;for(let l=0;l<=e.length;++l){if(l2){const h=i.lastIndexOf(n);h===-1?(i="",a=0):(i=i.slice(0,h),a=i.length-1-i.lastIndexOf(n)),o=l,u=0;continue}else if(i.length!==0){i="",a=0,o=l,u=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",a=2)}else i.length>0?i+=`${n}${e.slice(o+1,l)}`:i=e.slice(o+1,l),a=l-o-1;o=l,u=0}else s===ke&&u!==-1?++u:u=-1}return i}function Cn(e,t){if(t===null||typeof t!="object")throw new Ln("pathObject","Object",t);const n=t.dir||t.root,r=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}const ae={resolve(...e){let t="",n="",r=!1;for(let i=e.length-1;i>=-1;i--){let a;if(i>=0){if(a=e[i],Z(a,"path"),a.length===0)continue}else t.length===0?a=It():(a=Or[`=${t}`]||It(),(a===void 0||a.slice(0,2).toLowerCase()!==t.toLowerCase()&&a.charCodeAt(2)===oe)&&(a=`${t}\\`));const o=a.length;let u=0,s="",l=!1;const h=a.charCodeAt(0);if(o===1)O(h)&&(u=1,l=!0);else if(O(h))if(l=!0,O(a.charCodeAt(1))){let c=2,d=c;for(;c2&&O(a.charCodeAt(2))&&(l=!0,u=3));if(s.length>0)if(t.length>0){if(s.toLowerCase()!==t.toLowerCase())continue}else t=s;if(r){if(t.length>0)break}else if(n=`${a.slice(u)}\\${n}`,r=l,l&&t.length>0)break}return n=ot(n,!r,"\\",O),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){Z(e,"path");const t=e.length;if(t===0)return".";let n=0,r,i=!1;const a=e.charCodeAt(0);if(t===1)return Wt(a)?"\\":e;if(O(a))if(i=!0,O(e.charCodeAt(1))){let u=2,s=u;for(;u2&&O(e.charCodeAt(2))&&(i=!0,n=3));let o=n0&&O(e.charCodeAt(t-1))&&(o+="\\"),r===void 0?i?`\\${o}`:o:i?`${r}\\${o}`:`${r}${o}`},isAbsolute(e){Z(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return O(n)||t>2&&Ae(n)&&e.charCodeAt(1)===Se&&O(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let a=0;a0&&(t===void 0?t=n=o:t+=`\\${o}`)}if(t===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&O(n.charCodeAt(0))){++i;const a=n.length;a>1&&O(n.charCodeAt(1))&&(++i,a>2&&(O(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return ae.normalize(t)},relative(e,t){if(Z(e,"from"),Z(t,"to"),e===t)return"";const n=ae.resolve(e),r=ae.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";let i=0;for(;ii&&e.charCodeAt(a-1)===oe;)a--;const o=a-i;let u=0;for(;uu&&t.charCodeAt(s-1)===oe;)s--;const l=s-u,h=oh){if(t.charCodeAt(u+d)===oe)return r.slice(u+d+1);if(d===2)return r.slice(u+d)}o>h&&(e.charCodeAt(i+d)===oe?c=d:d===2&&(c=3)),c===-1&&(c=0)}let p="";for(d=i+c+1;d<=a;++d)(d===a||e.charCodeAt(d)===oe)&&(p+=p.length===0?"..":"\\..");return u+=c,p.length>0?`${p}${r.slice(u,s)}`:(r.charCodeAt(u)===oe&&++u,r.slice(u,s))},toNamespacedPath(e){if(typeof e!="string")return e;if(e.length===0)return"";const t=ae.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===oe){if(t.charCodeAt(1)===oe){const n=t.charCodeAt(2);if(n!==$r&&n!==ke)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(Ae(t.charCodeAt(0))&&t.charCodeAt(1)===Se&&t.charCodeAt(2)===oe)return`\\\\?\\${t}`;return e},dirname(e){Z(e,"path");const t=e.length;if(t===0)return".";let n=-1,r=0;const i=e.charCodeAt(0);if(t===1)return O(i)?e:".";if(O(i)){if(n=r=1,O(e.charCodeAt(1))){let u=2,s=u;for(;u2&&O(e.charCodeAt(2))?3:2,r=n);let a=-1,o=!0;for(let u=t-1;u>=r;--u)if(O(e.charCodeAt(u))){if(!o){a=u;break}}else o=!1;if(a===-1){if(n===-1)return".";a=n}return e.slice(0,a)},basename(e,t){t!==void 0&&Z(t,"ext"),Z(e,"path");let n=0,r=-1,i=!0,a;if(e.length>=2&&Ae(e.charCodeAt(0))&&e.charCodeAt(1)===Se&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,u=-1;for(a=e.length-1;a>=n;--a){const s=e.charCodeAt(a);if(O(s)){if(!i){n=a+1;break}}else u===-1&&(i=!1,u=a+1),o>=0&&(s===t.charCodeAt(o)?--o===-1&&(r=a):(o=-1,r=u))}return n===r?r=u:r===-1&&(r=e.length),e.slice(n,r)}for(a=e.length-1;a>=n;--a)if(O(e.charCodeAt(a))){if(!i){n=a+1;break}}else r===-1&&(i=!1,r=a+1);return r===-1?"":e.slice(n,r)},extname(e){Z(e,"path");let t=0,n=-1,r=0,i=-1,a=!0,o=0;e.length>=2&&e.charCodeAt(1)===Se&&Ae(e.charCodeAt(0))&&(t=r=2);for(let u=e.length-1;u>=t;--u){const s=e.charCodeAt(u);if(O(s)){if(!a){r=u+1;break}continue}i===-1&&(a=!1,i=u+1),s===ke?n===-1?n=u:o!==1&&(o=1):n!==-1&&(o=-1)}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:Cn.bind(null,"\\"),parse(e){Z(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.length;let r=0,i=e.charCodeAt(0);if(n===1)return O(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(O(i)){if(r=1,O(e.charCodeAt(1))){let c=2,d=c;for(;c0&&(t.root=e.slice(0,r));let a=-1,o=r,u=-1,s=!0,l=e.length-1,h=0;for(;l>=r;--l){if(i=e.charCodeAt(l),O(i)){if(!s){o=l+1;break}continue}u===-1&&(s=!1,u=l+1),i===ke?a===-1?a=l:h!==1&&(h=1):a!==-1&&(h=-1)}return u!==-1&&(a===-1||h===0||h===1&&a===u-1&&a===o+1?t.base=t.name=e.slice(o,u):(t.name=e.slice(o,a),t.base=e.slice(o,u),t.ext=e.slice(a,u))),o>0&&o!==r?t.dir=e.slice(0,o-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},le={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:It();Z(i,"path"),i.length!==0&&(t=`${i}/${t}`,n=i.charCodeAt(0)===te)}return t=ot(t,!n,"/",Wt),n?`/${t}`:t.length>0?t:"."},normalize(e){if(Z(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===te,n=e.charCodeAt(e.length-1)===te;return e=ot(e,!t,"/",Wt),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return Z(e,"path"),e.length>0&&e.charCodeAt(0)===te},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=r:t+=`/${r}`)}return t===void 0?".":le.normalize(t)},relative(e,t){if(Z(e,"from"),Z(t,"to"),e===t||(e=le.resolve(e),t=le.resolve(t),e===t))return"";const n=1,r=e.length,i=r-n,a=1,o=t.length-a,u=iu){if(t.charCodeAt(a+l)===te)return t.slice(a+l+1);if(l===0)return t.slice(a+l)}else i>u&&(e.charCodeAt(n+l)===te?s=l:l===0&&(s=0));let h="";for(l=n+s+1;l<=r;++l)(l===r||e.charCodeAt(l)===te)&&(h+=h.length===0?"..":"/..");return`${h}${t.slice(a+s)}`},toNamespacedPath(e){return e},dirname(e){if(Z(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===te;let n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===te){if(!r){n=i;break}}else r=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&Z(t,"ext"),Z(e,"path");let n=0,r=-1,i=!0,a;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,u=-1;for(a=e.length-1;a>=0;--a){const s=e.charCodeAt(a);if(s===te){if(!i){n=a+1;break}}else u===-1&&(i=!1,u=a+1),o>=0&&(s===t.charCodeAt(o)?--o===-1&&(r=a):(o=-1,r=u))}return n===r?r=u:r===-1&&(r=e.length),e.slice(n,r)}for(a=e.length-1;a>=0;--a)if(e.charCodeAt(a)===te){if(!i){n=a+1;break}}else r===-1&&(i=!1,r=a+1);return r===-1?"":e.slice(n,r)},extname(e){Z(e,"path");let t=-1,n=0,r=-1,i=!0,a=0;for(let o=e.length-1;o>=0;--o){const u=e.charCodeAt(o);if(u===te){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),u===ke?t===-1?t=o:a!==1&&(a=1):t!==-1&&(a=-1)}return t===-1||r===-1||a===0||a===1&&t===r-1&&t===n+1?"":e.slice(t,r)},format:Cn.bind(null,"/"),parse(e){Z(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===te;let r;n?(t.root="/",r=1):r=0;let i=-1,a=0,o=-1,u=!0,s=e.length-1,l=0;for(;s>=r;--s){const h=e.charCodeAt(s);if(h===te){if(!u){a=s+1;break}continue}o===-1&&(u=!1,o=s+1),h===ke?i===-1?i=s:l!==1&&(l=1):i!==-1&&(l=-1)}if(o!==-1){const h=a===0&&n?1:a;i===-1||l===0||l===1&&i===o-1&&i===a+1?t.base=t.name=e.slice(h,o):(t.name=e.slice(h,i),t.base=e.slice(h,o),t.ext=e.slice(i,o))}return a>0?t.dir=e.slice(0,a-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};le.win32=ae.win32=ae,le.posix=ae.posix=le,Me==="win32"?ae.normalize:le.normalize,Me==="win32"?ae.resolve:le.resolve,Me==="win32"?ae.relative:le.relative,Me==="win32"?ae.dirname:le.dirname,Me==="win32"?ae.basename:le.basename,Me==="win32"?ae.extname:le.extname,Me==="win32"?ae.sep:le.sep;const Xr=/^\w[\w\d+.-]*$/,Qr=/^\//,Jr=/^\/\//;function xn(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!Xr.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Qr.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Jr.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Zr(e,t){return!e&&!t?"file":e}function Kr(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==me&&(t=me+t):t=me;break}return t}const Q="",me="/",ea=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class Re{constructor(t,n,r,i,a,o=!1){typeof t=="object"?(this.scheme=t.scheme||Q,this.authority=t.authority||Q,this.path=t.path||Q,this.query=t.query||Q,this.fragment=t.fragment||Q):(this.scheme=Zr(t,o),this.authority=n||Q,this.path=Kr(this.scheme,r||Q),this.query=i||Q,this.fragment=a||Q,xn(this,o))}static isUri(t){return t instanceof Re?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}get fsPath(){return Pt(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:r,path:i,query:a,fragment:o}=t;return n===void 0?n=this.scheme:n===null&&(n=Q),r===void 0?r=this.authority:r===null&&(r=Q),i===void 0?i=this.path:i===null&&(i=Q),a===void 0?a=this.query:a===null&&(a=Q),o===void 0?o=this.fragment:o===null&&(o=Q),n===this.scheme&&r===this.authority&&i===this.path&&a===this.query&&o===this.fragment?this:new Pe(n,r,i,a,o)}static parse(t,n=!1){const r=ea.exec(t);return r?new Pe(r[2]||Q,lt(r[4]||Q),lt(r[5]||Q),lt(r[7]||Q),lt(r[9]||Q),n):new Pe(Q,Q,Q,Q,Q)}static file(t){let n=Q;if(Ye&&(t=t.replace(/\\/g,me)),t[0]===me&&t[1]===me){const r=t.indexOf(me,2);r===-1?(n=t.substring(2),t=me):(n=t.substring(2,r),t=t.substring(r)||me)}return new Pe("file",n,t,Q,Q)}static from(t){const n=new Pe(t.scheme,t.authority,t.path,t.query,t.fragment);return xn(n,!0),n}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return Ye&&t.scheme==="file"?r=Re.file(ae.join(Pt(t,!0),...n)).path:r=le.join(t.path,...n),t.with({path:r})}toString(t=!1){return Bt(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof Re)return t;{const n=new Pe(t);return n._formatted=t.external,n._fsPath=t._sep===Dn?t.fsPath:null,n}}else return t}}const Dn=Ye?1:void 0;class Pe extends Re{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Pt(this,!1)),this._fsPath}toString(t=!1){return t?Bt(this,!0):(this._formatted||(this._formatted=Bt(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Dn),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const En={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function Mn(e,t){let n,r=-1;for(let i=0;i=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||t&&a===47)r!==-1&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n!==void 0&&(n+=e.charAt(i));else{n===void 0&&(n=e.substr(0,i));const o=En[a];o!==void 0?(r!==-1&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=o):r===-1&&(r=i)}}return r!==-1&&(n+=encodeURIComponent(e.substring(r))),n!==void 0?n:e}function ta(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,Ye&&(n=n.replace(/\//g,"\\")),n}function Bt(e,t){const n=t?ta:Mn;let r="",{scheme:i,authority:a,path:o,query:u,fragment:s}=e;if(i&&(r+=i,r+=":"),(a||i==="file")&&(r+=me,r+=me),a){let l=a.indexOf("@");if(l!==-1){const h=a.substr(0,l);a=a.substr(l+1),l=h.indexOf(":"),l===-1?r+=n(h,!1):(r+=n(h.substr(0,l),!1),r+=":",r+=n(h.substr(l+1),!1)),r+="@"}a=a.toLowerCase(),l=a.indexOf(":"),l===-1?r+=n(a,!1):(r+=n(a.substr(0,l),!1),r+=a.substr(l))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){const l=o.charCodeAt(1);l>=65&&l<=90&&(o=`/${String.fromCharCode(l+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){const l=o.charCodeAt(0);l>=65&&l<=90&&(o=`${String.fromCharCode(l+32)}:${o.substr(2)}`)}r+=n(o,!0)}return u&&(r+="?",r+=n(u,!1)),s&&(r+="#",r+=t?s:Mn(s,!1)),r}function Rn(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Rn(e.substr(3)):e}}const Nn=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function lt(e){return e.match(Nn)?e.replace(Nn,t=>Rn(t)):e}class he{constructor(t,n){this.lineNumber=t,this.column=n}with(t=this.lineNumber,n=this.column){return t===this.lineNumber&&n===this.column?this:new he(t,n)}delta(t=0,n=0){return this.with(this.lineNumber+t,this.column+n)}equals(t){return he.equals(this,t)}static equals(t,n){return!t&&!n?!0:!!t&&!!n&&t.lineNumber===n.lineNumber&&t.column===n.column}isBefore(t){return he.isBefore(this,t)}static isBefore(t,n){return t.lineNumberr||t===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return J.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return J.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}containsRange(t){return J.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn