@next-bricks/vs 1.17.1 → 1.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +1 -1
- package/dist/chunks/1427.7ba22e80.js +1 -0
- package/dist/chunks/3354.0afb8624.js +1 -0
- package/dist/chunks/6165.f5033dc0.js +2 -0
- package/dist/chunks/{6165.324e0fbb.js.map → 6165.f5033dc0.js.map} +1 -1
- package/dist/chunks/7242.b167885a.js +2 -0
- package/dist/chunks/7242.b167885a.js.map +1 -0
- package/dist/chunks/{9519.dcd18d4f.js → 9519.308363b4.js} +1 -1
- package/dist/chunks/code-editor.c8706794.js +2 -0
- package/dist/chunks/code-editor.c8706794.js.map +1 -0
- package/dist/chunks/{main.8893d771.js → main.7c0fcbf9.js} +2 -2
- package/dist/chunks/{main.8893d771.js.map → main.7c0fcbf9.js.map} +1 -1
- package/dist/{index.58605c57.js → index.c4fac782.js} +2 -2
- package/dist/{index.58605c57.js.map → index.c4fac782.js.map} +1 -1
- package/package.json +2 -2
- package/dist/chunks/1427.d3837a0a.js +0 -1
- package/dist/chunks/3354.4eeab347.js +0 -1
- package/dist/chunks/6165.324e0fbb.js +0 -2
- package/dist/chunks/7242.d6c20093.js +0 -2
- package/dist/chunks/7242.d6c20093.js.map +0 -1
- package/dist/chunks/code-editor.5c29df2d.js +0 -2
- package/dist/chunks/code-editor.5c29df2d.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(globalThis.webpackChunk_next_bricks_vs=globalThis.webpackChunk_next_bricks_vs||[]).push([[4044,6165,7247,7716,8204],{4046:(e,t,o)=>{"use strict";o.d(t,{v:()=>g});var n=o(62001),r=o(40739),a=o(44804),i=o(24102),s=o(11968);const d=["analytics.event","console.error","console.info","console.log","console.warn","context.assign","context.load","context.refresh","context.replace","event.preventDefault","event.stopPropagation","formstate.update","handleHttpError","history.block","history.goBack","history.goForward","history.push","history.pushAnchor","history.pushQuery","history.reload","history.replace","history.replaceQuery","history.unblock","localStorage.removeItem","localStorage.setItem","location.assign","location.reload","menu.clearMenuCache","menu.clearMenuTitleCache","message.error","message.info","message.subscribe","message.success","message.unsubscribe","message.warn","mode.setDashboardMode","mode.setDefaultMode","parent.postMessage","preview.debug","sessionStorage.removeItem","sessionStorage.setItem","state.load","state.refresh","state.update","theme.setDarkTheme","theme.setLightTheme","theme.setTheme","tpl.dispatchEvent","window.open","window.postMessage"],u=(e,t,o)=>{const n=[],r=[];let a="",i=o,s=t.startColumn;for(;i>0;){const o=e.getValueInRange({startLineNumber:i,endLineNumber:i,startColumn:0,endColumn:1/0}).match(/^([\s|-]*)(\w+)(?=:)/);if(o){const[,e,i]=o;e.length===t.startColumn-1&&n.unshift(i),e.length<s-1&&(!a&&(a=i),s=e.length,r.unshift(i))}i--}return{curLevelKeys:n,keyList:r,parentKey:a}},g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,g=arguments.length>3?arguments[3]:void 0;return async(c,l,p)=>{if(o&&o!==(0,a.B)())return{suggestions:[]};const f=null!=g&&g.showDSKey?["CTX.DS","DS"]:[],m=c.getWordUntilPosition(l),{word:k,token:b}=((e,t,o)=>{var n;const r=e.getWordUntilPosition(t),a=e.getValueInRange({startLineNumber:t.lineNumber,endLineNumber:t.lineNumber,startColumn:t.column-r.word.length-1,endColumn:t.column-r.word.length}),i=e.getWordAtPosition({...t,column:t.column-(null==r||null===(n=r.word)||void 0===n?void 0:n.length)-1});let s=null==i?void 0:i.word;if(null!=o&&o.showDSKey&&"DS"===(null==i?void 0:i.word)){const o=e.getWordAtPosition({...t,column:i.startColumn-1});s=`${null==o?void 0:o.word}.${i.word}`}return{word:s,token:a}})(c,l,g),h=c.getValueInRange({startLineNumber:l.lineNumber,endLineNumber:l.lineNumber,startColumn:0,endColumn:1/0}),C={startLineNumber:l.lineNumber,endLineNumber:l.lineNumber,startColumn:m.startColumn,endColumn:m.endColumn},y=1===m.startColumn,{curLevelKeys:M}=u(c,m,c.getLineCount());if("<"===p.triggerCharacter){const e=c.getValueInRange({startLineNumber:l.lineNumber,endLineNumber:l.lineNumber,startColumn:l.column-2,endColumn:l.column+2});return/^(['"]?)<\1$/.test(e.trim())?{suggestions:[{label:"<% %>",detail:"Expression body",kind:n.languages.CompletionItemKind.Value,insertText:"% ${0} %>",insertTextRules:n.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:C},{label:"<%= %>",detail:"Track expression body",kind:n.languages.CompletionItemKind.Value,insertText:"%= ${0} %>",insertTextRules:n.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:C}]}:{suggestions:[]}}if(y)return{suggestions:(null!=e?e:[]).filter((e=>!M.includes(e.label))).map((e=>({...e,label:e.label,insertText:e.insertText||e.label,kind:n.languages.CompletionItemKind.Keyword,range:C})))};if(":"===p.triggerCharacter||"."===p.triggerCharacter&&k&&!["CTX","STATE","FN"].concat(f).includes(k)){if("action"===k&&":"===p.triggerCharacter)return{suggestions:d.map((e=>({label:` ${e}`,detail:"event action",kind:n.languages.CompletionItemKind.Keyword,insertText:` ${e}`,range:C})))};const e=null==t?void 0:t[k];let o,r="";if(e&&!Array.isArray(e)?(o=e.completers,r=e.triggerCharacter):o=e,r?p.triggerCharacter===r&&o:o)return{suggestions:(null!=o?o:[]).map((e=>{const t=":"===r?` ${e.label}`:e.label;return{...e,label:t,kind:n.languages.CompletionItemKind.Value,insertText:e.insertText||t,range:C}}))}}if(((e,t)=>{var o;const r=e.getWordUntilPosition(t),a=e.findPreviousMatch("<%",t,!1,!1,null,!1),i=e.findNextMatch("%>",t,!1,!1,null,!1),s=null==a?void 0:a.range,d=null==i?void 0:i.range;if((null==s?void 0:s.startLineNumber)&&(null==d?void 0:d.startLineNumber)&&s.startLineNumber<=t.lineNumber&&d.endLineNumber>=t.lineNumber&&(null===(o=e.findMatches("<%|%>",new n.Range(s.endLineNumber,s.endColumn,d.startLineNumber,d.startColumn),!0,!1,null,!0))||void 0===o||!o.length)){const{parentKey:o}=u(e,s,s.startLineNumber),{parentKey:n}=u(e,d,d.startLineNumber),{keyList:a}=u(e,r,t.lineNumber);if(o===n&&a.includes(o)||""===o&&""===n)return!0}return!1})(c,l)&&":"!==b){const e=s.b.getInstance(o);return{suggestions:await(0,i.DW)(c,l,e.getState())}}return/^[\s|-]*\w$/.test(h)?{suggestions:r.xN.map((e=>({label:e,insertText:e,kind:n.languages.CompletionItemKind.Keyword,range:C}))).filter((e=>!M.includes(e.label)))}:{suggestions:[]}}}},4794:(e,t,o)=>{"use strict";o.d(t,{MX:()=>r,X2:()=>a,xx:()=>i});let n=null;function r(e){return n!==e&&(n=e,!0)}function a(e){var t;n===e&&(n=null),null===(t=e.getModel())||void 0===t||t.dispose(),e.dispose()}function i(e){return n===e}},5087:(e,t,o)=>{"use strict";o.d(t,{K:()=>i});var n=o(47695);let r,a;function i(){return r||(r=(async()=>{const e=(0,n.LV)((a||(a=new Worker(new URL(o.p+o.u(4539),o.b))),a));return await new e})()),r}},8182:(e,t,o)=>{"use strict";o.d(t,{I:()=>a,K:()=>n,NS:()=>r});let n=function(e){return e.COPY="COPY",e.COPY_SUCCESS="COPY_SUCCESS",e.COPY_FAILED="COPY_FAILED",e.EXPAND="EXPAND",e.COLLAPSE="COLLAPSE",e}({});const r="bricks/vs/code-editor",a={en:{COPY:"Copy",COPY_SUCCESS:"Copied!",COPY_FAILED:"Copy failed!",EXPAND:"Expand",COLLAPSE:"Collapse"},zh:{COPY:"复制",COPY_SUCCESS:"已复制!",COPY_FAILED:"复制失败!",EXPAND:"展开",COLLAPSE:"收起"}}},11968:(e,t,o)=>{"use strict";o.d(t,{b:()=>u});var n=o(70918),r=o(70829),a=o(86121),i=o(12559),s=new WeakMap,d=new WeakMap;class u{static getInstance(e){return(0,i.A)(u,this,g)._[e]||((0,i.A)(u,this,g)._[e]=new u(e)),(0,i.A)(u,this,g)._[e]}constructor(e){(0,n.A)(this,s,void 0),(0,n.A)(this,d,{}),(0,a.A)(s,this,e)}updateState(e){(0,a.A)(d,this,e)}getState(){return(0,r.A)(d,this)}}var g={_:{}}},18965:e=>{"use strict";e.exports=JSON.parse('{"inherit":false,"base":"vs","colors":{"editor.lineHighlightBackground":"#0000000A","checkbox.border":"#CECECE","editor.background":"#FFFFFF","editor.foreground":"#3B3B3B","editor.inactiveSelectionBackground":"#E5EBF1","editorIndentGuide.background1":"#D3D3D3","editorIndentGuide.activeBackground1":"#939393","editor.selectionHighlightBackground":"#ADD6FF80","editorSuggestWidget.background":"#F8F8F8","activityBarBadge.background":"#005FB8","sideBarTitle.foreground":"#3B3B3B","list.hoverBackground":"#F2F2F2","menu.border":"#CECECE","input.placeholderForeground":"#767676","searchEditor.textInputBorder":"#CECECE","settings.textInputBorder":"#CECECE","settings.numberInputBorder":"#CECECE","statusBarItem.remoteForeground":"#FFFFFF","statusBarItem.remoteBackground":"#005FB8","ports.iconRunningProcessForeground":"#369432","sideBarSectionHeader.background":"#F8F8F8","sideBarSectionHeader.border":"#E5E5E5","tab.selectedForeground":"#333333b3","tab.selectedBackground":"#ffffffa5","tab.lastPinnedBorder":"#D4D4D4","notebook.cellBorderColor":"#E5E5E5","notebook.selectedCellBackground":"#C8DDF150","statusBarItem.errorBackground":"#C72E0F","list.activeSelectionIconForeground":"#000000","list.focusAndSelectionOutline":"#005FB8","terminal.inactiveSelectionBackground":"#E5EBF1","widget.border":"#E5E5E5","actionBar.toggledBackground":"#dddddd","diffEditor.unchangedRegionBackground":"#f8f8f8","activityBar.activeBorder":"#005FB8","activityBar.background":"#F8F8F8","activityBar.border":"#E5E5E5","activityBar.foreground":"#1F1F1F","activityBar.inactiveForeground":"#616161","activityBarBadge.foreground":"#FFFFFF","badge.background":"#CCCCCC","badge.foreground":"#3B3B3B","button.background":"#005FB8","button.border":"#0000001a","button.foreground":"#FFFFFF","button.hoverBackground":"#0258A8","button.secondaryBackground":"#E5E5E5","button.secondaryForeground":"#3B3B3B","button.secondaryHoverBackground":"#CCCCCC","chat.slashCommandBackground":"#ADCEFF7A","chat.slashCommandForeground":"#26569E","chat.editedFileForeground":"#895503","checkbox.background":"#F8F8F8","descriptionForeground":"#3B3B3B","dropdown.background":"#FFFFFF","dropdown.border":"#CECECE","dropdown.foreground":"#3B3B3B","dropdown.listBackground":"#FFFFFF","editorGroup.border":"#E5E5E5","editorGroupHeader.tabsBackground":"#F8F8F8","editorGroupHeader.tabsBorder":"#E5E5E5","editorGutter.addedBackground":"#2EA043","editorGutter.deletedBackground":"#F85149","editorGutter.modifiedBackground":"#005FB8","editorLineNumber.activeForeground":"#171184","editorLineNumber.foreground":"#6E7681","editorOverviewRuler.border":"#E5E5E5","editorWidget.background":"#F8F8F8","errorForeground":"#F85149","focusBorder":"#005FB8","foreground":"#3B3B3B","icon.foreground":"#3B3B3B","input.background":"#FFFFFF","input.border":"#CECECE","input.foreground":"#3B3B3B","inputOption.activeBackground":"#BED6ED","inputOption.activeBorder":"#005FB8","inputOption.activeForeground":"#000000","keybindingLabel.foreground":"#3B3B3B","list.activeSelectionBackground":"#E8E8E8","list.activeSelectionForeground":"#000000","menu.selectionBackground":"#005FB8","menu.selectionForeground":"#ffffff","notificationCenterHeader.background":"#FFFFFF","notificationCenterHeader.foreground":"#3B3B3B","notifications.background":"#FFFFFF","notifications.border":"#E5E5E5","notifications.foreground":"#3B3B3B","panel.background":"#F8F8F8","panel.border":"#E5E5E5","panelInput.border":"#E5E5E5","panelTitle.activeBorder":"#005FB8","panelTitle.activeForeground":"#3B3B3B","panelTitle.inactiveForeground":"#3B3B3B","peekViewEditor.matchHighlightBackground":"#BB800966","peekViewResult.background":"#FFFFFF","peekViewResult.matchHighlightBackground":"#BB800966","pickerGroup.border":"#E5E5E5","pickerGroup.foreground":"#8B949E","progressBar.background":"#005FB8","quickInput.background":"#F8F8F8","quickInput.foreground":"#3B3B3B","settings.dropdownBackground":"#FFFFFF","settings.dropdownBorder":"#CECECE","settings.headerForeground":"#1F1F1F","settings.modifiedItemIndicator":"#BB800966","sideBar.background":"#F8F8F8","sideBar.border":"#E5E5E5","sideBar.foreground":"#3B3B3B","sideBarSectionHeader.foreground":"#3B3B3B","statusBar.background":"#F8F8F8","statusBar.foreground":"#3B3B3B","statusBar.border":"#E5E5E5","statusBarItem.hoverBackground":"#B8B8B850","statusBarItem.compactHoverBackground":"#CCCCCC","statusBar.debuggingBackground":"#FD716C","statusBar.debuggingForeground":"#000000","statusBar.focusBorder":"#005FB8","statusBar.noFolderBackground":"#F8F8F8","statusBarItem.focusBorder":"#005FB8","statusBarItem.prominentBackground":"#6E768166","tab.activeBackground":"#FFFFFF","tab.activeBorder":"#F8F8F8","tab.activeBorderTop":"#005FB8","tab.activeForeground":"#3B3B3B","tab.selectedBorderTop":"#68a3da","tab.border":"#E5E5E5","tab.hoverBackground":"#FFFFFF","tab.inactiveBackground":"#F8F8F8","tab.inactiveForeground":"#868686","tab.unfocusedActiveBorder":"#F8F8F8","tab.unfocusedActiveBorderTop":"#E5E5E5","tab.unfocusedHoverBackground":"#F8F8F8","terminalCursor.foreground":"#005FB8","terminal.foreground":"#3B3B3B","terminal.tab.activeBorder":"#005FB8","textBlockQuote.background":"#F8F8F8","textBlockQuote.border":"#E5E5E5","textCodeBlock.background":"#F8F8F8","textLink.activeForeground":"#005FB8","textLink.foreground":"#005FB8","textPreformat.foreground":"#3B3B3B","textPreformat.background":"#0000001F","textSeparator.foreground":"#21262D","titleBar.activeBackground":"#F8F8F8","titleBar.activeForeground":"#1E1E1E","titleBar.border":"#E5E5E5","titleBar.inactiveBackground":"#F8F8F8","titleBar.inactiveForeground":"#8B949E","welcomePage.tileBackground":"#F3F3F3"},"rules":[{"foreground":"#008000","token":"punctuation.definition.comment"},{"foreground":"#a31515","token":"punctuation.definition.string"},{"foreground":"#000000ff","token":"meta.embedded"},{"foreground":"#000000ff","token":"source.groovy.embedded"},{"foreground":"#000000ff","token":"string meta.image.inline.markdown"},{"foreground":"#000000ff","token":"variable.legacy.builtin.python"},{"fontStyle":"italic","token":"emphasis"},{"fontStyle":"bold","token":"strong"},{"foreground":"#000080","token":"meta.diff.header"},{"foreground":"#008000","token":"comment"},{"foreground":"#0000ff","token":"constant.language"},{"foreground":"#098658","token":"constant.numeric"},{"foreground":"#098658","token":"variable.other.enummember"},{"foreground":"#098658","token":"keyword.operator.plus.exponent"},{"foreground":"#098658","token":"keyword.operator.minus.exponent"},{"foreground":"#811f3f","token":"constant.regexp"},{"foreground":"#800000","token":"entity.name.tag"},{"foreground":"#800000","token":"entity.name.selector"},{"foreground":"#e50000","token":"entity.other.attribute-name"},{"foreground":"#800000","token":"entity.other.attribute-name.class.css"},{"foreground":"#800000","token":"source.css entity.other.attribute-name.class"},{"foreground":"#800000","token":"entity.other.attribute-name.id.css"},{"foreground":"#800000","token":"entity.other.attribute-name.parent-selector.css"},{"foreground":"#800000","token":"entity.other.attribute-name.parent.less"},{"foreground":"#800000","token":"source.css entity.other.attribute-name.pseudo-class"},{"foreground":"#800000","token":"entity.other.attribute-name.pseudo-element.css"},{"foreground":"#800000","token":"source.css.less entity.other.attribute-name.id"},{"foreground":"#800000","token":"entity.other.attribute-name.scss"},{"foreground":"#cd3131","token":"invalid"},{"fontStyle":"underline","token":"markup.underline"},{"fontStyle":"bold","foreground":"#000080","token":"markup.bold"},{"fontStyle":"bold","foreground":"#800000","token":"markup.heading"},{"fontStyle":"italic","token":"markup.italic"},{"fontStyle":"strikethrough","token":"markup.strikethrough"},{"foreground":"#098658","token":"markup.inserted"},{"foreground":"#a31515","token":"markup.deleted"},{"foreground":"#0451a5","token":"markup.changed"},{"foreground":"#0451a5","token":"punctuation.definition.quote.begin.markdown"},{"foreground":"#0451a5","token":"punctuation.definition.list.begin.markdown"},{"foreground":"#800000","token":"markup.inline.raw"},{"foreground":"#800000","token":"punctuation.definition.tag"},{"foreground":"#0000ff","token":"meta.preprocessor"},{"foreground":"#0000ff","token":"entity.name.function.preprocessor"},{"foreground":"#a31515","token":"meta.preprocessor.string"},{"foreground":"#098658","token":"meta.preprocessor.numeric"},{"foreground":"#0451a5","token":"meta.structure.dictionary.key.python"},{"foreground":"#0000ff","token":"storage"},{"foreground":"#0000ff","token":"storage.type"},{"foreground":"#0000ff","token":"storage.modifier"},{"foreground":"#0000ff","token":"keyword.operator.noexcept"},{"foreground":"#a31515","token":"string"},{"foreground":"#a31515","token":"meta.embedded.assembly"},{"foreground":"#0000ff","token":"string.comment.buffered.block.pug"},{"foreground":"#0000ff","token":"string.quoted.pug"},{"foreground":"#0000ff","token":"string.interpolated.pug"},{"foreground":"#0000ff","token":"string.unquoted.plain.in.yaml"},{"foreground":"#0000ff","token":"string.unquoted.plain.out.yaml"},{"foreground":"#0000ff","token":"string.unquoted.block.yaml"},{"foreground":"#0000ff","token":"string.quoted.single.yaml"},{"foreground":"#0000ff","token":"string.quoted.double.xml"},{"foreground":"#0000ff","token":"string.quoted.single.xml"},{"foreground":"#0000ff","token":"string.unquoted.cdata.xml"},{"foreground":"#0000ff","token":"string.quoted.double.html"},{"foreground":"#0000ff","token":"string.quoted.single.html"},{"foreground":"#0000ff","token":"string.unquoted.html"},{"foreground":"#0000ff","token":"string.quoted.single.handlebars"},{"foreground":"#0000ff","token":"string.quoted.double.handlebars"},{"foreground":"#811f3f","token":"string.regexp"},{"foreground":"#0000ff","token":"punctuation.definition.template-expression.begin"},{"foreground":"#0000ff","token":"punctuation.definition.template-expression.end"},{"foreground":"#0000ff","token":"punctuation.section.embedded"},{"foreground":"#000000","token":"meta.template.expression"},{"foreground":"#0451a5","token":"support.constant.property-value"},{"foreground":"#0451a5","token":"support.constant.font-name"},{"foreground":"#0451a5","token":"support.constant.media-type"},{"foreground":"#0451a5","token":"support.constant.media"},{"foreground":"#0451a5","token":"constant.other.color.rgb-value"},{"foreground":"#0451a5","token":"constant.other.rgb-value"},{"foreground":"#0451a5","token":"support.constant.color"},{"foreground":"#e50000","token":"support.type.vendored.property-name"},{"foreground":"#e50000","token":"support.type.property-name"},{"foreground":"#e50000","token":"source.css variable"},{"foreground":"#e50000","token":"source.coffee.embedded"},{"foreground":"#0451a5","token":"support.type.property-name.json"},{"foreground":"#0000ff","token":"keyword"},{"foreground":"#0000ff","token":"keyword.control"},{"foreground":"#000000","token":"keyword.operator"},{"foreground":"#0000ff","token":"keyword.operator.new"},{"foreground":"#0000ff","token":"keyword.operator.expression"},{"foreground":"#0000ff","token":"keyword.operator.cast"},{"foreground":"#0000ff","token":"keyword.operator.sizeof"},{"foreground":"#0000ff","token":"keyword.operator.alignof"},{"foreground":"#0000ff","token":"keyword.operator.typeid"},{"foreground":"#0000ff","token":"keyword.operator.alignas"},{"foreground":"#0000ff","token":"keyword.operator.instanceof"},{"foreground":"#0000ff","token":"keyword.operator.logical.python"},{"foreground":"#0000ff","token":"keyword.operator.wordlike"},{"foreground":"#098658","token":"keyword.other.unit"},{"foreground":"#800000","token":"punctuation.section.embedded.begin.php"},{"foreground":"#800000","token":"punctuation.section.embedded.end.php"},{"foreground":"#0451a5","token":"support.function.git-rebase"},{"foreground":"#098658","token":"constant.sha.git-rebase"},{"foreground":"#000000","token":"storage.modifier.import.java"},{"foreground":"#000000","token":"variable.language.wildcard.java"},{"foreground":"#000000","token":"storage.modifier.package.java"},{"foreground":"#0000ff","token":"variable.language"},{"foreground":"#795E26","token":"entity.name.function"},{"foreground":"#795E26","token":"support.function"},{"foreground":"#795E26","token":"support.constant.handlebars"},{"foreground":"#795E26","token":"source.powershell variable.other.member"},{"foreground":"#795E26","token":"entity.name.operator.custom-literal"},{"foreground":"#267f99","token":"support.class"},{"foreground":"#267f99","token":"support.type"},{"foreground":"#267f99","token":"entity.name.type"},{"foreground":"#267f99","token":"entity.name.namespace"},{"foreground":"#267f99","token":"entity.other.attribute"},{"foreground":"#267f99","token":"entity.name.scope-resolution"},{"foreground":"#267f99","token":"entity.name.class"},{"foreground":"#267f99","token":"storage.type.numeric.go"},{"foreground":"#267f99","token":"storage.type.byte.go"},{"foreground":"#267f99","token":"storage.type.boolean.go"},{"foreground":"#267f99","token":"storage.type.string.go"},{"foreground":"#267f99","token":"storage.type.uintptr.go"},{"foreground":"#267f99","token":"storage.type.error.go"},{"foreground":"#267f99","token":"storage.type.rune.go"},{"foreground":"#267f99","token":"storage.type.cs"},{"foreground":"#267f99","token":"storage.type.generic.cs"},{"foreground":"#267f99","token":"storage.type.modifier.cs"},{"foreground":"#267f99","token":"storage.type.variable.cs"},{"foreground":"#267f99","token":"storage.type.annotation.java"},{"foreground":"#267f99","token":"storage.type.generic.java"},{"foreground":"#267f99","token":"storage.type.java"},{"foreground":"#267f99","token":"storage.type.object.array.java"},{"foreground":"#267f99","token":"storage.type.primitive.array.java"},{"foreground":"#267f99","token":"storage.type.primitive.java"},{"foreground":"#267f99","token":"storage.type.token.java"},{"foreground":"#267f99","token":"storage.type.groovy"},{"foreground":"#267f99","token":"storage.type.annotation.groovy"},{"foreground":"#267f99","token":"storage.type.parameters.groovy"},{"foreground":"#267f99","token":"storage.type.generic.groovy"},{"foreground":"#267f99","token":"storage.type.object.array.groovy"},{"foreground":"#267f99","token":"storage.type.primitive.array.groovy"},{"foreground":"#267f99","token":"storage.type.primitive.groovy"},{"foreground":"#267f99","token":"meta.type.cast.expr"},{"foreground":"#267f99","token":"meta.type.new.expr"},{"foreground":"#267f99","token":"support.constant.math"},{"foreground":"#267f99","token":"support.constant.dom"},{"foreground":"#267f99","token":"support.constant.json"},{"foreground":"#267f99","token":"entity.other.inherited-class"},{"foreground":"#267f99","token":"punctuation.separator.namespace.ruby"},{"foreground":"#AF00DB","token":"keyword.control"},{"foreground":"#AF00DB","token":"source.cpp keyword.operator.new"},{"foreground":"#AF00DB","token":"source.cpp keyword.operator.delete"},{"foreground":"#AF00DB","token":"keyword.other.using"},{"foreground":"#AF00DB","token":"keyword.other.directive.using"},{"foreground":"#AF00DB","token":"keyword.other.operator"},{"foreground":"#AF00DB","token":"entity.name.operator"},{"foreground":"#001080","token":"variable"},{"foreground":"#001080","token":"meta.definition.variable.name"},{"foreground":"#001080","token":"support.variable"},{"foreground":"#001080","token":"entity.name.variable"},{"foreground":"#001080","token":"constant.other.placeholder"},{"foreground":"#0070C1","token":"variable.other.constant"},{"foreground":"#0070C1","token":"variable.other.enummember"},{"foreground":"#001080","token":"meta.object-literal.key"},{"foreground":"#0451a5","token":"support.constant.property-value"},{"foreground":"#0451a5","token":"support.constant.font-name"},{"foreground":"#0451a5","token":"support.constant.media-type"},{"foreground":"#0451a5","token":"support.constant.media"},{"foreground":"#0451a5","token":"constant.other.color.rgb-value"},{"foreground":"#0451a5","token":"constant.other.rgb-value"},{"foreground":"#0451a5","token":"support.constant.color"},{"foreground":"#d16969","token":"punctuation.definition.group.regexp"},{"foreground":"#d16969","token":"punctuation.definition.group.assertion.regexp"},{"foreground":"#d16969","token":"punctuation.definition.character-class.regexp"},{"foreground":"#d16969","token":"punctuation.character.set.begin.regexp"},{"foreground":"#d16969","token":"punctuation.character.set.end.regexp"},{"foreground":"#d16969","token":"keyword.operator.negation.regexp"},{"foreground":"#d16969","token":"support.other.parenthesis.regexp"},{"foreground":"#811f3f","token":"constant.character.character-class.regexp"},{"foreground":"#811f3f","token":"constant.other.character-class.set.regexp"},{"foreground":"#811f3f","token":"constant.other.character-class.regexp"},{"foreground":"#811f3f","token":"constant.character.set.regexp"},{"foreground":"#000000","token":"keyword.operator.quantifier.regexp"},{"foreground":"#EE0000","token":"keyword.operator.or.regexp"},{"foreground":"#EE0000","token":"keyword.control.anchor.regexp"},{"foreground":"#0000ff","token":"constant.character"},{"foreground":"#0000ff","token":"constant.other.option"},{"foreground":"#EE0000","token":"constant.character.escape"},{"foreground":"#000000","token":"entity.name.label"}],"encodedTokensColors":[]}')},24102:(e,t,o)=>{"use strict";o.d(t,{AR:()=>a,DW:()=>i,Eh:()=>s});var n=o(62001),r=o(40739);function a(e){return n.Uri.parse(e.toString()+".ts")}async function i(e,t,o){var r,i;const s=await n.languages.typescript.getJavaScriptWorker(),d=await s(e.uri),u=n.editor.getModel(a(e.uri)),g=e.getOffsetAt(t)-(null!==(r=null==o?void 0:o.offset)&&void 0!==r?r:0),c=await d.getCompletionsAtPosition(u.uri.toString(),g),l=e.getWordUntilPosition(t),p=new n.Range(t.lineNumber,l.startColumn,t.lineNumber,l.endColumn);return(null!==(i=null==c?void 0:c.entries)&&void 0!==i?i:[]).map((o=>{let r=p;if(o.replacementSpan){const t=e.getPositionAt(o.replacementSpan.start),a=e.getPositionAt(o.replacementSpan.start+o.replacementSpan.length);r=new n.Range(t.lineNumber,t.column,a.lineNumber,a.column)}return{uri:u.uri,position:t,offset:g,range:r,label:o.name,insertText:o.name,sortText:o.sortText,kind:n.languages.CompletionItemKind.Property}}))}function s(){return["\ndeclare namespace APP {\n const name: string;\n const id: string;\n const homepage: string;\n const currentVersion: string;\n const config: object;\n const localeName: string;\n const localeTitle: string;\n}\n",r.X2].join("\n")}},29844:(e,t,o)=>{"use strict";self.MonacoEnvironment={getWorker:function(e,t){switch(t){case"json":return new Worker(new URL(o.p+o.u(7247),o.b));case"css":case"scss":case"less":return new Worker(new URL(o.p+o.u(7716),o.b));case"html":case"handlebars":case"razor":return new Worker(new URL(o.p+o.u(8204),o.b));case"typescript":case"javascript":return new Worker(new URL(o.p+o.u(4044),o.b));default:return new Worker(new URL(o.p+o.u(548),o.b))}}}},30426:(e,t,o)=>{"use strict";o.d(t,{N:()=>N});var n,r=o(74635),a=o(70918),i=o(5536),s=o(99492),d=o(86121),u=o(70829),g=o(62740),c=o(7921),l=o(11280);let p,f,m,k,b,h,C,y,M;const{method:B,property:w}=(0,c.createDecorators)();var A=new WeakMap,F=new WeakSet,v=new WeakMap,x=new WeakMap,E=new WeakMap,D=new WeakMap,I=new WeakMap,j=new WeakMap;class N extends l.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,F),(0,a.A)(this,A,(p(this),!1)),(0,a.A)(this,v,"normal"),(0,a.A)(this,x,!1),(0,a.A)(this,E,f(this)),(0,a.A)(this,D,(m(this),k(this))),(0,a.A)(this,I,(b(this),h(this))),(0,a.A)(this,j,(C(this),y(this))),M(this)}get isFormItemElement(){return!0}set validateState(e){(0,s.A)(F,z,this,e),this._render()}get validateState(){return(0,i.A)(F,this,T)}set notRender(e){this.hidden=e,(0,s.A)(F,S,this,e),this._render()}get notRender(){return(0,i.A)(F,this,L)}get $bindFormItem(){return(0,i.A)(F,this,O)}set $bindFormItem(e){(0,s.A)(F,P,this,e),this._render()}get helpBrick(){return(0,u.A)(E,this)}set helpBrick(e){(0,d.A)(E,this,e)}get labelBrick(){return(0,u.A)(D,this)}set labelBrick(e){(0,d.A)(D,this,e)}get labelCol(){return(0,u.A)(I,this)}set labelCol(e){(0,d.A)(I,this,e)}get wrapperCol(){return(0,u.A)(j,this)}set wrapperCol(e){(0,d.A)(j,this,e)}setNotRender(e){this.notRender=e}getFormElement(){let e=this;for(;(e=e.parentNode)&&e&&!e.isFormElement;);return e}}function L(e){return(0,u.A)(A,e)}function S(e,t){(0,d.A)(A,e,t)}function T(e){return(0,u.A)(v,e)}function z(e,t){(0,d.A)(v,e,t)}function O(e){return(0,u.A)(x,e)}function P(e,t){(0,d.A)(x,e,t)}n=N,[f,m,k,b,h,C,y,M,p]=(0,g.A)(n,[],[[w({attribute:!1}),1,"helpBrick"],[w({attribute:!1}),1,"labelBrick"],[w({attribute:!1}),1,"labelCol"],[w({attribute:!1}),1,"wrapperCol"],[B(),2,"setNotRender"],[B(),2,"getFormElement"]],0,void 0,l.ReactNextElement).e},37584:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMD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xNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjNDI0MjQyIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="},40739:(e,t,o)=>{"use strict";o.d(t,{X2:()=>r,xN:()=>n});const n=["target","targetRef","properties","events","method","callback","success","error","action","useProvider","useChildren","useBrick","args","if","then"],r='\n declare const DATA: any;\n declare const EVENT: CustomEvent<any>;\n declare const FLAGS: Record<string, boolean>;\n declare const ANCHOR: string | null;\n declare const HASH: string;\n declare namespace INSTALLED_APPS {\n function has(appId: string):boolean\n }\n declare const ITEM: any;\n declare const INDEX: number;\n declare const SIZE: number;\n declare namespace LOCAL_STORAGE {\n function getItem(name: string): string;\n }\n declare namespace SESSION_STORAGE {\n function getItem(name: string): string\n }\n declare const MEDIA: {\n breakpoint?: "xLarge" | "large" | "medium" | "small" | "xSmall";\n };\n declare const MISC: Record<string, any>;\n declare const PARAMS: URLSearchParams;\n declare const PROCESSORS: Record<string, Record<string, Function>>;\n declare const QUERY_ARRAY: Record<string, string[]>;\n declare const TPL: Record<string, any>;\n declare const PIPES: Record<string, Function>;\n declare const _: Record<string, any>;\n declare namespace SYS {\n const username:string;\n const userInstanceId:string;\n const org:number;\n const isAdmin: boolean;\n const accessRule:string;\n const csrfToken:string;\n const accessToken:string;\n const userShowValue:string[];\n }\n declare const BASE_URL: string;\n declare namespace IMG {\n function get(src: string): string;\n }\n declare function I18N(key: string, options?: string | Record<string, unknown>): string;\n declare function I18N_TEXT(data: {[language: string]: string}):string;\n declare namespace PERMISSIONS {\n function check(...action: string[]):boolean;\n }\n declare namespace THEME {\n function getTheme(): "light" | "dark" | "dark-v2";\n }\n'},43271:(e,t,o)=>{"use strict";o.d(t,{A:()=>s});var n=o(36758),r=o.n(n),a=o(40935),i=o.n(a)()(r());i.push([e.id,".highlight{box-shadow:rgb(74 170 189) 0px 1px 0px 0px}.pointer{cursor:pointer}.monaco-editor{outline-width:0}.monaco-editor .overflow-guard{border-radius:var(--antd-button-border-radius);border:1px solid var(--color-border-divider-line)}.code-editor-wrapper.error .overflow-guard{border-color:var(--antd-error-color)}.code-editor-wrapper{position:relative}.code-editor-wrapper.expanded{position:fixed;z-index:1000;top:0;left:0;right:0;bottom:0;padding:20px;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.toolbar-wrapper{position:absolute;z-index:4;top:0;bottom:0;right:0;pointer-events:none;padding:15px 20px}.toolbar{pointer-events:auto;display:none;line-height:12px;font-size:12px;text-align:center;gap:10px;box-shadow:none;transition:none;border-radius:50%;border:none}.code-editor-wrapper:not(.expanded) .toolbar.sticky{position:sticky;top:15px}.code-editor-wrapper.expanded .toolbar-wrapper{right:40px;top:40px}.code-editor-wrapper:hover .toolbar{display:flex}.copy-icon,\n.expand-icon{opacity:0.5;cursor:pointer;font-size:16px}.copy-icon:hover,\n.expand-icon:hover{opacity:1}.monaco-editor.monaco-editor-v3 .find-widget > .find-part,\n.monaco-editor.monaco-editor-v3 .find-widget > .replace-part{margin-right:25px}.monaco-editor.monaco-editor-v3 .find-widget .button:not(.toggle){box-sizing:content-box}.monaco-editor.monaco-editor-v3 .sticky-line-number{text-align:initial;float:initial}",""]);const s=i},44804:(e,t,o)=>{"use strict";let n;function r(e){n=e}function a(){return n}o.d(t,{B:()=>a,J:()=>r})},46587:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII="},46984:(e,t,o)=>{"use strict";o.d(t,{ZY:()=>l,MY:()=>p,ix:()=>c});var n=o(62001),r=o(37732),a=o(90896),i=o(44804);function s(e,t){const o=d(e,"<%",t);if(!o)return!1;const n=u(e,"%>",t);if(!n)return!1;const r=d(e,"%>",t);if(r&&o.range.getEndPosition().isBefore(r.range.getStartPosition()))return!1;const a=u(e,"<%",t);return!a||!a.range.getStartPosition().isBefore(n.range.getEndPosition())}function d(e,t,o){const n=e.findPreviousMatch(t,o,!1,!1,null,!1);return n&&o.isBefore(n.range.getStartPosition())?null:n}function u(e,t,o){const n=e.findNextMatch(t,o,!1,!1,null,!1);return n&&n.range.getEndPosition().isBefore(o)?null:n}const g={request:["uri","query","header","body"]};function c(e,t,o){if("<"!==o.triggerCharacter||s(e,t))return{suggestions:[]};const r=e.getValueInRange({startLineNumber:t.lineNumber,startColumn:t.column-2,endLineNumber:t.lineNumber,endColumn:t.column+1});if(!/^(['"]?)<\1$/.test(r.trim()))return{suggestions:[]};const a=e.getWordUntilPosition(t),i={startLineNumber:t.lineNumber,startColumn:a.startColumn,endLineNumber:t.lineNumber,endColumn:a.endColumn};return{suggestions:[{label:"<% %>",detail:"CEL body",kind:n.languages.CompletionItemKind.Value,insertText:"% ${0} %>",insertTextRules:n.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:i}]}}function l(e){return{triggerCharacters:["."],provideCompletionItems(t,o,i){if("cel"!==e&&!s(t,o))return{suggestions:[]};const d=t.getWordUntilPosition(o),u={startLineNumber:o.lineNumber,startColumn:d.startColumn,endLineNumber:o.lineNumber,endColumn:d.endColumn},c=t.getWordUntilPosition(new n.Position(o.lineNumber,d.startColumn-1));if("."===i.triggerCharacter||"."===t.getValueInRange({startLineNumber:o.lineNumber,startColumn:c.endColumn,endLineNumber:o.lineNumber,endColumn:d.startColumn}).trim()){const e=c.word&&(0,r.hasOwnProperty)(g,c.word)?g[c.word]:void 0;return e?{suggestions:e.map((e=>({label:e,insertText:e,kind:n.languages.CompletionItemKind.Method,range:u})))}:a.AA.includes(c.word)?{suggestions:[]}:{suggestions:a.D$.map((e=>({label:e,insertText:e,kind:n.languages.CompletionItemKind.Method,range:u})))}}return{suggestions:a.AA.map((e=>({label:e,insertText:e,kind:n.languages.CompletionItemKind.Keyword,range:u})))}}}}function p(e,t,o){return{triggerCharacters:["."],provideCompletionItems(a,d,u){if(t!==(0,i.B)()||"cel"!==e&&!s(a,d))return{suggestions:[]};const g=a.getWordUntilPosition(d),c=a.getWordUntilPosition(new n.Position(d.lineNumber,g.startColumn-1));if("."!==u.triggerCharacter&&"."!==a.getValueInRange({startLineNumber:d.lineNumber,startColumn:c.endColumn,endLineNumber:d.lineNumber,endColumn:g.startColumn}).trim())return{suggestions:[]};let l;if(c.word)for(const e of o)"members"===e.type&&(0,r.hasOwnProperty)(e.members,c.word)&&(l=e.members[c.word]);if(!l)return{suggestions:[]};const p={startLineNumber:d.lineNumber,endLineNumber:d.lineNumber,startColumn:g.startColumn,endColumn:g.endColumn};return{suggestions:l.map((e=>({label:e,insertText:e,kind:n.languages.CompletionItemKind.Method,range:p})))}}}}},47726:(e,t,o)=>{"use strict";o.d(t,{$:()=>C,F:()=>c});var n=o(70918),r=o(70829),a=o(86121),i=o(62001);const s={brick_next_yaml:'你是一个编程助手,主要用于 Visual Builder 中的 YAML 配置的代码补全。\n\nYAML 中可以使用 `<% %>` 嵌入 JS 表达式,例如:\n\n```yamlyaml\ngroups: <% _.groupBy(CTX.hosts, "idc") %>\n```\n\nJS 表达式中可以使用 lodash (`_`) 和 moment。\n\n提供简洁易读的代码补全,语法和逻辑准确,与现有上下文无缝集成,格式优雅。如果要添加注释,不要放在行尾部,应该单独成行。',javascript:d("JavaScript"),typescript:d("TypeScript")};function d(e){return`你是一个编程助手,主要用于 Visual Builder 中的 ${e} 函数的代码补全。\n\n提供简洁易读的代码补全,语法和逻辑准确,与现有上下文无缝集成,格式优雅。如果要添加注释,不要放在行尾部,应该单独成行。`}var u=o(29755);function g(e){let t="",o="";return{trimmed:e.replace(/^\s+/,(e=>(t=e,""))).replace(/\s+$/,(e=>(o=e,""))),leading:t,trailing:o}}const c=Object.freeze(["typescript","javascript","brick_next_yaml"]);var l=new WeakMap,p=new WeakMap,f=new WeakMap,m=new WeakMap,k=new WeakMap,b=new WeakMap,h=new WeakMap;class C{constructor(e){var t,o,r;(0,n.A)(this,l,null),(0,n.A)(this,p,null),(0,n.A)(this,f,void 0),(0,n.A)(this,m,void 0),(0,n.A)(this,k,void 0),(0,n.A)(this,b,void 0),(0,n.A)(this,h,void 0),(0,a.A)(f,this,null!==(t=e.debounce)&&void 0!==t?t:750),(0,a.A)(k,this,e.HttpAbortError),(0,a.A)(b,this,e.request),(0,a.A)(h,this,null!==(o=e.model)&&void 0!==o?o:"qwen-coder-turbo"),(0,a.A)(m,this,null!==(r=e.timeout)&&void 0!==r?r:12e3)}async provideInlineCompletions(e,t,o,n){const d=new AbortController;var c;return n.onCancellationRequested((()=>{d.abort()})),(0,r.A)(l,this)&&(clearTimeout((0,r.A)(l,this)),null===(c=(0,r.A)(p,this))||void 0===c||c.call(this,null),(0,a.A)(l,this,null),(0,a.A)(p,this,null)),new Promise((o=>{(0,a.A)(p,this,o),(0,a.A)(l,this,setTimeout((async()=>{(0,a.A)(l,this,null),(0,a.A)(p,this,null),n.isCancellationRequested&&o(null);const c=e.getLanguageId(),f=e.getValue(),C=e.getLineContent(t.lineNumber);if(0===f.trim().length||t.column===e.getLineLength(t.lineNumber)+1&&("brick_next_yaml"===c?/\s+%>\s*$/.test(C):/[;,}\]]\s*$/.test(C)))return void o(null);const y=setTimeout((()=>{d.abort()}),(0,r.A)(m,this));try{const n=await async function(e){let{request:t,model:o,source:n,language:r,offset:a,signal:i}=e;const d=n.slice(0,a),c=n.slice(a),l="brick_next_yaml"===r?"# File: config.yaml\n":`// File utils.${"javascript"===r?"js":"ts"}\n`,p=await t({model:o,system:s[r],prompt:`<|fim_prefix|>${l}${d}<|fim_suffix|>${c}<|fim_middle|>`,temperature:.2,signal:i}),f=null==p?void 0:p.match(/(?:^|\n)```(?:\w*)\n([\s\S]*?)(?:\n```(?:\n|$)|$)/);if(!f)return console.error("No code block found in response.",p),null;const m=function(e,t,o){const n=e.replace(/^\n+|\n+$/g,""),r=t.replace(/^\n+/g,""),a=o.replace(/\n+$/g,""),i=n.split("\n"),s=r.split("\n"),d=a.split("\n"),c=s.length,l=Math.max(0,s.length-i.length),p=`${l>0?s.slice(l).join("\n"):r}${d.length>i.length?d.slice(0,i.length).join("\n"):a}`,f=(0,u.Pp)(p,n,{ignoreWhitespace:!0});let m=l,k=!1,b="unchanged";for(let e=0;e<f.length;e++){const t=f[e];b=t.removed?"removed":t.added?"added":"unchanged";const o=f[e+1],n=null!=o&&o.removed?"removed":null!=o&&o.added?"added":"unchanged";if("added"!==b?m+=t.count:0===e&&1===f.length&&m++,!k&&(k=m>=c,k)){const e=m-c;if("unchanged"===b&&0===e&&"added"===n||"added"===b&&0===e||"removed"===b&&"added"===n){const e="added"===b?t:o,n=`${"unchanged"===b?`${t.value.replace(/\n$/,"").split("\n").pop()}\n`:""}${e.value.replace(/\n$/,"")}`.split("\n"),r=n[n.length-1],a=s[c-1],i=d[0],{trimmed:u,trailing:l}=g(r),{trimmed:p,leading:f,trailing:m}=g(a),{trimmed:k,leading:h}=g(i);for(let e=0;e<n.length;e++){const t=n[e],{trimmed:o,leading:r}=g(t);if(o.startsWith(p)&&u.endsWith(k)){const t=n.slice(e).join("\n"),a=r.length+p.length,i=t.length-(l.length+k.length),s=t.slice(a,i),{leading:d,trailing:u}=g(s),c=s.slice(Math.min(d.length,m.length),s.length-Math.min(u.length,h.length));if(f.length>r.length&&o.length>0&&p.length>0&&f.startsWith(r)){const e=f.slice(r.length);return c.split("\n").map(((t,o)=>0===o?t:`${e}${t}`)).join("\n")}return c}}}break}}if(f.filter((e=>!(e.added||e.removed))).reduce(((e,t)=>e+t.count),0)/p.split("\n").length<.2){var h,C;const e=n.trimStart(),t=null!==(h=null===(C=s[s.length-1].match(/^\s+/))||void 0===C?void 0:C[0])&&void 0!==h?h:"";return t?e.split("\n").map(((e,o)=>0===o?e:`${t}${e}`)).join("\n"):e}return null}(f[1].startsWith(l)?f[1].slice(l.length):f[1],d,c);return m&&/\S/.test(m)?m:(console.warn("Response is invalid:",p),null)}({request:(0,r.A)(b,this),model:(0,r.A)(h,this),source:f,offset:e.getOffsetAt(t),language:c,signal:d.signal});if(!n)return null;o({enableForwardStability:!0,items:[{insertText:n,range:new i.Range(t.lineNumber,t.column,t.lineNumber,t.column)}]})}catch(e){e instanceof(0,r.A)(k,this)||console.error("Error fetching inline completion:",e),o(null)}finally{clearTimeout(y)}}),(0,r.A)(f,this)))}))}freeInlineCompletions(){}}},55262:(e,t,o)=>{"use strict";o.d(t,{$:()=>a});var n=o(62001);let r;function a(e,t){for(const e of null!=r?r:[])e.dispose();r=null==e?void 0:e.map((e=>{const o=n.Uri.file(`libs/${e.filePath}`).toString();return n.languages.typescript[t.languageDefaults].addExtraLib(e.content,o)}))}},62066:(e,t,o)=>{"use strict";o.d(t,{kz:()=>a});const n={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:o(62001).languages.IndentAction.Indent}}]},r={tokenPostfix:".yaml.cel",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","NULL","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["tag","white","operators","white"]],{include:"@flowScalars"},{include:"@flowExpression"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"tag"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +)(<%(?:\s|$))/,["string",{token:"@rematch",next:"@multiExpression.$1"}]],[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *)(.+)$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,"string","@singleQuotedString"],[/"/,"string","@doubleQuotedString"]],singleQuotedString:[{include:"@expressionStart"},[/(%>)(\s*)(')/,[{token:"delimiter",bracket:"@close"},"white",{token:"string",next:"@pop"}]],[/[^']*'/,"string","@pop"]],doubleQuotedString:[{include:"@expressionStart"},[/(%>)(\s*)(")/,[{token:"delimiter",bracket:"@close"},"white",{token:"string",next:"@pop"}]],[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]],flowExpression:[{include:"@expressionStart"},[/(\s+)(%>)(\s*)/,["white",{token:"delimiter",bracket:"@close"},{token:"white",next:"@pop"}]]],expressionStart:[[/(\s*)(<%)(\s+)/,["white",{token:"delimiter",bracket:"@open"},{token:"white",next:"@expressionEmbedded",nextEmbedded:"text/cel"}]]],multiExpression:[[/(<%)/,{token:"delimiter",next:"@expressionEmbedded",nextEmbedded:"text/cel",bracket:"@open"}],[/(%>)(\s*)/,[{token:"delimiter",bracket:"@close"},{token:"white",next:"@pop"}]],[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],expressionEmbedded:[[/%>/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]]}};function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"cel_yaml";e.languages.register({id:t,extensions:[".cel-yaml"],mimetypes:["text/cel-yaml"]}),e.languages.setLanguageConfiguration(t,n),e.languages.setMonarchTokensProvider(t,r)}},71836:(e,t,o)=>{"use strict";o.d(t,{j:()=>a});var n=o(24586),r=o(62001);class a{constructor(e,t,o){(0,n.A)(this,"domNode",void 0),(0,n.A)(this,"placeholder",void 0),(0,n.A)(this,"editor",void 0),(0,n.A)(this,"color",void 0),this.placeholder=e,this.editor=t,this.color=o,this.editor.onDidChangeModelContent((()=>this.onDidChangeModelContent())),this.onDidChangeModelContent()}onDidChangeModelContent(){var e,t,o,n;""===(null===(e=this.editor)||void 0===e||null===(t=e.getValue)||void 0===t?void 0:t.call(e))?this.editor.addContentWidget(this):null===(o=this.editor)||void 0===o||null===(n=o.removeContentWidget)||void 0===n||n.call(o,this)}getId(){return a.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.style.pointerEvents="none",this.domNode.textContent=this.placeholder,this.domNode.style.whiteSpace="break-spaces",this.domNode.style.fontStyle="italic",this.domNode.style.color=this.color,this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[r.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){var e,t;null===(e=this.editor)||void 0===e||null===(t=e.removeContentWidget)||void 0===t||t.call(e,this)}}(0,n.A)(a,"ID","editor.widget.placeholderHint")},73569:(e,t,o)=>{"use strict";var n=o(72591),r=o.n(n),a=o(1740),i=o.n(a),s=o(88128),d=o.n(s),u=o(30855),g=o.n(u),c=o(93051),l=o.n(c),p=o(73656),f=o.n(p),m=o(43271),k={};k.styleTagTransform=f(),k.setAttributes=g(),k.insert=d().bind(null,"head"),k.domAPI=i(),k.insertStyleElement=l(),r()(m.A,k),m.A&&m.A.locals&&m.A.locals},81076:(e,t,o)=>{var n={"./JSON.tmLanguage.json":[33887,3887],"./JavaScript.tmLanguage.json":[43272,3272],"./JavaScriptReact.tmLanguage.json":[28267,8267],"./MagicPython.tmLanguage.json":[42370,2370],"./TypeScript.tmLanguage.json":[66272,6272],"./TypeScriptReact.tmLanguage.json":[96595,6595],"./brick-next/builtin-entity.json":[22385,2385],"./brick-next/injection-quoted-double.json":[13354,3354],"./brick-next/injection-quoted-single.json":[51427,1427],"./brick-next/injection-unquoted.json":[49519,9519],"./css.tmLanguage.json":[53872,3872],"./go.tmLanguage.json":[62859,2859],"./html-derivative.tmLanguage.json":[71442,1442],"./html.tmLanguage.json":[96206,6206],"./java.tmLanguage.json":[26485,6485],"./markdown.tmLanguage.json":[45014,5014],"./powershell.tmLanguage.json":[58350,8350],"./shell-unix-bash.tmLanguage.json":[73926,1545],"./xml.tmLanguage.json":[29041,1422],"./yaml-1.0.tmLanguage.json":[77384,7384],"./yaml-1.1.tmLanguage.json":[42953,2953],"./yaml-1.2.tmLanguage.json":[60658,658],"./yaml-1.3.tmLanguage.json":[91867,1867],"./yaml-embedded.tmLanguage.json":[87825,7825],"./yaml.tmLanguage.json":[78816,8816]};function r(e){if(!o.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],r=t[0];return o.e(t[1]).then((()=>o.t(r,17)))}r.keys=()=>Object.keys(n),r.id=81076,e.exports=r},85808:(e,t,o)=>{"use strict";o.d(t,{n:()=>i});var n=o(47695);let r,a;function i(){return r||(r=(async()=>{const e=(0,n.LV)((a||(a=new Worker(new URL(o.p+o.u(2675),o.b))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g4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjQzVDNUM1Ii8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="},88849:(e,t,o)=>{"use strict";o.d(t,{A:()=>k,e:()=>u});var n=o(62001),r=o(25726),a=o(27107),i=o(24619);const s={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:n.languages.IndentAction.Indent}}]},d=new Map;d.set("javascript","source.js.jsx"),d.set("typescript","source.tsx"),d.set("html","text.html.basic"),d.set("markdown","text.html.markdown"),d.set("xml","text.xml"),d.set("css","source.css"),d.set("json","source.json"),d.set("python","source.python"),d.set("go","source.go"),d.set("java","source.java"),d.set("shell","source.shell"),d.set("powershell","source.powershell"),d.set("yaml","source.yaml"),d.set("brick_next_yaml","source.brick_next_yaml");const u=[...d.keys()];var g;(g=n).languages.register({id:"brick_next_yaml",extensions:[".yaml",".yml"],mimetypes:["application/x-yaml","text/x-yaml"]}),g.languages.setLanguageConfiguration("brick_next_yaml",s);const c=new Map([["source.js","JavaScript.tmLanguage"],["source.js.jsx","JavaScriptReact.tmLanguage"],["source.ts","TypeScript.tmLanguage"],["source.tsx","TypeScriptReact.tmLanguage"],["text.html.basic","html.tmLanguage"],["text.html.derivative","html-derivative.tmLanguage"],["text.html.markdown","markdown.tmLanguage"],["text.xml","xml.tmLanguage"],["source.css","css.tmLanguage"],["source.json","JSON.tmLanguage"],["source.python","MagicPython.tmLanguage"],["source.go","go.tmLanguage"],["source.java","java.tmLanguage"],["source.shell","shell-unix-bash.tmLanguage"],["source.powershell","powershell.tmLanguage"],["source.yaml","yaml.tmLanguage"],["source.yaml.1.0","yaml-1.0.tmLanguage"],["source.yaml.1.1","yaml-1.1.tmLanguage"],["source.yaml.1.2","yaml-1.2.tmLanguage"],["source.yaml.1.3","yaml-1.3.tmLanguage"],["source.yaml.embedded","yaml-embedded.tmLanguage"],["source.brick_next_yaml","yaml.tmLanguage"],["placeholder.injection.string.unquoted","brick-next/injection-unquoted"],["placeholder.injection.string.quoted.double","brick-next/injection-quoted-double"],["placeholder.injection.string.quoted.single","brick-next/injection-quoted-single"],["builtin.entity.injection.string","brick-next/builtin-entity"]]),l=fetch(i).then((e=>e.arrayBuffer())).then((e=>(0,a.loadWASM)({data:e}))),p=new r.Registry({onigLib:l.then((()=>({createOnigScanner:e=>new a.OnigScanner(e),createOnigString:e=>new a.OnigString(e)}))),async loadGrammar(e){const t=c.get(e);if(t){const n=(await o(81076)(`./${t}.json`)).default;return"source.brick_next_yaml"===e?{...n,scopeName:e}:n}return null},getInjections:e=>"source.brick_next_yaml"===e?["placeholder.injection.string.unquoted","placeholder.injection.string.quoted.double","placeholder.injection.string.quoted.single","builtin.entity.injection.string"]:[]}),f=new Map,m=new Set;function k(e){if(m.has(e))return;m.add(e);const t=d.get(e);t&&n.languages.setTokensProvider(e,function(e){let t=f.get(e);return t||(t=async function(e){const t=await p.loadGrammar(e);if(!t)throw new Error("Failed to load grammar");return{getInitialState:()=>r.INITIAL,tokenize(e,o){const n=t.tokenizeLine(e,o),r=[];for(const e of n.tokens)r.push({startIndex:e.startIndex,scopes:e.scopes[e.scopes.length-1]});return{tokens:r,endState:n.ruleStack}}}}(e),f.set(e,t)),t}(t))}},90896:(e,t,o)=>{"use strict";o.d(t,{AA:()=>r,D$:()=>a,kz:()=>s,xf:()=>n});const n={comments:{lineComment:"//",blockComment:null},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],onEnterRules:[{beforeText:/^ $/,afterText:/^ $/,action:{indentAction:o(62001).languages.IndentAction.IndentOutdent,appendText:" "}}]},r=["bytes","double","duration","dyn","int","bool","matches","size","string","timestamp","type","uint","round","base64","has","printf","isEmpty","repeatArray","mergeList","fieldNotEmpty","hasOrDefault","trinocular","traceId","SHA1","random","random_string","now","request","step","variable","config","$"],a=["contains","endsWith","matches","startsWith","getDate","getDayOfMonth","getDayOfWeek","getDayOfYear","getFullYear","getHours","getMilliseconds","getMinutes","getMonth","getSeconds","charAt","indexOf","lastIndexOf","lowerAscii","replace","split","join","substring","trim","upperAscii","all","exists","exists_one","map","filter","decodeb64","truncate","parseJSON","parseYAML","parseURL","isBlank","marshalJSON","marshalYAML","merge","repeat","match","canonical","convertMap","fuse","remove","setAttr","parseDate","format","input","output"],i={defaultToken:"invalid",tokenPostfix:".cel",keywords:["in","as","break","const","continue","else","for","function","if","import","let","loop","package","namespace","return","var","void","while","null","true","false"],constants:r,instanceMethods:a,operators:["&&","||","<=","<",">=",">","==","!=","+","-","*","/","%","!"],symbols:/[=><!~?:&|+\-*/^%]+/,escapes:/\\(?:[bfnrt\\"']|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}|[0-3][0-7]{2})/,tokenizer:{root:[[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":"keyword","@constants":"keyword","@default":"identifier"}}],[/(\.)([a-zA-Z_$][\w$]*)/,["operator",{cases:{"@instanceMethods":"keyword","@default":"identifier"}}]],{include:"@whitespace"},[/[{}()[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d*\.\d+([eE][-+]?\d+)?/,"number.float"],[/0x[0-9a-fA-F]+[uU]?/,"number.hex"],[/\d+[uU]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\/.*$/,"comment"]]}};function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"cel";e.languages.register({id:t,extensions:[".cel"],mimetypes:["text/cel"]}),e.languages.setLanguageConfiguration(t,n),e.languages.setMonarchTokensProvider(t,i)}},97137:(e,t,o)=>{"use strict";o.d(t,{Vu:()=>i,fE:()=>r,lP:()=>a,yU:()=>n});const n=12,r=18,a=12,i=12},97716:(e,t,o)=>{"use strict";o.d(t,{v:()=>a});const n=new RegExp("\\b(MARK:\\s*)(.*)$"),r=/^-+|-+$/g;function a(e,t){var o;let n=[];if(t.findRegionSectionHeaders&&(null===(o=t.foldingRules)||void 0===o?void 0:o.markers)){const o=function(e,t){const o=[],n=e.getLineCount();for(let r=1;r<=n;r++){const n=e.getLineContent(r),a=n.match(t.foldingRules.markers.start);if(a){const e={startLineNumber:r,startColumn:a[0].length+1,endLineNumber:r,endColumn:n.length+1};if(e.endColumn>e.startColumn){const t={range:e,...s(n.substring(a[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&o.push(t)}}}return o}(e,t);n=n.concat(o)}if(t.findMarkSectionHeaders){const t=function(e){const t=[],o=e.getLineCount();for(let n=1;n<=o;n++)i(e.getLineContent(n),n,t);return t}(e);n=n.concat(t)}return n}function i(e,t,o){n.lastIndex=0;const r=n.exec(e);if(r){const e=r.index+r[1].length+1,n={startLineNumber:t,startColumn:e,endLineNumber:t,endColumn:e+r[2].length};if(n.endColumn>n.startColumn){const e={range:n,...s(r[1]),shouldBeInComments:!0};(e.text||e.hasSeparatorLine)&&o.push(e)}}}function s(e){const t=(e=e.trim()).startsWith("-");return{text:e=e.replace(r,""),hasSeparatorLine:t}}},98546:(e,t,o)=>{"use strict";o.d(t,{kz:()=>i});var n=o(90896);const r={brackets:n.xf.brackets,autoClosingPairs:n.xf.autoClosingPairs},a={tokenPostfix:".yaml.str",tokenizer:{root:[{include:"@whitespace"},{include:"@expression"},{include:"@strings"}],expression:[[/<%/,{token:"delimiter",next:"@expressionEmbedded",nextEmbedded:"text/cel",bracket:"@open"}],[/%>/,{token:"delimiter",bracket:"@close"}]],expressionEmbedded:[[/%>/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],strings:[[/[^<]+|<(?!%)/,"string"]],whitespace:[[/[ \t\r\n]+/,"white"]]}};function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"cel_str";e.languages.register({id:t,extensions:[".cel-str"],mimetypes:["text/cel-str"]}),e.languages.setLanguageConfiguration(t,r),e.languages.setMonarchTokensProvider(t,a)}},98967:e=>{"use strict";e.exports=JSON.parse('{"inherit":false,"base":"vs-dark","colors":{"checkbox.border":"#3C3C3C","editor.background":"#1F1F1F","editor.foreground":"#CCCCCC","editor.inactiveSelectionBackground":"#3A3D41","editorIndentGuide.background1":"#404040","editorIndentGuide.activeBackground1":"#707070","editor.selectionHighlightBackground":"#ADD6FF26","list.dropBackground":"#383B3D","activityBarBadge.background":"#0078D4","sideBarTitle.foreground":"#CCCCCC","input.placeholderForeground":"#989898","menu.background":"#1F1F1F","menu.foreground":"#CCCCCC","menu.separatorBackground":"#454545","menu.border":"#454545","menu.selectionBackground":"#0078d4","statusBarItem.remoteForeground":"#FFFFFF","statusBarItem.remoteBackground":"#0078D4","ports.iconRunningProcessForeground":"#369432","sideBarSectionHeader.background":"#181818","sideBarSectionHeader.border":"#2B2B2B","tab.selectedBackground":"#222222","tab.selectedForeground":"#ffffffa0","tab.lastPinnedBorder":"#ccc3","list.activeSelectionIconForeground":"#FFF","terminal.inactiveSelectionBackground":"#3A3D41","widget.border":"#313131","actionBar.toggledBackground":"#383a49","activityBar.activeBorder":"#0078D4","activityBar.background":"#181818","activityBar.border":"#2B2B2B","activityBar.foreground":"#D7D7D7","activityBar.inactiveForeground":"#868686","activityBarBadge.foreground":"#FFFFFF","badge.background":"#616161","badge.foreground":"#F8F8F8","button.background":"#0078D4","button.border":"#FFFFFF12","button.foreground":"#FFFFFF","button.hoverBackground":"#026EC1","button.secondaryBackground":"#313131","button.secondaryForeground":"#CCCCCC","button.secondaryHoverBackground":"#3C3C3C","chat.slashCommandBackground":"#26477866","chat.slashCommandForeground":"#85B6FF","chat.editedFileForeground":"#E2C08D","checkbox.background":"#313131","debugToolBar.background":"#181818","descriptionForeground":"#9D9D9D","dropdown.background":"#313131","dropdown.border":"#3C3C3C","dropdown.foreground":"#CCCCCC","dropdown.listBackground":"#1F1F1F","editor.findMatchBackground":"#9E6A03","editorGroup.border":"#FFFFFF17","editorGroupHeader.tabsBackground":"#181818","editorGroupHeader.tabsBorder":"#2B2B2B","editorGutter.addedBackground":"#2EA043","editorGutter.deletedBackground":"#F85149","editorGutter.modifiedBackground":"#0078D4","editorLineNumber.activeForeground":"#CCCCCC","editorLineNumber.foreground":"#6E7681","editorOverviewRuler.border":"#010409","editorWidget.background":"#202020","errorForeground":"#F85149","focusBorder":"#0078D4","foreground":"#CCCCCC","icon.foreground":"#CCCCCC","input.background":"#313131","input.border":"#3C3C3C","input.foreground":"#CCCCCC","inputOption.activeBackground":"#2489DB82","inputOption.activeBorder":"#2488DB","keybindingLabel.foreground":"#CCCCCC","notificationCenterHeader.background":"#1F1F1F","notificationCenterHeader.foreground":"#CCCCCC","notifications.background":"#1F1F1F","notifications.border":"#2B2B2B","notifications.foreground":"#CCCCCC","panel.background":"#181818","panel.border":"#2B2B2B","panelInput.border":"#2B2B2B","panelTitle.activeBorder":"#0078D4","panelTitle.activeForeground":"#CCCCCC","panelTitle.inactiveForeground":"#9D9D9D","peekViewEditor.background":"#1F1F1F","peekViewEditor.matchHighlightBackground":"#BB800966","peekViewResult.background":"#1F1F1F","peekViewResult.matchHighlightBackground":"#BB800966","pickerGroup.border":"#3C3C3C","progressBar.background":"#0078D4","quickInput.background":"#222222","quickInput.foreground":"#CCCCCC","settings.dropdownBackground":"#313131","settings.dropdownBorder":"#3C3C3C","settings.headerForeground":"#FFFFFF","settings.modifiedItemIndicator":"#BB800966","sideBar.background":"#181818","sideBar.border":"#2B2B2B","sideBar.foreground":"#CCCCCC","sideBarSectionHeader.foreground":"#CCCCCC","statusBar.background":"#181818","statusBar.border":"#2B2B2B","statusBar.debuggingBackground":"#0078D4","statusBar.debuggingForeground":"#FFFFFF","statusBar.focusBorder":"#0078D4","statusBar.foreground":"#CCCCCC","statusBar.noFolderBackground":"#1F1F1F","statusBarItem.focusBorder":"#0078D4","statusBarItem.prominentBackground":"#6E768166","tab.activeBackground":"#1F1F1F","tab.activeBorder":"#1F1F1F","tab.activeBorderTop":"#0078D4","tab.activeForeground":"#FFFFFF","tab.selectedBorderTop":"#6caddf","tab.border":"#2B2B2B","tab.hoverBackground":"#1F1F1F","tab.inactiveBackground":"#181818","tab.inactiveForeground":"#9D9D9D","tab.unfocusedActiveBorder":"#1F1F1F","tab.unfocusedActiveBorderTop":"#2B2B2B","tab.unfocusedHoverBackground":"#1F1F1F","terminal.foreground":"#CCCCCC","terminal.tab.activeBorder":"#0078D4","textBlockQuote.background":"#2B2B2B","textBlockQuote.border":"#616161","textCodeBlock.background":"#2B2B2B","textLink.activeForeground":"#4daafc","textLink.foreground":"#4daafc","textPreformat.foreground":"#D0D0D0","textPreformat.background":"#3C3C3C","textSeparator.foreground":"#21262D","titleBar.activeBackground":"#181818","titleBar.activeForeground":"#CCCCCC","titleBar.border":"#2B2B2B","titleBar.inactiveBackground":"#1F1F1F","titleBar.inactiveForeground":"#9D9D9D","welcomePage.tileBackground":"#2B2B2B","welcomePage.progress.foreground":"#0078D4"},"rules":[{"foreground":"#6A9955","token":"punctuation.definition.comment"},{"foreground":"#ce9178","token":"punctuation.definition.string"},{"foreground":"#D4D4D4","token":"meta.embedded"},{"foreground":"#D4D4D4","token":"source.groovy.embedded"},{"foreground":"#D4D4D4","token":"string meta.image.inline.markdown"},{"foreground":"#D4D4D4","token":"variable.legacy.builtin.python"},{"fontStyle":"italic","token":"emphasis"},{"fontStyle":"bold","token":"strong"},{"foreground":"#000080","token":"header"},{"foreground":"#6A9955","token":"comment"},{"foreground":"#569cd6","token":"constant.language"},{"foreground":"#b5cea8","token":"constant.numeric"},{"foreground":"#b5cea8","token":"variable.other.enummember"},{"foreground":"#b5cea8","token":"keyword.operator.plus.exponent"},{"foreground":"#b5cea8","token":"keyword.operator.minus.exponent"},{"foreground":"#646695","token":"constant.regexp"},{"foreground":"#569cd6","token":"entity.name.tag"},{"foreground":"#d7ba7d","token":"entity.name.tag.css"},{"foreground":"#d7ba7d","token":"entity.name.tag.less"},{"foreground":"#9cdcfe","token":"entity.other.attribute-name"},{"foreground":"#d7ba7d","token":"entity.other.attribute-name.class.css"},{"foreground":"#d7ba7d","token":"source.css entity.other.attribute-name.class"},{"foreground":"#d7ba7d","token":"entity.other.attribute-name.id.css"},{"foreground":"#d7ba7d","token":"entity.other.attribute-name.parent-selector.css"},{"foreground":"#d7ba7d","token":"entity.other.attribute-name.parent.less"},{"foreground":"#d7ba7d","token":"source.css entity.other.attribute-name.pseudo-class"},{"foreground":"#d7ba7d","token":"entity.other.attribute-name.pseudo-element.css"},{"foreground":"#d7ba7d","token":"source.css.less entity.other.attribute-name.id"},{"foreground":"#d7ba7d","token":"entity.other.attribute-name.scss"},{"foreground":"#f44747","token":"invalid"},{"fontStyle":"underline","token":"markup.underline"},{"fontStyle":"bold","foreground":"#569cd6","token":"markup.bold"},{"fontStyle":"bold","foreground":"#569cd6","token":"markup.heading"},{"fontStyle":"italic","token":"markup.italic"},{"fontStyle":"strikethrough","token":"markup.strikethrough"},{"foreground":"#b5cea8","token":"markup.inserted"},{"foreground":"#ce9178","token":"markup.deleted"},{"foreground":"#569cd6","token":"markup.changed"},{"foreground":"#6A9955","token":"punctuation.definition.quote.begin.markdown"},{"foreground":"#6796e6","token":"punctuation.definition.list.begin.markdown"},{"foreground":"#ce9178","token":"markup.inline.raw"},{"foreground":"#808080","token":"punctuation.definition.tag"},{"foreground":"#569cd6","token":"meta.preprocessor"},{"foreground":"#569cd6","token":"entity.name.function.preprocessor"},{"foreground":"#ce9178","token":"meta.preprocessor.string"},{"foreground":"#b5cea8","token":"meta.preprocessor.numeric"},{"foreground":"#9cdcfe","token":"meta.structure.dictionary.key.python"},{"foreground":"#569cd6","token":"meta.diff.header"},{"foreground":"#569cd6","token":"storage"},{"foreground":"#569cd6","token":"storage.type"},{"foreground":"#569cd6","token":"storage.modifier"},{"foreground":"#569cd6","token":"keyword.operator.noexcept"},{"foreground":"#ce9178","token":"string"},{"foreground":"#ce9178","token":"meta.embedded.assembly"},{"foreground":"#ce9178","token":"string.tag"},{"foreground":"#ce9178","token":"string.value"},{"foreground":"#d16969","token":"string.regexp"},{"foreground":"#569cd6","token":"punctuation.definition.template-expression.begin"},{"foreground":"#569cd6","token":"punctuation.definition.template-expression.end"},{"foreground":"#569cd6","token":"punctuation.section.embedded"},{"foreground":"#d4d4d4","token":"meta.template.expression"},{"foreground":"#9cdcfe","token":"support.type.vendored.property-name"},{"foreground":"#9cdcfe","token":"support.type.property-name"},{"foreground":"#9cdcfe","token":"source.css variable"},{"foreground":"#9cdcfe","token":"source.coffee.embedded"},{"foreground":"#569cd6","token":"keyword"},{"foreground":"#569cd6","token":"keyword.control"},{"foreground":"#d4d4d4","token":"keyword.operator"},{"foreground":"#569cd6","token":"keyword.operator.new"},{"foreground":"#569cd6","token":"keyword.operator.expression"},{"foreground":"#569cd6","token":"keyword.operator.cast"},{"foreground":"#569cd6","token":"keyword.operator.sizeof"},{"foreground":"#569cd6","token":"keyword.operator.alignof"},{"foreground":"#569cd6","token":"keyword.operator.typeid"},{"foreground":"#569cd6","token":"keyword.operator.alignas"},{"foreground":"#569cd6","token":"keyword.operator.instanceof"},{"foreground":"#569cd6","token":"keyword.operator.logical.python"},{"foreground":"#569cd6","token":"keyword.operator.wordlike"},{"foreground":"#b5cea8","token":"keyword.other.unit"},{"foreground":"#569cd6","token":"punctuation.section.embedded.begin.php"},{"foreground":"#569cd6","token":"punctuation.section.embedded.end.php"},{"foreground":"#9cdcfe","token":"support.function.git-rebase"},{"foreground":"#b5cea8","token":"constant.sha.git-rebase"},{"foreground":"#d4d4d4","token":"storage.modifier.import.java"},{"foreground":"#d4d4d4","token":"variable.language.wildcard.java"},{"foreground":"#d4d4d4","token":"storage.modifier.package.java"},{"foreground":"#569cd6","token":"variable.language"},{"foreground":"#DCDCAA","token":"entity.name.function"},{"foreground":"#DCDCAA","token":"support.function"},{"foreground":"#DCDCAA","token":"support.constant.handlebars"},{"foreground":"#DCDCAA","token":"source.powershell variable.other.member"},{"foreground":"#DCDCAA","token":"entity.name.operator.custom-literal"},{"foreground":"#4EC9B0","token":"support.class"},{"foreground":"#4EC9B0","token":"support.type"},{"foreground":"#4EC9B0","token":"entity.name.type"},{"foreground":"#4EC9B0","token":"entity.name.namespace"},{"foreground":"#4EC9B0","token":"entity.other.attribute"},{"foreground":"#4EC9B0","token":"entity.name.scope-resolution"},{"foreground":"#4EC9B0","token":"entity.name.class"},{"foreground":"#4EC9B0","token":"storage.type.numeric.go"},{"foreground":"#4EC9B0","token":"storage.type.byte.go"},{"foreground":"#4EC9B0","token":"storage.type.boolean.go"},{"foreground":"#4EC9B0","token":"storage.type.string.go"},{"foreground":"#4EC9B0","token":"storage.type.uintptr.go"},{"foreground":"#4EC9B0","token":"storage.type.error.go"},{"foreground":"#4EC9B0","token":"storage.type.rune.go"},{"foreground":"#4EC9B0","token":"storage.type.cs"},{"foreground":"#4EC9B0","token":"storage.type.generic.cs"},{"foreground":"#4EC9B0","token":"storage.type.modifier.cs"},{"foreground":"#4EC9B0","token":"storage.type.variable.cs"},{"foreground":"#4EC9B0","token":"storage.type.annotation.java"},{"foreground":"#4EC9B0","token":"storage.type.generic.java"},{"foreground":"#4EC9B0","token":"storage.type.java"},{"foreground":"#4EC9B0","token":"storage.type.object.array.java"},{"foreground":"#4EC9B0","token":"storage.type.primitive.array.java"},{"foreground":"#4EC9B0","token":"storage.type.primitive.java"},{"foreground":"#4EC9B0","token":"storage.type.token.java"},{"foreground":"#4EC9B0","token":"storage.type.groovy"},{"foreground":"#4EC9B0","token":"storage.type.annotation.groovy"},{"foreground":"#4EC9B0","token":"storage.type.parameters.groovy"},{"foreground":"#4EC9B0","token":"storage.type.generic.groovy"},{"foreground":"#4EC9B0","token":"storage.type.object.array.groovy"},{"foreground":"#4EC9B0","token":"storage.type.primitive.array.groovy"},{"foreground":"#4EC9B0","token":"storage.type.primitive.groovy"},{"foreground":"#4EC9B0","token":"meta.type.cast.expr"},{"foreground":"#4EC9B0","token":"meta.type.new.expr"},{"foreground":"#4EC9B0","token":"support.constant.math"},{"foreground":"#4EC9B0","token":"support.constant.dom"},{"foreground":"#4EC9B0","token":"support.constant.json"},{"foreground":"#4EC9B0","token":"entity.other.inherited-class"},{"foreground":"#4EC9B0","token":"punctuation.separator.namespace.ruby"},{"foreground":"#C586C0","token":"keyword.control"},{"foreground":"#C586C0","token":"source.cpp keyword.operator.new"},{"foreground":"#C586C0","token":"keyword.operator.delete"},{"foreground":"#C586C0","token":"keyword.other.using"},{"foreground":"#C586C0","token":"keyword.other.directive.using"},{"foreground":"#C586C0","token":"keyword.other.operator"},{"foreground":"#C586C0","token":"entity.name.operator"},{"foreground":"#9CDCFE","token":"variable"},{"foreground":"#9CDCFE","token":"meta.definition.variable.name"},{"foreground":"#9CDCFE","token":"support.variable"},{"foreground":"#9CDCFE","token":"entity.name.variable"},{"foreground":"#9CDCFE","token":"constant.other.placeholder"},{"foreground":"#4FC1FF","token":"variable.other.constant"},{"foreground":"#4FC1FF","token":"variable.other.enummember"},{"foreground":"#9CDCFE","token":"meta.object-literal.key"},{"foreground":"#CE9178","token":"support.constant.property-value"},{"foreground":"#CE9178","token":"support.constant.font-name"},{"foreground":"#CE9178","token":"support.constant.media-type"},{"foreground":"#CE9178","token":"support.constant.media"},{"foreground":"#CE9178","token":"constant.other.color.rgb-value"},{"foreground":"#CE9178","token":"constant.other.rgb-value"},{"foreground":"#CE9178","token":"support.constant.color"},{"foreground":"#CE9178","token":"punctuation.definition.group.regexp"},{"foreground":"#CE9178","token":"punctuation.definition.group.assertion.regexp"},{"foreground":"#CE9178","token":"punctuation.definition.character-class.regexp"},{"foreground":"#CE9178","token":"punctuation.character.set.begin.regexp"},{"foreground":"#CE9178","token":"punctuation.character.set.end.regexp"},{"foreground":"#CE9178","token":"keyword.operator.negation.regexp"},{"foreground":"#CE9178","token":"support.other.parenthesis.regexp"},{"foreground":"#d16969","token":"constant.character.character-class.regexp"},{"foreground":"#d16969","token":"constant.other.character-class.set.regexp"},{"foreground":"#d16969","token":"constant.other.character-class.regexp"},{"foreground":"#d16969","token":"constant.character.set.regexp"},{"foreground":"#DCDCAA","token":"keyword.operator.or.regexp"},{"foreground":"#DCDCAA","token":"keyword.control.anchor.regexp"},{"foreground":"#d7ba7d","token":"keyword.operator.quantifier.regexp"},{"foreground":"#569cd6","token":"constant.character"},{"foreground":"#569cd6","token":"constant.other.option"},{"foreground":"#d7ba7d","token":"constant.character.escape"},{"foreground":"#C8C8C8","token":"entity.name.label"}],"encodedTokensColors":[]}')}}]);
|
|
2
|
-
//# sourceMappingURL=6165.324e0fbb.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_next_bricks_vs=globalThis.webpackChunk_next_bricks_vs||[]).push([[7242],{77242:(e,t,n)=>{var i=n(74635),s=n(70918),r=n(26902),o=n(5536),a=n(86121),l=n(70829),c=n(62740),u=n(18769),h=n.n(u),d=n(7921),g=n(37732),m=n(11280),p=n(4273),k=n(23081),f=n(41361),v=n(30426),A=n(62001),y=n(88849),b=(n(29844),n(18965)),w=n(98967),M=n(55310),C=n.n(M),E=(n(65168),n(20563)),x=n(97137),S=n(4046),W=n(44804),L=n(24102),N=n(69704),B=n(8182),P=n(53373),_=n.n(P),O=n(47726),z=n(72414),R=(n(73569),n(11968)),I=n(71836),V=n(5087),D=n(85808),T=n(90896),F=n(62066),H=n(98546),K=n(46984),Y=n(4794),q=n(55262);let j,J,U,X,$,Z,G,Q,ee,te,ne,ie,se,re,oe,ae,le,ce,ue,he,de,ge,me,pe,ke,fe,ve,Ae,ye,be,we,Me,Ce,Ee,xe,Se,We,Le,Ne,Be,Pe,_e,Oe,ze,Re,Ie,Ve,De,Te,Fe,He,Ke,Ye,qe,je,Je,Ue,Xe,$e,Ze,Ge,Qe,et,tt,nt,it,st,rt,ot,at,lt;var ct,ut,ht;(0,N.initializeReactI18n)(B.NS,B.I),A.editor.defineTheme("tm-vs-light",b),A.editor.defineTheme("tm-vs-dark",w);const dt=["tm-vs-light","tm-vs-dark"],gt=["vs-dark","hc-black","tm-vs-dark"];(0,T.kz)(A),(0,F.kz)(A),(0,H.kz)(A);const mt=["cel_yaml","cel_str"],pt=["cel",...mt];for(const e of mt)A.languages.registerCompletionItemProvider(e,{triggerCharacters:["<"],provideCompletionItems:K.ix});for(const e of pt)A.languages.registerCompletionItemProvider(e,(0,K.ZY)(e));const{enabled:kt,...ft}=null!==(ct=null===(ut=(0,k.getRuntime)())||void 0===ut?void 0:ut.getMiscSettings().globalMonacoEditorCopilotOptions)&&void 0!==ct?ct:{};kt&&A.languages.registerInlineCompletionsProvider(O.F,new O.$({...ft,async request(e){var t;let{model:n,temperature:i,system:s,prompt:r,signal:o}=e;return null===(t=(await(0,z.b)({model:n,temperature:i,enableSensitiveWordsFilter:!1,stream:!1,messages:[...s?[{role:"system",content:s}]:[],{role:"user",content:r}]},{signal:o,interceptorParams:{ignoreLoadingBar:!0}})).choices)||void 0===t||null===(t=t[0])||void 0===t||null===(t=t.message)||void 0===t||null===(t=t.content)||void 0===t?void 0:t.trim()},HttpAbortError:f.HttpAbortError}));const{defineElement:vt,property:At,event:yt}=(0,d.createDecorators)(),bt=(0,m.wrapBrick)("eo-form-item"),wt=(0,m.wrapBrick)("eo-tooltip"),Mt=(0,m.wrapBrick)("eo-icon"),Ct=(0,g.unwrapProvider)("basic.copy-to-clipboard"),Et=(0,g.unwrapProvider)("basic.show-notification"),xt="spell_check",St="brick_next_yaml_lint";let Wt;var Lt=new WeakMap,Nt=new WeakMap,Bt=new WeakMap,Pt=new WeakMap,_t=new WeakMap,Ot=new WeakMap,zt=new WeakMap,Rt=new WeakMap,It=new WeakMap,Vt=new WeakMap,Dt=new WeakMap,Tt=new WeakMap,Ft=new WeakMap,Ht=new WeakMap,Kt=new WeakMap,Yt=new WeakMap,qt=new WeakMap,jt=new WeakMap,Jt=new WeakMap,Ut=new WeakMap,Xt=new WeakMap,$t=new WeakMap,Zt=new WeakMap,Gt=new WeakMap,Qt=new WeakMap,en=new WeakMap,tn=new WeakMap,nn=new WeakMap,sn=new WeakMap,rn=new WeakMap,on=new WeakSet,an=new WeakMap,ln=new WeakMap,cn=new WeakMap,un=new WeakMap,hn=new WeakMap,dn=new WeakMap;class gn extends v.N{constructor(){super(...arguments),(0,i.A)(this,on),(0,s.A)(this,Lt,J(this)),(0,s.A)(this,Nt,(U(this),X(this))),(0,s.A)(this,Bt,($(this),Z(this))),(0,s.A)(this,Pt,(G(this),Q(this))),(0,s.A)(this,_t,(ee(this),te(this))),(0,s.A)(this,Ot,(ne(this),ie(this))),(0,s.A)(this,zt,(se(this),re(this))),(0,s.A)(this,Rt,(oe(this),ae(this))),(0,s.A)(this,It,(le(this),ce(this))),(0,s.A)(this,Vt,(ue(this),he(this))),(0,s.A)(this,Dt,(de(this),ge(this))),(0,s.A)(this,Tt,(me(this),pe(this))),(0,s.A)(this,Ft,(ke(this),fe(this))),(0,s.A)(this,Ht,(ve(this),Ae(this))),(0,s.A)(this,Kt,(ye(this),be(this))),(0,s.A)(this,Yt,(we(this),Me(this))),(0,s.A)(this,qt,(Ce(this),Ee(this))),(0,s.A)(this,jt,(xe(this),Se(this))),(0,s.A)(this,Jt,(We(this),Le(this))),(0,s.A)(this,Ut,(Ne(this),Be(this))),(0,s.A)(this,Xt,(Pe(this),_e(this))),(0,s.A)(this,$t,(Oe(this),ze(this))),(0,s.A)(this,Zt,(Re(this),Ie(this))),(0,s.A)(this,Gt,(Ve(this),De(this))),(0,s.A)(this,Qt,(Te(this),Fe(this))),(0,s.A)(this,en,(He(this),Ke(this))),(0,s.A)(this,tn,(Ye(this),qe(this))),(0,s.A)(this,nn,(je(this),Je(this))),(0,s.A)(this,sn,(Ue(this),Xe(this))),(0,s.A)(this,rn,($e(this),Ze(this))),(0,s.A)(this,an,(et(this),tt(this))),(0,s.A)(this,ln,(st(this),e=>{var t;this.value=e,null===(t=this.getFormElement())||void 0===t||t.formStore.onChange(this.name,e),(0,o.A)(on,this,Ge).emit(e)})),(0,s.A)(this,cn,(e=>{(0,o.A)(on,this,nt).emit(e)})),(0,s.A)(this,un,rt(this)),(0,s.A)(this,hn,(lt(this),e=>{(0,o.A)(on,this,ot).emit(e)})),(0,s.A)(this,dn,(e=>{if("brick_next_yaml"===this.language||"yaml"===this.language)try{C().load(e)}catch{return"请填写正确的格式"}return""}))}get name(){return(0,l.A)(Lt,this)}set name(e){(0,a.A)(Lt,this,e)}get label(){return(0,l.A)(Nt,this)}set label(e){(0,a.A)(Nt,this,e)}get value(){return(0,l.A)(Bt,this)}set value(e){(0,a.A)(Bt,this,e)}get language(){return(0,l.A)(Pt,this)}set language(e){(0,a.A)(Pt,this,e)}get theme(){return(0,l.A)(_t,this)}set theme(e){(0,a.A)(_t,this,e)}get required(){return(0,l.A)(Ot,this)}set required(e){(0,a.A)(Ot,this,e)}get readOnly(){return(0,l.A)(zt,this)}set readOnly(e){(0,a.A)(zt,this,e)}get automaticLayout(){return(0,l.A)(Rt,this)}set automaticLayout(e){(0,a.A)(Rt,this,e)}get minLines(){return(0,l.A)(It,this)}set minLines(e){(0,a.A)(It,this,e)}get completers(){return(0,l.A)(Vt,this)}set completers(e){(0,a.A)(Vt,this,e)}get advancedCompleters(){return(0,l.A)(Dt,this)}set advancedCompleters(e){(0,a.A)(Dt,this,e)}get markers(){return(0,l.A)(Tt,this)}set markers(e){(0,a.A)(Tt,this,e)}get links(){return(0,l.A)(Ft,this)}set links(e){(0,a.A)(Ft,this,e)}get maxLines(){return(0,l.A)(Ht,this)}set maxLines(e){(0,a.A)(Ht,this,e)}get height(){return(0,l.A)(Kt,this)}set height(e){(0,a.A)(Kt,this,e)}get message(){return(0,l.A)(Yt,this)}set message(e){(0,a.A)(Yt,this,e)}get placeholder(){return(0,l.A)(qt,this)}set placeholder(e){(0,a.A)(qt,this,e)}get showExpandButton(){return(0,l.A)(jt,this)}set showExpandButton(e){(0,a.A)(jt,this,e)}get lineNumbers(){return(0,l.A)(Jt,this)}set lineNumbers(e){(0,a.A)(Jt,this,e)}get tokenConfig(){return(0,l.A)(Ut,this)}set tokenConfig(e){(0,a.A)(Ut,this,e)}get customValidationInBrickNextYaml(){return(0,l.A)(Xt,this)}set customValidationInBrickNextYaml(e){(0,a.A)(Xt,this,e)}get showCopyButton(){return(0,l.A)($t,this)}set showCopyButton(e){(0,a.A)($t,this,e)}get glyphMargin(){return(0,l.A)(Zt,this)}set glyphMargin(e){(0,a.A)(Zt,this,e)}get extraLibs(){return(0,l.A)(Gt,this)}set extraLibs(e){(0,a.A)(Gt,this,e)}get fixedOverflowWidgets(){return(0,l.A)(Qt,this)}set fixedOverflowWidgets(e){(0,a.A)(Qt,this,e)}get spellCheck(){return(0,l.A)(en,this)}set spellCheck(e){(0,a.A)(en,this,e)}get knownWords(){return(0,l.A)(tn,this)}set knownWords(e){(0,a.A)(tn,this,e)}get domLibsEnabled(){return(0,l.A)(nn,this)}set domLibsEnabled(e){(0,a.A)(nn,this,e)}get uri(){return(0,l.A)(sn,this)}set uri(e){(0,a.A)(sn,this,e)}connectedCallback(){this.style.display||(this.style.display="block"),super.connectedCallback()}render(){return h().createElement(bt,{exportparts:"message",curElement:this,formElement:this.getFormElement(),name:this.name,label:this.label,required:this.required,helpBrick:this.helpBrick,labelBrick:this.labelBrick,notRender:this.notRender,validator:(0,l.A)(dn,this)},h().createElement(mn,{value:this.value,language:this.language,readOnly:this.readOnly,theme:this.theme,automaticLayout:this.automaticLayout,minLines:this.minLines,maxLines:this.maxLines,height:this.height,completers:this.completers,advancedCompleters:this.advancedCompleters,extraLibs:this.extraLibs,markers:this.markers,links:this.links,tokenConfig:this.tokenConfig,lineNumbers:this.lineNumbers,glyphMargin:this.glyphMargin,placeholder:this.placeholder,showCopyButton:this.showCopyButton,showExpandButton:this.showExpandButton,validateState:this.validateState,onChange:(0,l.A)(ln,this),onUserInput:(0,l.A)(cn,this),onTokenClick:(0,l.A)(hn,this),customValidationInBrickNextYaml:this.customValidationInBrickNextYaml,fixedOverflowWidgets:this.fixedOverflowWidgets,spellCheck:this.spellCheck,knownWords:this.knownWords,domLibsEnabled:this.domLibsEnabled,uri:this.uri}))}}function mn(e){let{value:t,language:n,theme:i,minLines:s,maxLines:r,height:o,automaticLayout:a,completers:l,advancedCompleters:c,markers:d,readOnly:g,links:m,extraLibs:k,tokenConfig:f,showExpandButton:v,showCopyButton:b=!0,lineNumbers:w="on",glyphMargin:M=!1,placeholder:C,validateState:P,onChange:O,onTokenClick:z,customValidationInBrickNextYaml:T,fixedOverflowWidgets:F,spellCheck:H,knownWords:j,domLibsEnabled:J,uri:U}=e;const X=null!=t?t:"",$=null!=n?n:"plaintext",Z=null!=i?i:"auto",G=null!=s?s:3,Q=null!=r?r:1/0,ee=null!=o?o:500,te=null==F||F,ne=null==H||H,[ie,se]=(0,u.useState)(!1),re=(0,u.useMemo)((()=>(0,E.uniqueId)("worker")),[]),{t:oe}=(0,N.useTranslation)(B.NS),ae=(0,u.useRef)(null),le=(0,u.useRef)(),ce=(0,u.useRef)(),ue=(0,u.useRef)({width:300,height:pn(X,G,Q)}),[he,de]=(0,u.useState)(),ge=(0,u.useRef)(a),me=(0,p.useCurrentTheme)(),pe=y.e.includes($),ke=(0,u.useMemo)((()=>{const e="auto"===Z?"dark"===me||"dark-v2"===me?"vs-dark":"vs":Z;return pe&&!dt.includes(e)?gt.includes(e)?"tm-vs-dark":"tm-vs-light":e}),[me,Z,pe]),fe=gt.includes(ke);(0,u.useEffect)((()=>{if(dt.includes(ke))return;const e=fe?"#FFFFFF0F":"#0000000A";A.editor.defineTheme("custom-theme",{base:ke,inherit:!0,rules:[],colors:{"editor.lineHighlightBackground":`${e}`}}),A.editor.setTheme("custom-theme")}),[ke,fe]),(0,u.useEffect)((()=>{A.editor.setTheme(ke)}),[ke]),(0,u.useEffect)((()=>{if(ce.current){const e=ce.current.getModel();A.editor.setModelLanguage(e,$)}(0,y.A)($)}),[$]),(0,u.useEffect)((()=>{if("brick_next_yaml"===$){const e=(0,S.v)(l,Array.isArray(c)?void 0:c,re,f),t=A.languages.registerCompletionItemProvider("brick_next_yaml",{provideCompletionItems:e,triggerCharacters:[".",":","<"]});return()=>{t.dispose()}}}),[l,c,$,re,f]),(0,u.useEffect)((()=>{if(Array.isArray(c)&&c.length>0&&pt.includes($)){const e=A.languages.registerCompletionItemProvider($,(0,K.MY)($,re,c));return()=>{e.dispose()}}}),[$,c,re]),(0,u.useEffect)((()=>{const e=ce.current;if(e){const t=e.getModel();null!=t&&t.getValue&&X!==t.getValue()&&t.setValue(X)}}),[X]),(0,u.useLayoutEffect)((()=>{var e;if("fit-content"!==ge.current||!ae.current)return;ue.current.width=ae.current.getBoundingClientRect().width,null===(e=ce.current)||void 0===e||e.layout(ue.current);const t=new ResizeObserver((e=>{for(const n of e)if(n.target===ae.current){const e=n.contentBoxSize?n.contentBoxSize[0]?n.contentBoxSize[0].inlineSize:n.contentBoxSize.inlineSize:n.contentRect.width,i=n.contentBoxSize?n.contentBoxSize[0]?n.contentBoxSize[0].blockSize:n.contentBoxSize.blockSize:n.contentRect.height;var t;(e!==ue.current.width||ie)&&(ue.current.width=e,null===(t=ce.current)||void 0===t||t.layout({width:e,height:ie?i:ue.current.height}));break}}));return t.observe(ae.current),()=>{t.disconnect()}}),[ie]),(0,u.useLayoutEffect)((()=>{if("fit-container"!==ge.current)return;const e=function(e){let t=e;for(;t;){const e="vs.code-editor"===t.tagName.toLowerCase();if(t=t.parentElement,e)return t}}(ae.current);if(!e)return;const t=new ResizeObserver((()=>{de(e.offsetHeight)}));return t.observe(e),()=>{t.disconnect()}}),[]),(0,u.useEffect)((()=>{"fit-container"!==ge.current&&"fit-content"!==ge.current&&de(ee)}),[ee]),(0,u.useEffect)((()=>{ce.current&&ce.current.updateOptions({readOnly:g,lineNumbersMinChars:ie?5:3})}),[g,ie]),(0,u.useEffect)((()=>{if(ce.current||!ae.current)return;const e=A.editor.createModel(X,$,U?A.Uri.parse(U):void 0);let t;if("brick_next_yaml"===$){const n=(0,L.AR)(e.uri);t=A.editor.createModel(X,"javascript",n),A.languages.typescript.javascriptDefaults.addExtraLib((0,L.Eh)(),e.uri.toString()+"d.ts")}const n=ce.current=A.editor.create(ae.current,{extraEditorClassName:"monaco-editor-v3",model:e,minimap:{enabled:!1,showRegionSectionHeaders:!1,showMarkSectionHeaders:!1},scrollBeyondLastLine:!1,tabSize:2,insertSpaces:!0,automaticLayout:"fit-content"!==ge.current,fontSize:x.yU,lineHeight:x.fE,scrollbar:{horizontalScrollbarSize:x.lP,verticalScrollbarSize:x.lP,horizontalSliderSize:8,verticalSliderSize:8,alwaysConsumeMouseWheel:!1},padding:{top:x.Vu,bottom:"fit-content"==ge.current?void 0:x.Vu},overviewRulerBorder:!1,mouseWheelScrollSensitivity:.5,fixedOverflowWidgets:te,lineNumbers:w,lineNumbersMinChars:3,glyphMargin:M,folding:"off"!==w,suggest:{insertMode:"insert",preview:!0},readOnly:g,quickSuggestions:{strings:!0,other:!0,comments:!0},renderLineHighlightOnlyWhenFocus:!0,unicodeHighlight:{ambiguousCharacters:!1}});return le.current=ce.current.createDecorationsCollection(),()=>{var i;e.dispose(),n.dispose(),null===(i=t)||void 0===i||i.dispose()}}),[]);const ve="typescript"===$?"typescriptDefaults":"javascriptDefaults";(0,u.useEffect)((()=>{"javascript"!==$&&"typescript"!==$&&"brick_next_yaml"!==$||A.languages.typescript[ve].setCompilerOptions({allowNonTsExtensions:!0,lib:J?void 0:["esnext"],target:A.languages.typescript.ScriptTarget.ESNext,module:A.languages.typescript.ModuleKind.ESNext,jsx:A.languages.typescript.JsxEmit.Preserve})}),[$,J,ve]),(0,u.useEffect)((()=>{const e=ce.current;if(e)return()=>{(0,Y.X2)(e)}}),[]),(0,u.useEffect)((()=>{const e=ce.current;if(!e)return;const t=()=>{(0,q.$)(k,{languageDefaults:ve}),"javascript"!==$&&"typescript"!==$&&"brick_next_yaml"!==$||A.languages.typescript[ve].setCompilerOptions({allowNonTsExtensions:!0,lib:J?void 0:["esnext"],target:A.languages.typescript.ScriptTarget.ESNext,module:A.languages.typescript.ModuleKind.ESNext,jsx:A.languages.typescript.JsxEmit.Preserve})};(0,Y.xx)(e)&&t();const n=e.onDidFocusEditorWidget((()=>{(0,Y.MX)(e)&&t()}));return()=>{n.dispose()}}),[J,k,$,ve]),(0,u.useEffect)((()=>{const e=ce.current;if("brick_next_yaml"===$&&e){const t=e.getModel(),n=e.onMouseDown((function(e){var n,i;const s=le.current;(null!==(n=null==s||null===(i=s.getRanges)||void 0===i?void 0:i.call(s))&&void 0!==n?n:[]).forEach((n=>{const i=/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"metaKey":"ctrlKey";n&&e.target.position&&e.event[i]&&n.containsPosition(e.target.position)&&z(t.getValueInRange(n))}))})),i=e.onMouseMove((function(e){const t=le.current;t&&t.getRanges().forEach((n=>{const i=/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"metaKey":"ctrlKey";if(n&&e.target.position&&e.event[i]&&n.containsPosition(e.target.position)){const e=t.getRanges().map((e=>({range:e,options:{inlineClassName:n.equalsRange(e)?"highlight pointer":"highlight"}})));t.set(e)}else if(!e.event[i]){const e=t.getRanges().map((e=>({range:e,options:{inlineClassName:"highlight"}})));t.set(e)}}))}));return()=>{null==i||i.dispose(),null==n||n.dispose()}}}),[$,z,me,Z]),(0,u.useEffect)((()=>{const e=ce.current;if(!e||!ae.current||"fit-content"!==ge.current)return;const t=e.onDidContentSizeChange((t=>{if(!ie&&t.contentHeightChanged){const n=kn(t.contentHeight,G,Q);n!==ue.current.height&&(ue.current.height=n,e.layout(ue.current))}})),n=kn(e.getContentHeight(),G,Q);return n!==ue.current.height&&(ue.current.height=n,e.layout(ue.current)),()=>{t.dispose()}}),[Q,G,ie]);const Ae=(0,u.useCallback)((async(e,t)=>{A.editor.setModelMarkers(e,"semantic_validate",[]);const n=e.findPreviousMatch("<%[~=]?",t,!0,!1,null,!1),i=e.findNextMatch("%>",t,!1,!1,null,!1),s=null==n?void 0:n.range,r=null==i?void 0:i.range;if(s&&r){const n=new A.Range(s.startLineNumber,s.endColumn,r.startLineNumber,r.startColumn),i=e.getValueInRange(n);if(n.containsPosition(t)&&!/<% | %>/.test(i)){const t=(0,L.AR)(e.uri);A.editor.getModel(t).setValue(i);const r=e.getOffsetAt(new A.Position(s.startLineNumber,s.endColumn));if(R.b.getInstance(re).updateState({content:i,range:n,offset:r}),!T)return;const o=await A.languages.typescript.getJavaScriptWorker(),a=await o(t),l=(await a.getSemanticDiagnostics(t.toString())).map((t=>{var n;const i=r+(null!==(n=t.start)&&void 0!==n?n:0),s=e.getPositionAt(i);return{startLineNumber:s.lineNumber,startColumn:s.column,endLineNumber:s.lineNumber,endColumn:s.column+t.length,message:t.messageText,severity:A.MarkerSeverity.Warning}}));A.editor.setModelMarkers(e,"semantic_validate",l)}}}),[re]);(0,u.useEffect)((()=>{if(!ce.current)return;const e=ce.current.getModel(),t=e.onDidChangeContent((async t=>{(0,W.J)(re),["brick_next_yaml"].includes($)&&Ae(e,ce.current.getPosition()),t.isFlush||O(e.getValue())}));return()=>{t.dispose()}}),[O,re,$,Ae]),(0,u.useEffect)((()=>{if(ie){const e=t=>{"Escape"!==t.key&&"Esc"!==t.key||(window.removeEventListener("keydown",e),se(!1))};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}}),[ie]),(0,u.useEffect)((()=>{if(!ce.current&&!C)return;const e=new I.j(C,ce.current,fe?"rgba(174,174,175,0.4)":"rgba(89,89,89,0.4)");return()=>{e.dispose()}}),[C,fe]);const ye=(0,u.useCallback)((()=>{if(ce.current){const e=ce.current.getModel();Ct(e.getValue()).then((()=>Et({type:"success",message:oe(B.K.COPY_SUCCESS)}))).catch((()=>Et({type:"error",message:oe(B.K.COPY_FAILED)})))}}),[oe]),be=(0,u.useCallback)((()=>{se(!ie)}),[ie]);return(0,u.useEffect)((()=>{const e=ce.current;if(!e||"brick_next_yaml"!==$)return;let t=!1;const n=(0,E.debounce)((async()=>{var n;const i=await(0,V.K)();if(t)return;const{lintMarkers:s,lintDecorations:r}=await i.lint({source:e.getValue(),links:m,markers:d}),o=e.getModel();!t&&o&&(A.editor.setModelMarkers(o,St,s.map((e=>{let{start:t,end:n,message:i,severity:s,code:r}=e;const a=o.getPositionAt(t),l=o.getPositionAt(n);return{startLineNumber:a.lineNumber,startColumn:a.column,endLineNumber:l.lineNumber,endColumn:l.column,severity:A.MarkerSeverity[s],message:i,code:r}}))),null===(n=le.current)||void 0===n||n.set(r.map((e=>{let{start:t,end:n,options:i}=e;return{range:A.Range.fromPositions(o.getPositionAt(t),o.getPositionAt(n)),options:i}}))))}),200),i=e.onDidChangeModelContent(n);return n(),()=>{t=!0,i.dispose(),A.editor.setModelMarkers(e.getModel(),St,[])}}),[$,m,d,Z,re]),(0,u.useEffect)((()=>{const e=ce.current;if(!e||!ne)return;let t=!1;const n=(0,E.debounce)((async()=>{const n=await(0,D.n)();if(t)return;const{markers:i}=await n.spellCheck({source:e.getValue(),knownWords:j}),s=e.getModel();!t&&s&&A.editor.setModelMarkers(s,xt,i.map((e=>{let{start:t,end:n,message:i,severity:r}=e;const o=s.getPositionAt(t),a=s.getPositionAt(n);return{startLineNumber:o.lineNumber,startColumn:o.column,endLineNumber:a.lineNumber,endColumn:a.column,severity:A.MarkerSeverity[r],message:i}})))}),200),i=e.onDidChangeModelContent(n);return n(),()=>{t=!0,i.dispose(),A.editor.setModelMarkers(e.getModel(),xt,[])}}),[ne,j]),h().createElement("div",{className:_()("code-editor-wrapper",{expanded:ie,error:"error"===P})},h().createElement("div",{ref:ae,style:{height:ie?"100%":he,overflow:ie?"scroll":""}}),h().createElement("div",{className:"toolbar-wrapper"},h().createElement("div",{className:"toolbar sticky"},b&&h().createElement(wt,{content:oe(B.K.COPY)},h().createElement(Mt,{className:"copy-icon",icon:"copy",lib:"antd",theme:"outlined",onClick:ye})),v&&h().createElement(wt,{content:oe(ie?B.K.COLLAPSE:B.K.EXPAND)},h().createElement(Mt,{className:"expand-icon",icon:ie?"compress":"expand",lib:"antd",theme:"outlined",onClick:be})))))}function pn(e,t,n){return fn(Math.min(n,Math.max(t,e.split("\n").length)))}function kn(e,t,n){let i=e;return(e-x.Vu)%x.fE==0&&(i=e+x.lP),Math.min(fn(n),Math.max(i,fn(t)))}function fn(e){return e*x.fE+x.lP+x.Vu}ht=gn,({e:[J,U,X,$,Z,G,Q,ee,te,ne,ie,se,re,oe,ae,le,ce,ue,he,de,ge,me,pe,ke,fe,ve,Ae,ye,be,we,Me,Ce,Ee,xe,Se,We,Le,Ne,Be,Pe,_e,Oe,ze,Re,Ie,Ve,De,Te,Fe,He,Ke,Ye,qe,je,Je,Ue,Xe,$e,Ze,Ge,Qe,et,tt,nt,it,st,rt,ot,at,lt],c:[Wt,j]}=(0,c.A)(ht,[vt("vs.code-editor",{shadowOptions:!1})],[[At(),1,"name"],[At(),1,"label"],[At(),1,"value"],[At(),1,"language"],[At(),1,"theme"],[At({type:Boolean}),1,"required"],[At({type:Boolean}),1,"readOnly"],[At(),1,"automaticLayout"],[At({type:Number}),1,"minLines"],[At({attribute:!1}),1,"completers"],[At({attribute:!1}),1,"advancedCompleters"],[At({attribute:!1}),1,"markers"],[At({attribute:!1}),1,"links"],[At({type:Number}),1,"maxLines"],[At({attribute:!1}),1,"height"],[At(),1,"message"],[At(),1,"placeholder"],[At({type:Boolean}),1,"showExpandButton"],[At(),1,"lineNumbers"],[At({attribute:!1}),1,"tokenConfig"],[At({type:Boolean}),1,"customValidationInBrickNextYaml"],[At({type:Boolean}),1,"showCopyButton"],[At({type:Boolean}),1,"glyphMargin"],[At({attribute:!1}),1,"extraLibs"],[At({type:Boolean}),1,"fixedOverflowWidgets"],[At({type:Boolean}),1,"spellCheck"],[At({attribute:!1}),1,"knownWords"],[At({type:Boolean}),1,"domLibsEnabled"],[At(),1,"uri"],[yt({type:"code.change"}),1,"codeChange",e=>(0,l.A)(rn,e),(e,t)=>(0,a.A)(rn,e,t)],[yt({type:"user.input"}),1,"userInput",e=>(0,l.A)(an,e),(e,t)=>(0,a.A)(an,e,t)],[yt({type:"token.click"}),1,"tokenClickEvent",e=>(0,l.A)(un,e),(e,t)=>(0,a.A)(un,e,t)]],0,(e=>dn.has((0,r.A)(e))),v.N)),j()}}]);
|
|
2
|
-
//# sourceMappingURL=7242.d6c20093.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/7242.d6c20093.js","mappings":"+0BAgFAA,EAAAA,EAAAA,qBAAoBC,EAAAA,GAAIC,EAAAA,GAExBC,EAAAA,OAAcC,YACZ,cACAC,GAE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GAAA,CAAAA,EAAA7U,KAAAC,EAAAA,EAAAA,GAAAhG,GAAA4a,EAAA7U,IAAA,CAG9BzI,GAAM,CAAE+Z,KAAM,eAAe,cAAAuD,IAAA9U,EAAAA,EAAAA,GAAA3F,GAAAya,GAAA,CAAAA,EAAA7U,KAAAC,EAAAA,EAAAA,GAAA7F,GAAAya,EAAA7U,IAAA,CAa7BzI,GAAM,CAAE+Z,KAAM,gBAAgB,oBAAAuD,IAAA9U,EAAAA,EAAAA,GAAAxF,GAAAsa,GAAA,CAAAA,EAAA7U,KAAAC,EAAAA,EAAAA,GAAA1F,GAAAsa,EAAA7U,KAAA,GAAA8U,GAAAra,GAAAsa,KAAAC,EAAAA,EAAAA,GAAAF,KAzLRna,EAAAA,IAAmB4Z,G","sources":["webpack:///./src/code-editor/index.tsx"],"sourcesContent":["import React, {\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { EventEmitter, createDecorators } from \"@next-core/element\";\nimport { unwrapProvider } from \"@next-core/utils/general\";\nimport { wrapBrick } from \"@next-core/react-element\";\nimport { useCurrentTheme } from \"@next-core/react-runtime\";\nimport { getRuntime } from \"@next-core/runtime\";\nimport { HttpAbortError } from \"@next-core/http\";\nimport { FormItemElementBase } from \"@next-shared/form\";\nimport type { FormItem, FormItemProps } from \"@next-bricks/form/form-item\";\nimport * as monaco from \"monaco-editor\";\nimport {\n initializeTokensProvider,\n languages as textmateLanguages,\n} from \"@next-shared/monaco-textmate\";\nimport \"@next-shared/monaco-textmate/workers.js\";\nimport tmVsLight from \"@next-shared/monaco-textmate/themes/light-modern.json\";\nimport tmVsDark from \"@next-shared/monaco-textmate/themes/dark-modern.json\";\nimport yaml from \"js-yaml\";\nimport \"@next-core/theme\";\nimport { uniqueId, debounce } from \"lodash\";\nimport {\n EDITOR_SCROLLBAR_SIZE,\n EDITOR_PADDING_VERTICAL,\n EDITOR_LINE_HEIGHT,\n EDITOR_FONT_SIZE,\n} from \"./constants.js\";\nimport {\n AdvancedCompleterMap,\n ExtraLib,\n type MixedCompleter,\n} from \"./interfaces.js\";\nimport { brickNextYAMLProviderCompletionItems } from \"./utils/brickNextYaml.js\";\nimport { Level } from \"./utils/constants.js\";\nimport { setEditorId } from \"./utils/editorId.js\";\nimport {\n getEmbeddedJavascriptUri,\n getBrickYamlBuiltInDeclare,\n} from \"./utils/jsSuggestInBrickYaml.js\";\nimport type { EoTooltip, ToolTipProps } from \"@next-bricks/basic/tooltip\";\nimport type {\n GeneralIcon,\n GeneralIconProps,\n} from \"@next-bricks/icons/general-icon\";\nimport { useTranslation, initializeReactI18n } from \"@next-core/i18n/react\";\nimport { K, NS, locales } from \"./i18n.js\";\nimport type { copyToClipboard as _copyToClipboard } from \"@next-bricks/basic/data-providers/copy-to-clipboard\";\nimport type { showNotification as _showNotification } from \"@next-bricks/basic/data-providers/show-notification/show-notification\";\nimport classNames from \"classnames\";\nimport {\n MonacoCopilotProvider,\n SUPPORTED_LANGUAGES,\n} from \"@next-shared/monaco-copilot\";\nimport { AiopsBaseApi_openaiChat } from \"@next-api-sdk/llm-sdk\";\nimport \"./index.css\";\nimport { EmbeddedModelContext } from \"./utils/embeddedModelState.js\";\nimport { PlaceholderContentWidget } from \"./widget/Placeholder.js\";\nimport { getRemoteYamlLinterWorker } from \"./workers/yamlLinter.js\";\nimport { getRemoteSpellCheckWorker } from \"./workers/spellCheckRemoteWorker.js\";\nimport { register as registerCel } from \"./languages/cel.js\";\nimport { register as registerCelYaml } from \"./languages/cel-yaml.js\";\nimport { register as registerCelStr } from \"./languages/cel-str.js\";\nimport {\n provideEmbeddedCelCompletionItems,\n celCommonCompletionProviderFactory,\n celSpecificCompletionProviderFactory,\n} from \"./utils/celCompletionProvider.js\";\nimport {\n disposeEditor,\n isCurrentEditor,\n switchEditor,\n} from \"./utils/EditorService.js\";\nimport { setExtraLibs } from \"./utils/setExtraLibs.js\";\n\ninitializeReactI18n(NS, locales);\n\nmonaco.editor.defineTheme(\n \"tm-vs-light\",\n tmVsLight as monaco.editor.IStandaloneThemeData\n);\nmonaco.editor.defineTheme(\n \"tm-vs-dark\",\n tmVsDark as monaco.editor.IStandaloneThemeData\n);\n\nconst TEXTMATE_THEMES = [\"tm-vs-light\", \"tm-vs-dark\"];\nconst DARK_THEMES = [\"vs-dark\", \"hc-black\", \"tm-vs-dark\"];\n\nregisterCel(monaco);\nregisterCelYaml(monaco);\nregisterCelStr(monaco);\n\nconst EMBEDDED_CEL = [\"cel_yaml\", \"cel_str\"];\nconst CEL_FAMILY = [\"cel\", ...EMBEDDED_CEL];\nfor (const lang of EMBEDDED_CEL) {\n monaco.languages.registerCompletionItemProvider(lang, {\n triggerCharacters: [\"<\"],\n provideCompletionItems: provideEmbeddedCelCompletionItems,\n });\n}\n\nfor (const lang of CEL_FAMILY) {\n monaco.languages.registerCompletionItemProvider(\n lang,\n celCommonCompletionProviderFactory(lang)\n );\n}\n\n// istanbul ignore next\nconst { enabled: copilotEnabled, ...copilotOptions } =\n (getRuntime()?.getMiscSettings().globalMonacoEditorCopilotOptions ?? {}) as {\n enabled?: boolean;\n model?: string;\n debounce?: number;\n timeout?: number;\n };\n\n// istanbul ignore next\nif (copilotEnabled) {\n monaco.languages.registerInlineCompletionsProvider(\n SUPPORTED_LANGUAGES,\n new MonacoCopilotProvider({\n ...copilotOptions,\n async request({ model, temperature, system, prompt, signal }) {\n const response = await AiopsBaseApi_openaiChat(\n {\n model,\n temperature,\n enableSensitiveWordsFilter: false,\n stream: false,\n messages: [\n ...(system ? [{ role: \"system\", content: system }] : []),\n { role: \"user\", content: prompt },\n ],\n },\n {\n signal,\n interceptorParams: {\n ignoreLoadingBar: true,\n },\n }\n );\n return response.choices?.[0]?.message?.content?.trim();\n },\n HttpAbortError,\n })\n );\n}\n\nconst { defineElement, property, event } = createDecorators();\n\nconst WrappedFormItem = wrapBrick<FormItem, FormItemProps>(\"eo-form-item\");\nconst WrappedTooltip = wrapBrick<EoTooltip, ToolTipProps>(\"eo-tooltip\");\nconst WrappedIcon = wrapBrick<GeneralIcon, GeneralIconProps>(\"eo-icon\");\nconst copyToClipboard = unwrapProvider<typeof _copyToClipboard>(\n \"basic.copy-to-clipboard\"\n);\nconst showNotification = unwrapProvider<typeof _showNotification>(\n \"basic.show-notification\"\n);\n\nconst SPELL_CHECK = \"spell_check\";\nconst BRICK_NEXT_YAML_LINT = \"brick_next_yaml_lint\";\n\nexport interface CodeEditorProps {\n name?: string;\n label?: string;\n value?: string;\n language?: string;\n theme?: string;\n placeholder?: string;\n required?: boolean;\n readOnly?: boolean;\n automaticLayout?: \"fit-container\" | \"fit-content\" | \"none\";\n minLines?: number;\n maxLines?: number;\n height?: string | number;\n completers?: monaco.languages.CompletionItem[];\n tokenConfig?: TokenConfig;\n advancedCompleters?: AdvancedCompleterMap | MixedCompleter[];\n extraLibs?: ExtraLib[];\n markers?: Marker[];\n links?: string[];\n showExpandButton?: boolean;\n showCopyButton?: boolean;\n lineNumbers?: monaco.editor.LineNumbersType;\n glyphMargin?: boolean;\n validateState?: string;\n customValidationInBrickNextYaml?: boolean;\n fixedOverflowWidgets?: boolean;\n spellCheck?: boolean;\n knownWords?: string[];\n domLibsEnabled?: boolean;\n uri?: string;\n}\n\nexport interface Marker {\n token: string;\n level?: keyof typeof Level;\n message?: string;\n code?: {\n value: string;\n target: string;\n };\n params?: string[];\n}\n\nexport type TokenConfig = {\n showDSKey?: boolean;\n};\n\n/**\n * 构件代码编辑器\n * @category form-input-advanced\n */\nexport\n@defineElement(\"vs.code-editor\", {\n // There are a few issues for monaco-editor with shadow DOM.\n // So we use light DOM for now.\n // See https://github.com/microsoft/monaco-editor/issues?q=is%3Aissue+is%3Aopen+shadow+dom\n shadowOptions: false,\n})\nclass CodeEditor extends FormItemElementBase implements CodeEditorProps {\n @property()\n accessor name: string | undefined;\n\n @property()\n accessor label: string | undefined;\n\n @property()\n accessor value: string | undefined;\n\n /**\n * @default \"plaintext\"\n */\n @property()\n accessor language: string | undefined;\n\n /**\n * 主题,支持 `\"auto\" | \"vs\" | \"vs-dark\"`\n *\n * @default \"auto\"\n * @group ui\n */\n @property() accessor theme: string | undefined;\n\n @property({\n type: Boolean,\n })\n accessor required: boolean | undefined;\n\n @property({\n type: Boolean,\n })\n accessor readOnly: boolean | undefined;\n\n @property()\n accessor automaticLayout:\n | \"fit-container\"\n | \"fit-content\"\n | \"none\"\n | undefined;\n\n /**\n * @default 3\n */\n @property({ type: Number })\n accessor minLines: number | undefined;\n\n /**\n * 仅对 language 为 brick_next_yaml 有效,设置第一层属性名的自动补全。\n */\n @property({\n attribute: false,\n })\n accessor completers: monaco.languages.CompletionItem[] | undefined;\n\n /**\n * 高级自动补全配置。\n * - 设置为键值对时,仅对 language 为 brick_next_yaml 有效,设置任意的自动补全;\n * - 设置为数组时,当前仅对 language 为 cel 有效。\n * 未来将统一改为数组格式,废弃键值对格式的配置。\n */\n @property({\n attribute: false,\n })\n accessor advancedCompleters:\n | AdvancedCompleterMap\n | MixedCompleter[]\n | undefined;\n\n @property({ attribute: false })\n accessor markers: Marker[] | undefined;\n\n @property({ attribute: false })\n accessor links: string[] | undefined;\n\n /**\n * @default Infinity\n */\n @property({ type: Number })\n accessor maxLines: number | undefined;\n\n @property({ attribute: false })\n accessor height: string | number | undefined;\n\n @property()\n accessor message: string | undefined;\n\n @property()\n accessor placeholder: string | undefined;\n\n /**\n * 是否展示展开按钮\n */\n @property({ type: Boolean })\n accessor showExpandButton: boolean | undefined;\n\n /**\n * 行数配置\n */\n @property()\n accessor lineNumbers: monaco.editor.LineNumbersType | undefined;\n\n /**\n * 自定义高亮配置\n */\n @property({\n attribute: false,\n })\n accessor tokenConfig: TokenConfig | undefined;\n\n /**\n * 在 brick_next_yaml 中是否开启语义相关校验\n * @default false\n */\n @property({\n type: Boolean,\n })\n accessor customValidationInBrickNextYaml: boolean | undefined;\n\n /**\n * 是否展示复制按钮\n * @default true\n */\n @property({ type: Boolean })\n accessor showCopyButton: boolean | undefined;\n\n /**\n * 显示字形边距\n * @default false\n */\n @property({ type: Boolean })\n accessor glyphMargin: boolean | undefined;\n\n /**\n * 额外声明的 lib 库\n */\n @property({\n attribute: false,\n })\n accessor extraLibs: ExtraLib[] | undefined;\n\n /**\n * @default true\n */\n @property({ type: Boolean })\n accessor fixedOverflowWidgets: boolean | undefined;\n\n /**\n * 是否启用英语拼写检查\n * @default true\n */\n @property({ type: Boolean })\n accessor spellCheck: boolean | undefined;\n\n /**\n * 启用英语拼写检查时,除系统设置的词汇表外,指定其他的已知单词(小写)。\n */\n @property({ attribute: false })\n accessor knownWords: string[] | undefined;\n\n /**\n * 是否启用 DOM 相关接口的自动提示。\n */\n @property({ type: Boolean })\n accessor domLibsEnabled: boolean | undefined;\n\n @property()\n accessor uri: string | undefined;\n\n @event({ type: \"code.change\" })\n accessor #codeChange!: EventEmitter<string>;\n\n @event({ type: \"user.input\" })\n accessor #userInput!: EventEmitter<any>;\n\n #handleChange = (value: string) => {\n this.value = value;\n this.getFormElement()?.formStore.onChange(this.name!, value);\n this.#codeChange.emit(value);\n };\n\n #handleUserInput = (value: any) => {\n this.#userInput.emit(value);\n };\n\n @event({ type: \"token.click\" })\n accessor #tokenClickEvent!: EventEmitter<string>;\n\n #handleTokenClick = (word: string) => {\n this.#tokenClickEvent.emit(word);\n };\n\n #handleValidator = (value: string) => {\n if (this.language === \"brick_next_yaml\" || this.language === \"yaml\") {\n try {\n yaml.load(value);\n } catch {\n return \"请填写正确的格式\";\n }\n }\n return \"\";\n };\n\n connectedCallback(): void {\n // Don't override user's style settings.\n // istanbul ignore else\n if (!this.style.display) {\n this.style.display = \"block\";\n }\n super.connectedCallback();\n }\n\n render() {\n return (\n <WrappedFormItem\n exportparts=\"message\"\n curElement={this}\n formElement={this.getFormElement()}\n name={this.name}\n label={this.label}\n required={this.required}\n helpBrick={this.helpBrick}\n labelBrick={this.labelBrick}\n notRender={this.notRender}\n validator={this.#handleValidator}\n >\n <CodeEditorComponent\n value={this.value}\n language={this.language}\n readOnly={this.readOnly}\n theme={this.theme}\n automaticLayout={this.automaticLayout}\n minLines={this.minLines}\n maxLines={this.maxLines}\n height={this.height}\n completers={this.completers}\n advancedCompleters={this.advancedCompleters}\n extraLibs={this.extraLibs}\n markers={this.markers}\n links={this.links}\n tokenConfig={this.tokenConfig}\n lineNumbers={this.lineNumbers}\n glyphMargin={this.glyphMargin}\n placeholder={this.placeholder}\n showCopyButton={this.showCopyButton}\n showExpandButton={this.showExpandButton}\n validateState={this.validateState}\n onChange={this.#handleChange}\n onUserInput={this.#handleUserInput}\n onTokenClick={this.#handleTokenClick}\n customValidationInBrickNextYaml={this.customValidationInBrickNextYaml}\n fixedOverflowWidgets={this.fixedOverflowWidgets}\n spellCheck={this.spellCheck}\n knownWords={this.knownWords}\n domLibsEnabled={this.domLibsEnabled}\n uri={this.uri}\n />\n </WrappedFormItem>\n );\n }\n}\n\nexport function CodeEditorComponent({\n value: _value,\n language: _language,\n theme: _theme,\n minLines: _minLines,\n maxLines: _maxLines,\n height: _height,\n automaticLayout,\n completers,\n advancedCompleters,\n markers,\n readOnly,\n links,\n extraLibs,\n tokenConfig,\n showExpandButton,\n showCopyButton = true,\n lineNumbers = \"on\",\n glyphMargin = false,\n placeholder,\n validateState,\n onChange,\n // onUserInput,\n onTokenClick,\n customValidationInBrickNextYaml,\n fixedOverflowWidgets: _fixedOverflowWidgets,\n spellCheck: _spellCheck,\n knownWords,\n domLibsEnabled,\n uri,\n}: CodeEditorProps & {\n onChange(value: string): void;\n onUserInput: (value: any) => void;\n onTokenClick(word: string): void;\n}) {\n const value = _value ?? \"\";\n const language = _language ?? \"plaintext\";\n const theme = _theme ?? \"auto\";\n const minLines = _minLines ?? 3;\n const maxLines = _maxLines ?? Infinity;\n const height = _height ?? 500;\n const fixedOverflowWidgets = _fixedOverflowWidgets ?? true;\n const spellCheck = _spellCheck ?? true;\n const [expanded, setExpanded] = useState(false);\n const workerId = useMemo(() => uniqueId(\"worker\"), []);\n\n const { t } = useTranslation(NS);\n\n const containerRef = useRef<HTMLDivElement>(null);\n const decorationsCollection =\n useRef<monaco.editor.IEditorDecorationsCollection>();\n const editorRef = useRef<monaco.editor.IStandaloneCodeEditor>();\n const size = useRef<monaco.editor.IDimension>({\n width: 300,\n height: getContentHeightByCode(value, minLines, maxLines),\n });\n const [actualHeight, setActualHeight] = useState<string | number>();\n // `automaticLayout` should never change\n const automaticLayoutRef = useRef(automaticLayout);\n const systemTheme = useCurrentTheme();\n\n const useTextmateTheme = textmateLanguages.includes(language);\n const computedTheme = useMemo(() => {\n const candidateTheme =\n theme === \"auto\"\n ? systemTheme === \"dark\" || systemTheme === \"dark-v2\"\n ? \"vs-dark\"\n : \"vs\"\n : theme;\n if (useTextmateTheme && !TEXTMATE_THEMES.includes(candidateTheme)) {\n return DARK_THEMES.includes(candidateTheme)\n ? \"tm-vs-dark\"\n : \"tm-vs-light\";\n }\n return candidateTheme;\n }, [systemTheme, theme, useTextmateTheme]);\n const isDarkTheme = DARK_THEMES.includes(computedTheme);\n\n useEffect(() => {\n if (TEXTMATE_THEMES.includes(computedTheme)) {\n return;\n }\n const lineHighlightBackground = isDarkTheme ? \"#FFFFFF0F\" : \"#0000000A\";\n monaco.editor.defineTheme(\"custom-theme\", {\n base: computedTheme as \"vs-dark\" | \"vs\",\n inherit: true,\n rules: [],\n colors: {\n \"editor.lineHighlightBackground\": `${lineHighlightBackground}`,\n },\n });\n // Currently theme is configured globally.\n // See https://github.com/microsoft/monaco-editor/issues/338\n monaco.editor.setTheme(\"custom-theme\");\n }, [computedTheme, isDarkTheme]);\n\n useEffect(() => {\n monaco.editor.setTheme(computedTheme);\n }, [computedTheme]);\n\n useEffect(() => {\n if (editorRef.current) {\n const currentModel = editorRef.current.getModel()!;\n monaco.editor.setModelLanguage(currentModel, language);\n }\n initializeTokensProvider(language);\n }, [language]);\n\n useEffect(() => {\n if (language === \"brick_next_yaml\") {\n const provideCompletionItems = brickNextYAMLProviderCompletionItems(\n completers,\n Array.isArray(advancedCompleters) ? undefined : advancedCompleters,\n workerId,\n tokenConfig\n );\n const monacoProviderRef = monaco.languages.registerCompletionItemProvider(\n \"brick_next_yaml\",\n {\n provideCompletionItems,\n triggerCharacters: [\".\", \":\", \"<\"],\n } as monaco.languages.CompletionItemProvider\n );\n return () => {\n monacoProviderRef.dispose();\n };\n }\n }, [completers, advancedCompleters, language, workerId, tokenConfig]);\n\n useEffect(() => {\n if (\n Array.isArray(advancedCompleters) &&\n advancedCompleters.length > 0 &&\n CEL_FAMILY.includes(language)\n ) {\n const disposable = monaco.languages.registerCompletionItemProvider(\n language,\n celSpecificCompletionProviderFactory(\n language,\n workerId,\n advancedCompleters\n )\n );\n return () => {\n disposable.dispose();\n };\n }\n }, [language, advancedCompleters, workerId]);\n\n useEffect(() => {\n const editor = editorRef.current;\n if (editor) {\n const currentModel = editor.getModel();\n if (currentModel?.getValue && value !== currentModel.getValue()) {\n currentModel.setValue(value as string);\n }\n }\n }, [value]);\n\n useLayoutEffect(() => {\n if (automaticLayoutRef.current !== \"fit-content\" || !containerRef.current) {\n return;\n }\n\n size.current.width = containerRef.current.getBoundingClientRect().width;\n editorRef.current?.layout(size.current);\n\n const observer = new ResizeObserver((entries) => {\n for (const entry of entries) {\n if (entry.target === containerRef.current) {\n // istanbul ignore next: compatibility\n const newWidth = entry.contentBoxSize\n ? entry.contentBoxSize[0]\n ? entry.contentBoxSize[0].inlineSize\n : (entry.contentBoxSize as unknown as ResizeObserverSize)\n .inlineSize\n : entry.contentRect.width;\n // istanbul ignore next: compatibility\n const newHeight = entry.contentBoxSize\n ? entry.contentBoxSize[0]\n ? entry.contentBoxSize[0].blockSize\n : (entry.contentBoxSize as unknown as ResizeObserverSize)\n .blockSize\n : entry.contentRect.height;\n if (newWidth !== size.current.width || expanded) {\n size.current.width = newWidth;\n editorRef.current?.layout({\n width: newWidth,\n height: expanded ? newHeight : size.current.height,\n });\n }\n break;\n }\n }\n });\n observer.observe(containerRef.current);\n\n return () => {\n observer.disconnect();\n };\n }, [expanded]);\n\n useLayoutEffect(() => {\n if (automaticLayoutRef.current !== \"fit-container\") {\n return;\n }\n\n const container = getDOMContainer(containerRef.current);\n if (!container) {\n return;\n }\n // Manually layout the editor once the container resized.\n const observer = new ResizeObserver((): void => {\n setActualHeight(container.offsetHeight);\n });\n observer.observe(container);\n return () => {\n observer.disconnect();\n };\n }, []);\n\n useEffect(() => {\n if (\n automaticLayoutRef.current !== \"fit-container\" &&\n automaticLayoutRef.current !== \"fit-content\"\n ) {\n setActualHeight(height);\n }\n }, [height]);\n\n useEffect(() => {\n if (!editorRef.current) return;\n editorRef.current.updateOptions({\n readOnly,\n lineNumbersMinChars: expanded ? 5 : 3,\n });\n }, [readOnly, expanded]);\n\n useEffect(() => {\n if (editorRef.current || !containerRef.current) {\n return;\n }\n const model = monaco.editor.createModel(\n value,\n language,\n uri ? monaco.Uri.parse(uri) : undefined\n );\n let embeddedModel: monaco.editor.ITextModel | undefined;\n if (language === \"brick_next_yaml\") {\n // 注册嵌套的 model, language 为 js\n const embeddedUri = getEmbeddedJavascriptUri(model.uri);\n embeddedModel = monaco.editor.createModel(\n value,\n \"javascript\",\n embeddedUri\n );\n monaco.languages.typescript.javascriptDefaults.addExtraLib(\n getBrickYamlBuiltInDeclare(),\n model.uri.toString() + \"d.ts\"\n );\n }\n\n const editor = (editorRef.current = monaco.editor.create(\n containerRef.current,\n {\n extraEditorClassName: \"monaco-editor-v3\",\n model,\n minimap: {\n enabled: false,\n showRegionSectionHeaders: false,\n showMarkSectionHeaders: false,\n },\n scrollBeyondLastLine: false,\n tabSize: 2,\n insertSpaces: true,\n automaticLayout: automaticLayoutRef.current !== \"fit-content\",\n fontSize: EDITOR_FONT_SIZE,\n lineHeight: EDITOR_LINE_HEIGHT,\n scrollbar: {\n horizontalScrollbarSize: EDITOR_SCROLLBAR_SIZE,\n verticalScrollbarSize: EDITOR_SCROLLBAR_SIZE,\n horizontalSliderSize: 8,\n verticalSliderSize: 8,\n alwaysConsumeMouseWheel: false,\n },\n padding: {\n top: EDITOR_PADDING_VERTICAL,\n // When use `fit-content`, we always plus the height with the vertical padding.\n // Thus the possible x-scrollbar will not take extra space at the bottom.\n bottom:\n automaticLayoutRef.current == \"fit-content\"\n ? undefined\n : EDITOR_PADDING_VERTICAL,\n },\n overviewRulerBorder: false,\n mouseWheelScrollSensitivity: 0.5,\n fixedOverflowWidgets,\n lineNumbers: lineNumbers,\n lineNumbersMinChars: 3,\n glyphMargin,\n folding: lineNumbers !== \"off\",\n suggest: {\n insertMode: \"insert\",\n preview: true,\n },\n readOnly: readOnly,\n quickSuggestions: { strings: true, other: true, comments: true },\n renderLineHighlightOnlyWhenFocus: true,\n unicodeHighlight: {\n ambiguousCharacters: false,\n },\n }\n ));\n\n decorationsCollection.current =\n editorRef.current.createDecorationsCollection();\n\n return () => {\n model.dispose();\n editor.dispose();\n embeddedModel?.dispose();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const languageDefaults =\n language === \"typescript\" ? \"typescriptDefaults\" : \"javascriptDefaults\";\n\n useEffect(() => {\n if (\n language === \"javascript\" ||\n language === \"typescript\" ||\n language === \"brick_next_yaml\"\n ) {\n monaco.languages.typescript[languageDefaults].setCompilerOptions({\n allowNonTsExtensions: true,\n lib: domLibsEnabled ? undefined : [\"esnext\"],\n target: monaco.languages.typescript.ScriptTarget.ESNext,\n module: monaco.languages.typescript.ModuleKind.ESNext,\n jsx: monaco.languages.typescript.JsxEmit.Preserve,\n });\n }\n }, [language, domLibsEnabled, languageDefaults]);\n\n useEffect(() => {\n const editor = editorRef.current;\n if (!editor) {\n return;\n }\n return () => {\n disposeEditor(editor);\n };\n }, []);\n\n useEffect(() => {\n const editor = editorRef.current;\n if (!editor) {\n return;\n }\n\n const setupLanguageService = () => {\n setExtraLibs(extraLibs, { languageDefaults });\n\n if (\n language === \"javascript\" ||\n language === \"typescript\" ||\n language === \"brick_next_yaml\"\n ) {\n monaco.languages.typescript[languageDefaults].setCompilerOptions({\n allowNonTsExtensions: true,\n lib: domLibsEnabled ? undefined : [\"esnext\"],\n target: monaco.languages.typescript.ScriptTarget.ESNext,\n module: monaco.languages.typescript.ModuleKind.ESNext,\n jsx: monaco.languages.typescript.JsxEmit.Preserve,\n });\n }\n };\n\n if (isCurrentEditor(editor)) {\n setupLanguageService();\n }\n\n const disposable = editor.onDidFocusEditorWidget(() => {\n // Set language service for this particular editor instance\n if (switchEditor(editor)) {\n setupLanguageService();\n }\n });\n return () => {\n disposable.dispose();\n };\n }, [domLibsEnabled, extraLibs, language, languageDefaults]);\n\n useEffect(() => {\n const editor = editorRef.current;\n if (language === \"brick_next_yaml\" && editor) {\n const model = editor.getModel()!;\n const editorMouseDownEvent = editor.onMouseDown(function (e) {\n const decorations = decorationsCollection.current;\n (decorations?.getRanges?.() ?? []).forEach((range) => {\n const modKey = /Mac|iPod|iPhone|iPad/.test(navigator.platform)\n ? \"metaKey\"\n : \"ctrlKey\";\n if (\n range &&\n e.target.position &&\n e.event[modKey] &&\n range.containsPosition(e.target.position)\n ) {\n onTokenClick(model.getValueInRange(range));\n }\n });\n });\n\n const mouseOverEvent = editor.onMouseMove(function (e) {\n const decorations = decorationsCollection.current;\n if (!decorations) return;\n decorations.getRanges().forEach((range) => {\n const modKey = /Mac|iPod|iPhone|iPad/.test(navigator.platform)\n ? \"metaKey\"\n : \"ctrlKey\";\n if (\n range &&\n e.target.position &&\n e.event[modKey] &&\n range.containsPosition(e.target.position)\n ) {\n const newDecorations = decorations.getRanges().map((item) => ({\n range: item,\n options: {\n inlineClassName: range.equalsRange(item)\n ? \"highlight pointer\"\n : \"highlight\",\n },\n }));\n decorations.set(newDecorations);\n } else if (!e.event[modKey]) {\n const newDecorations = decorations.getRanges().map((item) => ({\n range: item,\n options: {\n inlineClassName: \"highlight\",\n },\n }));\n decorations.set(newDecorations);\n }\n });\n });\n\n return () => {\n mouseOverEvent?.dispose();\n editorMouseDownEvent?.dispose();\n };\n }\n }, [language, onTokenClick, systemTheme, theme]);\n\n useEffect(() => {\n const editor = editorRef.current;\n if (\n !editor ||\n !containerRef.current ||\n automaticLayoutRef.current !== \"fit-content\"\n ) {\n return;\n }\n\n const listener = editor.onDidContentSizeChange((e) => {\n if (expanded) return;\n if (e.contentHeightChanged) {\n const newHeight = fixEditorHeightWithScrollBar(\n e.contentHeight,\n minLines,\n maxLines\n );\n if (newHeight !== size.current.height) {\n size.current.height = newHeight;\n editor.layout(size.current);\n }\n }\n });\n\n const newHeight = fixEditorHeightWithScrollBar(\n editor.getContentHeight(),\n minLines,\n maxLines\n );\n if (newHeight !== size.current.height) {\n size.current.height = newHeight;\n editor.layout(size.current);\n }\n\n return () => {\n listener.dispose();\n };\n }, [maxLines, minLines, expanded]);\n\n // istanbul ignore next\n const embeddedModelProcessor = useCallback(\n async (model: monaco.editor.IModel, position: monaco.Position) => {\n monaco.editor.setModelMarkers(model, \"semantic_validate\", []);\n\n const prefixEvaluateOperator = model.findPreviousMatch(\n \"<%[~=]?\",\n position,\n true,\n false,\n null,\n false\n );\n\n const suffixEvaluateOperator = model.findNextMatch(\n \"%>\",\n position,\n false,\n false,\n null,\n false\n );\n\n const prefixEvaluateRange = prefixEvaluateOperator?.range;\n const suffixEvaluateRange = suffixEvaluateOperator?.range;\n\n if (prefixEvaluateRange && suffixEvaluateRange) {\n const range = new monaco.Range(\n prefixEvaluateRange.startLineNumber,\n prefixEvaluateRange.endColumn,\n suffixEvaluateRange.startLineNumber,\n suffixEvaluateRange.startColumn\n );\n\n const content = model.getValueInRange(range);\n if (range.containsPosition(position!) && !/<% | %>/.test(content)) {\n const newUri = getEmbeddedJavascriptUri(model.uri);\n const embeddedModel = monaco.editor.getModel(newUri);\n\n embeddedModel!.setValue(content);\n const offset = model.getOffsetAt(\n new monaco.Position(\n prefixEvaluateRange.startLineNumber,\n prefixEvaluateRange.endColumn\n )\n );\n\n const embeddedContext = EmbeddedModelContext.getInstance(workerId);\n\n embeddedContext.updateState({ content, range, offset });\n\n if (!customValidationInBrickNextYaml) return;\n\n const getWorker =\n await monaco.languages.typescript.getJavaScriptWorker();\n\n const worker = await getWorker(newUri);\n\n const diagnostics = await worker.getSemanticDiagnostics(\n newUri.toString()\n );\n\n const semanticMarkers = diagnostics.map((item) => {\n const finalOffset = offset + (item.start ?? 0);\n const currentPosition = model.getPositionAt(finalOffset);\n\n return {\n startLineNumber: currentPosition.lineNumber,\n startColumn: currentPosition.column,\n endLineNumber: currentPosition.lineNumber,\n endColumn: currentPosition.column + item.length!,\n message: item.messageText as string,\n severity: monaco.MarkerSeverity.Warning,\n };\n });\n\n monaco.editor.setModelMarkers(\n model,\n \"semantic_validate\",\n semanticMarkers\n );\n }\n }\n },\n [workerId]\n );\n\n useEffect(() => {\n if (!editorRef.current) {\n return;\n }\n const currentModel = editorRef.current.getModel()!;\n const listener = currentModel.onDidChangeContent(async (e) => {\n setEditorId(workerId);\n\n if ([\"brick_next_yaml\"].includes(language)) {\n embeddedModelProcessor(currentModel, editorRef.current!.getPosition()!);\n // debounceParse();\n }\n if (!e.isFlush) {\n onChange(currentModel.getValue());\n }\n });\n return () => {\n listener.dispose();\n };\n }, [\n /* debounceParse, */ onChange,\n workerId,\n language,\n embeddedModelProcessor,\n ]);\n\n useEffect(() => {\n if (expanded) {\n const fn = (e: KeyboardEvent): void => {\n if (e.key === \"Escape\" || e.key === \"Esc\") {\n window.removeEventListener(\"keydown\", fn);\n setExpanded(false);\n }\n };\n window.addEventListener(\"keydown\", fn);\n return () => {\n window.removeEventListener(\"keydown\", fn);\n };\n }\n }, [expanded]);\n\n useEffect(() => {\n if (!editorRef.current && !placeholder) return;\n const placeholderWidget = new PlaceholderContentWidget(\n placeholder!,\n editorRef.current!,\n isDarkTheme ? \"rgba(174,174,175,0.4)\" : \"rgba(89,89,89,0.4)\"\n );\n\n return () => {\n placeholderWidget.dispose();\n };\n }, [placeholder, isDarkTheme]);\n\n const handleCopyIconClick = useCallback(() => {\n if (editorRef.current) {\n const currentModel = editorRef.current.getModel()!;\n copyToClipboard(currentModel.getValue())\n .then(() =>\n showNotification({ type: \"success\", message: t(K.COPY_SUCCESS) })\n )\n .catch(() =>\n showNotification({ type: \"error\", message: t(K.COPY_FAILED) })\n );\n }\n }, [t]);\n\n const handleExpandedClick = useCallback(() => {\n setExpanded(!expanded);\n }, [expanded]);\n\n // istanbul ignore next\n useEffect(() => {\n const editor = editorRef.current;\n if (!(editor && language === \"brick_next_yaml\")) {\n return;\n }\n\n let ignore = false;\n const handleChange = async () => {\n const worker = await getRemoteYamlLinterWorker();\n if (ignore) {\n return;\n }\n const { lintMarkers, lintDecorations } = await worker.lint({\n source: editor.getValue(),\n links,\n markers,\n });\n const model = editor.getModel();\n if (ignore || !model) {\n return;\n }\n monaco.editor.setModelMarkers(\n model,\n BRICK_NEXT_YAML_LINT,\n lintMarkers.map(({ start, end, message, severity, code }) => {\n const startPos = model.getPositionAt(start);\n const endPos = model.getPositionAt(end);\n return {\n startLineNumber: startPos.lineNumber,\n startColumn: startPos.column,\n endLineNumber: endPos.lineNumber,\n endColumn: endPos.column,\n severity: monaco.MarkerSeverity[severity],\n message,\n code: code as monaco.editor.IMarkerData[\"code\"],\n };\n })\n );\n decorationsCollection.current?.set(\n lintDecorations.map(({ start, end, options }) => ({\n range: monaco.Range.fromPositions(\n model.getPositionAt(start),\n model.getPositionAt(end)\n ),\n options,\n }))\n );\n };\n const debounceChange = debounce(handleChange, 200);\n const change = editor.onDidChangeModelContent(debounceChange);\n debounceChange();\n\n return () => {\n ignore = true;\n change.dispose();\n monaco.editor.setModelMarkers(\n editor.getModel()!,\n BRICK_NEXT_YAML_LINT,\n []\n );\n };\n }, [language, links, markers, theme, workerId]);\n\n // istanbul ignore next\n useEffect(() => {\n const editor = editorRef.current;\n if (!editor || !spellCheck) {\n return;\n }\n\n let ignore = false;\n const handleChange = async () => {\n const worker = await getRemoteSpellCheckWorker();\n if (ignore) {\n return;\n }\n const { markers: spellCheckMarkers } = await worker.spellCheck({\n source: editor.getValue(),\n knownWords,\n });\n const model = editor.getModel();\n if (ignore || !model) {\n return;\n }\n monaco.editor.setModelMarkers(\n model,\n SPELL_CHECK,\n spellCheckMarkers.map(({ start, end, message, severity }) => {\n const startPos = model.getPositionAt(start);\n const endPos = model.getPositionAt(end);\n return {\n startLineNumber: startPos.lineNumber,\n startColumn: startPos.column,\n endLineNumber: endPos.lineNumber,\n endColumn: endPos.column,\n severity: monaco.MarkerSeverity[severity],\n message,\n };\n })\n );\n };\n const debounceChange = debounce(handleChange, 200);\n const change = editor.onDidChangeModelContent(debounceChange);\n debounceChange();\n\n return () => {\n ignore = true;\n change.dispose();\n monaco.editor.setModelMarkers(editor.getModel()!, SPELL_CHECK, []);\n };\n }, [spellCheck, knownWords]);\n\n return (\n <div\n className={classNames(\"code-editor-wrapper\", {\n expanded,\n error: validateState === \"error\",\n })}\n >\n <div\n ref={containerRef}\n style={{\n height: expanded ? \"100%\" : actualHeight,\n overflow: expanded ? \"scroll\" : \"\",\n }}\n />\n <div className=\"toolbar-wrapper\">\n <div className=\"toolbar sticky\">\n {showCopyButton && (\n <WrappedTooltip content={t(K.COPY) as string}>\n <WrappedIcon\n className=\"copy-icon\"\n icon=\"copy\"\n lib=\"antd\"\n theme=\"outlined\"\n onClick={handleCopyIconClick}\n />\n </WrappedTooltip>\n )}\n {showExpandButton && (\n <WrappedTooltip\n content={(expanded ? t(K.COLLAPSE) : t(K.EXPAND)) as string}\n >\n <WrappedIcon\n className=\"expand-icon\"\n icon={expanded ? \"compress\" : \"expand\"}\n lib=\"antd\"\n theme=\"outlined\"\n onClick={handleExpandedClick}\n />\n </WrappedTooltip>\n )}\n </div>\n </div>\n </div>\n );\n}\n\nfunction getContentHeightByCode(\n code: string,\n minLines: number,\n maxLines: number\n): number {\n return getContentHeightByLines(\n Math.min(maxLines, Math.max(minLines, code.split(\"\\n\").length))\n );\n}\n\nfunction fixEditorHeightWithScrollBar(\n contentHeight: number,\n minLines: number,\n maxLines: number\n): number {\n let fixedHeight = contentHeight;\n if ((contentHeight - EDITOR_PADDING_VERTICAL) % EDITOR_LINE_HEIGHT === 0) {\n fixedHeight = contentHeight + EDITOR_SCROLLBAR_SIZE;\n }\n return Math.min(\n getContentHeightByLines(maxLines),\n Math.max(fixedHeight, getContentHeightByLines(minLines))\n );\n}\n\nfunction getContentHeightByLines(lines: number): number {\n return (\n lines * EDITOR_LINE_HEIGHT + EDITOR_SCROLLBAR_SIZE + EDITOR_PADDING_VERTICAL\n );\n}\n\n/** Get the direct DOM container of `vs.code-editor` */\nfunction getDOMContainer(element: HTMLElement | null) {\n let brick = element;\n while (brick) {\n const found = brick.tagName.toLowerCase() === \"vs.code-editor\";\n brick = brick.parentElement;\n if (found) {\n return brick;\n }\n }\n}\n"],"names":["initializeReactI18n","NS","locales","monaco","defineTheme","tmVsLight","tmVsDark","TEXTMATE_THEMES","DARK_THEMES","registerCel","registerCelYaml","registerCelStr","EMBEDDED_CEL","CEL_FAMILY","lang","registerCompletionItemProvider","triggerCharacters","provideCompletionItems","provideEmbeddedCelCompletionItems","celCommonCompletionProviderFactory","enabled","copilotEnabled","copilotOptions","_getRuntime$getMiscSe","_getRuntime","getRuntime","getMiscSettings","globalMonacoEditorCopilotOptions","registerInlineCompletionsProvider","SUPPORTED_LANGUAGES","MonacoCopilotProvider","request","_ref","_response$choices","model","temperature","system","prompt","signal","AiopsBaseApi_openaiChat","enableSensitiveWordsFilter","stream","messages","role","content","interceptorParams","ignoreLoadingBar","choices","message","trim","HttpAbortError","defineElement","property","event","createDecorators","WrappedFormItem","wrapBrick","WrappedTooltip","WrappedIcon","copyToClipboard","unwrapProvider","showNotification","SPELL_CHECK","BRICK_NEXT_YAML_LINT","_CodeEditor","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_N","_O","_P","_Q","_R","_S","_T","_U","_V","_W","_X","_Y","_Z","_a","_b","_c","_d","_CodeEditor_brand","WeakSet","_e","_handleChange","_handleUserInput","_f","_handleTokenClick","_handleValidator","CodeEditor","FormItemElementBase","constructor","arguments","_classPrivateMethodInitSpec","_classPrivateFieldInitSpec","_init_name","_init_extra_name","_init_label","_init_extra_label","_init_value","_init_extra_value","_init_language","_init_extra_language","_init_theme","_init_extra_theme","_init_required","_init_extra_required","_init_readOnly","_init_extra_readOnly","_init_automaticLayout","_init_extra_automaticLayout","_init_minLines","_init_extra_minLines","_init_completers","_init_extra_completers","_init_advancedCompleters","_init_extra_advancedCompleters","_init_markers","_init_extra_markers","_init_links","_init_extra_links","_init_maxLines","_init_extra_maxLines","_init_height","_init_extra_height","_init_message","_init_extra_message","_init_placeholder","_init_extra_placeholder","_init_showExpandButton","_init_extra_showExpandButton","_init_lineNumbers","_init_extra_lineNumbers","_init_tokenConfig","_init_extra_tokenConfig","_init_customValidationInBrickNextYaml","_init_extra_customValidationInBrickNextYaml","_init_showCopyButton","_init_extra_showCopyButton","_init_glyphMargin","_init_extra_glyphMargin","_init_extraLibs","_init_extra_extraLibs","_init_fixedOverflowWidgets","_init_extra_fixedOverflowWidgets","_init_spellCheck","_init_extra_spellCheck","_init_knownWords","_init_extra_knownWords","_init_domLibsEnabled","_init_extra_domLibsEnabled","_init_uri","_init_extra_uri","_init_codeChange","_init_extra_codeChange","_init_userInput","_init_extra_userInput","value","_this$getFormElement","this","getFormElement","formStore","onChange","name","_classPrivateGetter","_get_codeChange","emit","_get_userInput","_init_tokenClickEvent","_init_extra_tokenClickEvent","word","_get_tokenClickEvent","language","yaml","_classPrivateFieldGet","v","_classPrivateFieldSet","label","theme","required","readOnly","automaticLayout","minLines","completers","advancedCompleters","markers","links","maxLines","height","placeholder","showExpandButton","lineNumbers","tokenConfig","customValidationInBrickNextYaml","showCopyButton","glyphMargin","extraLibs","fixedOverflowWidgets","spellCheck","knownWords","domLibsEnabled","uri","connectedCallback","style","display","super","render","React","exportparts","curElement","formElement","helpBrick","labelBrick","notRender","validator","CodeEditorComponent","validateState","onUserInput","onTokenClick","_ref2","_value","_language","_theme","_minLines","_maxLines","_height","_fixedOverflowWidgets","_spellCheck","Infinity","expanded","setExpanded","useState","workerId","useMemo","uniqueId","t","useTranslation","containerRef","useRef","decorationsCollection","editorRef","size","width","getContentHeightByCode","actualHeight","setActualHeight","automaticLayoutRef","systemTheme","useCurrentTheme","useTextmateTheme","textmateLanguages","includes","computedTheme","candidateTheme","isDarkTheme","useEffect","lineHighlightBackground","base","inherit","rules","colors","setTheme","current","currentModel","getModel","setModelLanguage","initializeTokensProvider","brickNextYAMLProviderCompletionItems","Array","isArray","undefined","monacoProviderRef","dispose","length","disposable","celSpecificCompletionProviderFactory","editor","getValue","setValue","useLayoutEffect","_editorRef$current","getBoundingClientRect","layout","observer","ResizeObserver","entries","entry","target","newWidth","contentBoxSize","inlineSize","contentRect","newHeight","blockSize","_editorRef$current2","observe","disconnect","container","element","brick","found","tagName","toLowerCase","parentElement","getDOMContainer","offsetHeight","updateOptions","lineNumbersMinChars","createModel","parse","embeddedModel","embeddedUri","getEmbeddedJavascriptUri","typescript","javascriptDefaults","addExtraLib","getBrickYamlBuiltInDeclare","toString","create","extraEditorClassName","minimap","showRegionSectionHeaders","showMarkSectionHeaders","scrollBeyondLastLine","tabSize","insertSpaces","fontSize","EDITOR_FONT_SIZE","lineHeight","EDITOR_LINE_HEIGHT","scrollbar","horizontalScrollbarSize","EDITOR_SCROLLBAR_SIZE","verticalScrollbarSize","horizontalSliderSize","verticalSliderSize","alwaysConsumeMouseWheel","padding","top","EDITOR_PADDING_VERTICAL","bottom","overviewRulerBorder","mouseWheelScrollSensitivity","folding","suggest","insertMode","preview","quickSuggestions","strings","other","comments","renderLineHighlightOnlyWhenFocus","unicodeHighlight","ambiguousCharacters","createDecorationsCollection","_embeddedModel","languageDefaults","setCompilerOptions","allowNonTsExtensions","lib","ScriptTarget","ESNext","module","ModuleKind","jsx","JsxEmit","Preserve","disposeEditor","setupLanguageService","setExtraLibs","isCurrentEditor","onDidFocusEditorWidget","switchEditor","editorMouseDownEvent","onMouseDown","e","_decorations$getRange","_decorations$getRange2","decorations","getRanges","call","forEach","range","modKey","test","navigator","platform","position","containsPosition","getValueInRange","mouseOverEvent","onMouseMove","newDecorations","map","item","options","inlineClassName","equalsRange","set","listener","onDidContentSizeChange","contentHeightChanged","fixEditorHeightWithScrollBar","contentHeight","getContentHeight","embeddedModelProcessor","useCallback","async","setModelMarkers","prefixEvaluateOperator","findPreviousMatch","suffixEvaluateOperator","findNextMatch","prefixEvaluateRange","suffixEvaluateRange","startLineNumber","endColumn","startColumn","newUri","offset","getOffsetAt","EmbeddedModelContext","getInstance","updateState","getWorker","getJavaScriptWorker","worker","semanticMarkers","getSemanticDiagnostics","_item$start","finalOffset","start","currentPosition","getPositionAt","lineNumber","column","endLineNumber","messageText","severity","Warning","onDidChangeContent","setEditorId","getPosition","isFlush","fn","key","window","removeEventListener","addEventListener","placeholderWidget","PlaceholderContentWidget","handleCopyIconClick","then","type","K","COPY_SUCCESS","catch","COPY_FAILED","handleExpandedClick","ignore","debounceChange","debounce","_decorationsCollectio","getRemoteYamlLinterWorker","lintMarkers","lintDecorations","lint","source","_ref3","end","code","startPos","endPos","_ref4","fromPositions","change","onDidChangeModelContent","getRemoteSpellCheckWorker","spellCheckMarkers","_ref5","className","classNames","error","ref","overflow","COPY","icon","onClick","COLLAPSE","EXPAND","getContentHeightByLines","Math","min","max","split","fixedHeight","lines","_CodeEditor2","_set_codeChange","_set_userInput","_set_tokenClickEvent","c","_initClass","_applyDecs","shadowOptions","Boolean","Number","attribute","o","_","has","_checkInRHS"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_next_bricks_vs=globalThis.webpackChunk_next_bricks_vs||[]).push([[3722],{32580:(e,t,n)=>{n.r(t),n.d(t,{CodeEditor:()=>Wt,CodeEditorComponent:()=>mn});var i=n(74635),s=n(70918),r=n(26902),o=n(5536),a=n(86121),l=n(70829),c=n(62740),u=n(18769),h=n.n(u),d=n(7921),g=n(37732),m=n(11280),p=n(4273),k=n(23081),f=n(41361),v=n(30426),A=n(62001),y=n(88849),b=(n(29844),n(18965)),w=n(98967),M=n(55310),C=n.n(M),E=(n(65168),n(20563)),x=n(97137),S=n(4046),W=n(44804),L=n(24102),N=n(69704),B=n(8182),P=n(53373),_=n.n(P),O=n(47726),z=n(72414),R=(n(73569),n(11968)),I=n(71836),V=n(5087),D=n(85808),T=n(90896),F=n(62066),H=n(98546),K=n(46984),Y=n(4794),q=n(55262);let j,J,U,X,$,Z,G,Q,ee,te,ne,ie,se,re,oe,ae,le,ce,ue,he,de,ge,me,pe,ke,fe,ve,Ae,ye,be,we,Me,Ce,Ee,xe,Se,We,Le,Ne,Be,Pe,_e,Oe,ze,Re,Ie,Ve,De,Te,Fe,He,Ke,Ye,qe,je,Je,Ue,Xe,$e,Ze,Ge,Qe,et,tt,nt,it,st,rt,ot,at,lt;var ct,ut,ht;(0,N.initializeReactI18n)(B.NS,B.I),A.editor.defineTheme("tm-vs-light",b),A.editor.defineTheme("tm-vs-dark",w);const dt=["tm-vs-light","tm-vs-dark"],gt=["vs-dark","hc-black","tm-vs-dark"];(0,T.kz)(A),(0,F.kz)(A),(0,H.kz)(A);const mt=["cel_yaml","cel_str"],pt=["cel",...mt];for(const e of mt)A.languages.registerCompletionItemProvider(e,{triggerCharacters:["<"],provideCompletionItems:K.ix});for(const e of pt)A.languages.registerCompletionItemProvider(e,(0,K.ZY)(e));const{enabled:kt,...ft}=null!==(ct=null===(ut=(0,k.getRuntime)())||void 0===ut?void 0:ut.getMiscSettings().globalMonacoEditorCopilotOptions)&&void 0!==ct?ct:{};kt&&A.languages.registerInlineCompletionsProvider(O.F,new O.$({...ft,async request(e){var t;let{model:n,temperature:i,system:s,prompt:r,signal:o}=e;return null===(t=(await(0,z.b)({model:n,temperature:i,enableSensitiveWordsFilter:!1,stream:!1,messages:[...s?[{role:"system",content:s}]:[],{role:"user",content:r}]},{signal:o,interceptorParams:{ignoreLoadingBar:!0}})).choices)||void 0===t||null===(t=t[0])||void 0===t||null===(t=t.message)||void 0===t||null===(t=t.content)||void 0===t?void 0:t.trim()},HttpAbortError:f.HttpAbortError}));const{defineElement:vt,property:At,event:yt}=(0,d.createDecorators)(),bt=(0,m.wrapBrick)("eo-form-item"),wt=(0,m.wrapBrick)("eo-tooltip"),Mt=(0,m.wrapBrick)("eo-icon"),Ct=(0,g.unwrapProvider)("basic.copy-to-clipboard"),Et=(0,g.unwrapProvider)("basic.show-notification"),xt="spell_check",St="brick_next_yaml_lint";let Wt;var Lt=new WeakMap,Nt=new WeakMap,Bt=new WeakMap,Pt=new WeakMap,_t=new WeakMap,Ot=new WeakMap,zt=new WeakMap,Rt=new WeakMap,It=new WeakMap,Vt=new WeakMap,Dt=new WeakMap,Tt=new WeakMap,Ft=new WeakMap,Ht=new WeakMap,Kt=new WeakMap,Yt=new WeakMap,qt=new WeakMap,jt=new WeakMap,Jt=new WeakMap,Ut=new WeakMap,Xt=new WeakMap,$t=new WeakMap,Zt=new WeakMap,Gt=new WeakMap,Qt=new WeakMap,en=new WeakMap,tn=new WeakMap,nn=new WeakMap,sn=new WeakMap,rn=new WeakMap,on=new WeakSet,an=new WeakMap,ln=new WeakMap,cn=new WeakMap,un=new WeakMap,hn=new WeakMap,dn=new WeakMap;class gn extends v.N{constructor(){super(...arguments),(0,i.A)(this,on),(0,s.A)(this,Lt,J(this)),(0,s.A)(this,Nt,(U(this),X(this))),(0,s.A)(this,Bt,($(this),Z(this))),(0,s.A)(this,Pt,(G(this),Q(this))),(0,s.A)(this,_t,(ee(this),te(this))),(0,s.A)(this,Ot,(ne(this),ie(this))),(0,s.A)(this,zt,(se(this),re(this))),(0,s.A)(this,Rt,(oe(this),ae(this))),(0,s.A)(this,It,(le(this),ce(this))),(0,s.A)(this,Vt,(ue(this),he(this))),(0,s.A)(this,Dt,(de(this),ge(this))),(0,s.A)(this,Tt,(me(this),pe(this))),(0,s.A)(this,Ft,(ke(this),fe(this))),(0,s.A)(this,Ht,(ve(this),Ae(this))),(0,s.A)(this,Kt,(ye(this),be(this))),(0,s.A)(this,Yt,(we(this),Me(this))),(0,s.A)(this,qt,(Ce(this),Ee(this))),(0,s.A)(this,jt,(xe(this),Se(this))),(0,s.A)(this,Jt,(We(this),Le(this))),(0,s.A)(this,Ut,(Ne(this),Be(this))),(0,s.A)(this,Xt,(Pe(this),_e(this))),(0,s.A)(this,$t,(Oe(this),ze(this))),(0,s.A)(this,Zt,(Re(this),Ie(this))),(0,s.A)(this,Gt,(Ve(this),De(this))),(0,s.A)(this,Qt,(Te(this),Fe(this))),(0,s.A)(this,en,(He(this),Ke(this))),(0,s.A)(this,tn,(Ye(this),qe(this))),(0,s.A)(this,nn,(je(this),Je(this))),(0,s.A)(this,sn,(Ue(this),Xe(this))),(0,s.A)(this,rn,($e(this),Ze(this))),(0,s.A)(this,an,(et(this),tt(this))),(0,s.A)(this,ln,(st(this),e=>{var t;this.value=e,null===(t=this.getFormElement())||void 0===t||t.formStore.onChange(this.name,e),(0,o.A)(on,this,Ge).emit(e)})),(0,s.A)(this,cn,(e=>{(0,o.A)(on,this,nt).emit(e)})),(0,s.A)(this,un,rt(this)),(0,s.A)(this,hn,(lt(this),e=>{(0,o.A)(on,this,ot).emit(e)})),(0,s.A)(this,dn,(e=>{if("brick_next_yaml"===this.language||"yaml"===this.language)try{C().load(e)}catch{return"请填写正确的格式"}return""}))}get name(){return(0,l.A)(Lt,this)}set name(e){(0,a.A)(Lt,this,e)}get label(){return(0,l.A)(Nt,this)}set label(e){(0,a.A)(Nt,this,e)}get value(){return(0,l.A)(Bt,this)}set value(e){(0,a.A)(Bt,this,e)}get language(){return(0,l.A)(Pt,this)}set language(e){(0,a.A)(Pt,this,e)}get theme(){return(0,l.A)(_t,this)}set theme(e){(0,a.A)(_t,this,e)}get required(){return(0,l.A)(Ot,this)}set required(e){(0,a.A)(Ot,this,e)}get readOnly(){return(0,l.A)(zt,this)}set readOnly(e){(0,a.A)(zt,this,e)}get automaticLayout(){return(0,l.A)(Rt,this)}set automaticLayout(e){(0,a.A)(Rt,this,e)}get minLines(){return(0,l.A)(It,this)}set minLines(e){(0,a.A)(It,this,e)}get completers(){return(0,l.A)(Vt,this)}set completers(e){(0,a.A)(Vt,this,e)}get advancedCompleters(){return(0,l.A)(Dt,this)}set advancedCompleters(e){(0,a.A)(Dt,this,e)}get markers(){return(0,l.A)(Tt,this)}set markers(e){(0,a.A)(Tt,this,e)}get links(){return(0,l.A)(Ft,this)}set links(e){(0,a.A)(Ft,this,e)}get maxLines(){return(0,l.A)(Ht,this)}set maxLines(e){(0,a.A)(Ht,this,e)}get height(){return(0,l.A)(Kt,this)}set height(e){(0,a.A)(Kt,this,e)}get message(){return(0,l.A)(Yt,this)}set message(e){(0,a.A)(Yt,this,e)}get placeholder(){return(0,l.A)(qt,this)}set placeholder(e){(0,a.A)(qt,this,e)}get showExpandButton(){return(0,l.A)(jt,this)}set showExpandButton(e){(0,a.A)(jt,this,e)}get lineNumbers(){return(0,l.A)(Jt,this)}set lineNumbers(e){(0,a.A)(Jt,this,e)}get tokenConfig(){return(0,l.A)(Ut,this)}set tokenConfig(e){(0,a.A)(Ut,this,e)}get customValidationInBrickNextYaml(){return(0,l.A)(Xt,this)}set customValidationInBrickNextYaml(e){(0,a.A)(Xt,this,e)}get showCopyButton(){return(0,l.A)($t,this)}set showCopyButton(e){(0,a.A)($t,this,e)}get glyphMargin(){return(0,l.A)(Zt,this)}set glyphMargin(e){(0,a.A)(Zt,this,e)}get extraLibs(){return(0,l.A)(Gt,this)}set extraLibs(e){(0,a.A)(Gt,this,e)}get fixedOverflowWidgets(){return(0,l.A)(Qt,this)}set fixedOverflowWidgets(e){(0,a.A)(Qt,this,e)}get spellCheck(){return(0,l.A)(en,this)}set spellCheck(e){(0,a.A)(en,this,e)}get knownWords(){return(0,l.A)(tn,this)}set knownWords(e){(0,a.A)(tn,this,e)}get domLibsEnabled(){return(0,l.A)(nn,this)}set domLibsEnabled(e){(0,a.A)(nn,this,e)}get uri(){return(0,l.A)(sn,this)}set uri(e){(0,a.A)(sn,this,e)}connectedCallback(){this.style.display||(this.style.display="block"),super.connectedCallback()}render(){return h().createElement(bt,{exportparts:"message",curElement:this,formElement:this.getFormElement(),name:this.name,label:this.label,required:this.required,helpBrick:this.helpBrick,labelBrick:this.labelBrick,notRender:this.notRender,validator:(0,l.A)(dn,this)},h().createElement(mn,{value:this.value,language:this.language,readOnly:this.readOnly,theme:this.theme,automaticLayout:this.automaticLayout,minLines:this.minLines,maxLines:this.maxLines,height:this.height,completers:this.completers,advancedCompleters:this.advancedCompleters,extraLibs:this.extraLibs,markers:this.markers,links:this.links,tokenConfig:this.tokenConfig,lineNumbers:this.lineNumbers,glyphMargin:this.glyphMargin,placeholder:this.placeholder,showCopyButton:this.showCopyButton,showExpandButton:this.showExpandButton,validateState:this.validateState,onChange:(0,l.A)(ln,this),onUserInput:(0,l.A)(cn,this),onTokenClick:(0,l.A)(hn,this),customValidationInBrickNextYaml:this.customValidationInBrickNextYaml,fixedOverflowWidgets:this.fixedOverflowWidgets,spellCheck:this.spellCheck,knownWords:this.knownWords,domLibsEnabled:this.domLibsEnabled,uri:this.uri}))}}function mn(e){let{value:t,language:n,theme:i,minLines:s,maxLines:r,height:o,automaticLayout:a,completers:l,advancedCompleters:c,markers:d,readOnly:g,links:m,extraLibs:k,tokenConfig:f,showExpandButton:v,showCopyButton:b=!0,lineNumbers:w="on",glyphMargin:M=!1,placeholder:C,validateState:P,onChange:O,onTokenClick:z,customValidationInBrickNextYaml:T,fixedOverflowWidgets:F,spellCheck:H,knownWords:j,domLibsEnabled:J,uri:U}=e;const X=null!=t?t:"",$=null!=n?n:"plaintext",Z=null!=i?i:"auto",G=null!=s?s:3,Q=null!=r?r:1/0,ee=null!=o?o:500,te=null==F||F,ne=null==H||H,[ie,se]=(0,u.useState)(!1),re=(0,u.useMemo)((()=>(0,E.uniqueId)("worker")),[]),{t:oe}=(0,N.useTranslation)(B.NS),ae=(0,u.useRef)(null),le=(0,u.useRef)(),ce=(0,u.useRef)(),ue=(0,u.useRef)({width:300,height:pn(X,G,Q)}),[he,de]=(0,u.useState)(),ge=(0,u.useRef)(a),me=(0,p.useCurrentTheme)(),pe=y.e.includes($),ke=(0,u.useMemo)((()=>{const e="auto"===Z?"dark"===me||"dark-v2"===me?"vs-dark":"vs":Z;return pe&&!dt.includes(e)?gt.includes(e)?"tm-vs-dark":"tm-vs-light":e}),[me,Z,pe]),fe=gt.includes(ke);(0,u.useEffect)((()=>{if(dt.includes(ke))return;const e=fe?"#FFFFFF0F":"#0000000A";A.editor.defineTheme("custom-theme",{base:ke,inherit:!0,rules:[],colors:{"editor.lineHighlightBackground":`${e}`}}),A.editor.setTheme("custom-theme")}),[ke,fe]),(0,u.useEffect)((()=>{A.editor.setTheme(ke)}),[ke]),(0,u.useEffect)((()=>{if(ce.current){const e=ce.current.getModel();A.editor.setModelLanguage(e,$)}(0,y.A)($)}),[$]),(0,u.useEffect)((()=>{if("brick_next_yaml"===$){const e=(0,S.v)(l,Array.isArray(c)?void 0:c,re,f),t=A.languages.registerCompletionItemProvider("brick_next_yaml",{provideCompletionItems:e,triggerCharacters:[".",":","<"]});return()=>{t.dispose()}}}),[l,c,$,re,f]),(0,u.useEffect)((()=>{if(Array.isArray(c)&&c.length>0&&pt.includes($)){const e=A.languages.registerCompletionItemProvider($,(0,K.MY)($,re,c));return()=>{e.dispose()}}}),[$,c,re]),(0,u.useEffect)((()=>{const e=ce.current;if(e){const t=e.getModel();null!=t&&t.getValue&&X!==t.getValue()&&t.setValue(X)}}),[X]),(0,u.useLayoutEffect)((()=>{var e;if("fit-content"!==ge.current||!ae.current)return;ue.current.width=ae.current.getBoundingClientRect().width,null===(e=ce.current)||void 0===e||e.layout(ue.current);const t=new ResizeObserver((e=>{for(const n of e)if(n.target===ae.current){const e=n.contentBoxSize?n.contentBoxSize[0]?n.contentBoxSize[0].inlineSize:n.contentBoxSize.inlineSize:n.contentRect.width,i=n.contentBoxSize?n.contentBoxSize[0]?n.contentBoxSize[0].blockSize:n.contentBoxSize.blockSize:n.contentRect.height;var t;(e!==ue.current.width||ie)&&(ue.current.width=e,null===(t=ce.current)||void 0===t||t.layout({width:e,height:ie?i:ue.current.height}));break}}));return t.observe(ae.current),()=>{t.disconnect()}}),[ie]),(0,u.useLayoutEffect)((()=>{if("fit-container"!==ge.current)return;const e=function(e){let t=e;for(;t;){const e="vs.code-editor"===t.tagName.toLowerCase();if(t=t.parentElement,e)return t}}(ae.current);if(!e)return;const t=new ResizeObserver((()=>{de(e.offsetHeight)}));return t.observe(e),()=>{t.disconnect()}}),[]),(0,u.useEffect)((()=>{"fit-container"!==ge.current&&"fit-content"!==ge.current&&de(ee)}),[ee]),(0,u.useEffect)((()=>{ce.current&&ce.current.updateOptions({readOnly:g,lineNumbersMinChars:ie?5:3})}),[g,ie]),(0,u.useEffect)((()=>{if(ce.current||!ae.current)return;const e=A.editor.createModel(X,$,U?A.Uri.parse(U):void 0);let t;if("brick_next_yaml"===$){const n=(0,L.AR)(e.uri);t=A.editor.createModel(X,"javascript",n),A.languages.typescript.javascriptDefaults.addExtraLib((0,L.Eh)(),e.uri.toString()+"d.ts")}const n=ce.current=A.editor.create(ae.current,{extraEditorClassName:"monaco-editor-v3",model:e,minimap:{enabled:!1,showRegionSectionHeaders:!1,showMarkSectionHeaders:!1},scrollBeyondLastLine:!1,tabSize:2,insertSpaces:!0,automaticLayout:"fit-content"!==ge.current,fontSize:x.yU,lineHeight:x.fE,scrollbar:{horizontalScrollbarSize:x.lP,verticalScrollbarSize:x.lP,horizontalSliderSize:8,verticalSliderSize:8,alwaysConsumeMouseWheel:!1},padding:{top:x.Vu,bottom:"fit-content"==ge.current?void 0:x.Vu},overviewRulerBorder:!1,mouseWheelScrollSensitivity:.5,fixedOverflowWidgets:te,lineNumbers:w,lineNumbersMinChars:3,glyphMargin:M,folding:"off"!==w,suggest:{insertMode:"insert",preview:!0},readOnly:g,quickSuggestions:{strings:!0,other:!0,comments:!0},renderLineHighlightOnlyWhenFocus:!0,unicodeHighlight:{ambiguousCharacters:!1}});return le.current=ce.current.createDecorationsCollection(),()=>{var i;e.dispose(),n.dispose(),null===(i=t)||void 0===i||i.dispose()}}),[]);const ve="typescript"===$?"typescriptDefaults":"javascriptDefaults";(0,u.useEffect)((()=>{"javascript"!==$&&"typescript"!==$&&"brick_next_yaml"!==$||A.languages.typescript[ve].setCompilerOptions({allowNonTsExtensions:!0,lib:J?void 0:["esnext"],target:A.languages.typescript.ScriptTarget.ESNext,module:A.languages.typescript.ModuleKind.ESNext,jsx:A.languages.typescript.JsxEmit.Preserve})}),[$,J,ve]),(0,u.useEffect)((()=>{const e=ce.current;if(e)return()=>{(0,Y.X2)(e)}}),[]),(0,u.useEffect)((()=>{const e=ce.current;if(!e)return;const t=()=>{(0,q.$)(k,{languageDefaults:ve}),"javascript"!==$&&"typescript"!==$&&"brick_next_yaml"!==$||A.languages.typescript[ve].setCompilerOptions({allowNonTsExtensions:!0,lib:J?void 0:["esnext"],target:A.languages.typescript.ScriptTarget.ESNext,module:A.languages.typescript.ModuleKind.ESNext,jsx:A.languages.typescript.JsxEmit.Preserve})};(0,Y.xx)(e)&&t();const n=e.onDidFocusEditorWidget((()=>{(0,Y.MX)(e)&&t()}));return()=>{n.dispose()}}),[J,k,$,ve]),(0,u.useEffect)((()=>{const e=ce.current;if("brick_next_yaml"===$&&e){const t=e.getModel(),n=e.onMouseDown((function(e){var n,i;const s=le.current;(null!==(n=null==s||null===(i=s.getRanges)||void 0===i?void 0:i.call(s))&&void 0!==n?n:[]).forEach((n=>{const i=/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"metaKey":"ctrlKey";n&&e.target.position&&e.event[i]&&n.containsPosition(e.target.position)&&z(t.getValueInRange(n))}))})),i=e.onMouseMove((function(e){const t=le.current;t&&t.getRanges().forEach((n=>{const i=/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"metaKey":"ctrlKey";if(n&&e.target.position&&e.event[i]&&n.containsPosition(e.target.position)){const e=t.getRanges().map((e=>({range:e,options:{inlineClassName:n.equalsRange(e)?"highlight pointer":"highlight"}})));t.set(e)}else if(!e.event[i]){const e=t.getRanges().map((e=>({range:e,options:{inlineClassName:"highlight"}})));t.set(e)}}))}));return()=>{null==i||i.dispose(),null==n||n.dispose()}}}),[$,z,me,Z]),(0,u.useEffect)((()=>{const e=ce.current;if(!e||!ae.current||"fit-content"!==ge.current)return;const t=e.onDidContentSizeChange((t=>{if(!ie&&t.contentHeightChanged){const n=kn(t.contentHeight,G,Q);n!==ue.current.height&&(ue.current.height=n,e.layout(ue.current))}})),n=kn(e.getContentHeight(),G,Q);return n!==ue.current.height&&(ue.current.height=n,e.layout(ue.current)),()=>{t.dispose()}}),[Q,G,ie]);const Ae=(0,u.useCallback)((async(e,t)=>{A.editor.setModelMarkers(e,"semantic_validate",[]);const n=e.findPreviousMatch("<%[~=]?",t,!0,!1,null,!1),i=e.findNextMatch("%>",t,!1,!1,null,!1),s=null==n?void 0:n.range,r=null==i?void 0:i.range;if(s&&r){const n=new A.Range(s.startLineNumber,s.endColumn,r.startLineNumber,r.startColumn),i=e.getValueInRange(n);if(n.containsPosition(t)&&!/<% | %>/.test(i)){const t=(0,L.AR)(e.uri);A.editor.getModel(t).setValue(i);const r=e.getOffsetAt(new A.Position(s.startLineNumber,s.endColumn));if(R.b.getInstance(re).updateState({content:i,range:n,offset:r}),!T)return;const o=await A.languages.typescript.getJavaScriptWorker(),a=await o(t),l=(await a.getSemanticDiagnostics(t.toString())).map((t=>{var n;const i=r+(null!==(n=t.start)&&void 0!==n?n:0),s=e.getPositionAt(i);return{startLineNumber:s.lineNumber,startColumn:s.column,endLineNumber:s.lineNumber,endColumn:s.column+t.length,message:t.messageText,severity:A.MarkerSeverity.Warning}}));A.editor.setModelMarkers(e,"semantic_validate",l)}}}),[re]);(0,u.useEffect)((()=>{if(!ce.current)return;const e=ce.current.getModel(),t=e.onDidChangeContent((async t=>{(0,W.J)(re),["brick_next_yaml"].includes($)&&Ae(e,ce.current.getPosition()),t.isFlush||O(e.getValue())}));return()=>{t.dispose()}}),[O,re,$,Ae]),(0,u.useEffect)((()=>{if(ie){const e=t=>{"Escape"!==t.key&&"Esc"!==t.key||(window.removeEventListener("keydown",e),se(!1))};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}}),[ie]),(0,u.useEffect)((()=>{if(!ce.current&&!C)return;const e=new I.j(C,ce.current,fe?"rgba(174,174,175,0.4)":"rgba(89,89,89,0.4)");return()=>{e.dispose()}}),[C,fe]);const ye=(0,u.useCallback)((()=>{if(ce.current){const e=ce.current.getModel();Ct(e.getValue()).then((()=>Et({type:"success",message:oe(B.K.COPY_SUCCESS)}))).catch((()=>Et({type:"error",message:oe(B.K.COPY_FAILED)})))}}),[oe]),be=(0,u.useCallback)((()=>{se(!ie)}),[ie]);return(0,u.useEffect)((()=>{const e=ce.current;if(!e||"brick_next_yaml"!==$)return;let t=!1;const n=(0,E.debounce)((async()=>{var n;const i=await(0,V.K)();if(t)return;const{lintMarkers:s,lintDecorations:r}=await i.lint({source:e.getValue(),links:m,markers:d}),o=e.getModel();!t&&o&&(A.editor.setModelMarkers(o,St,s.map((e=>{let{start:t,end:n,message:i,severity:s,code:r}=e;const a=o.getPositionAt(t),l=o.getPositionAt(n);return{startLineNumber:a.lineNumber,startColumn:a.column,endLineNumber:l.lineNumber,endColumn:l.column,severity:A.MarkerSeverity[s],message:i,code:r}}))),null===(n=le.current)||void 0===n||n.set(r.map((e=>{let{start:t,end:n,options:i}=e;return{range:A.Range.fromPositions(o.getPositionAt(t),o.getPositionAt(n)),options:i}}))))}),200),i=e.onDidChangeModelContent(n);return n(),()=>{t=!0,i.dispose(),A.editor.setModelMarkers(e.getModel(),St,[])}}),[$,m,d,Z,re]),(0,u.useEffect)((()=>{const e=ce.current;if(!e||!ne)return;let t=!1;const n=(0,E.debounce)((async()=>{const n=await(0,D.n)();if(t)return;const{markers:i}=await n.spellCheck({source:e.getValue(),knownWords:j}),s=e.getModel();!t&&s&&A.editor.setModelMarkers(s,xt,i.map((e=>{let{start:t,end:n,message:i,severity:r}=e;const o=s.getPositionAt(t),a=s.getPositionAt(n);return{startLineNumber:o.lineNumber,startColumn:o.column,endLineNumber:a.lineNumber,endColumn:a.column,severity:A.MarkerSeverity[r],message:i}})))}),200),i=e.onDidChangeModelContent(n);return n(),()=>{t=!0,i.dispose(),A.editor.setModelMarkers(e.getModel(),xt,[])}}),[ne,j]),h().createElement("div",{className:_()("code-editor-wrapper",{expanded:ie,error:"error"===P})},h().createElement("div",{ref:ae,style:{height:ie?"100%":he,overflow:ie?"scroll":""}}),h().createElement("div",{className:"toolbar-wrapper"},h().createElement("div",{className:"toolbar sticky"},b&&h().createElement(wt,{content:oe(B.K.COPY)},h().createElement(Mt,{className:"copy-icon",icon:"copy",lib:"antd",theme:"outlined",onClick:ye})),v&&h().createElement(wt,{content:oe(ie?B.K.COLLAPSE:B.K.EXPAND)},h().createElement(Mt,{className:"expand-icon",icon:ie?"compress":"expand",lib:"antd",theme:"outlined",onClick:be})))))}function pn(e,t,n){return fn(Math.min(n,Math.max(t,e.split("\n").length)))}function kn(e,t,n){let i=e;return(e-x.Vu)%x.fE==0&&(i=e+x.lP),Math.min(fn(n),Math.max(i,fn(t)))}function fn(e){return e*x.fE+x.lP+x.Vu}ht=gn,({e:[J,U,X,$,Z,G,Q,ee,te,ne,ie,se,re,oe,ae,le,ce,ue,he,de,ge,me,pe,ke,fe,ve,Ae,ye,be,we,Me,Ce,Ee,xe,Se,We,Le,Ne,Be,Pe,_e,Oe,ze,Re,Ie,Ve,De,Te,Fe,He,Ke,Ye,qe,je,Je,Ue,Xe,$e,Ze,Ge,Qe,et,tt,nt,it,st,rt,ot,at,lt],c:[Wt,j]}=(0,c.A)(ht,[vt("vs.code-editor",{shadowOptions:!1})],[[At(),1,"name"],[At(),1,"label"],[At(),1,"value"],[At(),1,"language"],[At(),1,"theme"],[At({type:Boolean}),1,"required"],[At({type:Boolean}),1,"readOnly"],[At(),1,"automaticLayout"],[At({type:Number}),1,"minLines"],[At({attribute:!1}),1,"completers"],[At({attribute:!1}),1,"advancedCompleters"],[At({attribute:!1}),1,"markers"],[At({attribute:!1}),1,"links"],[At({type:Number}),1,"maxLines"],[At({attribute:!1}),1,"height"],[At(),1,"message"],[At(),1,"placeholder"],[At({type:Boolean}),1,"showExpandButton"],[At(),1,"lineNumbers"],[At({attribute:!1}),1,"tokenConfig"],[At({type:Boolean}),1,"customValidationInBrickNextYaml"],[At({type:Boolean}),1,"showCopyButton"],[At({type:Boolean}),1,"glyphMargin"],[At({attribute:!1}),1,"extraLibs"],[At({type:Boolean}),1,"fixedOverflowWidgets"],[At({type:Boolean}),1,"spellCheck"],[At({attribute:!1}),1,"knownWords"],[At({type:Boolean}),1,"domLibsEnabled"],[At(),1,"uri"],[yt({type:"code.change"}),1,"codeChange",e=>(0,l.A)(rn,e),(e,t)=>(0,a.A)(rn,e,t)],[yt({type:"user.input"}),1,"userInput",e=>(0,l.A)(an,e),(e,t)=>(0,a.A)(an,e,t)],[yt({type:"token.click"}),1,"tokenClickEvent",e=>(0,l.A)(un,e),(e,t)=>(0,a.A)(un,e,t)]],0,(e=>dn.has((0,r.A)(e))),v.N)),j()}}]);
|
|
2
|
-
//# sourceMappingURL=code-editor.5c29df2d.js.map
|