@harnessio/yaml-editor 0.16.0-react18.alpha.4 → 0.18.0
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/README.md +28 -0
- package/dist/components/CodeEditor.d.ts +2 -1
- package/dist/index.cjs +89 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +1063 -465
- package/dist/index.js.map +1 -1
- package/dist/monacoeditorwork/yaml.worker.bundle.js +235 -237
- package/package.json +18 -11
|
@@ -27838,129 +27838,129 @@ ${p.commentBefore}` : u;
|
|
|
27838
27838
|
ParseErrorCode2[ParseErrorCode2["InvalidCharacter"] = 16] = "InvalidCharacter";
|
|
27839
27839
|
})(ParseErrorCode || (ParseErrorCode = {}));
|
|
27840
27840
|
|
|
27841
|
-
// ../../node_modules/.pnpm/vscode-uri@3.0
|
|
27841
|
+
// ../../node_modules/.pnpm/vscode-uri@3.1.0/node_modules/vscode-uri/lib/esm/index.mjs
|
|
27842
27842
|
var LIB;
|
|
27843
27843
|
(() => {
|
|
27844
27844
|
"use strict";
|
|
27845
|
-
var t = {
|
|
27845
|
+
var t = { 975: (t2) => {
|
|
27846
27846
|
function e2(t3) {
|
|
27847
27847
|
if ("string" != typeof t3) throw new TypeError("Path must be a string. Received " + JSON.stringify(t3));
|
|
27848
27848
|
}
|
|
27849
27849
|
function r2(t3, e3) {
|
|
27850
|
-
for (var r3, n3 = "",
|
|
27851
|
-
if (
|
|
27850
|
+
for (var r3, n3 = "", i2 = 0, o2 = -1, s2 = 0, h2 = 0; h2 <= t3.length; ++h2) {
|
|
27851
|
+
if (h2 < t3.length) r3 = t3.charCodeAt(h2);
|
|
27852
27852
|
else {
|
|
27853
27853
|
if (47 === r3) break;
|
|
27854
27854
|
r3 = 47;
|
|
27855
27855
|
}
|
|
27856
27856
|
if (47 === r3) {
|
|
27857
|
-
if (
|
|
27858
|
-
else if (
|
|
27859
|
-
if (n3.length < 2 || 2 !==
|
|
27857
|
+
if (o2 === h2 - 1 || 1 === s2) ;
|
|
27858
|
+
else if (o2 !== h2 - 1 && 2 === s2) {
|
|
27859
|
+
if (n3.length < 2 || 2 !== i2 || 46 !== n3.charCodeAt(n3.length - 1) || 46 !== n3.charCodeAt(n3.length - 2)) {
|
|
27860
27860
|
if (n3.length > 2) {
|
|
27861
|
-
var
|
|
27862
|
-
if (
|
|
27863
|
-
-1 ===
|
|
27861
|
+
var a3 = n3.lastIndexOf("/");
|
|
27862
|
+
if (a3 !== n3.length - 1) {
|
|
27863
|
+
-1 === a3 ? (n3 = "", i2 = 0) : i2 = (n3 = n3.slice(0, a3)).length - 1 - n3.lastIndexOf("/"), o2 = h2, s2 = 0;
|
|
27864
27864
|
continue;
|
|
27865
27865
|
}
|
|
27866
27866
|
} else if (2 === n3.length || 1 === n3.length) {
|
|
27867
|
-
n3 = "",
|
|
27867
|
+
n3 = "", i2 = 0, o2 = h2, s2 = 0;
|
|
27868
27868
|
continue;
|
|
27869
27869
|
}
|
|
27870
27870
|
}
|
|
27871
|
-
e3 && (n3.length > 0 ? n3 += "/.." : n3 = "..",
|
|
27872
|
-
} else n3.length > 0 ? n3 += "/" + t3.slice(
|
|
27873
|
-
|
|
27874
|
-
} else 46 === r3 && -1 !==
|
|
27871
|
+
e3 && (n3.length > 0 ? n3 += "/.." : n3 = "..", i2 = 2);
|
|
27872
|
+
} else n3.length > 0 ? n3 += "/" + t3.slice(o2 + 1, h2) : n3 = t3.slice(o2 + 1, h2), i2 = h2 - o2 - 1;
|
|
27873
|
+
o2 = h2, s2 = 0;
|
|
27874
|
+
} else 46 === r3 && -1 !== s2 ? ++s2 : s2 = -1;
|
|
27875
27875
|
}
|
|
27876
27876
|
return n3;
|
|
27877
27877
|
}
|
|
27878
27878
|
var n2 = { resolve: function() {
|
|
27879
|
-
for (var t3, n3 = "",
|
|
27880
|
-
var
|
|
27881
|
-
|
|
27879
|
+
for (var t3, n3 = "", i2 = false, o2 = arguments.length - 1; o2 >= -1 && !i2; o2--) {
|
|
27880
|
+
var s2;
|
|
27881
|
+
o2 >= 0 ? s2 = arguments[o2] : (void 0 === t3 && (t3 = process.cwd()), s2 = t3), e2(s2), 0 !== s2.length && (n3 = s2 + "/" + n3, i2 = 47 === s2.charCodeAt(0));
|
|
27882
27882
|
}
|
|
27883
|
-
return n3 = r2(n3, !
|
|
27883
|
+
return n3 = r2(n3, !i2), i2 ? n3.length > 0 ? "/" + n3 : "/" : n3.length > 0 ? n3 : ".";
|
|
27884
27884
|
}, normalize: function(t3) {
|
|
27885
27885
|
if (e2(t3), 0 === t3.length) return ".";
|
|
27886
|
-
var n3 = 47 === t3.charCodeAt(0),
|
|
27887
|
-
return 0 !== (t3 = r2(t3, !n3)).length || n3 || (t3 = "."), t3.length > 0 &&
|
|
27886
|
+
var n3 = 47 === t3.charCodeAt(0), i2 = 47 === t3.charCodeAt(t3.length - 1);
|
|
27887
|
+
return 0 !== (t3 = r2(t3, !n3)).length || n3 || (t3 = "."), t3.length > 0 && i2 && (t3 += "/"), n3 ? "/" + t3 : t3;
|
|
27888
27888
|
}, isAbsolute: function(t3) {
|
|
27889
27889
|
return e2(t3), t3.length > 0 && 47 === t3.charCodeAt(0);
|
|
27890
27890
|
}, join: function() {
|
|
27891
27891
|
if (0 === arguments.length) return ".";
|
|
27892
27892
|
for (var t3, r3 = 0; r3 < arguments.length; ++r3) {
|
|
27893
|
-
var
|
|
27894
|
-
e2(
|
|
27893
|
+
var i2 = arguments[r3];
|
|
27894
|
+
e2(i2), i2.length > 0 && (void 0 === t3 ? t3 = i2 : t3 += "/" + i2);
|
|
27895
27895
|
}
|
|
27896
27896
|
return void 0 === t3 ? "." : n2.normalize(t3);
|
|
27897
27897
|
}, relative: function(t3, r3) {
|
|
27898
27898
|
if (e2(t3), e2(r3), t3 === r3) return "";
|
|
27899
27899
|
if ((t3 = n2.resolve(t3)) === (r3 = n2.resolve(r3))) return "";
|
|
27900
|
-
for (var
|
|
27901
|
-
for (var
|
|
27902
|
-
for (var
|
|
27903
|
-
if (
|
|
27904
|
-
if (
|
|
27905
|
-
if (47 === r3.charCodeAt(
|
|
27906
|
-
if (0 ===
|
|
27907
|
-
} else
|
|
27900
|
+
for (var i2 = 1; i2 < t3.length && 47 === t3.charCodeAt(i2); ++i2) ;
|
|
27901
|
+
for (var o2 = t3.length, s2 = o2 - i2, h2 = 1; h2 < r3.length && 47 === r3.charCodeAt(h2); ++h2) ;
|
|
27902
|
+
for (var a3 = r3.length - h2, c2 = s2 < a3 ? s2 : a3, f3 = -1, u2 = 0; u2 <= c2; ++u2) {
|
|
27903
|
+
if (u2 === c2) {
|
|
27904
|
+
if (a3 > c2) {
|
|
27905
|
+
if (47 === r3.charCodeAt(h2 + u2)) return r3.slice(h2 + u2 + 1);
|
|
27906
|
+
if (0 === u2) return r3.slice(h2 + u2);
|
|
27907
|
+
} else s2 > c2 && (47 === t3.charCodeAt(i2 + u2) ? f3 = u2 : 0 === u2 && (f3 = 0));
|
|
27908
27908
|
break;
|
|
27909
27909
|
}
|
|
27910
|
-
var
|
|
27911
|
-
if (
|
|
27912
|
-
47 ===
|
|
27910
|
+
var l2 = t3.charCodeAt(i2 + u2);
|
|
27911
|
+
if (l2 !== r3.charCodeAt(h2 + u2)) break;
|
|
27912
|
+
47 === l2 && (f3 = u2);
|
|
27913
27913
|
}
|
|
27914
|
-
var
|
|
27915
|
-
for (
|
|
27916
|
-
return
|
|
27914
|
+
var g2 = "";
|
|
27915
|
+
for (u2 = i2 + f3 + 1; u2 <= o2; ++u2) u2 !== o2 && 47 !== t3.charCodeAt(u2) || (0 === g2.length ? g2 += ".." : g2 += "/..");
|
|
27916
|
+
return g2.length > 0 ? g2 + r3.slice(h2 + f3) : (h2 += f3, 47 === r3.charCodeAt(h2) && ++h2, r3.slice(h2));
|
|
27917
27917
|
}, _makeLong: function(t3) {
|
|
27918
27918
|
return t3;
|
|
27919
27919
|
}, dirname: function(t3) {
|
|
27920
27920
|
if (e2(t3), 0 === t3.length) return ".";
|
|
27921
|
-
for (var r3 = t3.charCodeAt(0), n3 = 47 === r3,
|
|
27922
|
-
if (!
|
|
27923
|
-
|
|
27921
|
+
for (var r3 = t3.charCodeAt(0), n3 = 47 === r3, i2 = -1, o2 = true, s2 = t3.length - 1; s2 >= 1; --s2) if (47 === (r3 = t3.charCodeAt(s2))) {
|
|
27922
|
+
if (!o2) {
|
|
27923
|
+
i2 = s2;
|
|
27924
27924
|
break;
|
|
27925
27925
|
}
|
|
27926
|
-
} else
|
|
27927
|
-
return -1 ===
|
|
27926
|
+
} else o2 = false;
|
|
27927
|
+
return -1 === i2 ? n3 ? "/" : "." : n3 && 1 === i2 ? "//" : t3.slice(0, i2);
|
|
27928
27928
|
}, basename: function(t3, r3) {
|
|
27929
27929
|
if (void 0 !== r3 && "string" != typeof r3) throw new TypeError('"ext" argument must be a string');
|
|
27930
27930
|
e2(t3);
|
|
27931
|
-
var n3,
|
|
27931
|
+
var n3, i2 = 0, o2 = -1, s2 = true;
|
|
27932
27932
|
if (void 0 !== r3 && r3.length > 0 && r3.length <= t3.length) {
|
|
27933
27933
|
if (r3.length === t3.length && r3 === t3) return "";
|
|
27934
|
-
var
|
|
27934
|
+
var h2 = r3.length - 1, a3 = -1;
|
|
27935
27935
|
for (n3 = t3.length - 1; n3 >= 0; --n3) {
|
|
27936
|
-
var
|
|
27937
|
-
if (47 ===
|
|
27938
|
-
if (!
|
|
27939
|
-
|
|
27936
|
+
var c2 = t3.charCodeAt(n3);
|
|
27937
|
+
if (47 === c2) {
|
|
27938
|
+
if (!s2) {
|
|
27939
|
+
i2 = n3 + 1;
|
|
27940
27940
|
break;
|
|
27941
27941
|
}
|
|
27942
|
-
} else -1 ===
|
|
27942
|
+
} else -1 === a3 && (s2 = false, a3 = n3 + 1), h2 >= 0 && (c2 === r3.charCodeAt(h2) ? -1 == --h2 && (o2 = n3) : (h2 = -1, o2 = a3));
|
|
27943
27943
|
}
|
|
27944
|
-
return
|
|
27944
|
+
return i2 === o2 ? o2 = a3 : -1 === o2 && (o2 = t3.length), t3.slice(i2, o2);
|
|
27945
27945
|
}
|
|
27946
27946
|
for (n3 = t3.length - 1; n3 >= 0; --n3) if (47 === t3.charCodeAt(n3)) {
|
|
27947
|
-
if (!
|
|
27948
|
-
|
|
27947
|
+
if (!s2) {
|
|
27948
|
+
i2 = n3 + 1;
|
|
27949
27949
|
break;
|
|
27950
27950
|
}
|
|
27951
|
-
} else -1 ===
|
|
27952
|
-
return -1 ===
|
|
27951
|
+
} else -1 === o2 && (s2 = false, o2 = n3 + 1);
|
|
27952
|
+
return -1 === o2 ? "" : t3.slice(i2, o2);
|
|
27953
27953
|
}, extname: function(t3) {
|
|
27954
27954
|
e2(t3);
|
|
27955
|
-
for (var r3 = -1, n3 = 0,
|
|
27956
|
-
var
|
|
27957
|
-
if (47 !==
|
|
27958
|
-
else if (!
|
|
27959
|
-
n3 =
|
|
27955
|
+
for (var r3 = -1, n3 = 0, i2 = -1, o2 = true, s2 = 0, h2 = t3.length - 1; h2 >= 0; --h2) {
|
|
27956
|
+
var a3 = t3.charCodeAt(h2);
|
|
27957
|
+
if (47 !== a3) -1 === i2 && (o2 = false, i2 = h2 + 1), 46 === a3 ? -1 === r3 ? r3 = h2 : 1 !== s2 && (s2 = 1) : -1 !== r3 && (s2 = -1);
|
|
27958
|
+
else if (!o2) {
|
|
27959
|
+
n3 = h2 + 1;
|
|
27960
27960
|
break;
|
|
27961
27961
|
}
|
|
27962
27962
|
}
|
|
27963
|
-
return -1 === r3 || -1 ===
|
|
27963
|
+
return -1 === r3 || -1 === i2 || 0 === s2 || 1 === s2 && r3 === i2 - 1 && r3 === n3 + 1 ? "" : t3.slice(r3, i2);
|
|
27964
27964
|
}, format: function(t3) {
|
|
27965
27965
|
if (null === t3 || "object" != typeof t3) throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof t3);
|
|
27966
27966
|
return function(t4, e3) {
|
|
@@ -27971,22 +27971,22 @@ ${p.commentBefore}` : u;
|
|
|
27971
27971
|
e2(t3);
|
|
27972
27972
|
var r3 = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
27973
27973
|
if (0 === t3.length) return r3;
|
|
27974
|
-
var n3,
|
|
27975
|
-
|
|
27976
|
-
for (var
|
|
27977
|
-
else if (!
|
|
27978
|
-
|
|
27974
|
+
var n3, i2 = t3.charCodeAt(0), o2 = 47 === i2;
|
|
27975
|
+
o2 ? (r3.root = "/", n3 = 1) : n3 = 0;
|
|
27976
|
+
for (var s2 = -1, h2 = 0, a3 = -1, c2 = true, f3 = t3.length - 1, u2 = 0; f3 >= n3; --f3) if (47 !== (i2 = t3.charCodeAt(f3))) -1 === a3 && (c2 = false, a3 = f3 + 1), 46 === i2 ? -1 === s2 ? s2 = f3 : 1 !== u2 && (u2 = 1) : -1 !== s2 && (u2 = -1);
|
|
27977
|
+
else if (!c2) {
|
|
27978
|
+
h2 = f3 + 1;
|
|
27979
27979
|
break;
|
|
27980
27980
|
}
|
|
27981
|
-
return -1 ===
|
|
27981
|
+
return -1 === s2 || -1 === a3 || 0 === u2 || 1 === u2 && s2 === a3 - 1 && s2 === h2 + 1 ? -1 !== a3 && (r3.base = r3.name = 0 === h2 && o2 ? t3.slice(1, a3) : t3.slice(h2, a3)) : (0 === h2 && o2 ? (r3.name = t3.slice(1, s2), r3.base = t3.slice(1, a3)) : (r3.name = t3.slice(h2, s2), r3.base = t3.slice(h2, a3)), r3.ext = t3.slice(s2, a3)), h2 > 0 ? r3.dir = t3.slice(0, h2 - 1) : o2 && (r3.dir = "/"), r3;
|
|
27982
27982
|
}, sep: "/", delimiter: ":", win32: null, posix: null };
|
|
27983
27983
|
n2.posix = n2, t2.exports = n2;
|
|
27984
27984
|
} }, e = {};
|
|
27985
27985
|
function r(n2) {
|
|
27986
|
-
var
|
|
27987
|
-
if (void 0 !==
|
|
27988
|
-
var
|
|
27989
|
-
return t[n2](
|
|
27986
|
+
var i2 = e[n2];
|
|
27987
|
+
if (void 0 !== i2) return i2.exports;
|
|
27988
|
+
var o2 = e[n2] = { exports: {} };
|
|
27989
|
+
return t[n2](o2, o2.exports, r), o2.exports;
|
|
27990
27990
|
}
|
|
27991
27991
|
r.d = (t2, e2) => {
|
|
27992
27992
|
for (var n2 in e2) r.o(e2, n2) && !r.o(t2, n2) && Object.defineProperty(t2, n2, { enumerable: true, get: e2[n2] });
|
|
@@ -27994,184 +27994,182 @@ ${p.commentBefore}` : u;
|
|
|
27994
27994
|
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true });
|
|
27995
27995
|
};
|
|
27996
27996
|
var n = {};
|
|
27997
|
-
|
|
27998
|
-
|
|
27999
|
-
|
|
28000
|
-
|
|
28001
|
-
|
|
28002
|
-
|
|
28003
|
-
|
|
28004
|
-
|
|
28005
|
-
|
|
28006
|
-
|
|
28007
|
-
|
|
28008
|
-
if (
|
|
28009
|
-
if (
|
|
28010
|
-
|
|
28011
|
-
|
|
28012
|
-
|
|
28013
|
-
|
|
28014
|
-
|
|
28015
|
-
|
|
28016
|
-
|
|
28017
|
-
|
|
28018
|
-
|
|
28019
|
-
|
|
28020
|
-
|
|
28021
|
-
|
|
28022
|
-
|
|
28023
|
-
|
|
28024
|
-
|
|
28025
|
-
|
|
28026
|
-
|
|
28027
|
-
|
|
28028
|
-
|
|
28029
|
-
|
|
28030
|
-
|
|
28031
|
-
|
|
28032
|
-
|
|
28033
|
-
|
|
28034
|
-
|
|
28035
|
-
|
|
28036
|
-
|
|
28037
|
-
|
|
28038
|
-
|
|
28039
|
-
|
|
28040
|
-
|
|
28041
|
-
|
|
28042
|
-
|
|
28043
|
-
|
|
28044
|
-
|
|
28045
|
-
|
|
28046
|
-
|
|
28047
|
-
|
|
28048
|
-
|
|
28049
|
-
|
|
28050
|
-
|
|
28051
|
-
|
|
28052
|
-
|
|
28053
|
-
|
|
28054
|
-
|
|
28055
|
-
|
|
28056
|
-
|
|
28057
|
-
|
|
28058
|
-
|
|
28059
|
-
|
|
28060
|
-
|
|
28061
|
-
|
|
28062
|
-
|
|
28063
|
-
|
|
28064
|
-
|
|
28065
|
-
|
|
28066
|
-
|
|
28067
|
-
|
|
28068
|
-
if (
|
|
28069
|
-
|
|
28070
|
-
|
|
28071
|
-
|
|
28072
|
-
return e3._formatted = t3.external, e3._fsPath = t3._sep === u ? t3.fsPath : null, e3;
|
|
28073
|
-
}
|
|
27997
|
+
let i;
|
|
27998
|
+
if (r.r(n), r.d(n, { URI: () => l, Utils: () => I }), "object" == typeof process) i = "win32" === process.platform;
|
|
27999
|
+
else if ("object" == typeof navigator) {
|
|
28000
|
+
let t2 = navigator.userAgent;
|
|
28001
|
+
i = t2.indexOf("Windows") >= 0;
|
|
28002
|
+
}
|
|
28003
|
+
const o = /^\w[\w\d+.-]*$/, s = /^\//, h = /^\/\//;
|
|
28004
|
+
function a2(t2, e2) {
|
|
28005
|
+
if (!t2.scheme && e2) throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t2.authority}", path: "${t2.path}", query: "${t2.query}", fragment: "${t2.fragment}"}`);
|
|
28006
|
+
if (t2.scheme && !o.test(t2.scheme)) throw new Error("[UriError]: Scheme contains illegal characters.");
|
|
28007
|
+
if (t2.path) {
|
|
28008
|
+
if (t2.authority) {
|
|
28009
|
+
if (!s.test(t2.path)) throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
|
|
28010
|
+
} else if (h.test(t2.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
|
|
28011
|
+
}
|
|
28012
|
+
}
|
|
28013
|
+
const c = "", f2 = "/", u = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
|
|
28014
|
+
class l {
|
|
28015
|
+
static isUri(t2) {
|
|
28016
|
+
return t2 instanceof l || !!t2 && "string" == typeof t2.authority && "string" == typeof t2.fragment && "string" == typeof t2.path && "string" == typeof t2.query && "string" == typeof t2.scheme && "string" == typeof t2.fsPath && "function" == typeof t2.with && "function" == typeof t2.toString;
|
|
28017
|
+
}
|
|
28018
|
+
scheme;
|
|
28019
|
+
authority;
|
|
28020
|
+
path;
|
|
28021
|
+
query;
|
|
28022
|
+
fragment;
|
|
28023
|
+
constructor(t2, e2, r2, n2, i2, o2 = false) {
|
|
28024
|
+
"object" == typeof t2 ? (this.scheme = t2.scheme || c, this.authority = t2.authority || c, this.path = t2.path || c, this.query = t2.query || c, this.fragment = t2.fragment || c) : (this.scheme = /* @__PURE__ */ function(t3, e3) {
|
|
28025
|
+
return t3 || e3 ? t3 : "file";
|
|
28026
|
+
}(t2, o2), this.authority = e2 || c, this.path = function(t3, e3) {
|
|
28027
|
+
switch (t3) {
|
|
28028
|
+
case "https":
|
|
28029
|
+
case "http":
|
|
28030
|
+
case "file":
|
|
28031
|
+
e3 ? e3[0] !== f2 && (e3 = f2 + e3) : e3 = f2;
|
|
28032
|
+
}
|
|
28033
|
+
return e3;
|
|
28034
|
+
}(this.scheme, r2 || c), this.query = n2 || c, this.fragment = i2 || c, a2(this, o2));
|
|
28035
|
+
}
|
|
28036
|
+
get fsPath() {
|
|
28037
|
+
return v(this, false);
|
|
28038
|
+
}
|
|
28039
|
+
with(t2) {
|
|
28040
|
+
if (!t2) return this;
|
|
28041
|
+
let { scheme: e2, authority: r2, path: n2, query: i2, fragment: o2 } = t2;
|
|
28042
|
+
return void 0 === e2 ? e2 = this.scheme : null === e2 && (e2 = c), void 0 === r2 ? r2 = this.authority : null === r2 && (r2 = c), void 0 === n2 ? n2 = this.path : null === n2 && (n2 = c), void 0 === i2 ? i2 = this.query : null === i2 && (i2 = c), void 0 === o2 ? o2 = this.fragment : null === o2 && (o2 = c), e2 === this.scheme && r2 === this.authority && n2 === this.path && i2 === this.query && o2 === this.fragment ? this : new d(e2, r2, n2, i2, o2);
|
|
28043
|
+
}
|
|
28044
|
+
static parse(t2, e2 = false) {
|
|
28045
|
+
const r2 = u.exec(t2);
|
|
28046
|
+
return r2 ? new d(r2[2] || c, w(r2[4] || c), w(r2[5] || c), w(r2[7] || c), w(r2[9] || c), e2) : new d(c, c, c, c, c);
|
|
28047
|
+
}
|
|
28048
|
+
static file(t2) {
|
|
28049
|
+
let e2 = c;
|
|
28050
|
+
if (i && (t2 = t2.replace(/\\/g, f2)), t2[0] === f2 && t2[1] === f2) {
|
|
28051
|
+
const r2 = t2.indexOf(f2, 2);
|
|
28052
|
+
-1 === r2 ? (e2 = t2.substring(2), t2 = f2) : (e2 = t2.substring(2, r2), t2 = t2.substring(r2) || f2);
|
|
28053
|
+
}
|
|
28054
|
+
return new d("file", e2, t2, c, c);
|
|
28055
|
+
}
|
|
28056
|
+
static from(t2) {
|
|
28057
|
+
const e2 = new d(t2.scheme, t2.authority, t2.path, t2.query, t2.fragment);
|
|
28058
|
+
return a2(e2, true), e2;
|
|
28059
|
+
}
|
|
28060
|
+
toString(t2 = false) {
|
|
28061
|
+
return b(this, t2);
|
|
28062
|
+
}
|
|
28063
|
+
toJSON() {
|
|
28064
|
+
return this;
|
|
28065
|
+
}
|
|
28066
|
+
static revive(t2) {
|
|
28067
|
+
if (t2) {
|
|
28068
|
+
if (t2 instanceof l) return t2;
|
|
28069
|
+
{
|
|
28070
|
+
const e2 = new d(t2);
|
|
28071
|
+
return e2._formatted = t2.external, e2._fsPath = t2._sep === g ? t2.fsPath : null, e2;
|
|
28074
28072
|
}
|
|
28075
|
-
return t3;
|
|
28076
28073
|
}
|
|
28074
|
+
return t2;
|
|
28077
28075
|
}
|
|
28078
|
-
|
|
28079
|
-
|
|
28080
|
-
|
|
28081
|
-
|
|
28082
|
-
|
|
28083
|
-
|
|
28084
|
-
|
|
28085
|
-
toString(t3 = false) {
|
|
28086
|
-
return t3 ? y(this, true) : (this._formatted || (this._formatted = y(this, false)), this._formatted);
|
|
28087
|
-
}
|
|
28088
|
-
toJSON() {
|
|
28089
|
-
const t3 = { $mid: 1 };
|
|
28090
|
-
return this._fsPath && (t3.fsPath = this._fsPath, t3._sep = u), this._formatted && (t3.external = this._formatted), this.path && (t3.path = this.path), this.scheme && (t3.scheme = this.scheme), this.authority && (t3.authority = this.authority), this.query && (t3.query = this.query), this.fragment && (t3.fragment = this.fragment), t3;
|
|
28091
|
-
}
|
|
28076
|
+
}
|
|
28077
|
+
const g = i ? 1 : void 0;
|
|
28078
|
+
class d extends l {
|
|
28079
|
+
_formatted = null;
|
|
28080
|
+
_fsPath = null;
|
|
28081
|
+
get fsPath() {
|
|
28082
|
+
return this._fsPath || (this._fsPath = v(this, false)), this._fsPath;
|
|
28092
28083
|
}
|
|
28093
|
-
|
|
28094
|
-
|
|
28095
|
-
|
|
28096
|
-
|
|
28097
|
-
|
|
28098
|
-
|
|
28099
|
-
else {
|
|
28100
|
-
void 0 === n2 && (n2 = t3.substr(0, o2));
|
|
28101
|
-
const e4 = g[s2];
|
|
28102
|
-
void 0 !== e4 ? (-1 !== i2 && (n2 += encodeURIComponent(t3.substring(i2, o2)), i2 = -1), n2 += e4) : -1 === i2 && (i2 = o2);
|
|
28103
|
-
}
|
|
28104
|
-
}
|
|
28105
|
-
return -1 !== i2 && (n2 += encodeURIComponent(t3.substring(i2))), void 0 !== n2 ? n2 : t3;
|
|
28084
|
+
toString(t2 = false) {
|
|
28085
|
+
return t2 ? b(this, true) : (this._formatted || (this._formatted = b(this, false)), this._formatted);
|
|
28086
|
+
}
|
|
28087
|
+
toJSON() {
|
|
28088
|
+
const t2 = { $mid: 1 };
|
|
28089
|
+
return this._fsPath && (t2.fsPath = this._fsPath, t2._sep = g), this._formatted && (t2.external = this._formatted), this.path && (t2.path = this.path), this.scheme && (t2.scheme = this.scheme), this.authority && (t2.authority = this.authority), this.query && (t2.query = this.query), this.fragment && (t2.fragment = this.fragment), t2;
|
|
28106
28090
|
}
|
|
28107
|
-
|
|
28108
|
-
|
|
28109
|
-
|
|
28110
|
-
|
|
28111
|
-
|
|
28091
|
+
}
|
|
28092
|
+
const p = { 58: "%3A", 47: "%2F", 63: "%3F", 35: "%23", 91: "%5B", 93: "%5D", 64: "%40", 33: "%21", 36: "%24", 38: "%26", 39: "%27", 40: "%28", 41: "%29", 42: "%2A", 43: "%2B", 44: "%2C", 59: "%3B", 61: "%3D", 32: "%20" };
|
|
28093
|
+
function m(t2, e2, r2) {
|
|
28094
|
+
let n2, i2 = -1;
|
|
28095
|
+
for (let o2 = 0; o2 < t2.length; o2++) {
|
|
28096
|
+
const s2 = t2.charCodeAt(o2);
|
|
28097
|
+
if (s2 >= 97 && s2 <= 122 || s2 >= 65 && s2 <= 90 || s2 >= 48 && s2 <= 57 || 45 === s2 || 46 === s2 || 95 === s2 || 126 === s2 || e2 && 47 === s2 || r2 && 91 === s2 || r2 && 93 === s2 || r2 && 58 === s2) -1 !== i2 && (n2 += encodeURIComponent(t2.substring(i2, o2)), i2 = -1), void 0 !== n2 && (n2 += t2.charAt(o2));
|
|
28098
|
+
else {
|
|
28099
|
+
void 0 === n2 && (n2 = t2.substr(0, o2));
|
|
28100
|
+
const e3 = p[s2];
|
|
28101
|
+
void 0 !== e3 ? (-1 !== i2 && (n2 += encodeURIComponent(t2.substring(i2, o2)), i2 = -1), n2 += e3) : -1 === i2 && (i2 = o2);
|
|
28112
28102
|
}
|
|
28113
|
-
return void 0 !== e3 ? e3 : t3;
|
|
28114
28103
|
}
|
|
28115
|
-
|
|
28116
|
-
|
|
28117
|
-
|
|
28104
|
+
return -1 !== i2 && (n2 += encodeURIComponent(t2.substring(i2))), void 0 !== n2 ? n2 : t2;
|
|
28105
|
+
}
|
|
28106
|
+
function y(t2) {
|
|
28107
|
+
let e2;
|
|
28108
|
+
for (let r2 = 0; r2 < t2.length; r2++) {
|
|
28109
|
+
const n2 = t2.charCodeAt(r2);
|
|
28110
|
+
35 === n2 || 63 === n2 ? (void 0 === e2 && (e2 = t2.substr(0, r2)), e2 += p[n2]) : void 0 !== e2 && (e2 += t2[r2]);
|
|
28118
28111
|
}
|
|
28119
|
-
|
|
28120
|
-
|
|
28121
|
-
|
|
28122
|
-
|
|
28123
|
-
|
|
28124
|
-
|
|
28125
|
-
|
|
28126
|
-
|
|
28127
|
-
|
|
28128
|
-
|
|
28112
|
+
return void 0 !== e2 ? e2 : t2;
|
|
28113
|
+
}
|
|
28114
|
+
function v(t2, e2) {
|
|
28115
|
+
let r2;
|
|
28116
|
+
return r2 = t2.authority && t2.path.length > 1 && "file" === t2.scheme ? `//${t2.authority}${t2.path}` : 47 === t2.path.charCodeAt(0) && (t2.path.charCodeAt(1) >= 65 && t2.path.charCodeAt(1) <= 90 || t2.path.charCodeAt(1) >= 97 && t2.path.charCodeAt(1) <= 122) && 58 === t2.path.charCodeAt(2) ? e2 ? t2.path.substr(1) : t2.path[1].toLowerCase() + t2.path.substr(2) : t2.path, i && (r2 = r2.replace(/\//g, "\\")), r2;
|
|
28117
|
+
}
|
|
28118
|
+
function b(t2, e2) {
|
|
28119
|
+
const r2 = e2 ? y : m;
|
|
28120
|
+
let n2 = "", { scheme: i2, authority: o2, path: s2, query: h2, fragment: a3 } = t2;
|
|
28121
|
+
if (i2 && (n2 += i2, n2 += ":"), (o2 || "file" === i2) && (n2 += f2, n2 += f2), o2) {
|
|
28122
|
+
let t3 = o2.indexOf("@");
|
|
28123
|
+
if (-1 !== t3) {
|
|
28124
|
+
const e3 = o2.substr(0, t3);
|
|
28125
|
+
o2 = o2.substr(t3 + 1), t3 = e3.lastIndexOf(":"), -1 === t3 ? n2 += r2(e3, false, false) : (n2 += r2(e3.substr(0, t3), false, false), n2 += ":", n2 += r2(e3.substr(t3 + 1), false, true)), n2 += "@";
|
|
28129
28126
|
}
|
|
28130
|
-
|
|
28131
|
-
|
|
28132
|
-
|
|
28133
|
-
|
|
28134
|
-
|
|
28135
|
-
|
|
28136
|
-
|
|
28137
|
-
|
|
28138
|
-
|
|
28127
|
+
o2 = o2.toLowerCase(), t3 = o2.lastIndexOf(":"), -1 === t3 ? n2 += r2(o2, false, true) : (n2 += r2(o2.substr(0, t3), false, true), n2 += o2.substr(t3));
|
|
28128
|
+
}
|
|
28129
|
+
if (s2) {
|
|
28130
|
+
if (s2.length >= 3 && 47 === s2.charCodeAt(0) && 58 === s2.charCodeAt(2)) {
|
|
28131
|
+
const t3 = s2.charCodeAt(1);
|
|
28132
|
+
t3 >= 65 && t3 <= 90 && (s2 = `/${String.fromCharCode(t3 + 32)}:${s2.substr(3)}`);
|
|
28133
|
+
} else if (s2.length >= 2 && 58 === s2.charCodeAt(1)) {
|
|
28134
|
+
const t3 = s2.charCodeAt(0);
|
|
28135
|
+
t3 >= 65 && t3 <= 90 && (s2 = `${String.fromCharCode(t3 + 32)}:${s2.substr(2)}`);
|
|
28139
28136
|
}
|
|
28140
|
-
|
|
28137
|
+
n2 += r2(s2, true, false);
|
|
28141
28138
|
}
|
|
28142
|
-
|
|
28143
|
-
|
|
28144
|
-
|
|
28145
|
-
|
|
28146
|
-
|
|
28147
|
-
|
|
28148
|
-
|
|
28149
|
-
|
|
28150
|
-
|
|
28151
|
-
|
|
28152
|
-
|
|
28153
|
-
|
|
28154
|
-
|
|
28155
|
-
|
|
28156
|
-
|
|
28157
|
-
|
|
28158
|
-
|
|
28159
|
-
|
|
28160
|
-
|
|
28161
|
-
|
|
28162
|
-
|
|
28163
|
-
|
|
28164
|
-
|
|
28165
|
-
|
|
28166
|
-
|
|
28167
|
-
|
|
28168
|
-
|
|
28169
|
-
|
|
28170
|
-
|
|
28171
|
-
|
|
28172
|
-
|
|
28173
|
-
|
|
28174
|
-
|
|
28139
|
+
return h2 && (n2 += "?", n2 += r2(h2, false, false)), a3 && (n2 += "#", n2 += e2 ? a3 : m(a3, false, false)), n2;
|
|
28140
|
+
}
|
|
28141
|
+
function C(t2) {
|
|
28142
|
+
try {
|
|
28143
|
+
return decodeURIComponent(t2);
|
|
28144
|
+
} catch {
|
|
28145
|
+
return t2.length > 3 ? t2.substr(0, 3) + C(t2.substr(3)) : t2;
|
|
28146
|
+
}
|
|
28147
|
+
}
|
|
28148
|
+
const A2 = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
|
|
28149
|
+
function w(t2) {
|
|
28150
|
+
return t2.match(A2) ? t2.replace(A2, (t3) => C(t3)) : t2;
|
|
28151
|
+
}
|
|
28152
|
+
var x = r(975);
|
|
28153
|
+
const P = x.posix || x, _ = "/";
|
|
28154
|
+
var I;
|
|
28155
|
+
!function(t2) {
|
|
28156
|
+
t2.joinPath = function(t3, ...e2) {
|
|
28157
|
+
return t3.with({ path: P.join(t3.path, ...e2) });
|
|
28158
|
+
}, t2.resolvePath = function(t3, ...e2) {
|
|
28159
|
+
let r2 = t3.path, n2 = false;
|
|
28160
|
+
r2[0] !== _ && (r2 = _ + r2, n2 = true);
|
|
28161
|
+
let i2 = P.resolve(r2, ...e2);
|
|
28162
|
+
return n2 && i2[0] === _ && !t3.authority && (i2 = i2.substring(1)), t3.with({ path: i2 });
|
|
28163
|
+
}, t2.dirname = function(t3) {
|
|
28164
|
+
if (0 === t3.path.length || t3.path === _) return t3;
|
|
28165
|
+
let e2 = P.dirname(t3.path);
|
|
28166
|
+
return 1 === e2.length && 46 === e2.charCodeAt(0) && (e2 = ""), t3.with({ path: e2 });
|
|
28167
|
+
}, t2.basename = function(t3) {
|
|
28168
|
+
return P.basename(t3.path);
|
|
28169
|
+
}, t2.extname = function(t3) {
|
|
28170
|
+
return P.extname(t3.path);
|
|
28171
|
+
};
|
|
28172
|
+
}(I || (I = {})), LIB = n;
|
|
28175
28173
|
})();
|
|
28176
28174
|
var { URI: URI2, Utils } = LIB;
|
|
28177
28175
|
|