i-c-fn-head 0.0.5
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/.vscodeignore +15 -0
- package/CHANGELOG.md +9 -0
- package/LICENSE +1 -0
- package/README.md +78 -0
- package/dist/extension.js +1 -0
- package/dist/extension.js.map +1 -0
- package/empty +1 -0
- package/eslint.config.mjs +27 -0
- package/i-c-fn-head-0.0.1.use-for-Rust.vsix +0 -0
- package/i-c-fn-head-0.0.2.vsix +0 -0
- package/i-c-fn-head-0.0.3.vsix +0 -0
- package/i-c-fn-head-0.0.5.vsix +0 -0
- package/package.json +211 -0
- package/src/basic_funx.ts +120 -0
- package/src/colorful.ts +276 -0
- package/src/extension.ts +277 -0
- package/src/faav.ts +51 -0
- package/src/fancy_f12.ts +113 -0
- package/src/fn_body_n_head.ts +504 -0
- package/src/goto_impl.ts +62 -0
- package/src/init.ts +84 -0
- package/src/quick_pick.ts +43 -0
- package/src/show_doc_symbs.ts +66 -0
- package/src/test/extension.test.ts +15 -0
- package/tsconfig.json +23 -0
- package/tst.tst +0 -0
- package/vsc-extension-quickstart.md +48 -0
- package/webpack.config.js +48 -0
package/.vscodeignore
ADDED
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Any use takes $0.032 per month from You.. or just Your Soul 😇😜
|
package/README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# i-c-fn-head README
|
|
2
|
+
|
|
3
|
+
## Features
|
|
4
|
+
|
|
5
|
+
**Dear Dev, this extension just shows function's name in breadcrumbs of VSCode for C, CPP, D & Rust. Have a nice day, Dear Dev 🤟🙂**
|
|
6
|
+
<br>**Valuable Remark:** For now, it's usable for D & Rust.
|
|
7
|
+
<br>**Paradigm:** https://alg0z.blogspot.com/2026/03/update-icfnhead.html
|
|
8
|
+
<br>**How to use:** https://alg0z8n8its9lovely6tricks.blogspot.com/2026/04/how-to-use-icfnhead-for-vscode.html
|
|
9
|
+
## Highlight code.
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
"i_c_fn_head.configurations": [
|
|
13
|
+
{
|
|
14
|
+
"paths": [
|
|
15
|
+
"*.d"
|
|
16
|
+
],
|
|
17
|
+
"rules": [
|
|
18
|
+
{
|
|
19
|
+
"patterns": [
|
|
20
|
+
"(\\(|\\))"
|
|
21
|
+
],
|
|
22
|
+
"color": "#a0ffff",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"patterns": [
|
|
26
|
+
"\"[\\S\\s]*\""
|
|
27
|
+
],
|
|
28
|
+
"color": "#00ffff",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"patterns": [
|
|
32
|
+
"@(property|safe|trusted|system|disable|nogc)"
|
|
33
|
+
],
|
|
34
|
+
"color": "Pink",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"patterns": [
|
|
38
|
+
"([a-zA-Z0-9_@\\n\\s,_]+\\s*\\()"
|
|
39
|
+
],
|
|
40
|
+
"color": "#ffaa00",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"patterns": [
|
|
44
|
+
"(\\([a-zA-Z0-9_@\\n\\s,_&()/+-.]*\\))"
|
|
45
|
+
],
|
|
46
|
+
"color": "Cyan",
|
|
47
|
+
"multiLine": true
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"patterns": [
|
|
51
|
+
"[a-zA-Z0-9_@\\n\\s]+(\\([a-zA-Z0-9_@\\n\\s]*?\\))+[\\s\\n]*\\{"
|
|
52
|
+
],
|
|
53
|
+
"color": "Lime",
|
|
54
|
+
"multiLine": true
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"patterns": [
|
|
58
|
+
"(^|[^a-zA-Z0-9_])(string|auto|bool|byte|ubyte|short|ushort|int|size_t|uint|long|ulong|char|wchar|dchar|float|double|real|ifloat|idouble|ireal|cfloat|cdouble|creal|void|noreturn)($|[^a-zA-Z0-9_])"
|
|
59
|
+
],
|
|
60
|
+
"color": "Yellow"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"patterns": [
|
|
64
|
+
"(^|[^a-zA-Z0-9_])(if|else\\sif|else)($|[^a-zA-Z0-9_])"
|
|
65
|
+
],
|
|
66
|
+
"color": "Blue"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"patterns": [
|
|
70
|
+
"[\\S\\s]+"
|
|
71
|
+
],
|
|
72
|
+
"color": "BrightWhite",
|
|
73
|
+
"multiLine": true
|
|
74
|
+
},
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{var __webpack_modules__={505(t){"use strict";function e(t,e,i){t instanceof RegExp&&(t=n(t,i)),e instanceof RegExp&&(e=n(e,i));var r=s(t,e,i);return r&&{start:r[0],end:r[1],pre:i.slice(0,r[0]),body:i.slice(r[0]+t.length,r[1]),post:i.slice(r[1]+e.length)}}function n(t,e){var n=e.match(t);return n?n[0]:null}function s(t,e,n){var s,i,r,o,a,l=n.indexOf(t),c=n.indexOf(e,l+1),u=l;if(l>=0&&c>0){if(t===e)return[l,c];for(s=[],r=n.length;u>=0&&!a;)u==l?(s.push(u),l=n.indexOf(t,u+1)):1==s.length?a=[s.pop(),c]:((i=s.pop())<r&&(r=i,o=c),c=n.indexOf(e,u+1)),u=l<c&&l>=0?l:c;s.length&&(a=[r,o])}return a}t.exports=e,e.range=s},928(t,e,n){var s=n(505);t.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),g(function(t){return t.split("\\\\").join(i).split("\\{").join(r).split("\\}").join(o).split("\\,").join(a).split("\\.").join(l)}(t),!0).map(u)):[]};var i="\0SLASH"+Math.random()+"\0",r="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function u(t){return t.split(i).join("\\").split(r).join("{").split(o).join("}").split(a).join(",").split(l).join(".")}function h(t){if(!t)return[""];var e=[],n=s("{","}",t);if(!n)return t.split(",");var i=n.pre,r=n.body,o=n.post,a=i.split(",");a[a.length-1]+="{"+r+"}";var l=h(o);return o.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),e.push.apply(e,a),e}function p(t){return"{"+t+"}"}function f(t){return/^-?0\d/.test(t)}function _(t,e){return t<=e}function d(t,e){return t>=e}function g(t,e){var n=[],i=s("{","}",t);if(!i)return[t];var r=i.pre,a=i.post.length?g(i.post,!1):[""];if(/\$$/.test(i.pre))for(var l=0;l<a.length;l++){var u=r+"{"+i.body+"}"+a[l];n.push(u)}else{var m,b,w=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),y=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),v=w||y,x=i.body.indexOf(",")>=0;if(!v&&!x)return i.post.match(/,(?!,).*\}/)?g(t=i.pre+"{"+i.body+o+i.post):[t];if(v)m=i.body.split(/\.\./);else if(1===(m=h(i.body)).length&&1===(m=g(m[0],!1).map(p)).length)return a.map(function(t){return i.pre+m[0]+t});if(v){var O=c(m[0]),P=c(m[1]),k=Math.max(m[0].length,m[1].length),S=3==m.length?Math.abs(c(m[2])):1,j=_;P<O&&(S*=-1,j=d);var M=m.some(f);b=[];for(var E=O;j(E,P);E+=S){var D;if(y)"\\"===(D=String.fromCharCode(E))&&(D="");else if(D=String(E),M){var A=k-D.length;if(A>0){var T=new Array(A+1).join("0");D=E<0?"-"+T+D.slice(1):T+D}}b.push(D)}}else{b=[];for(var C=0;C<m.length;C++)b.push.apply(b,g(m[C],!1))}for(C=0;C<b.length;C++)for(l=0;l<a.length;l++)u=r+b[C]+a[l],(!e||v||u)&&n.push(u)}return n}},850(t,e,n){"use strict";var s,i=this&&this.__createBinding||(Object.create?function(t,e,n,s){void 0===s&&(s=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,s,i)}:function(t,e,n,s){void 0===s&&(s=n),t[s]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||(s=function(t){return s=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},s(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n=s(t),o=0;o<n.length;o++)"default"!==n[o]&&i(e,t,n[o]);return r(e,t),e});Object.defineProperty(e,"__esModule",{value:!0}),e.cmd_rgx=e.console_msg=void 0,e.prnt=u,e.getCMD=p,e.exclude_paths=async function(t){try{let e=[];const n=await(0,l.uri_to_file_of_opts)(),s=(await a.workspace.openTextDocument(n[0])).getText();u(s);let i=p(null,s,"exclude_path");if(null==i)return;for(let n of i)e=_(t,n);return 0==e.length?t:e}catch(t){return void u(String(t))}};const a=o(n(398)),l=n(336);class c{static v="rgx"}function u(t){h.show(t)}class h{static#t=a.window.createOutputChannel("i-c-fn-head");static show(t){this.#t.appendLine(t),this.#t.show()}}function p(t,e,n){const s=e||a.window.activeTextEditor?.document.getText();if(c.v=n||c.v,f.set_collect_rgx_from_doc(),null==s)return null;const i=t?f._collect_rgx_from_doc(s,t):f._collect_rgx_from_doc(s);return u("calc num of cmds: "+i.length.toString()),i}e.console_msg=h;class f{static collect_rgx_from_doc=/\/\/\s*rgx:\s*(\/.*:::[gmis]*)\s*\/\//g;static placeholder0="@663@";static placeholder0_max_len=200;static open_rgx="/";static close_rgx=":::";static set_collect_rgx_from_doc(t,e){this.open_rgx=t??this.open_rgx,this.close_rgx=e??this.close_rgx;let n="//\\s*"+(c.v??"rgx")+":\\s*("+this.open_rgx+".*"+this.close_rgx+"[gmis]*)\\s*//";return this.collect_rgx_from_doc=new RegExp(n,"g"),u("set_collect_rgx_from_doc: "+this.collect_rgx_from_doc.source),this.collect_rgx_from_doc}static _collect_rgx_from_doc(t,e){if(e)return this._collect_rgx_from_doc0(t,e);let n,s=[];for(;null!=(n=this.collect_rgx_from_doc.exec(t));){let t=this.strn_2_rgx(n[1]);if(null==t){u("_collect_rgx_from_doc: try_it is null");break}u("_collect_rgx_from_doc:"+n[1]),s.push(t)}return s}static _collect_rgx_from_doc0(t,e){let n,s=[];for(;null!=(n=this.collect_rgx_from_doc.exec(t));){let t=n[1].replaceAll(this.placeholder0,e),i=this.strn_2_rgx(t);if(u("1st class cmd_rgx"),null==i){u("_collect_rgx_from_doc: try_it is null");break}u("_collect_rgx_from_doc:"+n[1]),s.push(i)}return s}static strn_2_rgx(t){let e=this.close_rgx+"[gmis]*$",n=t.match(new RegExp(e)),s=null!=n?n[0].slice(this.close_rgx.length):"",i=t.slice(1).replaceAll(this.close_rgx+s,"");try{let t=new RegExp(i,s);return u("strn to rgx: "+t.source+" "+t.flags),t}catch(t){const e=t instanceof Error?t.message:String(t);return a.window.showInformationMessage(e),null}}}function _(t,e){let n=[];for(let s of t)u(e.source),s.fsPath.match(e)||n.push(s);return n}e.cmd_rgx=f},867(t,e,n){"use strict";var s,i=this&&this.__createBinding||(Object.create?function(t,e,n,s){void 0===s&&(s=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,s,i)}:function(t,e,n,s){void 0===s&&(s=n),t[s]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||(s=function(t){return s=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},s(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n=s(t),o=0;o<n.length;o++)"default"!==n[o]&&i(e,t,n[o]);return r(e,t),e});Object.defineProperty(e,"__esModule",{value:!0}),e.extra_activate=function(){return c},e.activate0=function(t){let e=[],n=[],s=[];function i(){n=a.window.visibleTextEditors.slice(),s=[],e.forEach(t=>t.ruleData.forEach(t=>t.decorationType.dispose()));const t=a.workspace.getConfiguration("i_c_fn_head").get("configurations");e=u(t).map(t=>({globs:u(t.paths),ruleData:u(t.rules).map(p)}))}function r(){return function(t,e,n){t.every(t=>0===t.ruleData.length)||0!==e.length&&(e.forEach(e=>{const s=a.workspace.asRelativePath(e.document.fileName),i=t.flatMap(t=>t.globs.some(t=>{const e=t.includes("/")||t.includes("\\")?t:"**/"+t;return(0,l.minimatch)(s,e,{nocase:"win32"===process.platform})})?t.ruleData:[]);if(0===i.length)return;let r;i.forEach(({decorationType:t,regexes:n,multiLine:s})=>{const i=[];if(s){r??=e.document.getText();for(const t of n)for(const n of r.matchAll(t)){if(void 0===n.index||0===n[0].length)continue;const t=e.document.positionAt(n.index),s=e.document.positionAt(n.index+n[0].length);i.push(new a.Range(t,s))}}else for(const t of n)for(let n=0;n<e.document.lineCount;n++)for(const s of e.document.lineAt(n).text.matchAll(t))void 0!==s.index&&0!==s[0].length&&i.push(new a.Range(n,s.index,n,s.index+s[0].length));e.setDecorations(t,i)}),n.push(e)}),e=[])}(e,n,s)}a.workspace.onDidChangeConfiguration(t=>{t.affectsConfiguration("i_c_fn_head.configurations")&&i()},null,t.subscriptions),a.window.onDidChangeVisibleTextEditors(t=>{n=t.filter(t=>!s.includes(t)),s=s.filter(e=>t.includes(e)),r()},null,t.subscriptions),a.workspace.onDidChangeTextDocument(t=>{a.window.visibleTextEditors.forEach(e=>{e.document!==t.document||n.includes(e)||n.push(e)}),s=s.filter(t=>!n.includes(t))},null,t.subscriptions),i();const o=setInterval(r,500);t.subscriptions.push({dispose:()=>clearInterval(o)})};const a=o(n(398)),l=n(722),c="\n // console.log('Extension \"color-my-text\" is activated.');\n\n let allConfigData: ConfigData[] = [];\n\n // todoEditors need (re)decoration; doneEditors are already up to date.\n // Tracking both avoids re-decorating unchanged editors when unrelated ones become visible.\n let todoEditors: vscode.TextEditor[] = [];\n let doneEditors: vscode.TextEditor[] = [];\n\n // Disposes old decoration types and rebuilds allConfigData from current settings.\n function resetDecorations(): void {\n todoEditors = vscode.window.visibleTextEditors.slice();\n doneEditors = [];\n\n allConfigData.forEach(configData => configData.ruleData.forEach(ruleData => ruleData.decorationType.dispose()));\n\n const configurations = vscode.workspace.getConfiguration('i_c_fn_head').get<Configuration[]>('configurations');\n allConfigData = toArray(configurations).map(configuration => ({\n globs: toArray(configuration.paths),\n ruleData: toArray(configuration.rules).map(buildRuleData),\n }));\n }\n\n // Applies decorations to all queued editors. Runs on a 500ms timer to batch rapid edits.\n\n\n vscode.workspace.onDidChangeConfiguration(\n event => {\n if (event.affectsConfiguration('i_c_fn_head.configurations')) {\n resetDecorations();\n }\n },\n null,\n context.subscriptions);\n\n vscode.window.onDidChangeVisibleTextEditors(\n visibleEditors => {\n // Queue newly visible editors; prune editors that were closed.\n todoEditors = visibleEditors.filter(editor => !doneEditors.includes(editor));\n doneEditors = doneEditors.filter(editor => visibleEditors.includes(editor));\n updateDecorations();\n },\n null,\n context.subscriptions);\n\n vscode.workspace.onDidChangeTextDocument(\n event => {\n // Re-queue any visible editor showing the changed document.\n vscode.window.visibleTextEditors.forEach(visibleEditor => {\n if (visibleEditor.document === event.document && !todoEditors.includes(visibleEditor)) {\n todoEditors.push(visibleEditor);\n }\n });\n\n doneEditors = doneEditors.filter(editor => !todoEditors.includes(editor));\n },\n null,\n context.subscriptions);\n\n resetDecorations();\n function updateDecorations(): void {\n return _updateDecorations(\n allConfigData,\n todoEditors,\n doneEditors\n );\n }\n const intervalId = setInterval(updateDecorations, 500);\n context.subscriptions.push({ dispose: () => clearInterval(intervalId) });\n\n";function u(t){return Array.isArray(t)?t:[]}const h=new Set(["Black","Blue","BrightBlack","BrightBlue","BrightCyan","BrightGreen","BrightMagenta","BrightRed","BrightWhite","BrightYellow","Cyan","Green","Magenta","Red","White","Yellow"]);function p(t){const e="string"!=typeof t.color?void 0:h.has(t.color)?new a.ThemeColor("terminal.ansi"+t.color):t.color,n=!0===t.underline&&!0===t.strikeThrough?"underline line-through":!0===t.underline?"underline":!0===t.strikeThrough?"line-through":!1===t.underline||!1===t.strikeThrough?"none":void 0,s=a.window.createTextEditorDecorationType({color:e,fontWeight:"boolean"!=typeof t.bold?void 0:t.bold?"bold":"normal",fontStyle:"boolean"!=typeof t.italic?void 0:t.italic?"italic":"normal",textDecoration:n}),i="g"+(!0===t.matchCase?"":"i")+(!0===t.multiLine?"s":"")+"u";return{decorationType:s,regexes:u(t.patterns).flatMap(t=>{try{return[new RegExp(t,i)]}catch{return[]}}),multiLine:!0===t.multiLine}}},265(t,e,n){"use strict";var s,i=this&&this.__createBinding||(Object.create?function(t,e,n,s){void 0===s&&(s=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,s,i)}:function(t,e,n,s){void 0===s&&(s=n),t[s]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||(s=function(t){return s=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},s(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n=s(t),o=0;o<n.length;o++)"default"!==n[o]&&i(e,t,n[o]);return r(e,t),e});Object.defineProperty(e,"__esModule",{value:!0}),e.skip_ln=void 0,e.activate11=function(t){for(;;)(0,c.menu)()},e.activate=async function(t){let e=!1;try{await(0,h.init)(t),e=m.raw_writeBkp(u.i_c_fn_head_opts.path_to_conf,null,"/tmp/tst00"),m.raw_writeBkp("tst",null,"/tmp/tst0"),console.log(e)}catch{console.error("err")}const n=a.commands.registerCommand("i-c-fn-head.helloWorld",()=>{a.window.showInformationMessage("Hello World from i_c_fn_head!")});t.subscriptions.push(n);const s=a.commands.registerCommand("extension.onUpArrowPress",()=>{a.window.showInformationMessage("up Key Press Detected!")});t.subscriptions.push(s)},e.deactivate=function(){},e.select_lang_n_tst_fn_head=function(){const t=a.window.activeTextEditor?.document.uri.fsPath??"";let e=/rs$|c$|cpp$|d$/g.exec(t)?.[0]??"";switch(t?.toString(),e){case"c":case"cpp":case"d":return/^[^+\-=]*\(/;case"rs":return/(^\s*(.*)?\s*fn\s+(\w+)\s*\(([^)]*)\)\s*(->\s*\w+)?\s*{?$)/m}return null},e.c_cpp_d_head=p,e.rust_head=f,e.rebuild_doc=function(t,e){let n="";for(let s=t;s<e.length;s++)n+=e[s];return n},e.dont_clobbe_line_w_curly_bracket=function(t,e){if(m.file_was_bkuped7(e.fsPath))return;let n="",s=!1,i="string"==typeof t?t.split("\n"):t;const r=/^[/]{2}/,o=/^\/\*/,a=/\*\/$/;let l=!1,c="";i.forEach(function(t){let e=_(t),i=t.trim();if(r.test(i))n+=i+"\n";else{if(l||(l=o.test(i)),l)return a.test(i)&&(l=!1),void(n+=i+"\n");if(c=i,i=d(i),i.length!=c.length)return s=!0,void(n+="\n"+i);i.length>0&&(n+="\n"+g(i,e," "))}}),s&&m.writeBkp(n,e)},e.count_spaces_from_left=_,e.exclude_comments_from_ln=d,e.pad_strn_from_left=g;const a=o(n(398)),l=n(896),c=n(403),u=n(248),h=n(336);function p(){return/^[^+\-=]*\(/}function f(){return/(^\s*(.*)?\s*fn\s+(\w+)\s*\(([^)]*)\)\s*(->\s*\w+)?\s*{?$)/m}function _(t){for(let e=0;e<t.length;e++)if(" "!=t[e])return e;return 0}function d(t){const e=/^[/]{2}/,n=/^\/\*/;let s="",i=_(t),r=t.replaceAll("//","<<>//").replaceAll("/*","<<>\n/*");r=r.split("<<>");let o="",a="";return r.forEach(function(t){e.test(t)||n.test(t)||(o="\n"+" ".repeat(i)+"{",a="\n"+" ".repeat(i)+"}",t.replaceAll("{",o).replaceAll("}",a)),s+=" ".repeat(i)+t}),s}function g(t,e,n){let s="";for(let t=0;t<e;t++)s+=n;return s+t}e.skip_ln=class{arr=[];#e=!1;run(t){this.#e=!1;for(let e=0;e<this.arr.length;e++)this.#e=this.#e||null!=t.match(this.arr[e]);return this.#e}};class m{static bkuped=[];static suffix=".YourOriginalFile";static bkp_source_file(t){let e="string"==typeof t?t:t.fsPath;if(this.file_was_bkuped7(e))return!0;let n=e+this.suffix;(0,l.copyFileSync)(e,n);let s=this.compare_files(e,n);return s&&this.bkuped.push(n),s}static file_was_bkuped7(t){let e=t+this.suffix;if(0==this.bkuped.length)return!1;let n=!1;return this.bkuped.forEach(function(t,s,i){t!=e||(n=!0)}),!n&&(0,l.existsSync)(e)?(this.bkuped.push(e),!0):n}static compare_files(t,e){let n="",s="";try{n=(0,l.readFileSync)(t,{encoding:"utf-8",flag:"r"})}catch(e){let n="File: "+t+" got err: "+e+"\n";return console.log(n),!1}try{s=(0,l.readFileSync)(e,{encoding:"utf-8",flag:"r"})}catch(t){let n="File: "+e+" got err: "+t+"\n";return console.log(n),!1}return n==s}static writeBkp(t,e,n){let s=e?.fsPath??n??"";return""!=s&&!!this.bkp_source_file(s)&&((0,l.writeFileSync)(s,t),!0)}static raw_writeBkp(t,e,n){let s=e?.fsPath??n??"";return(0,l.writeFileSync)(s,t),!0}}},248(t,e,n){"use strict";var s,i=this&&this.__createBinding||(Object.create?function(t,e,n,s){void 0===s&&(s=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,s,i)}:function(t,e,n,s){void 0===s&&(s=n),t[s]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||(s=function(t){return s=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},s(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n=s(t),o=0;o<n.length;o++)"default"!==n[o]&&i(e,t,n[o]);return r(e,t),e});Object.defineProperty(e,"__esModule",{value:!0}),e._block_head=e.i_c_fn_head_opts=e.restrict_search=void 0,e.langsName=function(){let t=a.window.activeTextEditor?.document.languageId;if(null==t)return{name:"",file_exts:[]};switch(t.toLowerCase()){case"c":return{name:"C",file_exts:["c","h"]};case"d":return{name:"D",file_exts:["d"]};case"rust":return{name:"Rust",file_exts:["rs"]};case"cpp":return{name:"CPP",file_exts:["cpp","hpp","h"]};default:return{name:"",file_exts:[]}}};const a=o(n(398));e.restrict_search=class{static max_num_of_res=2e3;static exclude_paths="**/(tests|build)/**"},e.i_c_fn_head_opts=class{static path_to_conf="";static been_set=!1;static provide_lang_C=!1;static provide_lang_CPP=!1;static provide_lang_D=!1;static provide_lang_Rust=!1},e._block_head=class{name="";lnum=0;mark_fn_head=/(fn\s.*\{?)|(\sfn\s.*\{?)/;set_info(t,e,n){t.length<=1||(this.name=t,this.lnum=e,this.mark_fn_head=n??this.mark_fn_head)}get_head(t,e){let n=t.trim();return this.mark_fn_head.test(n)?n:this.name}try_set_info(t,e){t.length<=1||this.mark_fn_head.test(t)&&(this.name=t,this.lnum=e)}}},135(t,e,n){"use strict";var s,i=this&&this.__createBinding||(Object.create?function(t,e,n,s){void 0===s&&(s=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,s,i)}:function(t,e,n,s){void 0===s&&(s=n),t[s]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||(s=function(t){return s=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},s(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n=s(t),o=0;o<n.length;o++)"default"!==n[o]&&i(e,t,n[o]);return r(e,t),e});Object.defineProperty(e,"__esModule",{value:!0}),e.F12_action=void 0,e.new_EL=h,e.new_pressF12=p,e.handleExtraCMDs=async function(t){let e=t?(0,l.getCMD)(t,null,"rgx"):(0,l.getCMD)(null,null,"rgx"),n=p();if(null==e)return n.v=u.cont,n;let s=await async function(t){(0,l.prnt)("start handle_rgx_cmd");const e=[];let n,s,i=await _();for(s of(i=await(0,l.exclude_paths)(i)??i,(0,l.prnt)("num of pruned uris: "+i.length),i))try{let i=await a.workspace.openTextDocument(s);if(null==i){(0,l.prnt)("failed to open "+s);continue}let r=i.getText();for(let s of t)n=r.matchAll(s),null!=n&&e.push(...f(n,i))}catch(t){(0,l.prnt)("doc: "+s.fsPath+"err "+String(t))}return e}(e);return s.length>0?h(s):((0,l.prnt)("failed to collect extra locations"),p(u.cont))},e._a_get_files_in_workspace=_;const a=o(n(398)),l=n(850),c=n(248);var u;function h(t){return{kind:"extra_locations",v:t||[]}}function p(t){return{kind:"F12_action",v:t||u.cont}}function f(t,e){let n=[],s=new a.Position(0,0),i=new a.Position(0,0),r=0,o=e.getText(),l=e.uri;for(let c of t){let t=c[0].length;if(r=o.indexOf(c[0],r+1),-1==r)break;s=e.positionAt(r),i=e.positionAt(r+t),n.push(new a.Location(l,new a.Range(s,i)))}return n}async function _(){let t="",e=[];if((0,c.langsName)().file_exts.length>0)for(let n=0;n<(0,c.langsName)().file_exts.length;n++){t="**/*."+(0,c.langsName)().file_exts[n],(0,l.prnt)("update file_ext "+t);let s=await a.workspace.findFiles(t,c.restrict_search.exclude_paths,c.restrict_search.max_num_of_res);e.push(...s)}return(0,l.prnt)("calc uris "+e.length),e}!function(t){t[t.cont=0]="cont",t[t.stop=1]="stop"}(u||(e.F12_action=u={}))},745(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(t,e,n,s){void 0===s&&(s=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,s,i)}:function(t,e,n,s){void 0===s&&(s=n),t[s]=e[n]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar=this&&this.__importStar||(ownKeys=function(t){return ownKeys=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},ownKeys(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n=ownKeys(t),s=0;s<n.length;s++)"default"!==n[s]&&__createBinding(e,t,n[s]);return __setModuleDefault(e,t),e}),ownKeys;Object.defineProperty(exports,"__esModule",{value:!0}),exports.mode=exports.lang_element=void 0,exports._c_fn_body=_c_fn_body,exports.bee_ep=bee_ep,exports.rust_fn_body=rust_fn_body,exports._rust_fn_body=_rust_fn_body,exports.add_symb=add_symb,exports.c_fn_body=c_fn_body,exports.get_c_fn_head=get_c_fn_head;const vscode=__importStar(__webpack_require__(398)),fs_1=__webpack_require__(896),faav_1=__webpack_require__(248);function _c_fn_body(t,e,n){let s=new lang_element;s.exclude_strns=/(\"[\s\S]*?\")/gm;let i=bee_ep(Array.isArray(t)?function(t){let e="";return t.forEach(function(t){e+=t}),e}(t):t,s.exclude_strns,"#").split("\n"),r="string"==typeof t?t.split("\n"):t;for(let t=0;t<i.length;t++)i[t]=i[t].trim();if(s.uri=e,s.set_lines(i,r)){s.exclude_comments=/(\/\/.*)|(\/\*.*(\/)?)/g,s.one_line_comment=/^[/]{2}/,s.one_line_block=/.*\{.*\}.*/,s.open_comment=/^\/\*/,s.close_comment=/\*\/$/,s.open_block=/\{/g,s.close_block=/\}/g,s.tst_class=/^(class|struct|enum)\s|\s(class|struct|enum)\s/i,s.block_head.mark_fn_head=/.*/;for(let t=0;t<i.length;t++)s.one_line_comment7(t)||s.within_comment7(t)||s.class_entry7(t)||(s.head7(t),s.one_line_block7(t)||(s.block_entry7(t),s.close_class7(t)||(s.update_block_state(t),s.close_block7(t))));n.push(...s.symbols)}}function bee_ep(t,e,n){let s=t,i=t.match(e);if(null==i)return s;let r=0;return i.forEach(function(t){r=t.length;let e="";for(let s=0;s<r;s++)"\n"!=t[s]?e+=n:e+="\n";s=s.replace(t,e)}),mode.dbg&&((0,fs_1.rmSync)("/tmp/txt"),(0,fs_1.writeFileSync)("/tmp/txt",s)),s}function rust_fn_body(t,e,n){let s=bee_ep(Array.isArray(t)?function(t){let e="";return t.forEach(function(t){e+=t}),e}(t):t,/(\"[\s\S]*?\")/gm,"#").split("\n"),i="string"==typeof t?t.split("\n"):t;for(let t=0;t<s.length;t++)s[t]=s[t].trim();const r=/(\/\/.*)|(\/\*.*(\/)?)/g,o=/^[/]{2}/,a=/.*\{.*\}.*/,l=/^\/\*/,c=/\*\/$/,u=/\{/g,h=/\}/g,p=/.*(trait|struct|impl|enum)\s/i;let f,_=!1,d=!1,g=null,m=null,b=0,w=0,y="",v=null,x="",O=new faav_1._block_head;for(let t=0;t<s.length;t++)f=s[t],o.test(f)||(d||(d=l.test(s[t].trim())),d?c.test(f.trim())&&(d=!1):null==g&&0==b&&p.test(s[t])?(u.test(s[t])&&(_=!0),g=t,w=b):(x=s[t].replaceAll(r,""),O.try_set_info(x,t),null==m&&-1==b&&(y=O.name,m=t),a.test(f)&&0==b&&O.name.length>0?(add_symb(O.lnum,t,i[t],"Function",e,n),O.name=""):null!=g&&0==b&&h.test(s[t])?(add_symb(g,t,i[g],"Class",e,n),g=null,_=!1):(b-=null!=(v=x.match(u))?v.length:0,_||null==g||w==b||(b+=1,_=!0),b+=null!=(v=x.match(h))?v.length:0,null!=m&&0==b&&O.name.length>0&&(add_symb(O.lnum,t,O.name,"Function",e,n),O.name="",m=null))))}function _rust_fn_body(t,e,n){let s=new lang_element;s.exclude_strns=/(\"[\s\S]*?\")/gm;let i=bee_ep(Array.isArray(t)?function(t){let e="";return t.forEach(function(t){e+=t}),e}(t):t,s.exclude_strns,"#").split("\n"),r="string"==typeof t?t.split("\n"):t;for(let t=0;t<i.length;t++)i[t]=i[t].trim();if(s.uri=e,s.set_lines(i,r)){s.exclude_comments=/(\/\/.*)|(\/\*.*(\/)?)/g,s.one_line_comment=/^[/]{2}/,s.one_line_block=/.*\{.*\}.*/,s.open_comment=/^\/\*/,s.close_comment=/\*\/$/,s.open_block=/\{/g,s.close_block=/\}/g,s.tst_class=/^(trait(\<)?|struct(\<)?|(impl(\<)?)|enum(\<)?)|\s(trait(\<)?|struct(\<)?|(impl(\<)?)|enum(\<)?)/i;for(let t=0;t<i.length;t++)s.one_line_comment7(t)||s.within_comment7(t)||s.class_entry7(t)||(s.head7(t),s.one_line_block7(t)||(s.block_entry7(t),s.close_class7(t)||(s.update_block_state(t),s.close_block7(t))));n.push(...s.symbols)}}function add_symb(startLine,endLine,objName,objType,uri,symbols){let set_rng=new vscode.Range(startLine,0,endLine,0);symbols.push(new vscode.SymbolInformation(objName,eval("vscode.SymbolKind."+objType),"",new vscode.Location(uri,set_rng)))}class lang_element{#n=0;exclude_strns=/(\"[\s\S]*?\")/gm;exclude_comments=/(\/\/.*)|(\/\*.*(\/)?)/g;one_line_comment=/^[/]{2}/;one_line_block=/.*\{.*\}.*/;open_comment=/^\/\*/;close_comment=/(\*\/)$/;butterfly=/\}.*\{/;open_block=/\{/g;close_block=/\}/g;tst_class=/.*(trait|struct|impl|enum)\s/i;#s=null;#i=!1;#r=!1;#o=null;#a=null;#l=0;#c=0;#u="";#h=null;#p="";#f=[];#_=[];block_head=new faav_1._block_head;rloc=0;uri=vscode.window.activeTextEditor?.document.uri??null;symbols=[];class_symbols=[];set_lines(t,e){return null!=this.uri&&(this.#f=t,this.#_=e,this.rloc=e.length,!0)}one_line_comment7(t){return this.one_line_comment.test(this.#f[t])}within_comment7(t){return this.#i||(this.#i=this.open_comment.test(this.#f[t].trim())),this.#i&&this.close_comment.test(this.#f[t].trim())?(this.#i=!1,!0):this.#i}class_entry7(t){return null!=this.#o&&null==this.#s&&this.open_block.test(this.#f[t])?(this.#s=t,!0):(null==this.#o&&0==this.#l&&this.tst_class.test(this.#f[t])&&(null!=this.#f[t].match(this.open_block)&&(this.#s=t),this.#o=t,this.#c=this.#l),this.#o===t||this.#s===t)}block_entry7(t){return null==this.#a&&-1==this.#l&&(this.#u=this.block_head.name,this.#a=t),this.#a===t}one_line_block7(t){if(null!=this.uri)return!!(this.one_line_block.test(this.#f[t])&&0==this.#l&&this.block_head.name.length>0)&&(add_symb(this.block_head.lnum,t,this.#_[t],"Function",this.uri,this.symbols),this.block_head.name="",!0)}head7(t){this.#p=this.#f[t].replaceAll(this.exclude_comments,""),0==this.#l&&this.block_head.try_set_info(this.#p,t)}close_block7(t){if(null!=this.uri)return null!=this.#a&&0==this.#l&&this.block_head.name.length>0&&(add_symb(this.block_head.lnum,t+1,this.#_[this.block_head.lnum],"Function",this.uri,this.symbols),this.block_head.name="",this.#a=null,!0)}close_class7(t){if(null!=this.uri)return!(null==this.#o||null==this.#s||0!=this.#l||!this.close_block.test(this.#f[t])||(add_symb(this.#o,t+1,this.#_[this.#o],"Class",this.uri,this.symbols),this.block_head.name="",this.#o=null,this.#s=null,this.#s=null,0))}update_block_state(t){this.#l-=null!=(this.#h=this.#p.match(this.open_block))?this.#h.length:0,this.#s||null==this.#o||this.#c==this.#l||(this.#l+=1,this.#s=t),this.#l+=null!=(this.#h=this.#p.match(this.close_block))?this.#h.length:0}}function c_fn_body(t,e,n){let s=t.split("\n");for(let t=0;t<s.length;t++)s[t]=s[t].trim();const i=/(\/\/.*)|(\/\*.*(\/)?)/g,r=/^[/]{2}/,o=/.*\{.*\}.*/,a=/^\/\*/,l=/[\"\'\`]+/g;let c=0,u=0;const h=/\*\/$/,p=/\{/,f=/\}/,_=/.*(\sclass|\sstruct)\s/i;let d,g=!1,m=!1,b=null,w=null,y=0,v=0,x="",O=null,P="",k=new faav_1._block_head;for(let t=0;t<s.length;t++)d=s[t],r.test(d)||(m||(m=a.test(s[t])),m?h.test(d)&&(m=!1):(0==c&&(c=l.exec(s[t])?.length??0),c>0?(u=l.exec(s[t])?.length??0)>0&&(c-=u):o.test(d)&&0==y?add_symb(t,t,d,"Function",e,n):o.test(d)&&0!=y||(null==b&&0==y&&_.test(s[t])?(p.test(s[t])&&(g=!0),b=t,v=y):null!=b&&0==y&&f.test(s[t])?(add_symb(b,t,s[b],"Class",e,n),b=null,g=!1):(P=s[t].replaceAll(i,""),y-=null!=(O=p.exec(P))?O.length:0,g||null==b||v==y||(y+=1,g=!0),y+=null!=(O=f.exec(P))?O.length:0,k.set_info(s[t],t),null==w&&-1==y&&(x=get_c_fn_head(s,t),w=t),null!=w&&0==y&&(add_symb(w,t,x,"Function",e,n),w=null)))))}function get_c_fn_head(t,e){for(let n=e;n>-1;n--)if(t[n].includes("("))return t[n];return t[0]}exports.lang_element=lang_element;class mode{static dbg=!1}exports.mode=mode},810(t,e,n){"use strict";var s,i=this&&this.__createBinding||(Object.create?function(t,e,n,s){void 0===s&&(s=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,s,i)}:function(t,e,n,s){void 0===s&&(s=n),t[s]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||(s=function(t){return s=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},s(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n=s(t),o=0;o<n.length;o++)"default"!==n[o]&&i(e,t,n[o]);return r(e,t),e});Object.defineProperty(e,"__esModule",{value:!0}),e.langDefinitionProvider=void 0;const a=o(n(398)),l=n(248),c=n(135),u=n(850);e.langDefinitionProvider=class{async provideDefinition(t,e,n){const s=t.getWordRangeAtPosition(e,/[\w$@_]+/);let i=t.getText(s);const r=null!=i&&""!=i?await(0,c.handleExtraCMDs)(i):await(0,c.handleExtraCMDs)(),o=[];(0,u.prnt)(r.kind),"extra_locations"==r.kind&&o.push(...r.v);let h="**/*."+(0,l.langsName)().file_exts[0],p=await a.workspace.findFiles(h,l.restrict_search.exclude_paths,l.restrict_search.max_num_of_res);if((0,l.langsName)().file_exts.length>1)for(let t=1;t<(0,l.langsName)().file_exts.length;t++){h="**/*."+(0,l.langsName)().file_exts[t];let e=await a.workspace.findFiles(h,l.restrict_search.exclude_paths,l.restrict_search.max_num_of_res);p.push(...e)}for(const t of p){if(n.isCancellationRequested)break;try{const e=await a.workspace.openTextDocument(t),s=e.getText();let r=s.indexOf(i);for(;-1!==r&&!n.isCancellationRequested;){const n=s.substr(r+i.length,3);if(/[\s\(=:\{]/.test(n)){const n=e.positionAt(r),s=e.positionAt(r+i.length);o.push(new a.Location(t,new a.Range(n,s)))}r=s.indexOf(i,r+1)}}catch{}}return o}}},336(t,e,n){"use strict";var s,i=this&&this.__createBinding||(Object.create?function(t,e,n,s){void 0===s&&(s=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,s,i)}:function(t,e,n,s){void 0===s&&(s=n),t[s]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||(s=function(t){return s=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},s(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n=s(t),o=0;o<n.length;o++)"default"!==n[o]&&i(e,t,n[o]);return r(e,t),e});Object.defineProperty(e,"__esModule",{value:!0}),e.uri_to_file_of_opts=f,e.init=async function(t){try{const e=await f(),n=await a.workspace.openTextDocument(e[0]);g._0=n.getText(),d("D",t),d("Rust",t),d("C",t),d("CPP",t),l.i_c_fn_head_opts.been_set=!0,l.i_c_fn_head_opts.path_to_conf=e[0].fsPath}catch(t){return void(0,p.prnt)("Sorry, Dear Dev.. it was failed to init i_c_fn_head ("+String(t)+" )")}m(t),(0,u.activate0)(t)},e.regDefProvider=m;const a=o(n(398)),l=n(248),c=n(810),u=n(867),h=n(633),p=n(850);async function f(){return a.workspace.findFiles("**/i_c_fn_head.opts","",1)}function _(t){return new RegExp(`\\/\\/\\s*run\\s+${t}\\s*\\/\\/`)}function d(t,e){_(t).test(g._0)&&"D"==t&&(l.i_c_fn_head_opts.provide_lang_D=!0,e?.subscriptions.push(a.languages.registerDocumentSymbolProvider({language:"D"},new h.ShowDocumentSymbols))),_(t).test(g._0)&&"CPP"==t&&(l.i_c_fn_head_opts.provide_lang_CPP=!0,e?.subscriptions.push(a.languages.registerDocumentSymbolProvider({language:"cpp"},new h.ShowDocumentSymbols))),_(t).test(g._0)&&"C"==t&&(l.i_c_fn_head_opts.provide_lang_C=!0,e?.subscriptions.push(a.languages.registerDocumentSymbolProvider({language:"c"},new h.ShowDocumentSymbols))),_(t).test(g._0)&&"Rust"==t&&(l.i_c_fn_head_opts.provide_lang_Rust=!0,e?.subscriptions.push(a.languages.registerDocumentSymbolProvider({language:"rust"},new h.ShowDocumentSymbols)))}class g{static _0=""}function m(t){const e=function(){let t=[];return l.i_c_fn_head_opts.provide_lang_C&&t.push({scheme:"file",language:"c"}),l.i_c_fn_head_opts.provide_lang_Rust&&t.push({scheme:"file",language:"rust"}),l.i_c_fn_head_opts.provide_lang_CPP&&t.push({scheme:"file",language:"cpp"}),l.i_c_fn_head_opts.provide_lang_D&&t.push({scheme:"file",language:"D"}),t}();t.subscriptions.push(a.languages.registerDefinitionProvider(e,new c.langDefinitionProvider))}},403(t,e,n){"use strict";var s,i=this&&this.__createBinding||(Object.create?function(t,e,n,s){void 0===s&&(s=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,s,i)}:function(t,e,n,s){void 0===s&&(s=n),t[s]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||(s=function(t){return s=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},s(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n=s(t),o=0;o<n.length;o++)"default"!==n[o]&&i(e,t,n[o]);return r(e,t),e});Object.defineProperty(e,"__esModule",{value:!0}),e.menu=function(){},o(n(398))},633(t,e,n){"use strict";var s,i=this&&this.__createBinding||(Object.create?function(t,e,n,s){void 0===s&&(s=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,s,i)}:function(t,e,n,s){void 0===s&&(s=n),t[s]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||(s=function(t){return s=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},s(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n=s(t),o=0;o<n.length;o++)"default"!==n[o]&&i(e,t,n[o]);return r(e,t),e});Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentSymbols=void 0,e.manage_output=u;const a=o(n(398)),l=n(745);var c;function u(t,e,n){const s=a.window.activeTextEditor?.document.uri.fsPath??"";let i=/rs$|c$|cpp$|d$/g.exec(s)?.[0]??"";switch(s?.toString(),i){case"c":return(0,l.c_fn_body)(t,e,n),c.C;case"cpp":return(0,l.c_fn_body)(t,e,n),c.CPP;case"d":return(0,l._c_fn_body)(t,e,n),c.D;case"rs":return(0,l._rust_fn_body)(t,e,n),c.Rust}return null}e.ShowDocumentSymbols=class{provideDocumentSymbols(t,e){let n=[],s=t.getText();return s.split("\n"),a.window.activeTextEditor?.document.languageId.toLowerCase(),new a.Range(0,0,0,100),new a.Position(0,0),new a.Range(0,0,0,100),u(s,t.uri,n),n}},function(t){t[t.C=0]="C",t[t.D=1]="D",t[t.Rust=2]="Rust",t[t.CPP=3]="CPP"}(c||(c={}))},398(t){"use strict";t.exports=require("vscode")},896(t){"use strict";t.exports=require("fs")},274(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertValidPattern=void 0,e.assertValidPattern=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")}},674(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AST=void 0;const s=n(843),i=n(116),r=new Set(["!","?","+","*","@"]),o=t=>r.has(t),a="(?!\\.)",l=new Set(["[","."]),c=new Set(["..","."]),u=new Set("().*{}+?[]^$\\!"),h=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),p="[^/]",f=p+"*?",_=p+"+?";class d{type;#d;#g;#m=!1;#b=[];#w;#y;#v;#x=!1;#O;#P;#k=!1;constructor(t,e,n={}){this.type=t,t&&(this.#g=!0),this.#w=e,this.#d=this.#w?this.#w.#d:this,this.#O=this.#d===this?n:this.#d.#O,this.#v=this.#d===this?[]:this.#d.#v,"!"!==t||this.#d.#x||this.#v.push(this),this.#y=this.#w?this.#w.#b.length:0}get hasMagic(){if(void 0!==this.#g)return this.#g;for(const t of this.#b)if("string"!=typeof t&&(t.type||t.hasMagic))return this.#g=!0;return this.#g}toString(){return void 0!==this.#P?this.#P:this.type?this.#P=this.type+"("+this.#b.map(t=>String(t)).join("|")+")":this.#P=this.#b.map(t=>String(t)).join("")}#S(){if(this!==this.#d)throw new Error("should only call on root");if(this.#x)return this;let t;for(this.toString(),this.#x=!0;t=this.#v.pop();){if("!"!==t.type)continue;let e=t,n=e.#w;for(;n;){for(let s=e.#y+1;!n.type&&s<n.#b.length;s++)for(const e of t.#b){if("string"==typeof e)throw new Error("string part in extglob AST??");e.copyIn(n.#b[s])}e=n,n=e.#w}}return this}push(...t){for(const e of t)if(""!==e){if("string"!=typeof e&&!(e instanceof d&&e.#w===this))throw new Error("invalid part: "+e);this.#b.push(e)}}toJSON(){const t=null===this.type?this.#b.slice().map(t=>"string"==typeof t?t:t.toJSON()):[this.type,...this.#b.map(t=>t.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#d||this.#d.#x&&"!"===this.#w?.type)&&t.push({}),t}isStart(){if(this.#d===this)return!0;if(!this.#w?.isStart())return!1;if(0===this.#y)return!0;const t=this.#w;for(let e=0;e<this.#y;e++){const n=t.#b[e];if(!(n instanceof d&&"!"===n.type))return!1}return!0}isEnd(){if(this.#d===this)return!0;if("!"===this.#w?.type)return!0;if(!this.#w?.isEnd())return!1;if(!this.type)return this.#w?.isEnd();const t=this.#w?this.#w.#b.length:0;return this.#y===t-1}copyIn(t){"string"==typeof t?this.push(t):this.push(t.clone(this))}clone(t){const e=new d(this.type,t);for(const t of this.#b)e.copyIn(t);return e}static#j(t,e,n,s){let i=!1,r=!1,a=-1,l=!1;if(null===e.type){let c=n,u="";for(;c<t.length;){const n=t.charAt(c++);if(i||"\\"===n)i=!i,u+=n;else if(r)c===a+1?"^"!==n&&"!"!==n||(l=!0):"]"!==n||c===a+2&&l||(r=!1),u+=n;else if("["!==n){if(!s.noext&&o(n)&&"("===t.charAt(c)){e.push(u),u="";const i=new d(n,e);c=d.#j(t,i,c,s),e.push(i);continue}u+=n}else r=!0,a=c,l=!1,u+=n}return e.push(u),c}let c=n+1,u=new d(null,e);const h=[];let p="";for(;c<t.length;){const n=t.charAt(c++);if(i||"\\"===n)i=!i,p+=n;else if(r)c===a+1?"^"!==n&&"!"!==n||(l=!0):"]"!==n||c===a+2&&l||(r=!1),p+=n;else if("["!==n){if(o(n)&&"("===t.charAt(c)){u.push(p),p="";const e=new d(n,u);u.push(e),c=d.#j(t,e,c,s);continue}if("|"!==n){if(")"===n)return""===p&&0===e.#b.length&&(e.#k=!0),u.push(p),p="",e.push(...h,u),c;p+=n}else u.push(p),p="",h.push(u),u=new d(null,e)}else r=!0,a=c,l=!1,p+=n}return e.type=null,e.#g=void 0,e.#b=[t.substring(n-1)],c}static fromGlob(t,e={}){const n=new d(null,void 0,e);return d.#j(t,n,0,e),n}toMMPattern(){if(this!==this.#d)return this.#d.toMMPattern();const t=this.toString(),[e,n,s,i]=this.toRegExpSource();if(!(s||this.#g||this.#O.nocase&&!this.#O.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const r=(this.#O.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${e}$`,r),{_src:e,_glob:t})}get options(){return this.#O}toRegExpSource(t){const e=t??!!this.#O.dot;if(this.#d===this&&this.#S(),!this.type){const n=this.isStart()&&this.isEnd(),s=this.#b.map(e=>{const[s,i,r,o]="string"==typeof e?d.#M(e,this.#g,n):e.toRegExpSource(t);return this.#g=this.#g||r,this.#m=this.#m||o,s}).join("");let r="";if(this.isStart()&&"string"==typeof this.#b[0]&&(1!==this.#b.length||!c.has(this.#b[0]))){const n=l,i=e&&n.has(s.charAt(0))||s.startsWith("\\.")&&n.has(s.charAt(2))||s.startsWith("\\.\\.")&&n.has(s.charAt(4)),o=!e&&!t&&n.has(s.charAt(0));r=i?"(?!(?:^|/)\\.\\.?(?:$|/))":o?a:""}let o="";return this.isEnd()&&this.#d.#x&&"!"===this.#w?.type&&(o="(?:$|\\/)"),[r+s+o,(0,i.unescape)(s),this.#g=!!this.#g,this.#m]}const n="*"===this.type||"+"===this.type,s="!"===this.type?"(?:(?!(?:":"(?:";let r=this.#E(e);if(this.isStart()&&this.isEnd()&&!r&&"!"!==this.type){const t=this.toString();return this.#b=[t],this.type=null,this.#g=void 0,[t,(0,i.unescape)(this.toString()),!1,!1]}let o=!n||t||e?"":this.#E(!0);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let u="";return u="!"===this.type&&this.#k?(this.isStart()&&!e?a:"")+_:s+r+("!"===this.type?"))"+(!this.isStart()||e||t?"":a)+f+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&o?")":"*"===this.type&&o?")?":`)${this.type}`),[u,(0,i.unescape)(r),this.#g=!!this.#g,this.#m]}#E(t){return this.#b.map(e=>{if("string"==typeof e)throw new Error("string type in extglob ast??");const[n,s,i,r]=e.toRegExpSource(t);return this.#m=this.#m||r,n}).filter(t=>!(this.isStart()&&this.isEnd()&&!t)).join("|")}static#M(t,e,n=!1){let r=!1,o="",a=!1;for(let i=0;i<t.length;i++){const l=t.charAt(i);if(r)r=!1,o+=(u.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[n,r,l,c]=(0,s.parseClass)(t,i);if(l){o+=n,a=a||r,i+=l-1,e=e||c;continue}}"*"!==l?"?"!==l?o+=h(l):(o+=p,e=!0):(o+=n&&"*"===t?_:f,e=!0)}else i===t.length-1?o+="\\\\":r=!0}return[o,(0,i.unescape)(t),!!e,a]}}e.AST=d},843(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseClass=void 0;const n={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},s=t=>t.replace(/[[\]\\-]/g,"\\$&"),i=t=>t.join("");e.parseClass=(t,e)=>{const r=e;if("["!==t.charAt(r))throw new Error("not in a brace expression");const o=[],a=[];let l=r+1,c=!1,u=!1,h=!1,p=!1,f=r,_="";t:for(;l<t.length;){const e=t.charAt(l);if("!"!==e&&"^"!==e||l!==r+1){if("]"===e&&c&&!h){f=l+1;break}if(c=!0,"\\"!==e||h){if("["===e&&!h)for(const[e,[s,i,c]]of Object.entries(n))if(t.startsWith(e,l)){if(_)return["$.",!1,t.length-r,!0];l+=e.length,c?a.push(s):o.push(s),u=u||i;continue t}h=!1,_?(e>_?o.push(s(_)+"-"+s(e)):e===_&&o.push(s(e)),_="",l++):t.startsWith("-]",l+1)?(o.push(s(e+"-")),l+=2):t.startsWith("-",l+1)?(_=e,l+=2):(o.push(s(e)),l++)}else h=!0,l++}else p=!0,l++}if(f<l)return["",!1,0,!1];if(!o.length&&!a.length)return["$.",!1,t.length-r,!0];if(0===a.length&&1===o.length&&/^\\?.$/.test(o[0])&&!p){return[(d=2===o[0].length?o[0].slice(-1):o[0],d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,f-r,!1]}var d;const g="["+(p?"^":"")+i(o)+"]",m="["+(p?"":"^")+i(a)+"]";return[o.length&&a.length?"("+g+"|"+m+")":o.length?g:m,u,f-r,!0]}},363(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.escape=void 0,e.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&")},722(t,e,n){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;const i=s(n(928)),r=n(274),o=n(674),a=n(363),l=n(116);e.minimatch=(t,e,n={})=>((0,r.assertValidPattern)(e),!(!n.nocomment&&"#"===e.charAt(0))&&new T(e,n).match(t));const c=/^\*+([^+@!?\*\[\(]*)$/,u=t=>e=>!e.startsWith(".")&&e.endsWith(t),h=t=>e=>e.endsWith(t),p=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),f=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),_=/^\*+\.\*+$/,d=t=>!t.startsWith(".")&&t.includes("."),g=t=>"."!==t&&".."!==t&&t.includes("."),m=/^\.\*+$/,b=t=>"."!==t&&".."!==t&&t.startsWith("."),w=/^\*+$/,y=t=>0!==t.length&&!t.startsWith("."),v=t=>0!==t.length&&"."!==t&&".."!==t,x=/^\?+([^+@!?\*\[\(]*)?$/,O=([t,e=""])=>{const n=j([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},P=([t,e=""])=>{const n=M([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},k=([t,e=""])=>{const n=M([t]);return e?t=>n(t)&&t.endsWith(e):n},S=([t,e=""])=>{const n=j([t]);return e?t=>n(t)&&t.endsWith(e):n},j=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},M=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},E="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";e.sep="win32"===E?"\\":"/",e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol("globstar **"),e.minimatch.GLOBSTAR=e.GLOBSTAR,e.filter=(t,n={})=>s=>(0,e.minimatch)(s,t,n),e.minimatch.filter=e.filter;const D=(t,e={})=>Object.assign({},t,e);e.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return e.minimatch;const n=e.minimatch;return Object.assign((e,s,i={})=>n(e,s,D(t,i)),{Minimatch:class extends n.Minimatch{constructor(e,n={}){super(e,D(t,n))}static defaults(e){return n.defaults(D(t,e)).Minimatch}},AST:class extends n.AST{constructor(e,n,s={}){super(e,n,D(t,s))}static fromGlob(e,s={}){return n.AST.fromGlob(e,D(t,s))}},unescape:(e,s={})=>n.unescape(e,D(t,s)),escape:(e,s={})=>n.escape(e,D(t,s)),filter:(e,s={})=>n.filter(e,D(t,s)),defaults:e=>n.defaults(D(t,e)),makeRe:(e,s={})=>n.makeRe(e,D(t,s)),braceExpand:(e,s={})=>n.braceExpand(e,D(t,s)),match:(e,s,i={})=>n.match(e,s,D(t,i)),sep:n.sep,GLOBSTAR:e.GLOBSTAR})},e.minimatch.defaults=e.defaults,e.braceExpand=(t,e={})=>((0,r.assertValidPattern)(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,i.default)(t)),e.minimatch.braceExpand=e.braceExpand,e.makeRe=(t,e={})=>new T(t,e).makeRe(),e.minimatch.makeRe=e.makeRe,e.match=(t,e,n={})=>{const s=new T(e,n);return t=t.filter(t=>s.match(t)),s.options.nonull&&!t.length&&t.push(e),t},e.minimatch.match=e.match;const A=/[?*]|[+@!]\(.*?\)|\[|\]/;class T{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){(0,r.assertValidPattern)(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||E,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const n=this.globSet.map(t=>this.slashSplit(t));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((t,e,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&A.test(t[2])||A.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map(t=>this.parse(t))];if(n)return[t[0],...t.slice(1).map(t=>this.parse(t))]}return t.map(t=>this.parse(t))});if(this.debug(this.pattern,s),this.set=s.filter(t=>-1===t.indexOf(!1)),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t})}levelOneOptimize(t){return t.map(t=>0===(t=t.reduce((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)},[])).length?[""]:t)}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const s=t[n];1===n&&""===s&&""===t[0]||"."!==s&&""!==s||(e=!0,t.splice(n,1),n--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const s=t[n-1];s&&"."!==s&&".."!==s&&"**"!==s&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let s=-1;for(;-1!==(s=n.indexOf("**",s+1));){let i=s;for(;"**"===n[i+1];)i++;i>s&&n.splice(s+1,i-s);let r=n[s+1];const o=n[s+2],a=n[s+3];if(".."!==r)continue;if(!o||"."===o||".."===o||!a||"."===a||".."===a)continue;e=!0,n.splice(s,1);const l=n.slice(0);l[s]="**",t.push(l),s--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const s=n[t];1===t&&""===s&&""===n[0]||"."!==s&&""!==s||(e=!0,n.splice(t,1),t--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let i=0;for(;-1!==(i=n.indexOf("..",i+1));){const t=n[i-1];if(t&&"."!==t&&".."!==t&&"**"!==t){e=!0;const t=1===i&&"**"===n[i+1]?["."]:[];n.splice(i-1,2,...t),0===n.length&&n.push(""),i-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const s=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);if(s){t[e]=[],t[n]=s;break}}return t.filter(t=>t.length)}partsMatch(t,e,n=!1){let s=0,i=0,r=[],o="";for(;s<t.length&&i<e.length;)if(t[s]===e[i])r.push("b"===o?e[i]:t[s]),s++,i++;else if(n&&"**"===t[s]&&e[i]===t[s+1])r.push(t[s]),s++;else if(n&&"**"===e[i]&&t[s]===e[i+1])r.push(e[i]),i++;else if("*"!==t[s]||!e[i]||!this.options.dot&&e[i].startsWith(".")||"**"===e[i]){if("*"!==e[i]||!t[s]||!this.options.dot&&t[s].startsWith(".")||"**"===t[s])return!1;if("a"===o)return!1;o="b",r.push(e[i]),s++,i++}else{if("b"===o)return!1;o="a",r.push(t[s]),s++,i++}return t.length===e.length&&r}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let s=0;s<t.length&&"!"===t.charAt(s);s++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,n,s=!1){const i=this.options;if(this.isWindows){const e="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),s=!e&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),i="string"==typeof n[0]&&/^[a-z]:$/i.test(n[0]),r=s?3:e?0:void 0,o=!i&&""===n[0]&&""===n[1]&&"?"===n[2]&&"string"==typeof n[3]&&/^[a-z]:$/i.test(n[3])?3:i?0:void 0;if("number"==typeof r&&"number"==typeof o){const[e,s]=[t[r],n[o]];e.toLowerCase()===s.toLowerCase()&&(n[o]=e,o>r?n=n.slice(o):r>o&&(t=t.slice(r)))}}const{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:n}),this.debug("matchOne",t.length,n.length);for(var o=0,a=0,l=t.length,c=n.length;o<l&&a<c;o++,a++){this.debug("matchOne loop");var u=n[a],h=t[o];if(this.debug(n,u,h),!1===u)return!1;if(u===e.GLOBSTAR){this.debug("GLOBSTAR",[n,u,h]);var p=o,f=a+1;if(f===c){for(this.debug("** at the end");o<l;o++)if("."===t[o]||".."===t[o]||!i.dot&&"."===t[o].charAt(0))return!1;return!0}for(;p<l;){var _=t[p];if(this.debug("\nglobstar while",t,p,n,f,_),this.matchOne(t.slice(p),n.slice(f),s))return this.debug("globstar found match!",p,l,_),!0;if("."===_||".."===_||!i.dot&&"."===_.charAt(0)){this.debug("dot detected!",t,p,n,f);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!s||(this.debug("\n>>> no match, partial?",t,p,n,f),p!==l))}let r;if("string"==typeof u?(r=h===u,this.debug("string match",u,h,r)):(r=u.test(h),this.debug("pattern match",u,h,r)),!r)return!1}if(o===l&&a===c)return!0;if(o===l)return s;if(a===c)return o===l-1&&""===t[o];throw new Error("wtf?")}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(t){(0,r.assertValidPattern)(t);const n=this.options;if("**"===t)return e.GLOBSTAR;if(""===t)return"";let s,i=null;(s=t.match(w))?i=n.dot?v:y:(s=t.match(c))?i=(n.nocase?n.dot?f:p:n.dot?h:u)(s[1]):(s=t.match(x))?i=(n.nocase?n.dot?P:O:n.dot?k:S)(s):(s=t.match(_))?i=n.dot?g:d:(s=t.match(m))&&(i=b);const a=o.AST.fromGlob(t,this.options).toMMPattern();return i&&"object"==typeof a&&Reflect.defineProperty(a,"test",{value:i}),a}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const n=this.options,s=n.noglobstar?"[^/]*?":n.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=new Set(n.nocase?["i"]:[]);let r=t.map(t=>{const n=t.map(t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))i.add(e);return"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===e.GLOBSTAR?e.GLOBSTAR:t._src});return n.forEach((t,i)=>{const r=n[i+1],o=n[i-1];t===e.GLOBSTAR&&o!==e.GLOBSTAR&&(void 0===o?void 0!==r&&r!==e.GLOBSTAR?n[i+1]="(?:\\/|"+s+"\\/)?"+r:n[i]=s:void 0===r?n[i-1]=o+"(?:\\/|"+s+")?":r!==e.GLOBSTAR&&(n[i-1]=o+"(?:\\/|\\/"+s+"\\/)"+r,n[i+1]=e.GLOBSTAR))}),n.filter(t=>t!==e.GLOBSTAR).join("/")}).join("|");const[o,a]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+a+"$",this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const i=this.set;this.debug(this.pattern,"set",i);let r=s[s.length-1];if(!r)for(let t=s.length-2;!r&&t>=0;t--)r=s[t];for(let t=0;t<i.length;t++){const o=i[t];let a=s;if(n.matchBase&&1===o.length&&(a=[r]),this.matchOne(a,o,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return e.minimatch.defaults(t).Minimatch}}e.Minimatch=T;var C=n(674);Object.defineProperty(e,"AST",{enumerable:!0,get:function(){return C.AST}});var R=n(363);Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return R.escape}});var $=n(116);Object.defineProperty(e,"unescape",{enumerable:!0,get:function(){return $.unescape}}),e.minimatch.AST=o.AST,e.minimatch.Minimatch=T,e.minimatch.escape=a.escape,e.minimatch.unescape=l.unescape},116(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=void 0,e.unescape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(n.exports,n,n.exports,__webpack_require__),n.exports}var __webpack_exports__=__webpack_require__(265);module.exports=__webpack_exports__})();
|