Your Name 1912bcd25b
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
chore: sync all remaining local workspace changes
2026-05-08 11:26:57 +08:00

136 lines
4.9 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: 939e07c76f4b30f0.294c1bf0d6.js
* Module id: 916289
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e, t, i) => {
"use strict";
function r(e) {
!(function (e) {
var t = e.util.clone(e.languages.javascript),
i = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,
r = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,
a = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
function n(e, t) {
return RegExp(
(e = e
.replace(/<S>/g, function () {
return i;
})
.replace(/<BRACES>/g, function () {
return r;
})
.replace(/<SPREAD>/g, function () {
return a;
})),
t,
);
}
(a = n(a).source),
(e.languages.jsx = e.languages.extend("markup", t)),
(e.languages.jsx.tag.pattern = n(
/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/
.source,
)),
(e.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/),
(e.languages.jsx.tag.inside["attr-value"].pattern =
/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/),
(e.languages.jsx.tag.inside.tag.inside["class-name"] =
/^[A-Z]\w*(?:\.[A-Z]\w*)*$/),
(e.languages.jsx.tag.inside.comment = t.comment),
e.languages.insertBefore(
"inside",
"attr-name",
{
spread: {
pattern: n(/<SPREAD>/.source),
inside: e.languages.jsx,
},
},
e.languages.jsx.tag,
),
e.languages.insertBefore(
"inside",
"special-attr",
{
script: {
pattern: n(/=<BRACES>/.source),
alias: "language-javascript",
inside: {
"script-punctuation": {
pattern: /^=(?=\{)/,
alias: "punctuation",
},
rest: e.languages.jsx,
},
},
},
e.languages.jsx.tag,
);
var A = function (e) {
return e
? "string" == typeof e
? e
: "string" == typeof e.content
? e.content
: e.content.map(A).join("")
: "";
},
s = function (t) {
for (var i = [], r = 0; r < t.length; r++) {
var a = t[r],
n = !1;
if (
("string" != typeof a &&
("tag" === a.type &&
a.content[0] &&
"tag" === a.content[0].type
? "</" === a.content[0].content[0].content
? i.length > 0 &&
i[i.length - 1].tagName ===
A(a.content[0].content[1]) &&
i.pop()
: "/>" === a.content[a.content.length - 1].content ||
i.push({
tagName: A(a.content[0].content[1]),
openedBraces: 0,
})
: i.length > 0 &&
"punctuation" === a.type &&
"{" === a.content
? i[i.length - 1].openedBraces++
: i.length > 0 &&
i[i.length - 1].openedBraces > 0 &&
"punctuation" === a.type &&
"}" === a.content
? i[i.length - 1].openedBraces--
: (n = !0)),
(n || "string" == typeof a) &&
i.length > 0 &&
0 === i[i.length - 1].openedBraces)
) {
var o = A(a);
r < t.length - 1 &&
("string" == typeof t[r + 1] ||
"plain-text" === t[r + 1].type) &&
((o += A(t[r + 1])), t.splice(r + 1, 1)),
r > 0 &&
("string" == typeof t[r - 1] ||
"plain-text" === t[r - 1].type) &&
((o = A(t[r - 1]) + o), t.splice(r - 1, 1), r--),
(t[r] = new e.Token("plain-text", o, null, o));
}
a.content && "string" != typeof a.content && s(a.content);
}
};
e.hooks.add("after-tokenize", function (e) {
("jsx" === e.language || "tsx" === e.language) && s(e.tokens);
});
})(e);
}
(t.exports = r), (r.displayName = "jsx"), (r.aliases = []);
};
export default moduleFactory;