vue-layout-gitcode 1.12.35 → 1.12.36
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/GloabarSearch-CbyaXQ9_.js +154 -0
- package/{MenuItem-CRrWzBu_.js → MenuItem-CpNGRzXl.js} +2 -2
- package/{ProjectMenuList---Zn6tsu.js → ProjectMenuList-i-DG-Lp_.js} +2 -2
- package/{ProjectMenuListV2-qjzqvCAU.js → ProjectMenuListV2-BWAcoaLB.js} +3 -3
- package/{ProjectSearch-DKnhz2i-.js → ProjectSearch-BF6NwnUD.js} +10 -5
- package/{SearchHistoryList-D_WQH3k0.js → SearchHistoryList-HPLScuap.js} +10 -7
- package/{SearchRecommed-C7iod1dC.js → SearchRecommed-CfoABOec.js} +2 -2
- package/{SearchScopeList-lewgMZ_-.js → SearchScopeList-MDfy39Wg.js} +1 -1
- package/{UserSearch-CyPQD5Rt.js → UserSearch-B3OpNc8B.js} +15 -12
- package/{index-Cx67TeFL.js → index-BOa97Aot.js} +484 -905
- package/{index-erL3lMa7.js → index-BsMZ1sa2.js} +1 -1
- package/{index-BG3HvdyT.js → index-CDZJ6srp.js} +1 -1
- package/index.d.ts +39 -700
- package/index.js +20 -20
- package/{notice-2WSok1Yq.js → notice-wiD3_kEI.js} +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/{transWebUrl-ChZBJdJ1.js → transWebUrl-BjEWcV7K.js} +1 -1
- package/{index-BsyIPSbg.js → useReportRepo-C61yRVsW.js} +90 -109
- package/GloabarSearch-CEtgWiTd.js +0 -202
|
@@ -12,14 +12,14 @@ import "vue-devui-lal/tooltip/style.css";
|
|
|
12
12
|
import "vue-devui-lal/textarea/style.css";
|
|
13
13
|
import { Icon } from "vue-devui-lal/icon";
|
|
14
14
|
import "vue-devui-lal/icon/style.css";
|
|
15
|
-
import cloneDeep from "lodash/cloneDeep";
|
|
16
15
|
import axios from "axios";
|
|
17
16
|
import { useRouter, useRoute, createRouter, createWebHistory, createMemoryHistory } from "vue-router";
|
|
18
17
|
import { useWindowSize, useMutationObserver, useResizeObserver, useInfiniteScroll, useEventListener, useElementSize, useStorage, useDebounceFn } from "@vueuse/core";
|
|
19
18
|
import { Avatar } from "vue-devui-lal/avatar";
|
|
20
19
|
import "vue-devui-lal/avatar/style.css";
|
|
21
20
|
import "lodash/last";
|
|
22
|
-
import
|
|
21
|
+
import cloneDeep from "lodash/cloneDeep";
|
|
22
|
+
import dayjs from "dayjs";
|
|
23
23
|
import isDate$1 from "lodash/isDate";
|
|
24
24
|
import { Skeleton, SkeletonItem } from "vue-devui-lal/skeleton";
|
|
25
25
|
import "vue-devui-lal/skeleton/style.css";
|
|
@@ -1584,10 +1584,11 @@ var purify = createDOMPurify();
|
|
|
1584
1584
|
const purifyConfig = { FORBID_TAGS: ["img"] };
|
|
1585
1585
|
if (typeof purify.addHook === "function" && typeof document !== "undefined" && document.createElement) {
|
|
1586
1586
|
purify.addHook("uponSanitizeElement", (node, data) => {
|
|
1587
|
+
var _a;
|
|
1587
1588
|
if (/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(data.tagName)) {
|
|
1588
1589
|
const tag = document.createElement("span");
|
|
1589
1590
|
tag.innerText = "<" + data.tagName + ">";
|
|
1590
|
-
node.
|
|
1591
|
+
(_a = node.parentNode) == null ? void 0 : _a.replaceChild(tag, node);
|
|
1591
1592
|
}
|
|
1592
1593
|
});
|
|
1593
1594
|
}
|
|
@@ -1768,8 +1769,8 @@ const toTypeString = (value) => objectToString.call(value);
|
|
|
1768
1769
|
const isPlainObject = (val) => {
|
|
1769
1770
|
if (!isObject$2(val))
|
|
1770
1771
|
return false;
|
|
1771
|
-
const
|
|
1772
|
-
return
|
|
1772
|
+
const proto = Object.getPrototypeOf(val);
|
|
1773
|
+
return proto === null || proto.constructor === Object;
|
|
1773
1774
|
};
|
|
1774
1775
|
const toDisplayString = (val) => {
|
|
1775
1776
|
return val == null ? "" : isArray(val) || isPlainObject(val) && val.toString === objectToString ? JSON.stringify(val, null, 2) : String(val);
|
|
@@ -7479,7 +7480,7 @@ function useI18nForLegacy(instance, scope, root, options = {}) {
|
|
|
7479
7480
|
_composer.value.mergeNumberFormat(locale22, format2);
|
|
7480
7481
|
}
|
|
7481
7482
|
}
|
|
7482
|
-
const
|
|
7483
|
+
const wrapper = {
|
|
7483
7484
|
get id() {
|
|
7484
7485
|
return _composer.value ? _composer.value.id : -1;
|
|
7485
7486
|
},
|
|
@@ -7610,7 +7611,7 @@ function useI18nForLegacy(instance, scope, root, options = {}) {
|
|
|
7610
7611
|
sync(composer);
|
|
7611
7612
|
}
|
|
7612
7613
|
});
|
|
7613
|
-
return
|
|
7614
|
+
return wrapper;
|
|
7614
7615
|
}
|
|
7615
7616
|
const globalExportProps = [
|
|
7616
7617
|
"locale",
|
|
@@ -7770,6 +7771,7 @@ const gitCodeLayout$1 = {
|
|
|
7770
7771
|
topic: "热门主题",
|
|
7771
7772
|
recentlyVisited: "最近访问",
|
|
7772
7773
|
platformSearch: "全平台搜索:",
|
|
7774
|
+
searchAll: "搜索全部:{keyword}",
|
|
7773
7775
|
applicationMarket: "应用市场",
|
|
7774
7776
|
myWorkbench: "工作台",
|
|
7775
7777
|
workbench: "工作台",
|
|
@@ -8187,6 +8189,7 @@ const gitCodeLayout = {
|
|
|
8187
8189
|
topic: "Hot topics",
|
|
8188
8190
|
recentlyVisited: "Recent Visits",
|
|
8189
8191
|
platformSearch: "Full Platform Search",
|
|
8192
|
+
searchAll: "Search all: {keyword}",
|
|
8190
8193
|
applicationMarket: "Marketplace",
|
|
8191
8194
|
myWorkbench: "Dashboard",
|
|
8192
8195
|
workbench: "Dashboard",
|
|
@@ -8503,7 +8506,7 @@ const gitCodeLayout = {
|
|
|
8503
8506
|
}
|
|
8504
8507
|
}
|
|
8505
8508
|
};
|
|
8506
|
-
const en
|
|
8509
|
+
const en = {
|
|
8507
8510
|
gitCodeLayout
|
|
8508
8511
|
};
|
|
8509
8512
|
const LANG_ZH = "zh";
|
|
@@ -8581,7 +8584,7 @@ const $i18n = setupI18n({
|
|
|
8581
8584
|
fallbackLocale: local,
|
|
8582
8585
|
messages: {
|
|
8583
8586
|
zh,
|
|
8584
|
-
en
|
|
8587
|
+
en
|
|
8585
8588
|
}
|
|
8586
8589
|
});
|
|
8587
8590
|
const i18n = $i18n;
|
|
@@ -8778,7 +8781,7 @@ function isPhone() {
|
|
|
8778
8781
|
return false;
|
|
8779
8782
|
}
|
|
8780
8783
|
const getDeviceType = () => {
|
|
8781
|
-
const userAgent = (window == null ? void 0 : window.navigator.userAgent) || (window == null ? void 0 : window.navigator.vendor) || (window == null ? void 0 : window.opera);
|
|
8784
|
+
const userAgent = (window == null ? void 0 : window.navigator.userAgent) || (window == null ? void 0 : window.navigator.vendor) || (window == null ? void 0 : window.opera) || "";
|
|
8782
8785
|
if (/iPad/i.test(userAgent)) {
|
|
8783
8786
|
return "iPadOS";
|
|
8784
8787
|
} else if (/iPhone/i.test(userAgent)) {
|
|
@@ -8820,8 +8823,9 @@ const getOSVersion = () => {
|
|
|
8820
8823
|
case "Mac OS":
|
|
8821
8824
|
break;
|
|
8822
8825
|
case "iOS":
|
|
8823
|
-
|
|
8824
|
-
|
|
8826
|
+
{
|
|
8827
|
+
const match = userAgent.match(/OS (\d+)_?(\d+)?/);
|
|
8828
|
+
if (match) version = match[0].replace("OS ", "").replace("_", ".");
|
|
8825
8829
|
}
|
|
8826
8830
|
break;
|
|
8827
8831
|
case "Windows":
|
|
@@ -8834,8 +8838,9 @@ const getOSVersion = () => {
|
|
|
8834
8838
|
else if (userAgent.indexOf("Windows NT 5.0") > -1) version = "2000";
|
|
8835
8839
|
break;
|
|
8836
8840
|
case "Android":
|
|
8837
|
-
|
|
8838
|
-
|
|
8841
|
+
{
|
|
8842
|
+
const match = userAgent.match(/Android (\d+)\.?(\d+)?/);
|
|
8843
|
+
if (match) version = match[0].replace("Android ", "");
|
|
8839
8844
|
}
|
|
8840
8845
|
break;
|
|
8841
8846
|
default:
|
|
@@ -9181,9 +9186,6 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
9181
9186
|
provide("globalStore", computed(() => props.globalStore));
|
|
9182
9187
|
const { useReport: useReport2 } = useRequestReport(props.request, props.globalStore);
|
|
9183
9188
|
provide("useReport", useReport2);
|
|
9184
|
-
computed(() => {
|
|
9185
|
-
return props.globalStore.isSignIn;
|
|
9186
|
-
});
|
|
9187
9189
|
const visibleItems = computed(() => {
|
|
9188
9190
|
switch (props.sceneValue) {
|
|
9189
9191
|
case SceneValue.news:
|
|
@@ -9871,7 +9873,8 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
9871
9873
|
const defaultHref = ref("javascript:void(0)");
|
|
9872
9874
|
const targetHref = computed(() => {
|
|
9873
9875
|
const pattern = /https?:\/\//i;
|
|
9874
|
-
const
|
|
9876
|
+
const href = props.href || "";
|
|
9877
|
+
const urlData = props.outSideLink && !pattern.test(href) ? `//${href}` : href;
|
|
9875
9878
|
return urlData;
|
|
9876
9879
|
});
|
|
9877
9880
|
return (_ctx, _cache) => {
|
|
@@ -10604,8 +10607,8 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
10604
10607
|
return getCNDImageUrl(tagType);
|
|
10605
10608
|
});
|
|
10606
10609
|
const handleClick = () => {
|
|
10607
|
-
if (
|
|
10608
|
-
window.open(
|
|
10610
|
+
if (typeof window !== "undefined") {
|
|
10611
|
+
window.open("/?tn=67bc3fa197a0293d6bfebd05", "_blank");
|
|
10609
10612
|
localStorage$2.setItem("GStarOrigin", props.origin || "home");
|
|
10610
10613
|
}
|
|
10611
10614
|
emits("click");
|
|
@@ -10638,9 +10641,12 @@ const FIRST_NAMESPACE_KEY = "parent_org_path";
|
|
|
10638
10641
|
const useBreadcrumb = () => {
|
|
10639
10642
|
const router2 = useRouter();
|
|
10640
10643
|
if (!router2) {
|
|
10641
|
-
return [];
|
|
10644
|
+
return computed(() => []);
|
|
10642
10645
|
}
|
|
10643
|
-
const repoInfo = inject(
|
|
10646
|
+
const repoInfo = inject(
|
|
10647
|
+
"repoInfo",
|
|
10648
|
+
computed(() => ({}))
|
|
10649
|
+
);
|
|
10644
10650
|
const breadcrumb = computed(() => {
|
|
10645
10651
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
10646
10652
|
const isSubOrg = !!((_b = (_a = router2 == null ? void 0 : router2.currentRoute) == null ? void 0 : _a.value) == null ? void 0 : _b.params[FIRST_NAMESPACE_KEY]);
|
|
@@ -10729,8 +10735,8 @@ var relativeTime$1 = { exports: {} };
|
|
|
10729
10735
|
}
|
|
10730
10736
|
}
|
|
10731
10737
|
if (n2) return a;
|
|
10732
|
-
var
|
|
10733
|
-
return "function" == typeof
|
|
10738
|
+
var M = s ? l.future : l.past;
|
|
10739
|
+
return "function" == typeof M ? M(a) : M.replace("%s", a);
|
|
10734
10740
|
}, n.to = function(r2, e2) {
|
|
10735
10741
|
return i(r2, e2, this, true);
|
|
10736
10742
|
}, n.from = function(r2, e2) {
|
|
@@ -10749,533 +10755,25 @@ var relativeTime$1 = { exports: {} };
|
|
|
10749
10755
|
})(relativeTime$1);
|
|
10750
10756
|
var relativeTimeExports = relativeTime$1.exports;
|
|
10751
10757
|
const relativeTime = /* @__PURE__ */ getDefaultExportFromCjs(relativeTimeExports);
|
|
10752
|
-
var
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
var
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
var
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
var M = "month";
|
|
10768
|
-
var Q = "quarter";
|
|
10769
|
-
var Y = "year";
|
|
10770
|
-
var DATE = "date";
|
|
10771
|
-
var FORMAT_DEFAULT = "YYYY-MM-DDTHH:mm:ssZ";
|
|
10772
|
-
var INVALID_DATE_STRING = "Invalid Date";
|
|
10773
|
-
var REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/;
|
|
10774
|
-
var REGEX_FORMAT = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
|
|
10775
|
-
const en = {
|
|
10776
|
-
name: "en",
|
|
10777
|
-
weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
|
|
10778
|
-
months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
|
|
10779
|
-
ordinal: function ordinal(n) {
|
|
10780
|
-
var s = ["th", "st", "nd", "rd"];
|
|
10781
|
-
var v = n % 100;
|
|
10782
|
-
return "[" + n + (s[(v - 20) % 10] || s[v] || s[0]) + "]";
|
|
10783
|
-
}
|
|
10784
|
-
};
|
|
10785
|
-
var padStart = function padStart2(string, length, pad) {
|
|
10786
|
-
var s = String(string);
|
|
10787
|
-
if (!s || s.length >= length) return string;
|
|
10788
|
-
return "" + Array(length + 1 - s.length).join(pad) + string;
|
|
10789
|
-
};
|
|
10790
|
-
var padZoneStr = function padZoneStr2(instance) {
|
|
10791
|
-
var negMinutes = -instance.utcOffset();
|
|
10792
|
-
var minutes = Math.abs(negMinutes);
|
|
10793
|
-
var hourOffset = Math.floor(minutes / 60);
|
|
10794
|
-
var minuteOffset = minutes % 60;
|
|
10795
|
-
return (negMinutes <= 0 ? "+" : "-") + padStart(hourOffset, 2, "0") + ":" + padStart(minuteOffset, 2, "0");
|
|
10796
|
-
};
|
|
10797
|
-
var monthDiff = function monthDiff2(a, b) {
|
|
10798
|
-
if (a.date() < b.date()) return -monthDiff2(b, a);
|
|
10799
|
-
var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month());
|
|
10800
|
-
var anchor = a.clone().add(wholeMonthDiff, M);
|
|
10801
|
-
var c = b - anchor < 0;
|
|
10802
|
-
var anchor2 = a.clone().add(wholeMonthDiff + (c ? -1 : 1), M);
|
|
10803
|
-
return +(-(wholeMonthDiff + (b - anchor) / (c ? anchor - anchor2 : anchor2 - anchor)) || 0);
|
|
10804
|
-
};
|
|
10805
|
-
var absFloor = function absFloor2(n) {
|
|
10806
|
-
return n < 0 ? Math.ceil(n) || 0 : Math.floor(n);
|
|
10807
|
-
};
|
|
10808
|
-
var prettyUnit = function prettyUnit2(u) {
|
|
10809
|
-
var special = {
|
|
10810
|
-
M,
|
|
10811
|
-
y: Y,
|
|
10812
|
-
w: W,
|
|
10813
|
-
d: D,
|
|
10814
|
-
D: DATE,
|
|
10815
|
-
h: H,
|
|
10816
|
-
m: MIN,
|
|
10817
|
-
s: S,
|
|
10818
|
-
ms: MS,
|
|
10819
|
-
Q
|
|
10820
|
-
};
|
|
10821
|
-
return special[u] || String(u || "").toLowerCase().replace(/s$/, "");
|
|
10822
|
-
};
|
|
10823
|
-
var isUndefined = function isUndefined2(s) {
|
|
10824
|
-
return s === void 0;
|
|
10825
|
-
};
|
|
10826
|
-
const U = {
|
|
10827
|
-
s: padStart,
|
|
10828
|
-
z: padZoneStr,
|
|
10829
|
-
m: monthDiff,
|
|
10830
|
-
a: absFloor,
|
|
10831
|
-
p: prettyUnit,
|
|
10832
|
-
u: isUndefined
|
|
10833
|
-
};
|
|
10834
|
-
var L = "en";
|
|
10835
|
-
var Ls = {};
|
|
10836
|
-
Ls[L] = en;
|
|
10837
|
-
var IS_DAYJS = "$isDayjsObject";
|
|
10838
|
-
var isDayjs = function isDayjs2(d) {
|
|
10839
|
-
return d instanceof Dayjs || !!(d && d[IS_DAYJS]);
|
|
10840
|
-
};
|
|
10841
|
-
var parseLocale = function parseLocale2(preset, object, isLocal) {
|
|
10842
|
-
var l;
|
|
10843
|
-
if (!preset) return L;
|
|
10844
|
-
if (typeof preset === "string") {
|
|
10845
|
-
var presetLower = preset.toLowerCase();
|
|
10846
|
-
if (Ls[presetLower]) {
|
|
10847
|
-
l = presetLower;
|
|
10848
|
-
}
|
|
10849
|
-
if (object) {
|
|
10850
|
-
Ls[presetLower] = object;
|
|
10851
|
-
l = presetLower;
|
|
10852
|
-
}
|
|
10853
|
-
var presetSplit = preset.split("-");
|
|
10854
|
-
if (!l && presetSplit.length > 1) {
|
|
10855
|
-
return parseLocale2(presetSplit[0]);
|
|
10856
|
-
}
|
|
10857
|
-
} else {
|
|
10858
|
-
var name = preset.name;
|
|
10859
|
-
Ls[name] = preset;
|
|
10860
|
-
l = name;
|
|
10861
|
-
}
|
|
10862
|
-
if (!isLocal && l) L = l;
|
|
10863
|
-
return l || !isLocal && L;
|
|
10864
|
-
};
|
|
10865
|
-
var dayjs = function dayjs2(date, c) {
|
|
10866
|
-
if (isDayjs(date)) {
|
|
10867
|
-
return date.clone();
|
|
10868
|
-
}
|
|
10869
|
-
var cfg = typeof c === "object" ? c : {};
|
|
10870
|
-
cfg.date = date;
|
|
10871
|
-
cfg.args = arguments;
|
|
10872
|
-
return new Dayjs(cfg);
|
|
10873
|
-
};
|
|
10874
|
-
var wrapper = function wrapper2(date, instance) {
|
|
10875
|
-
return dayjs(date, {
|
|
10876
|
-
locale: instance.$L,
|
|
10877
|
-
utc: instance.$u,
|
|
10878
|
-
x: instance.$x,
|
|
10879
|
-
$offset: instance.$offset
|
|
10880
|
-
// todo: refactor; do not use this.$offset in you code
|
|
10758
|
+
var zhCn = { exports: {} };
|
|
10759
|
+
(function(module, exports) {
|
|
10760
|
+
!function(e, _) {
|
|
10761
|
+
module.exports = _(dayjs);
|
|
10762
|
+
}(commonjsGlobal, function(e) {
|
|
10763
|
+
function _(e2) {
|
|
10764
|
+
return e2 && "object" == typeof e2 && "default" in e2 ? e2 : { default: e2 };
|
|
10765
|
+
}
|
|
10766
|
+
var t2 = _(e), d = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(e2, _2) {
|
|
10767
|
+
return "W" === _2 ? e2 + "周" : e2 + "日";
|
|
10768
|
+
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(e2, _2) {
|
|
10769
|
+
var t3 = 100 * e2 + _2;
|
|
10770
|
+
return t3 < 600 ? "凌晨" : t3 < 900 ? "早上" : t3 < 1100 ? "上午" : t3 < 1300 ? "中午" : t3 < 1800 ? "下午" : "晚上";
|
|
10771
|
+
} };
|
|
10772
|
+
return t2.default.locale(d, null, true), d;
|
|
10881
10773
|
});
|
|
10882
|
-
};
|
|
10883
|
-
var
|
|
10884
|
-
|
|
10885
|
-
Utils.i = isDayjs;
|
|
10886
|
-
Utils.w = wrapper;
|
|
10887
|
-
var parseDate = function parseDate2(cfg) {
|
|
10888
|
-
var date = cfg.date, utc2 = cfg.utc;
|
|
10889
|
-
if (date === null) return /* @__PURE__ */ new Date(NaN);
|
|
10890
|
-
if (Utils.u(date)) return /* @__PURE__ */ new Date();
|
|
10891
|
-
if (date instanceof Date) return new Date(date);
|
|
10892
|
-
if (typeof date === "string" && !/Z$/i.test(date)) {
|
|
10893
|
-
var d = date.match(REGEX_PARSE);
|
|
10894
|
-
if (d) {
|
|
10895
|
-
var m = d[2] - 1 || 0;
|
|
10896
|
-
var ms = (d[7] || "0").substring(0, 3);
|
|
10897
|
-
if (utc2) {
|
|
10898
|
-
return new Date(Date.UTC(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms));
|
|
10899
|
-
}
|
|
10900
|
-
return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);
|
|
10901
|
-
}
|
|
10902
|
-
}
|
|
10903
|
-
return new Date(date);
|
|
10904
|
-
};
|
|
10905
|
-
var Dayjs = /* @__PURE__ */ function() {
|
|
10906
|
-
function Dayjs2(cfg) {
|
|
10907
|
-
this.$L = parseLocale(cfg.locale, null, true);
|
|
10908
|
-
this.parse(cfg);
|
|
10909
|
-
this.$x = this.$x || cfg.x || {};
|
|
10910
|
-
this[IS_DAYJS] = true;
|
|
10911
|
-
}
|
|
10912
|
-
var _proto = Dayjs2.prototype;
|
|
10913
|
-
_proto.parse = function parse2(cfg) {
|
|
10914
|
-
this.$d = parseDate(cfg);
|
|
10915
|
-
this.init();
|
|
10916
|
-
};
|
|
10917
|
-
_proto.init = function init2() {
|
|
10918
|
-
var $d = this.$d;
|
|
10919
|
-
this.$y = $d.getFullYear();
|
|
10920
|
-
this.$M = $d.getMonth();
|
|
10921
|
-
this.$D = $d.getDate();
|
|
10922
|
-
this.$W = $d.getDay();
|
|
10923
|
-
this.$H = $d.getHours();
|
|
10924
|
-
this.$m = $d.getMinutes();
|
|
10925
|
-
this.$s = $d.getSeconds();
|
|
10926
|
-
this.$ms = $d.getMilliseconds();
|
|
10927
|
-
};
|
|
10928
|
-
_proto.$utils = function $utils() {
|
|
10929
|
-
return Utils;
|
|
10930
|
-
};
|
|
10931
|
-
_proto.isValid = function isValid() {
|
|
10932
|
-
return !(this.$d.toString() === INVALID_DATE_STRING);
|
|
10933
|
-
};
|
|
10934
|
-
_proto.isSame = function isSame(that, units) {
|
|
10935
|
-
var other = dayjs(that);
|
|
10936
|
-
return this.startOf(units) <= other && other <= this.endOf(units);
|
|
10937
|
-
};
|
|
10938
|
-
_proto.isAfter = function isAfter(that, units) {
|
|
10939
|
-
return dayjs(that) < this.startOf(units);
|
|
10940
|
-
};
|
|
10941
|
-
_proto.isBefore = function isBefore(that, units) {
|
|
10942
|
-
return this.endOf(units) < dayjs(that);
|
|
10943
|
-
};
|
|
10944
|
-
_proto.$g = function $g(input, get, set) {
|
|
10945
|
-
if (Utils.u(input)) return this[get];
|
|
10946
|
-
return this.set(set, input);
|
|
10947
|
-
};
|
|
10948
|
-
_proto.unix = function unix() {
|
|
10949
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
10950
|
-
};
|
|
10951
|
-
_proto.valueOf = function valueOf() {
|
|
10952
|
-
return this.$d.getTime();
|
|
10953
|
-
};
|
|
10954
|
-
_proto.startOf = function startOf(units, _startOf) {
|
|
10955
|
-
var _this = this;
|
|
10956
|
-
var isStartOf = !Utils.u(_startOf) ? _startOf : true;
|
|
10957
|
-
var unit = Utils.p(units);
|
|
10958
|
-
var instanceFactory = function instanceFactory2(d, m) {
|
|
10959
|
-
var ins = Utils.w(_this.$u ? Date.UTC(_this.$y, m, d) : new Date(_this.$y, m, d), _this);
|
|
10960
|
-
return isStartOf ? ins : ins.endOf(D);
|
|
10961
|
-
};
|
|
10962
|
-
var instanceFactorySet = function instanceFactorySet2(method, slice) {
|
|
10963
|
-
var argumentStart = [0, 0, 0, 0];
|
|
10964
|
-
var argumentEnd = [23, 59, 59, 999];
|
|
10965
|
-
return Utils.w(_this.toDate()[method].apply(
|
|
10966
|
-
// eslint-disable-line prefer-spread
|
|
10967
|
-
_this.toDate("s"),
|
|
10968
|
-
(isStartOf ? argumentStart : argumentEnd).slice(slice)
|
|
10969
|
-
), _this);
|
|
10970
|
-
};
|
|
10971
|
-
var $W = this.$W, $M = this.$M, $D = this.$D;
|
|
10972
|
-
var utcPad = "set" + (this.$u ? "UTC" : "");
|
|
10973
|
-
switch (unit) {
|
|
10974
|
-
case Y:
|
|
10975
|
-
return isStartOf ? instanceFactory(1, 0) : instanceFactory(31, 11);
|
|
10976
|
-
case M:
|
|
10977
|
-
return isStartOf ? instanceFactory(1, $M) : instanceFactory(0, $M + 1);
|
|
10978
|
-
case W: {
|
|
10979
|
-
var weekStart = this.$locale().weekStart || 0;
|
|
10980
|
-
var gap = ($W < weekStart ? $W + 7 : $W) - weekStart;
|
|
10981
|
-
return instanceFactory(isStartOf ? $D - gap : $D + (6 - gap), $M);
|
|
10982
|
-
}
|
|
10983
|
-
case D:
|
|
10984
|
-
case DATE:
|
|
10985
|
-
return instanceFactorySet(utcPad + "Hours", 0);
|
|
10986
|
-
case H:
|
|
10987
|
-
return instanceFactorySet(utcPad + "Minutes", 1);
|
|
10988
|
-
case MIN:
|
|
10989
|
-
return instanceFactorySet(utcPad + "Seconds", 2);
|
|
10990
|
-
case S:
|
|
10991
|
-
return instanceFactorySet(utcPad + "Milliseconds", 3);
|
|
10992
|
-
default:
|
|
10993
|
-
return this.clone();
|
|
10994
|
-
}
|
|
10995
|
-
};
|
|
10996
|
-
_proto.endOf = function endOf(arg) {
|
|
10997
|
-
return this.startOf(arg, false);
|
|
10998
|
-
};
|
|
10999
|
-
_proto.$set = function $set(units, _int) {
|
|
11000
|
-
var _C$D$C$DATE$C$M$C$Y$C;
|
|
11001
|
-
var unit = Utils.p(units);
|
|
11002
|
-
var utcPad = "set" + (this.$u ? "UTC" : "");
|
|
11003
|
-
var name = (_C$D$C$DATE$C$M$C$Y$C = {}, _C$D$C$DATE$C$M$C$Y$C[D] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[DATE] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[M] = utcPad + "Month", _C$D$C$DATE$C$M$C$Y$C[Y] = utcPad + "FullYear", _C$D$C$DATE$C$M$C$Y$C[H] = utcPad + "Hours", _C$D$C$DATE$C$M$C$Y$C[MIN] = utcPad + "Minutes", _C$D$C$DATE$C$M$C$Y$C[S] = utcPad + "Seconds", _C$D$C$DATE$C$M$C$Y$C[MS] = utcPad + "Milliseconds", _C$D$C$DATE$C$M$C$Y$C)[unit];
|
|
11004
|
-
var arg = unit === D ? this.$D + (_int - this.$W) : _int;
|
|
11005
|
-
if (unit === M || unit === Y) {
|
|
11006
|
-
var date = this.clone().set(DATE, 1);
|
|
11007
|
-
date.$d[name](arg);
|
|
11008
|
-
date.init();
|
|
11009
|
-
this.$d = date.set(DATE, Math.min(this.$D, date.daysInMonth())).$d;
|
|
11010
|
-
} else if (name) this.$d[name](arg);
|
|
11011
|
-
this.init();
|
|
11012
|
-
return this;
|
|
11013
|
-
};
|
|
11014
|
-
_proto.set = function set(string, _int2) {
|
|
11015
|
-
return this.clone().$set(string, _int2);
|
|
11016
|
-
};
|
|
11017
|
-
_proto.get = function get(unit) {
|
|
11018
|
-
return this[Utils.p(unit)]();
|
|
11019
|
-
};
|
|
11020
|
-
_proto.add = function add(number2, units) {
|
|
11021
|
-
var _this2 = this, _C$MIN$C$H$C$S$unit;
|
|
11022
|
-
number2 = Number(number2);
|
|
11023
|
-
var unit = Utils.p(units);
|
|
11024
|
-
var instanceFactorySet = function instanceFactorySet2(n) {
|
|
11025
|
-
var d = dayjs(_this2);
|
|
11026
|
-
return Utils.w(d.date(d.date() + Math.round(n * number2)), _this2);
|
|
11027
|
-
};
|
|
11028
|
-
if (unit === M) {
|
|
11029
|
-
return this.set(M, this.$M + number2);
|
|
11030
|
-
}
|
|
11031
|
-
if (unit === Y) {
|
|
11032
|
-
return this.set(Y, this.$y + number2);
|
|
11033
|
-
}
|
|
11034
|
-
if (unit === D) {
|
|
11035
|
-
return instanceFactorySet(1);
|
|
11036
|
-
}
|
|
11037
|
-
if (unit === W) {
|
|
11038
|
-
return instanceFactorySet(7);
|
|
11039
|
-
}
|
|
11040
|
-
var step = (_C$MIN$C$H$C$S$unit = {}, _C$MIN$C$H$C$S$unit[MIN] = MILLISECONDS_A_MINUTE, _C$MIN$C$H$C$S$unit[H] = MILLISECONDS_A_HOUR, _C$MIN$C$H$C$S$unit[S] = MILLISECONDS_A_SECOND, _C$MIN$C$H$C$S$unit)[unit] || 1;
|
|
11041
|
-
var nextTimeStamp = this.$d.getTime() + number2 * step;
|
|
11042
|
-
return Utils.w(nextTimeStamp, this);
|
|
11043
|
-
};
|
|
11044
|
-
_proto.subtract = function subtract(number2, string) {
|
|
11045
|
-
return this.add(number2 * -1, string);
|
|
11046
|
-
};
|
|
11047
|
-
_proto.format = function format2(formatStr) {
|
|
11048
|
-
var _this3 = this;
|
|
11049
|
-
var locale2 = this.$locale();
|
|
11050
|
-
if (!this.isValid()) return locale2.invalidDate || INVALID_DATE_STRING;
|
|
11051
|
-
var str = formatStr || FORMAT_DEFAULT;
|
|
11052
|
-
var zoneStr = Utils.z(this);
|
|
11053
|
-
var $H = this.$H, $m = this.$m, $M = this.$M;
|
|
11054
|
-
var weekdays = locale2.weekdays, months = locale2.months, meridiem2 = locale2.meridiem;
|
|
11055
|
-
var getShort = function getShort2(arr, index2, full, length) {
|
|
11056
|
-
return arr && (arr[index2] || arr(_this3, str)) || full[index2].slice(0, length);
|
|
11057
|
-
};
|
|
11058
|
-
var get$H = function get$H2(num) {
|
|
11059
|
-
return Utils.s($H % 12 || 12, num, "0");
|
|
11060
|
-
};
|
|
11061
|
-
var meridiemFunc = meridiem2 || function(hour, minute, isLowercase) {
|
|
11062
|
-
var m = hour < 12 ? "AM" : "PM";
|
|
11063
|
-
return isLowercase ? m.toLowerCase() : m;
|
|
11064
|
-
};
|
|
11065
|
-
var matches = function matches2(match) {
|
|
11066
|
-
switch (match) {
|
|
11067
|
-
case "YY":
|
|
11068
|
-
return String(_this3.$y).slice(-2);
|
|
11069
|
-
case "YYYY":
|
|
11070
|
-
return Utils.s(_this3.$y, 4, "0");
|
|
11071
|
-
case "M":
|
|
11072
|
-
return $M + 1;
|
|
11073
|
-
case "MM":
|
|
11074
|
-
return Utils.s($M + 1, 2, "0");
|
|
11075
|
-
case "MMM":
|
|
11076
|
-
return getShort(locale2.monthsShort, $M, months, 3);
|
|
11077
|
-
case "MMMM":
|
|
11078
|
-
return getShort(months, $M);
|
|
11079
|
-
case "D":
|
|
11080
|
-
return _this3.$D;
|
|
11081
|
-
case "DD":
|
|
11082
|
-
return Utils.s(_this3.$D, 2, "0");
|
|
11083
|
-
case "d":
|
|
11084
|
-
return String(_this3.$W);
|
|
11085
|
-
case "dd":
|
|
11086
|
-
return getShort(locale2.weekdaysMin, _this3.$W, weekdays, 2);
|
|
11087
|
-
case "ddd":
|
|
11088
|
-
return getShort(locale2.weekdaysShort, _this3.$W, weekdays, 3);
|
|
11089
|
-
case "dddd":
|
|
11090
|
-
return weekdays[_this3.$W];
|
|
11091
|
-
case "H":
|
|
11092
|
-
return String($H);
|
|
11093
|
-
case "HH":
|
|
11094
|
-
return Utils.s($H, 2, "0");
|
|
11095
|
-
case "h":
|
|
11096
|
-
return get$H(1);
|
|
11097
|
-
case "hh":
|
|
11098
|
-
return get$H(2);
|
|
11099
|
-
case "a":
|
|
11100
|
-
return meridiemFunc($H, $m, true);
|
|
11101
|
-
case "A":
|
|
11102
|
-
return meridiemFunc($H, $m, false);
|
|
11103
|
-
case "m":
|
|
11104
|
-
return String($m);
|
|
11105
|
-
case "mm":
|
|
11106
|
-
return Utils.s($m, 2, "0");
|
|
11107
|
-
case "s":
|
|
11108
|
-
return String(_this3.$s);
|
|
11109
|
-
case "ss":
|
|
11110
|
-
return Utils.s(_this3.$s, 2, "0");
|
|
11111
|
-
case "SSS":
|
|
11112
|
-
return Utils.s(_this3.$ms, 3, "0");
|
|
11113
|
-
case "Z":
|
|
11114
|
-
return zoneStr;
|
|
11115
|
-
}
|
|
11116
|
-
return null;
|
|
11117
|
-
};
|
|
11118
|
-
return str.replace(REGEX_FORMAT, function(match, $1) {
|
|
11119
|
-
return $1 || matches(match) || zoneStr.replace(":", "");
|
|
11120
|
-
});
|
|
11121
|
-
};
|
|
11122
|
-
_proto.utcOffset = function utcOffset() {
|
|
11123
|
-
return -Math.round(this.$d.getTimezoneOffset() / 15) * 15;
|
|
11124
|
-
};
|
|
11125
|
-
_proto.diff = function diff(input, units, _float) {
|
|
11126
|
-
var _this4 = this;
|
|
11127
|
-
var unit = Utils.p(units);
|
|
11128
|
-
var that = dayjs(input);
|
|
11129
|
-
var zoneDelta = (that.utcOffset() - this.utcOffset()) * MILLISECONDS_A_MINUTE;
|
|
11130
|
-
var diff2 = this - that;
|
|
11131
|
-
var getMonth = function getMonth2() {
|
|
11132
|
-
return Utils.m(_this4, that);
|
|
11133
|
-
};
|
|
11134
|
-
var result2;
|
|
11135
|
-
switch (unit) {
|
|
11136
|
-
case Y:
|
|
11137
|
-
result2 = getMonth() / 12;
|
|
11138
|
-
break;
|
|
11139
|
-
case M:
|
|
11140
|
-
result2 = getMonth();
|
|
11141
|
-
break;
|
|
11142
|
-
case Q:
|
|
11143
|
-
result2 = getMonth() / 3;
|
|
11144
|
-
break;
|
|
11145
|
-
case W:
|
|
11146
|
-
result2 = (diff2 - zoneDelta) / MILLISECONDS_A_WEEK;
|
|
11147
|
-
break;
|
|
11148
|
-
case D:
|
|
11149
|
-
result2 = (diff2 - zoneDelta) / MILLISECONDS_A_DAY;
|
|
11150
|
-
break;
|
|
11151
|
-
case H:
|
|
11152
|
-
result2 = diff2 / MILLISECONDS_A_HOUR;
|
|
11153
|
-
break;
|
|
11154
|
-
case MIN:
|
|
11155
|
-
result2 = diff2 / MILLISECONDS_A_MINUTE;
|
|
11156
|
-
break;
|
|
11157
|
-
case S:
|
|
11158
|
-
result2 = diff2 / MILLISECONDS_A_SECOND;
|
|
11159
|
-
break;
|
|
11160
|
-
default:
|
|
11161
|
-
result2 = diff2;
|
|
11162
|
-
break;
|
|
11163
|
-
}
|
|
11164
|
-
return _float ? result2 : Utils.a(result2);
|
|
11165
|
-
};
|
|
11166
|
-
_proto.daysInMonth = function daysInMonth() {
|
|
11167
|
-
return this.endOf(M).$D;
|
|
11168
|
-
};
|
|
11169
|
-
_proto.$locale = function $locale() {
|
|
11170
|
-
return Ls[this.$L];
|
|
11171
|
-
};
|
|
11172
|
-
_proto.locale = function locale2(preset, object) {
|
|
11173
|
-
if (!preset) return this.$L;
|
|
11174
|
-
var that = this.clone();
|
|
11175
|
-
var nextLocaleName = parseLocale(preset, object, true);
|
|
11176
|
-
if (nextLocaleName) that.$L = nextLocaleName;
|
|
11177
|
-
return that;
|
|
11178
|
-
};
|
|
11179
|
-
_proto.clone = function clone2() {
|
|
11180
|
-
return Utils.w(this.$d, this);
|
|
11181
|
-
};
|
|
11182
|
-
_proto.toDate = function toDate() {
|
|
11183
|
-
return new Date(this.valueOf());
|
|
11184
|
-
};
|
|
11185
|
-
_proto.toJSON = function toJSON() {
|
|
11186
|
-
return this.isValid() ? this.toISOString() : null;
|
|
11187
|
-
};
|
|
11188
|
-
_proto.toISOString = function toISOString() {
|
|
11189
|
-
return this.$d.toISOString();
|
|
11190
|
-
};
|
|
11191
|
-
_proto.toString = function toString() {
|
|
11192
|
-
return this.$d.toUTCString();
|
|
11193
|
-
};
|
|
11194
|
-
return Dayjs2;
|
|
11195
|
-
}();
|
|
11196
|
-
var proto = Dayjs.prototype;
|
|
11197
|
-
dayjs.prototype = proto;
|
|
11198
|
-
[["$ms", MS], ["$s", S], ["$m", MIN], ["$H", H], ["$W", D], ["$M", M], ["$y", Y], ["$D", DATE]].forEach(function(g) {
|
|
11199
|
-
proto[g[1]] = function(input) {
|
|
11200
|
-
return this.$g(input, g[0], g[1]);
|
|
11201
|
-
};
|
|
11202
|
-
});
|
|
11203
|
-
dayjs.extend = function(plugin, option) {
|
|
11204
|
-
if (!plugin.$i) {
|
|
11205
|
-
plugin(option, Dayjs, dayjs);
|
|
11206
|
-
plugin.$i = true;
|
|
11207
|
-
}
|
|
11208
|
-
return dayjs;
|
|
11209
|
-
};
|
|
11210
|
-
dayjs.locale = parseLocale;
|
|
11211
|
-
dayjs.isDayjs = isDayjs;
|
|
11212
|
-
dayjs.unix = function(timestamp) {
|
|
11213
|
-
return dayjs(timestamp * 1e3);
|
|
11214
|
-
};
|
|
11215
|
-
dayjs.en = Ls[L];
|
|
11216
|
-
dayjs.Ls = Ls;
|
|
11217
|
-
dayjs.p = {};
|
|
11218
|
-
var locale = {
|
|
11219
|
-
name: "zh-cn",
|
|
11220
|
-
weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
|
|
11221
|
-
weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
|
|
11222
|
-
weekdaysMin: "日_一_二_三_四_五_六".split("_"),
|
|
11223
|
-
months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
|
|
11224
|
-
monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
|
|
11225
|
-
ordinal: function ordinal2(number2, period) {
|
|
11226
|
-
switch (period) {
|
|
11227
|
-
case "W":
|
|
11228
|
-
return number2 + "周";
|
|
11229
|
-
default:
|
|
11230
|
-
return number2 + "日";
|
|
11231
|
-
}
|
|
11232
|
-
},
|
|
11233
|
-
weekStart: 1,
|
|
11234
|
-
yearStart: 4,
|
|
11235
|
-
formats: {
|
|
11236
|
-
LT: "HH:mm",
|
|
11237
|
-
LTS: "HH:mm:ss",
|
|
11238
|
-
L: "YYYY/MM/DD",
|
|
11239
|
-
LL: "YYYY年M月D日",
|
|
11240
|
-
LLL: "YYYY年M月D日Ah点mm分",
|
|
11241
|
-
LLLL: "YYYY年M月D日ddddAh点mm分",
|
|
11242
|
-
l: "YYYY/M/D",
|
|
11243
|
-
ll: "YYYY年M月D日",
|
|
11244
|
-
lll: "YYYY年M月D日 HH:mm",
|
|
11245
|
-
llll: "YYYY年M月D日dddd HH:mm"
|
|
11246
|
-
},
|
|
11247
|
-
relativeTime: {
|
|
11248
|
-
future: "%s内",
|
|
11249
|
-
past: "%s前",
|
|
11250
|
-
s: "几秒",
|
|
11251
|
-
m: "1 分钟",
|
|
11252
|
-
mm: "%d 分钟",
|
|
11253
|
-
h: "1 小时",
|
|
11254
|
-
hh: "%d 小时",
|
|
11255
|
-
d: "1 天",
|
|
11256
|
-
dd: "%d 天",
|
|
11257
|
-
M: "1 个月",
|
|
11258
|
-
MM: "%d 个月",
|
|
11259
|
-
y: "1 年",
|
|
11260
|
-
yy: "%d 年"
|
|
11261
|
-
},
|
|
11262
|
-
meridiem: function meridiem(hour, minute) {
|
|
11263
|
-
var hm = hour * 100 + minute;
|
|
11264
|
-
if (hm < 600) {
|
|
11265
|
-
return "凌晨";
|
|
11266
|
-
} else if (hm < 900) {
|
|
11267
|
-
return "早上";
|
|
11268
|
-
} else if (hm < 1100) {
|
|
11269
|
-
return "上午";
|
|
11270
|
-
} else if (hm < 1300) {
|
|
11271
|
-
return "中午";
|
|
11272
|
-
} else if (hm < 1800) {
|
|
11273
|
-
return "下午";
|
|
11274
|
-
}
|
|
11275
|
-
return "晚上";
|
|
11276
|
-
}
|
|
11277
|
-
};
|
|
11278
|
-
dayjs.locale(locale, null, true);
|
|
10774
|
+
})(zhCn);
|
|
10775
|
+
var zhCnExports = zhCn.exports;
|
|
10776
|
+
const locale = /* @__PURE__ */ getDefaultExportFromCjs(zhCnExports);
|
|
11279
10777
|
var timezone = { exports: {} };
|
|
11280
10778
|
(function(module, exports) {
|
|
11281
10779
|
!function(t2, e) {
|
|
@@ -11415,11 +10913,11 @@ var utc$1 = { exports: {} };
|
|
|
11415
10913
|
})(utc$1);
|
|
11416
10914
|
var utcExports = utc$1.exports;
|
|
11417
10915
|
const utc = /* @__PURE__ */ getDefaultExportFromCjs(utcExports);
|
|
11418
|
-
dayjs
|
|
11419
|
-
dayjs
|
|
11420
|
-
dayjs
|
|
11421
|
-
dayjs
|
|
11422
|
-
dayjs
|
|
10916
|
+
dayjs.locale(locale);
|
|
10917
|
+
dayjs.extend(relativeTime);
|
|
10918
|
+
dayjs.extend(tz);
|
|
10919
|
+
dayjs.extend(utc);
|
|
10920
|
+
dayjs.tz.setDefault("Asia/Shanghai");
|
|
11423
10921
|
const useTimeFormat = () => {
|
|
11424
10922
|
const formatTimeFromNow = (time) => {
|
|
11425
10923
|
if (!time) return "-";
|
|
@@ -11428,7 +10926,7 @@ const useTimeFormat = () => {
|
|
|
11428
10926
|
};
|
|
11429
10927
|
const formatTime = (time, format2) => {
|
|
11430
10928
|
if (!time) return "-";
|
|
11431
|
-
return dayjs
|
|
10929
|
+
return dayjs(time).format(format2);
|
|
11432
10930
|
};
|
|
11433
10931
|
return {
|
|
11434
10932
|
formatTimeFromNow,
|
|
@@ -11516,12 +11014,10 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
11516
11014
|
const breadcrumbNextTextRef = ref(null);
|
|
11517
11015
|
const { formatTimeFromNow } = useTimeFormat();
|
|
11518
11016
|
const props = __props;
|
|
11519
|
-
const repoInfo = inject("repoInfo");
|
|
11017
|
+
const repoInfo = inject("repoInfo", computed(() => void 0));
|
|
11520
11018
|
console.log("repoInfo", repoInfo);
|
|
11521
|
-
const orgInfo = inject("orgInfo");
|
|
11522
|
-
const otherUserInfo = inject("otherUserInfo");
|
|
11523
|
-
const aiHubSceneValue = [SceneValue.aiHome, SceneValue.aiGuide, SceneValue.aiRepo];
|
|
11524
|
-
computed(() => aiHubSceneValue.includes(props.scene));
|
|
11019
|
+
const orgInfo = inject("orgInfo", computed(() => void 0));
|
|
11020
|
+
const otherUserInfo = inject("otherUserInfo", computed(() => void 0));
|
|
11525
11021
|
const emits = __emit;
|
|
11526
11022
|
const handleOrgFollow = (val) => {
|
|
11527
11023
|
if (props.scene !== SceneValue.org) return;
|
|
@@ -11585,7 +11081,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
11585
11081
|
});
|
|
11586
11082
|
const formatTime = computed(() => {
|
|
11587
11083
|
var _a;
|
|
11588
|
-
return formatTimeFromNow((_a = repoInfo.value) == null ? void 0 : _a.last_repository_updated_at);
|
|
11084
|
+
return formatTimeFromNow(((_a = repoInfo.value) == null ? void 0 : _a.last_repository_updated_at) || "");
|
|
11589
11085
|
});
|
|
11590
11086
|
const handleFollowUser = () => {
|
|
11591
11087
|
if (props.scene !== SceneValue.user) return;
|
|
@@ -11624,8 +11120,8 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
11624
11120
|
return [
|
|
11625
11121
|
createVNode(_sfc_main$M, {
|
|
11626
11122
|
class: "g-border",
|
|
11627
|
-
src: (_a2 = unref(orgInfo)) == null ? void 0 : _a2.avatar,
|
|
11628
|
-
name: (_b2 = unref(orgInfo)) == null ? void 0 : _b2.name,
|
|
11123
|
+
src: ((_a2 = unref(orgInfo)) == null ? void 0 : _a2.avatar) || "",
|
|
11124
|
+
name: ((_b2 = unref(orgInfo)) == null ? void 0 : _b2.name) || "",
|
|
11629
11125
|
width: 28,
|
|
11630
11126
|
height: 28,
|
|
11631
11127
|
is_round: false
|
|
@@ -11665,7 +11161,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
11665
11161
|
])
|
|
11666
11162
|
]),
|
|
11667
11163
|
default: withCtx(() => {
|
|
11668
|
-
var _a2, _b2, _c2, _d, _e, _f, _g;
|
|
11164
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
11669
11165
|
return [
|
|
11670
11166
|
createElementVNode("h2", _hoisted_4$m, [
|
|
11671
11167
|
createVNode(GLink, {
|
|
@@ -11678,8 +11174,8 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
11678
11174
|
!((_a3 = _ctx.repoProps) == null ? void 0 : _a3.isGhMirrors) ? (openBlock(), createBlock(_sfc_main$M, {
|
|
11679
11175
|
key: 0,
|
|
11680
11176
|
class: normalizeClass({ "g-border": isOrg.value }),
|
|
11681
|
-
src: (_c3 = (_b3 = unref(repoInfo)) == null ? void 0 : _b3.namespace) == null ? void 0 : _c3.avatar_url,
|
|
11682
|
-
name: (_d2 = unref(repoInfo)) == null ? void 0 : _d2.name,
|
|
11177
|
+
src: ((_c3 = (_b3 = unref(repoInfo)) == null ? void 0 : _b3.namespace) == null ? void 0 : _c3.avatar_url) || "",
|
|
11178
|
+
name: ((_d2 = unref(repoInfo)) == null ? void 0 : _d2.name) || "",
|
|
11683
11179
|
width: 28,
|
|
11684
11180
|
height: 28,
|
|
11685
11181
|
is_round: !isOrg.value
|
|
@@ -11730,7 +11226,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
11730
11226
|
}, [
|
|
11731
11227
|
createVNode(GLink, {
|
|
11732
11228
|
class: "linkTx",
|
|
11733
|
-
|
|
11229
|
+
href: (_d = unref(breadcrumb)[unref(breadcrumb).length - 1]) == null ? void 0 : _d.path
|
|
11734
11230
|
}, {
|
|
11735
11231
|
default: withCtx(() => [
|
|
11736
11232
|
createElementVNode("span", {
|
|
@@ -11741,8 +11237,8 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
11741
11237
|
}, toDisplayString$1(unref(breadcrumb)[unref(breadcrumb).length - 1].label), 9, _hoisted_11$6)
|
|
11742
11238
|
]),
|
|
11743
11239
|
_: 1
|
|
11744
|
-
}, 8, ["
|
|
11745
|
-
unref(isGstarRepo)(unref(repoInfo).topic_names) ? (openBlock(), createElementBlock("div", _hoisted_12$5, [
|
|
11240
|
+
}, 8, ["href"]),
|
|
11241
|
+
unref(isGstarRepo)((_e = unref(repoInfo)) == null ? void 0 : _e.topic_names) ? (openBlock(), createElementBlock("div", _hoisted_12$5, [
|
|
11746
11242
|
createVNode(_sfc_main$L, {
|
|
11747
11243
|
origin: "repo",
|
|
11748
11244
|
icon: "",
|
|
@@ -11754,7 +11250,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
11754
11250
|
])),
|
|
11755
11251
|
_: 1
|
|
11756
11252
|
}, 8, ["message"])
|
|
11757
|
-
])) : unref(isIncubationRepo)(unref(repoInfo).topic_names) ? (openBlock(), createElementBlock("div", _hoisted_13$2, [
|
|
11253
|
+
])) : unref(isIncubationRepo)((_f = unref(repoInfo)) == null ? void 0 : _f.topic_names) ? (openBlock(), createElementBlock("div", _hoisted_13$2, [
|
|
11758
11254
|
createVNode(_sfc_main$L, {
|
|
11759
11255
|
origin: "repo",
|
|
11760
11256
|
icon: "",
|
|
@@ -11767,7 +11263,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
11767
11263
|
_: 1
|
|
11768
11264
|
}, 8, ["message"])
|
|
11769
11265
|
])) : createCommentVNode("", true),
|
|
11770
|
-
unref(isTrustedRepo)(unref(repoInfo).topic_names) ? (openBlock(), createElementBlock("div", _hoisted_14$2, [
|
|
11266
|
+
unref(isTrustedRepo)((_g = unref(repoInfo)) == null ? void 0 : _g.topic_names) ? (openBlock(), createElementBlock("div", _hoisted_14$2, [
|
|
11771
11267
|
createVNode(_sfc_main$L, {
|
|
11772
11268
|
trusted: "",
|
|
11773
11269
|
message: unref(t2)("gitCodeLayout.trusted.title"),
|
|
@@ -11776,7 +11272,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
11776
11272
|
href: "/trusted"
|
|
11777
11273
|
}, null, 8, ["message"])
|
|
11778
11274
|
])) : createCommentVNode("", true),
|
|
11779
|
-
((
|
|
11275
|
+
((_h = _ctx.repoProps) == null ? void 0 : _h.isPrivate) ? (openBlock(), createElementBlock("div", _hoisted_15$2, [
|
|
11780
11276
|
createVNode(GIcon, {
|
|
11781
11277
|
size: "16px",
|
|
11782
11278
|
class: "header-custom-lock-icon",
|
|
@@ -11789,13 +11285,13 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
11789
11285
|
onClick: toAiHub
|
|
11790
11286
|
}, [
|
|
11791
11287
|
createVNode(GIcon, {
|
|
11792
|
-
name: (
|
|
11288
|
+
name: (_i = topicTag.value) == null ? void 0 : _i.icon,
|
|
11793
11289
|
color: "var(--devui-shape-icon-fill)",
|
|
11794
11290
|
class: "header-custom-topic-icon"
|
|
11795
11291
|
}, null, 8, ["name"]),
|
|
11796
|
-
createElementVNode("span", _hoisted_16$2, toDisplayString$1((
|
|
11292
|
+
createElementVNode("span", _hoisted_16$2, toDisplayString$1((_j = topicTag.value) == null ? void 0 : _j.suffix), 1)
|
|
11797
11293
|
])) : createCommentVNode("", true),
|
|
11798
|
-
((
|
|
11294
|
+
((_k = _ctx.repoProps) == null ? void 0 : _k.isGhMirrors) && showTimeTopic.value && !unref(isPhone)() ? (openBlock(), createElementBlock("div", _hoisted_17$2, [
|
|
11799
11295
|
createVNode(GIcon, {
|
|
11800
11296
|
name: "gt-line-time",
|
|
11801
11297
|
color: "var(--devui-shape-icon-fill)",
|
|
@@ -12191,7 +11687,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
12191
11687
|
if (open) void nextTick(updateMenuPosition);
|
|
12192
11688
|
});
|
|
12193
11689
|
watch(
|
|
12194
|
-
() => route.fullPath,
|
|
11690
|
+
() => route == null ? void 0 : route.fullPath,
|
|
12195
11691
|
() => closeMenu()
|
|
12196
11692
|
);
|
|
12197
11693
|
onMounted(() => {
|
|
@@ -13057,33 +12553,33 @@ function requireMd5() {
|
|
|
13057
12553
|
271733878
|
|
13058
12554
|
]);
|
|
13059
12555
|
},
|
|
13060
|
-
_doProcessBlock: function(
|
|
12556
|
+
_doProcessBlock: function(M, offset) {
|
|
13061
12557
|
for (var i = 0; i < 16; i++) {
|
|
13062
12558
|
var offset_i = offset + i;
|
|
13063
|
-
var M_offset_i =
|
|
13064
|
-
|
|
12559
|
+
var M_offset_i = M[offset_i];
|
|
12560
|
+
M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360;
|
|
13065
12561
|
}
|
|
13066
|
-
var
|
|
13067
|
-
var M_offset_0 =
|
|
13068
|
-
var M_offset_1 =
|
|
13069
|
-
var M_offset_2 =
|
|
13070
|
-
var M_offset_3 =
|
|
13071
|
-
var M_offset_4 =
|
|
13072
|
-
var M_offset_5 =
|
|
13073
|
-
var M_offset_6 =
|
|
13074
|
-
var M_offset_7 =
|
|
13075
|
-
var M_offset_8 =
|
|
13076
|
-
var M_offset_9 =
|
|
13077
|
-
var M_offset_10 =
|
|
13078
|
-
var M_offset_11 =
|
|
13079
|
-
var M_offset_12 =
|
|
13080
|
-
var M_offset_13 =
|
|
13081
|
-
var M_offset_14 =
|
|
13082
|
-
var M_offset_15 =
|
|
13083
|
-
var a =
|
|
13084
|
-
var b =
|
|
13085
|
-
var c =
|
|
13086
|
-
var d =
|
|
12562
|
+
var H = this._hash.words;
|
|
12563
|
+
var M_offset_0 = M[offset + 0];
|
|
12564
|
+
var M_offset_1 = M[offset + 1];
|
|
12565
|
+
var M_offset_2 = M[offset + 2];
|
|
12566
|
+
var M_offset_3 = M[offset + 3];
|
|
12567
|
+
var M_offset_4 = M[offset + 4];
|
|
12568
|
+
var M_offset_5 = M[offset + 5];
|
|
12569
|
+
var M_offset_6 = M[offset + 6];
|
|
12570
|
+
var M_offset_7 = M[offset + 7];
|
|
12571
|
+
var M_offset_8 = M[offset + 8];
|
|
12572
|
+
var M_offset_9 = M[offset + 9];
|
|
12573
|
+
var M_offset_10 = M[offset + 10];
|
|
12574
|
+
var M_offset_11 = M[offset + 11];
|
|
12575
|
+
var M_offset_12 = M[offset + 12];
|
|
12576
|
+
var M_offset_13 = M[offset + 13];
|
|
12577
|
+
var M_offset_14 = M[offset + 14];
|
|
12578
|
+
var M_offset_15 = M[offset + 15];
|
|
12579
|
+
var a = H[0];
|
|
12580
|
+
var b = H[1];
|
|
12581
|
+
var c = H[2];
|
|
12582
|
+
var d = H[3];
|
|
13087
12583
|
a = FF(a, b, c, d, M_offset_0, 7, T[0]);
|
|
13088
12584
|
d = FF(d, a, b, c, M_offset_1, 12, T[1]);
|
|
13089
12585
|
c = FF(c, d, a, b, M_offset_2, 17, T[2]);
|
|
@@ -13148,10 +12644,10 @@ function requireMd5() {
|
|
|
13148
12644
|
d = II(d, a, b, c, M_offset_11, 10, T[61]);
|
|
13149
12645
|
c = II(c, d, a, b, M_offset_2, 15, T[62]);
|
|
13150
12646
|
b = II(b, c, d, a, M_offset_9, 21, T[63]);
|
|
13151
|
-
|
|
13152
|
-
|
|
13153
|
-
|
|
13154
|
-
|
|
12647
|
+
H[0] = H[0] + a | 0;
|
|
12648
|
+
H[1] = H[1] + b | 0;
|
|
12649
|
+
H[2] = H[2] + c | 0;
|
|
12650
|
+
H[3] = H[3] + d | 0;
|
|
13155
12651
|
},
|
|
13156
12652
|
_doFinalize: function() {
|
|
13157
12653
|
var data = this._data;
|
|
@@ -13166,10 +12662,10 @@ function requireMd5() {
|
|
|
13166
12662
|
data.sigBytes = (dataWords.length + 1) * 4;
|
|
13167
12663
|
this._process();
|
|
13168
12664
|
var hash = this._hash;
|
|
13169
|
-
var
|
|
12665
|
+
var H = hash.words;
|
|
13170
12666
|
for (var i = 0; i < 4; i++) {
|
|
13171
|
-
var H_i =
|
|
13172
|
-
|
|
12667
|
+
var H_i = H[i];
|
|
12668
|
+
H[i] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360;
|
|
13173
12669
|
}
|
|
13174
12670
|
return hash;
|
|
13175
12671
|
},
|
|
@@ -13221,7 +12717,7 @@ function requireSha1() {
|
|
|
13221
12717
|
var WordArray = C_lib.WordArray;
|
|
13222
12718
|
var Hasher = C_lib.Hasher;
|
|
13223
12719
|
var C_algo = C.algo;
|
|
13224
|
-
var
|
|
12720
|
+
var W = [];
|
|
13225
12721
|
var SHA1 = C_algo.SHA1 = Hasher.extend({
|
|
13226
12722
|
_doReset: function() {
|
|
13227
12723
|
this._hash = new WordArray.init([
|
|
@@ -13232,21 +12728,21 @@ function requireSha1() {
|
|
|
13232
12728
|
3285377520
|
|
13233
12729
|
]);
|
|
13234
12730
|
},
|
|
13235
|
-
_doProcessBlock: function(
|
|
13236
|
-
var
|
|
13237
|
-
var a =
|
|
13238
|
-
var b =
|
|
13239
|
-
var c =
|
|
13240
|
-
var d =
|
|
13241
|
-
var e =
|
|
12731
|
+
_doProcessBlock: function(M, offset) {
|
|
12732
|
+
var H = this._hash.words;
|
|
12733
|
+
var a = H[0];
|
|
12734
|
+
var b = H[1];
|
|
12735
|
+
var c = H[2];
|
|
12736
|
+
var d = H[3];
|
|
12737
|
+
var e = H[4];
|
|
13242
12738
|
for (var i = 0; i < 80; i++) {
|
|
13243
12739
|
if (i < 16) {
|
|
13244
|
-
|
|
12740
|
+
W[i] = M[offset + i] | 0;
|
|
13245
12741
|
} else {
|
|
13246
|
-
var n =
|
|
13247
|
-
|
|
12742
|
+
var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
|
|
12743
|
+
W[i] = n << 1 | n >>> 31;
|
|
13248
12744
|
}
|
|
13249
|
-
var t2 = (a << 5 | a >>> 27) + e +
|
|
12745
|
+
var t2 = (a << 5 | a >>> 27) + e + W[i];
|
|
13250
12746
|
if (i < 20) {
|
|
13251
12747
|
t2 += (b & c | ~b & d) + 1518500249;
|
|
13252
12748
|
} else if (i < 40) {
|
|
@@ -13262,11 +12758,11 @@ function requireSha1() {
|
|
|
13262
12758
|
b = a;
|
|
13263
12759
|
a = t2;
|
|
13264
12760
|
}
|
|
13265
|
-
|
|
13266
|
-
|
|
13267
|
-
|
|
13268
|
-
|
|
13269
|
-
|
|
12761
|
+
H[0] = H[0] + a | 0;
|
|
12762
|
+
H[1] = H[1] + b | 0;
|
|
12763
|
+
H[2] = H[2] + c | 0;
|
|
12764
|
+
H[3] = H[3] + d | 0;
|
|
12765
|
+
H[4] = H[4] + e | 0;
|
|
13270
12766
|
},
|
|
13271
12767
|
_doFinalize: function() {
|
|
13272
12768
|
var data = this._data;
|
|
@@ -14229,24 +13725,24 @@ function requireCipherCore() {
|
|
|
14229
13725
|
}
|
|
14230
13726
|
}
|
|
14231
13727
|
},
|
|
14232
|
-
encryptBlock: function(
|
|
14233
|
-
this._doCryptBlock(
|
|
13728
|
+
encryptBlock: function(M, offset) {
|
|
13729
|
+
this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);
|
|
14234
13730
|
},
|
|
14235
|
-
decryptBlock: function(
|
|
14236
|
-
var t2 =
|
|
14237
|
-
|
|
14238
|
-
|
|
14239
|
-
this._doCryptBlock(
|
|
14240
|
-
var t2 =
|
|
14241
|
-
|
|
14242
|
-
|
|
13731
|
+
decryptBlock: function(M, offset) {
|
|
13732
|
+
var t2 = M[offset + 1];
|
|
13733
|
+
M[offset + 1] = M[offset + 3];
|
|
13734
|
+
M[offset + 3] = t2;
|
|
13735
|
+
this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);
|
|
13736
|
+
var t2 = M[offset + 1];
|
|
13737
|
+
M[offset + 1] = M[offset + 3];
|
|
13738
|
+
M[offset + 3] = t2;
|
|
14243
13739
|
},
|
|
14244
|
-
_doCryptBlock: function(
|
|
13740
|
+
_doCryptBlock: function(M, offset, keySchedule, SUB_MIX_02, SUB_MIX_12, SUB_MIX_22, SUB_MIX_32, SBOX2) {
|
|
14245
13741
|
var nRounds = this._nRounds;
|
|
14246
|
-
var s0 =
|
|
14247
|
-
var s1 =
|
|
14248
|
-
var s2 =
|
|
14249
|
-
var s3 =
|
|
13742
|
+
var s0 = M[offset] ^ keySchedule[0];
|
|
13743
|
+
var s1 = M[offset + 1] ^ keySchedule[1];
|
|
13744
|
+
var s2 = M[offset + 2] ^ keySchedule[2];
|
|
13745
|
+
var s3 = M[offset + 3] ^ keySchedule[3];
|
|
14250
13746
|
var ksRow = 4;
|
|
14251
13747
|
for (var round = 1; round < nRounds; round++) {
|
|
14252
13748
|
var t0 = SUB_MIX_02[s0 >>> 24] ^ SUB_MIX_12[s1 >>> 16 & 255] ^ SUB_MIX_22[s2 >>> 8 & 255] ^ SUB_MIX_32[s3 & 255] ^ keySchedule[ksRow++];
|
|
@@ -14262,10 +13758,10 @@ function requireCipherCore() {
|
|
|
14262
13758
|
var t1 = (SBOX2[s1 >>> 24] << 24 | SBOX2[s2 >>> 16 & 255] << 16 | SBOX2[s3 >>> 8 & 255] << 8 | SBOX2[s0 & 255]) ^ keySchedule[ksRow++];
|
|
14263
13759
|
var t2 = (SBOX2[s2 >>> 24] << 24 | SBOX2[s3 >>> 16 & 255] << 16 | SBOX2[s0 >>> 8 & 255] << 8 | SBOX2[s1 & 255]) ^ keySchedule[ksRow++];
|
|
14264
13760
|
var t3 = (SBOX2[s3 >>> 24] << 24 | SBOX2[s0 >>> 16 & 255] << 16 | SBOX2[s1 >>> 8 & 255] << 8 | SBOX2[s2 & 255]) ^ keySchedule[ksRow++];
|
|
14265
|
-
|
|
14266
|
-
|
|
14267
|
-
|
|
14268
|
-
|
|
13761
|
+
M[offset] = t0;
|
|
13762
|
+
M[offset + 1] = t1;
|
|
13763
|
+
M[offset + 2] = t2;
|
|
13764
|
+
M[offset + 3] = t3;
|
|
14269
13765
|
},
|
|
14270
13766
|
keySize: 256 / 32
|
|
14271
13767
|
});
|
|
@@ -15352,6 +14848,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
15352
14848
|
setup(__props) {
|
|
15353
14849
|
const layoutConfig2 = useLayoutConfig();
|
|
15354
14850
|
const API = headRequest(inject("request"));
|
|
14851
|
+
const { isMobile } = usePageResize();
|
|
15355
14852
|
const counts = ref(0);
|
|
15356
14853
|
const getCounts = () => {
|
|
15357
14854
|
API.getMessageCount().then((result2) => {
|
|
@@ -15385,7 +14882,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
15385
14882
|
offEvent("updateNoticeCount");
|
|
15386
14883
|
});
|
|
15387
14884
|
return (_ctx, _cache) => {
|
|
15388
|
-
return
|
|
14885
|
+
return unref(isMobile) ? (openBlock(), createBlock(GLink, {
|
|
15389
14886
|
key: 0,
|
|
15390
14887
|
href: `${unref(transformUrl)(unref(layoutConfig2).VITE_HOST)}/notice?message_sate=countNotRead`
|
|
15391
14888
|
}, {
|
|
@@ -15613,11 +15110,11 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
15613
15110
|
}
|
|
15614
15111
|
};
|
|
15615
15112
|
const levelInfo = computed(() => {
|
|
15616
|
-
const lv = `v${userLevel.value}`;
|
|
15617
15113
|
if (userLevel.value > maxLevel) {
|
|
15618
15114
|
return levelMap.v3;
|
|
15619
15115
|
}
|
|
15620
|
-
|
|
15116
|
+
const levelKey = `v${userLevel.value}`;
|
|
15117
|
+
return levelMap[levelKey] || levelMap.v1;
|
|
15621
15118
|
});
|
|
15622
15119
|
return (_ctx, _cache) => {
|
|
15623
15120
|
return openBlock(), createElementBlock("div", {
|
|
@@ -15758,7 +15255,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
15758
15255
|
],
|
|
15759
15256
|
[
|
|
15760
15257
|
{ id: "personalSetting", label: t2("gitCodeLayout.header.personSetting"), icon: "gt-plane-setting", to: getRouterLink("setting") },
|
|
15761
|
-
{ id: "news", label: t2("gitCodeLayout.home.informationCenter"), icon: "gt-plane-consulting", target: "_blank", href: `${transformNewsUrl(INFORMATION_CENTER_URL)}?lang=${
|
|
15258
|
+
{ id: "news", label: t2("gitCodeLayout.home.informationCenter"), icon: "gt-plane-consulting", target: "_blank", href: `${transformNewsUrl(INFORMATION_CENTER_URL)}?lang=${locale2 || "zh"}` },
|
|
15762
15259
|
{ id: "help", label: t2("gitCodeLayout.header.helpDocument"), icon: "gt-plane-project-opened", href: currentHelpDocsUrl() }
|
|
15763
15260
|
]
|
|
15764
15261
|
];
|
|
@@ -15784,7 +15281,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
15784
15281
|
],
|
|
15785
15282
|
[
|
|
15786
15283
|
{ id: "personalSetting", label: t2("gitCodeLayout.header.personSetting"), icon: "gt-plane-setting", link: "/setting" },
|
|
15787
|
-
{ id: "news", label: t2("gitCodeLayout.home.informationCenter"), icon: "gt-plane-consulting", target: "_blank", href: `${transformNewsUrl(INFORMATION_CENTER_URL)}?lang=${
|
|
15284
|
+
{ id: "news", label: t2("gitCodeLayout.home.informationCenter"), icon: "gt-plane-consulting", target: "_blank", href: `${transformNewsUrl(INFORMATION_CENTER_URL)}?lang=${locale2 || "zh"}` },
|
|
15788
15285
|
{ id: "help", label: t2("gitCodeLayout.header.helpDocument"), icon: "gt-plane-project-opened", target: "_blank", href: currentHelpDocsUrl() }
|
|
15789
15286
|
]
|
|
15790
15287
|
];
|
|
@@ -15877,8 +15374,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
15877
15374
|
}, {
|
|
15878
15375
|
default: withCtx(() => [
|
|
15879
15376
|
createVNode(_sfc_main$M, {
|
|
15880
|
-
name: _ctx.accountInfo.nickname,
|
|
15881
|
-
src: _ctx.accountInfo.avatar,
|
|
15377
|
+
name: _ctx.accountInfo.nickname || "",
|
|
15378
|
+
src: _ctx.accountInfo.avatar || "",
|
|
15882
15379
|
width: 52,
|
|
15883
15380
|
height: 52
|
|
15884
15381
|
}, null, 8, ["name", "src"]),
|
|
@@ -16229,39 +15726,62 @@ var EVENT_NAME = /* @__PURE__ */ ((EVENT_NAME2) => {
|
|
|
16229
15726
|
return EVENT_NAME2;
|
|
16230
15727
|
})(EVENT_NAME || {});
|
|
16231
15728
|
function _frEventTrack(eventName, type = "custom") {
|
|
15729
|
+
var _a;
|
|
16232
15730
|
try {
|
|
16233
|
-
window
|
|
15731
|
+
(_a = window.FURION) == null ? void 0 : _a.log(type, eventName);
|
|
16234
15732
|
} catch (err) {
|
|
16235
15733
|
}
|
|
16236
15734
|
}
|
|
15735
|
+
const isSearchHistoryEntry = (value) => {
|
|
15736
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
15737
|
+
};
|
|
15738
|
+
const normalizeSearchHistoryEntry = (value) => {
|
|
15739
|
+
if (typeof value === "string") {
|
|
15740
|
+
return { q: value, type: "repo" };
|
|
15741
|
+
}
|
|
15742
|
+
if (!isSearchHistoryEntry(value)) {
|
|
15743
|
+
return { q: "", type: "repo" };
|
|
15744
|
+
}
|
|
15745
|
+
return { ...value, type: value.type || "repo" };
|
|
15746
|
+
};
|
|
15747
|
+
const sameSearchHistory = (left, right) => {
|
|
15748
|
+
const leftEntry = normalizeSearchHistoryEntry(left);
|
|
15749
|
+
return leftEntry.q === right.q && leftEntry.type === right.type && leftEntry.scope === right.scope && leftEntry.repo === right.repo && leftEntry.org === right.org && leftEntry.user === right.user && leftEntry.namespace === right.namespace;
|
|
15750
|
+
};
|
|
15751
|
+
const upsertSearchHistory = (current, data, limit = 10) => {
|
|
15752
|
+
const next = current.filter((item) => Boolean(normalizeSearchHistoryEntry(item).q));
|
|
15753
|
+
const normalizedData = { ...data, type: data.type || "repo" };
|
|
15754
|
+
const existingIndex = next.findIndex((item) => sameSearchHistory(item, normalizedData));
|
|
15755
|
+
if (existingIndex === -1) {
|
|
15756
|
+
next.unshift({ ...normalizedData, count: normalizedData.count || 1 });
|
|
15757
|
+
} else {
|
|
15758
|
+
const existing = normalizeSearchHistoryEntry(next[existingIndex]);
|
|
15759
|
+
existing.count = (existing.count || 1) + 1;
|
|
15760
|
+
next.splice(existingIndex, 1);
|
|
15761
|
+
next.unshift(existing);
|
|
15762
|
+
}
|
|
15763
|
+
return next.slice(0, limit);
|
|
15764
|
+
};
|
|
16237
15765
|
const setlocalVistHistory = (data, localType) => {
|
|
16238
15766
|
const storeName = localType;
|
|
16239
15767
|
const localData = localStorage$2.getItem(storeName);
|
|
16240
15768
|
let cur = [];
|
|
16241
15769
|
if (localData) {
|
|
16242
15770
|
try {
|
|
16243
|
-
|
|
15771
|
+
const parsed = JSON.parse(localData);
|
|
15772
|
+
cur = Array.isArray(parsed) ? parsed : [];
|
|
16244
15773
|
if (localType) {
|
|
16245
|
-
cur = cur.filter((ele) => typeof ele === "string" ? !!ele : !!(ele == null ? void 0 : ele.q));
|
|
16246
15774
|
if (data.q) {
|
|
16247
|
-
|
|
16248
|
-
|
|
16249
|
-
);
|
|
16250
|
-
if (!target) {
|
|
16251
|
-
cur.unshift({ ...data, count: 1 });
|
|
16252
|
-
} else {
|
|
16253
|
-
target.count = (target.count || 1) + 1;
|
|
16254
|
-
data.type && (target.type = data.type);
|
|
16255
|
-
cur.splice(cur.indexOf(target), 1);
|
|
16256
|
-
cur.unshift(target);
|
|
16257
|
-
}
|
|
15775
|
+
cur = upsertSearchHistory(cur, data);
|
|
15776
|
+
} else {
|
|
15777
|
+
cur = cur.filter((ele) => Boolean(normalizeSearchHistoryEntry(ele).q));
|
|
16258
15778
|
}
|
|
16259
15779
|
}
|
|
16260
15780
|
} catch (e) {
|
|
16261
15781
|
console.error(e);
|
|
16262
15782
|
}
|
|
16263
15783
|
} else {
|
|
16264
|
-
cur = [data];
|
|
15784
|
+
cur = data.q ? [{ ...data, type: data.type || "repo", count: 1 }] : [];
|
|
16265
15785
|
}
|
|
16266
15786
|
const storageCount = 10;
|
|
16267
15787
|
cur.splice(storageCount);
|
|
@@ -16602,6 +16122,56 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
16602
16122
|
}
|
|
16603
16123
|
});
|
|
16604
16124
|
const HighlightInput = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
16125
|
+
const SEARCH_ROUTE_PATHS = /* @__PURE__ */ new Set(["/search", "/search/"]);
|
|
16126
|
+
const SEARCH_SCOPE_QUERY_KEYS = ["scope", "repo", "org", "user", "namespace"];
|
|
16127
|
+
const firstNonEmpty = (...values) => {
|
|
16128
|
+
for (const value of values) {
|
|
16129
|
+
if (value == null ? void 0 : value.trim()) return value.trim();
|
|
16130
|
+
}
|
|
16131
|
+
return "";
|
|
16132
|
+
};
|
|
16133
|
+
const resolveSearchType = (input) => {
|
|
16134
|
+
const explicitType = firstNonEmpty(input.pendingType);
|
|
16135
|
+
if (explicitType) return explicitType;
|
|
16136
|
+
if (input.isSearchPage) {
|
|
16137
|
+
const currentPageType = firstNonEmpty(input.currentPageType);
|
|
16138
|
+
if (currentPageType && currentPageType !== "commit") return currentPageType;
|
|
16139
|
+
}
|
|
16140
|
+
const qualifierType = firstNonEmpty(input.qualifierType);
|
|
16141
|
+
if (qualifierType) return qualifierType;
|
|
16142
|
+
if (input.scope === "repo") return "code";
|
|
16143
|
+
if (input.scope === "group" || input.scope === "user") return "repo";
|
|
16144
|
+
return input.defaultGlobalSearchType || "repo";
|
|
16145
|
+
};
|
|
16146
|
+
const hasSearchQueryValue = (url, key) => {
|
|
16147
|
+
var _a;
|
|
16148
|
+
return Boolean((_a = url.searchParams.get(key)) == null ? void 0 : _a.trim());
|
|
16149
|
+
};
|
|
16150
|
+
const hasExplicitSearchScope = (url) => {
|
|
16151
|
+
return SEARCH_SCOPE_QUERY_KEYS.some((key) => hasSearchQueryValue(url, key));
|
|
16152
|
+
};
|
|
16153
|
+
const serializeHotWordUrl = (url, original) => {
|
|
16154
|
+
const serializedPath = `${url.pathname}${url.search}${url.hash}`;
|
|
16155
|
+
if (original.startsWith("//")) return `//${url.host}${serializedPath}`;
|
|
16156
|
+
if (/^[a-z][a-z\d+.-]*:\/\//i.test(original)) return url.toString();
|
|
16157
|
+
return serializedPath;
|
|
16158
|
+
};
|
|
16159
|
+
const normalizeSearchHotWordUrl = (original, defaultGlobalSearchType, sourceModule = "search_box_hot_word") => {
|
|
16160
|
+
if (!original) return original;
|
|
16161
|
+
let url;
|
|
16162
|
+
try {
|
|
16163
|
+
url = new URL(original, "https://gitcode-layout.invalid");
|
|
16164
|
+
} catch {
|
|
16165
|
+
return original;
|
|
16166
|
+
}
|
|
16167
|
+
if (SEARCH_ROUTE_PATHS.has(url.pathname) && !hasSearchQueryValue(url, "type") && !hasExplicitSearchScope(url)) {
|
|
16168
|
+
url.searchParams.set("type", defaultGlobalSearchType);
|
|
16169
|
+
}
|
|
16170
|
+
if (sourceModule && !url.searchParams.has("source_module")) {
|
|
16171
|
+
url.searchParams.set("source_module", sourceModule);
|
|
16172
|
+
}
|
|
16173
|
+
return serializeHotWordUrl(url, original);
|
|
16174
|
+
};
|
|
16605
16175
|
const _hoisted_1$r = { class: "g-header-search-prefix" };
|
|
16606
16176
|
const _hoisted_2$l = ["innerHTML"];
|
|
16607
16177
|
const _hoisted_3$k = { class: "g-header-search-suffix-splitline" };
|
|
@@ -16618,21 +16188,22 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
16618
16188
|
props: {
|
|
16619
16189
|
inAIHub: { type: Boolean },
|
|
16620
16190
|
sceneValue: {},
|
|
16621
|
-
isShowStickyNotice: { type: Boolean }
|
|
16191
|
+
isShowStickyNotice: { type: Boolean },
|
|
16192
|
+
defaultGlobalSearchType: { default: "repo" }
|
|
16622
16193
|
},
|
|
16623
16194
|
setup(__props) {
|
|
16624
16195
|
const layoutConfig2 = useLayoutConfig();
|
|
16625
16196
|
const { t: $t } = i18n.global;
|
|
16626
|
-
const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-
|
|
16627
|
-
const UserSearch = defineAsyncComponent(() => import("./UserSearch-
|
|
16628
|
-
const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-
|
|
16629
|
-
const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-
|
|
16630
|
-
const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-
|
|
16631
|
-
const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-
|
|
16197
|
+
const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-BF6NwnUD.js"));
|
|
16198
|
+
const UserSearch = defineAsyncComponent(() => import("./UserSearch-B3OpNc8B.js"));
|
|
16199
|
+
const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-CbyaXQ9_.js"));
|
|
16200
|
+
const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-HPLScuap.js"));
|
|
16201
|
+
const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-MDfy39Wg.js"));
|
|
16202
|
+
const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-CfoABOec.js"));
|
|
16632
16203
|
const props = __props;
|
|
16633
|
-
const repoInfo = inject("repoInfo");
|
|
16634
|
-
const orgInfo = inject("orgInfo");
|
|
16635
|
-
const otherUserInfo = inject("otherUserInfo");
|
|
16204
|
+
const repoInfo = inject("repoInfo", computed(() => void 0));
|
|
16205
|
+
const orgInfo = inject("orgInfo", computed(() => void 0));
|
|
16206
|
+
const otherUserInfo = inject("otherUserInfo", computed(() => void 0));
|
|
16636
16207
|
const useReport2 = inject("useReport");
|
|
16637
16208
|
const searchInfo = computed(() => {
|
|
16638
16209
|
var _a, _b;
|
|
@@ -16673,7 +16244,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
16673
16244
|
const inputRef = ref(null);
|
|
16674
16245
|
const inputIng = ref(false);
|
|
16675
16246
|
const pendingType = ref("");
|
|
16676
|
-
const API = headRequest(inject("request"));
|
|
16247
|
+
const API = headRequest(inject("request", () => Promise.resolve({ data: {} })));
|
|
16677
16248
|
const searchHotWords = ref([]);
|
|
16678
16249
|
const activeSearchKey = ref(0);
|
|
16679
16250
|
const interval = ref(null);
|
|
@@ -16852,24 +16423,27 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
16852
16423
|
repoScopeList.push({
|
|
16853
16424
|
label: info.projectType === "user" ? $t("gitCodeLayout.header.user") : $t("gitCodeLayout.header.org"),
|
|
16854
16425
|
enLabel: info.projectType === "user" ? "user" : "group",
|
|
16426
|
+
type: "scope",
|
|
16855
16427
|
value: info.nameOrOrg
|
|
16856
16428
|
});
|
|
16857
16429
|
}
|
|
16858
16430
|
return repoScopeList;
|
|
16859
16431
|
}
|
|
16860
16432
|
case "group":
|
|
16861
|
-
return [{ label: cnScopeMap.group, enLabel: "group", value: info.searchScopeName }];
|
|
16433
|
+
return [{ label: cnScopeMap.group, enLabel: "group", type: "scope", value: info.searchScopeName }];
|
|
16862
16434
|
case "user":
|
|
16863
|
-
return [{ label: cnScopeMap.user, enLabel: "user", value: info.searchScopeName }];
|
|
16435
|
+
return [{ label: cnScopeMap.user, enLabel: "user", type: "scope", value: info.searchScopeName }];
|
|
16864
16436
|
}
|
|
16865
16437
|
}
|
|
16866
16438
|
return [];
|
|
16867
16439
|
});
|
|
16868
|
-
|
|
16440
|
+
const localSearchText = localStorage$2.getItem("localSearchText");
|
|
16441
|
+
let parsedSearchHistory = [];
|
|
16869
16442
|
if (localSearchText) {
|
|
16870
16443
|
try {
|
|
16871
|
-
|
|
16872
|
-
|
|
16444
|
+
const parsed = JSON.parse(localSearchText);
|
|
16445
|
+
parsedSearchHistory = (Array.isArray(parsed) ? parsed : []).filter(
|
|
16446
|
+
(ele) => typeof ele === "string" ? Boolean(ele) : Boolean(ele && typeof ele === "object" && "q" in ele && ele.q)
|
|
16873
16447
|
);
|
|
16874
16448
|
} catch (e) {
|
|
16875
16449
|
console.error(e);
|
|
@@ -16883,7 +16457,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
16883
16457
|
console.error(e);
|
|
16884
16458
|
}
|
|
16885
16459
|
}
|
|
16886
|
-
const searchHistoryList = ref(
|
|
16460
|
+
const searchHistoryList = ref(parsedSearchHistory);
|
|
16887
16461
|
const visitHistoryList = ref(localVistList || []);
|
|
16888
16462
|
const displayHistoryList = computed(() => searchHistoryList.value.slice(0, HISTORY_DISPLAY_COUNT));
|
|
16889
16463
|
const activeIndex = ref(-1);
|
|
@@ -16912,7 +16486,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
16912
16486
|
}
|
|
16913
16487
|
}
|
|
16914
16488
|
};
|
|
16915
|
-
const handleSuffixClick = (
|
|
16489
|
+
const handleSuffixClick = () => {
|
|
16916
16490
|
useReport2(REPO_EVENT.CLICK, { module_name: REPO_MODULE.SEARCH_SUFFIX_CLICK });
|
|
16917
16491
|
onSearch();
|
|
16918
16492
|
};
|
|
@@ -16924,6 +16498,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
16924
16498
|
const searchHistory = (data) => {
|
|
16925
16499
|
isSearchHistory.value = true;
|
|
16926
16500
|
isContextScopePrefill.value = false;
|
|
16501
|
+
pendingType.value = typeof data === "string" ? "repo" : (data == null ? void 0 : data.type) || "repo";
|
|
16927
16502
|
if (typeof data === "string") {
|
|
16928
16503
|
searchStr.value = data;
|
|
16929
16504
|
} else {
|
|
@@ -16931,21 +16506,16 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
16931
16506
|
}
|
|
16932
16507
|
onSearch();
|
|
16933
16508
|
};
|
|
16934
|
-
const resolveSearchType = (params) => {
|
|
16509
|
+
const resolveSearchType$1 = (params) => {
|
|
16935
16510
|
var _a;
|
|
16936
|
-
|
|
16937
|
-
|
|
16938
|
-
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
-
}
|
|
16945
|
-
if (params.scope === "repo") {
|
|
16946
|
-
return "code";
|
|
16947
|
-
}
|
|
16948
|
-
return "repo";
|
|
16511
|
+
return resolveSearchType({
|
|
16512
|
+
pendingType: pendingType.value,
|
|
16513
|
+
isSearchPage: isSearchPage.value,
|
|
16514
|
+
currentPageType: ((_a = route == null ? void 0 : route.query) == null ? void 0 : _a.type) ? String(route.query.type) : void 0,
|
|
16515
|
+
qualifierType: params.type,
|
|
16516
|
+
scope: params.scope,
|
|
16517
|
+
defaultGlobalSearchType: props.defaultGlobalSearchType
|
|
16518
|
+
});
|
|
16949
16519
|
};
|
|
16950
16520
|
const onSearch = () => {
|
|
16951
16521
|
var _a, _b;
|
|
@@ -16959,13 +16529,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
16959
16529
|
const scopeOnly = isContextScopePrefill.value && hasOnlyOrgOrRepoScope(params);
|
|
16960
16530
|
const targetHotWord = searchHotWords.value[activeSearchKey.value];
|
|
16961
16531
|
if ((!searchStr.value || scopeOnly) && (targetHotWord == null ? void 0 : targetHotWord.url) && !isSearchHistory.value) {
|
|
16962
|
-
|
|
16963
|
-
const urlObj = new URL(targetHotWord.url);
|
|
16964
|
-
if (urlObj.search.length > 1) {
|
|
16965
|
-
hotUrl = `${hotUrl}&source_module=search_box_hot_word`;
|
|
16966
|
-
} else {
|
|
16967
|
-
hotUrl = `${hotUrl}?source_module=search_box_hot_word`;
|
|
16968
|
-
}
|
|
16532
|
+
const hotUrl = normalizeSearchHotWordUrl(targetHotWord.url, props.defaultGlobalSearchType);
|
|
16969
16533
|
window.open(transformUrl(hotUrl), "_blank");
|
|
16970
16534
|
pendingType.value = "";
|
|
16971
16535
|
return;
|
|
@@ -16981,7 +16545,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
16981
16545
|
pendingType.value = "";
|
|
16982
16546
|
return;
|
|
16983
16547
|
}
|
|
16984
|
-
const type = resolveSearchType(params);
|
|
16548
|
+
const type = resolveSearchType$1(params);
|
|
16985
16549
|
pendingType.value = "";
|
|
16986
16550
|
const query = {
|
|
16987
16551
|
q: queryKey,
|
|
@@ -17062,10 +16626,12 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
17062
16626
|
}, 300);
|
|
17063
16627
|
};
|
|
17064
16628
|
const onInputClick = () => {
|
|
17065
|
-
|
|
16629
|
+
var _a;
|
|
16630
|
+
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
17066
16631
|
};
|
|
17067
16632
|
const onClearSearch = () => {
|
|
17068
|
-
|
|
16633
|
+
var _a;
|
|
16634
|
+
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
17069
16635
|
isContextScopePrefill.value = false;
|
|
17070
16636
|
searchStr.value = "";
|
|
17071
16637
|
isFocus.value = true;
|
|
@@ -17110,7 +16676,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
17110
16676
|
const getSearchHot = async () => {
|
|
17111
16677
|
try {
|
|
17112
16678
|
const res = await API.getSearchHot();
|
|
17113
|
-
searchHotWords.value = res == null ? void 0 : res.data;
|
|
16679
|
+
searchHotWords.value = Array.isArray(res == null ? void 0 : res.data) ? res.data : [];
|
|
17114
16680
|
} catch (error) {
|
|
17115
16681
|
searchHotWords.value = [];
|
|
17116
16682
|
}
|
|
@@ -17127,7 +16693,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
17127
16693
|
}
|
|
17128
16694
|
);
|
|
17129
16695
|
searchStr.value = initSearchStrFromQuery();
|
|
17130
|
-
const index2 = (_a = searchHotWords.value) == null ? void 0 : _a.findIndex((item) => item === searchStr.value);
|
|
16696
|
+
const index2 = (_a = searchHotWords.value) == null ? void 0 : _a.findIndex((item) => item.content === searchStr.value);
|
|
17131
16697
|
activeSearchKey.value = index2 === -1 ? 0 : index2;
|
|
17132
16698
|
document.addEventListener("keydown", function(event) {
|
|
17133
16699
|
if (event.key === "Escape") {
|
|
@@ -17137,9 +16703,10 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
17137
16703
|
});
|
|
17138
16704
|
});
|
|
17139
16705
|
const aiSearchType = computed(() => {
|
|
17140
|
-
|
|
16706
|
+
var _a, _b;
|
|
16707
|
+
if (((_a = repoInfo.value) == null ? void 0 : _a.repo_type) === repoTypeEnum.DATASET) {
|
|
17141
16708
|
return "dataset";
|
|
17142
|
-
} else if (repoInfo.repo_type === repoTypeEnum.MODEL) {
|
|
16709
|
+
} else if (((_b = repoInfo.value) == null ? void 0 : _b.repo_type) === repoTypeEnum.MODEL) {
|
|
17143
16710
|
return "model";
|
|
17144
16711
|
}
|
|
17145
16712
|
return "model";
|
|
@@ -17166,7 +16733,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
17166
16733
|
!_ctx.inAIHub ? (openBlock(), createElementBlock("div", {
|
|
17167
16734
|
key: 0,
|
|
17168
16735
|
class: normalizeClass([isFocus.value ? "focusSearch" : { "left-search": true }, Boolean(_ctx.isShowStickyNotice) ? "focusSearch-sticky-notice" : ""]),
|
|
17169
|
-
onClick: _cache[
|
|
16736
|
+
onClick: _cache[5] || (_cache[5] = withModifiers(() => {
|
|
17170
16737
|
}, ["stop"]))
|
|
17171
16738
|
}, [
|
|
17172
16739
|
withDirectives(createElementVNode("div", {
|
|
@@ -17202,11 +16769,11 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
17202
16769
|
searchStr: keyword.value,
|
|
17203
16770
|
searchInfo: derivedSearchInfo.value
|
|
17204
16771
|
}, null, 8, ["searchStr", "searchInfo"])) : createCommentVNode("", true),
|
|
17205
|
-
!derivedSearchInfo.value.searchScope ? renderSlot(_ctx.$slots, "globalSearch", normalizeProps(mergeProps({ key: 2 }, { searchStr: keyword.value, searchMore:
|
|
16772
|
+
!derivedSearchInfo.value.searchScope ? renderSlot(_ctx.$slots, "globalSearch", normalizeProps(mergeProps({ key: 2 }, { searchStr: keyword.value, searchMore: handleSearchMore })), () => [
|
|
17206
16773
|
!derivedSearchInfo.value.searchScope ? (openBlock(), createBlock(unref(GloabarSearch), {
|
|
17207
16774
|
key: 0,
|
|
17208
16775
|
searchStr: keyword.value,
|
|
17209
|
-
onSearchMore:
|
|
16776
|
+
onSearchMore: handleSearchMore
|
|
17210
16777
|
}, null, 8, ["searchStr"])) : createCommentVNode("", true)
|
|
17211
16778
|
], true) : createCommentVNode("", true)
|
|
17212
16779
|
], 512), [
|
|
@@ -17266,11 +16833,11 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
17266
16833
|
class: normalizeClass(["g-header-search-recommend-placeholder", { default: !isFocus.value, focus: isFocus.value, "recommend-hidden": !recommendHasRoom.value }]),
|
|
17267
16834
|
style: normalizeStyle(recommendOffset.value ? { left: `calc(44px + ${recommendOffset.value}px)`, width: `${recommendMaxWidth.value}px`, overflow: "hidden" } : void 0)
|
|
17268
16835
|
}, [
|
|
17269
|
-
_cache[
|
|
16836
|
+
_cache[7] || (_cache[7] = createElementVNode("div", { class: "g-header-search-recommend-flame" }, "🔥", -1)),
|
|
17270
16837
|
(openBlock(true), createElementBlock(Fragment, null, renderList(searchHotWords.value, (item, index2) => {
|
|
17271
16838
|
return openBlock(), createElementBlock("div", {
|
|
17272
16839
|
class: normalizeClass(["g-header-search-recommend-item", { fadeInUp: activeSearchKey.value === index2, fadeOutUp: activeSearchKey.value !== index2 }]),
|
|
17273
|
-
key: item
|
|
16840
|
+
key: `${item.content}-${index2}`
|
|
17274
16841
|
}, toDisplayString$1(item.content), 3);
|
|
17275
16842
|
}), 128))
|
|
17276
16843
|
], 6)) : withDirectives((openBlock(), createElementBlock("span", {
|
|
@@ -17321,7 +16888,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
17321
16888
|
placeholder: unref($t)("gitCodeLayout.home.searchPlaceholder"),
|
|
17322
16889
|
onKeydown: withKeys(searchResult, ["enter"]),
|
|
17323
16890
|
modelValue: searchStr.value,
|
|
17324
|
-
"onUpdate:modelValue": _cache[
|
|
16891
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => searchStr.value = $event)
|
|
17325
16892
|
}, {
|
|
17326
16893
|
prefix: withCtx(() => [
|
|
17327
16894
|
createVNode(GIcon, {
|
|
@@ -17924,7 +17491,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
17924
17491
|
type: "button",
|
|
17925
17492
|
"aria-label": unref(t2)("gitCodeLayout.atomCode.openAtomCodeMenu"),
|
|
17926
17493
|
"aria-haspopup": "menu",
|
|
17927
|
-
"aria-expanded":
|
|
17494
|
+
"aria-expanded": isOpen.value
|
|
17928
17495
|
}, _cache[1] || (_cache[1] = [
|
|
17929
17496
|
createElementVNode("svg", {
|
|
17930
17497
|
"data-lucide": "chevron-down",
|
|
@@ -17966,7 +17533,7 @@ const vElementExposure = {
|
|
|
17966
17533
|
beforeUnmount() {
|
|
17967
17534
|
}
|
|
17968
17535
|
};
|
|
17969
|
-
const NoticeModal = defineAsyncComponent(() => import("./notice-
|
|
17536
|
+
const NoticeModal = defineAsyncComponent(() => import("./notice-wiD3_kEI.js"));
|
|
17970
17537
|
function clearNotice() {
|
|
17971
17538
|
if (localStorage$2.getItem("validator_email")) {
|
|
17972
17539
|
localStorage$2.removeItem("validator_email");
|
|
@@ -18013,7 +17580,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18013
17580
|
},
|
|
18014
17581
|
__name: "index",
|
|
18015
17582
|
props: {
|
|
18016
|
-
sceneValue: { default: SceneValue.
|
|
17583
|
+
sceneValue: { default: SceneValue.home },
|
|
18017
17584
|
isLogin: { type: Boolean, default: false },
|
|
18018
17585
|
request: { type: Function, default: proxyService },
|
|
18019
17586
|
loginOutFinish: {},
|
|
@@ -18021,8 +17588,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18021
17588
|
globalStore: { default: () => ({
|
|
18022
17589
|
httpStatus: 200
|
|
18023
17590
|
}) },
|
|
18024
|
-
repoInfo: { default: () => ({}) },
|
|
18025
|
-
orgInfo: { default: () => ({}) },
|
|
17591
|
+
repoInfo: { default: () => ({ forked_by_secure_issue: null }) },
|
|
17592
|
+
orgInfo: { default: () => ({ avatar: "", name: "" }) },
|
|
18026
17593
|
otherUserInfo: { default: () => ({}) },
|
|
18027
17594
|
userInfo: { default: () => ({}) },
|
|
18028
17595
|
headerFunctions: {},
|
|
@@ -18031,7 +17598,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18031
17598
|
headerBorder: { type: Boolean, default: false },
|
|
18032
17599
|
independence: { type: Boolean, default: true },
|
|
18033
17600
|
userMenus: {},
|
|
18034
|
-
loginChildComponents: {},
|
|
17601
|
+
loginChildComponents: { default: void 0 },
|
|
18035
17602
|
bgConfig: { default: () => ({
|
|
18036
17603
|
index_head: "",
|
|
18037
17604
|
detail_top: "",
|
|
@@ -18048,7 +17615,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18048
17615
|
workspaceNavigate: {},
|
|
18049
17616
|
atomcodeLaunchQs: { default: "" },
|
|
18050
17617
|
showAtomCodeLauncher: { type: Boolean, default: false },
|
|
18051
|
-
launchAtomCode: { type: Function, default: void 0 }
|
|
17618
|
+
launchAtomCode: { type: Function, default: void 0 },
|
|
17619
|
+
defaultGlobalSearchType: { default: "repo" }
|
|
18052
17620
|
},
|
|
18053
17621
|
emits: ["followDevCommunity", "followUser", "resetPwdDirectlySuccess", "update:openCreateDropdown"],
|
|
18054
17622
|
setup(__props, { emit: __emit }) {
|
|
@@ -18246,24 +17814,26 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18246
17814
|
window.open(props.bgConfig.detail_top_url, "_blank");
|
|
18247
17815
|
}
|
|
18248
17816
|
};
|
|
18249
|
-
const handleStickyNoticeExpo = (
|
|
17817
|
+
const handleStickyNoticeExpo = () => {
|
|
18250
17818
|
useReport2(REPO_EVENT.SHOW, { module_name: ASIDE_MENU_REPO.STICKYNOTICEEXPO });
|
|
18251
17819
|
};
|
|
18252
17820
|
const handleHeaderClick = (e) => {
|
|
18253
17821
|
console.log("handleHeaderClick", e);
|
|
18254
|
-
|
|
17822
|
+
const target = e.target;
|
|
17823
|
+
if (!(target == null ? void 0 : target.classList.contains("allow-click-stop"))) {
|
|
18255
17824
|
return;
|
|
18256
17825
|
}
|
|
18257
17826
|
if (isIndexHead.value && props.bgConfig.index_head_url) {
|
|
18258
17827
|
window.open(props.bgConfig.index_head_url, "_blank");
|
|
18259
17828
|
}
|
|
18260
17829
|
};
|
|
18261
|
-
const handleToolbarExpo = (
|
|
17830
|
+
const handleToolbarExpo = () => {
|
|
18262
17831
|
useReport2(REPO_EVENT.SHOW, { module_name: ASIDE_MENU_REPO.TOOLBAREXPO });
|
|
18263
17832
|
};
|
|
18264
17833
|
const handleToolbarClick = (e) => {
|
|
18265
17834
|
useReport2(REPO_EVENT.CLICK, { module_name: ASIDE_MENU_REPO.TOOLBAR });
|
|
18266
|
-
|
|
17835
|
+
const target = e.target;
|
|
17836
|
+
if (!(target == null ? void 0 : target.classList.contains("allow-click-stop"))) {
|
|
18267
17837
|
return;
|
|
18268
17838
|
}
|
|
18269
17839
|
if (isShowStickyNotice.value && props.bgConfig.detail_toolbar_url) {
|
|
@@ -18276,13 +17846,6 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18276
17846
|
childComponents: props == null ? void 0 : props.loginChildComponents
|
|
18277
17847
|
};
|
|
18278
17848
|
};
|
|
18279
|
-
computed(() => {
|
|
18280
|
-
const urlParams = new URLSearchParams(window.location.search);
|
|
18281
|
-
const isLogin = urlParams.get("isLogin");
|
|
18282
|
-
const fromId = urlParams.get("from_id");
|
|
18283
|
-
const webId = urlParams.get("web_id");
|
|
18284
|
-
return isLogin === "1" && fromId && webId;
|
|
18285
|
-
});
|
|
18286
17849
|
const isQuickAppLoginReportParams = computed(() => {
|
|
18287
17850
|
return api.get("isRegister") && api.get("success") && api.get("registerLoginMethod");
|
|
18288
17851
|
});
|
|
@@ -18382,10 +17945,17 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18382
17945
|
var _a2, _b, _c, _d, _e, _f;
|
|
18383
17946
|
const action = HandleParentWindowGetLoginInfo(props.request);
|
|
18384
17947
|
if (((_a2 = event == null ? void 0 : event.data) == null ? void 0 : _a2.type) === "main_report") {
|
|
18385
|
-
collectRegisterLoginEvent({
|
|
17948
|
+
collectRegisterLoginEvent({
|
|
17949
|
+
isRegister: (_b = event.data.report) == null ? void 0 : _b.isRegister,
|
|
17950
|
+
registerLoginMethod: (_c = event.data.report) == null ? void 0 : _c.registerLoginMethod,
|
|
17951
|
+
success: (_d = event.data.report) == null ? void 0 : _d.success,
|
|
17952
|
+
extraData: {}
|
|
17953
|
+
});
|
|
18386
17954
|
}
|
|
18387
|
-
if (
|
|
18388
|
-
action[
|
|
17955
|
+
if (((_e = event.data) == null ? void 0 : _e.type) === AuthResType.SUCCESS) {
|
|
17956
|
+
action[AuthResType.SUCCESS](event);
|
|
17957
|
+
} else if (((_f = event.data) == null ? void 0 : _f.type) === AuthResType.FAIL) {
|
|
17958
|
+
action[AuthResType.FAIL](event);
|
|
18389
17959
|
}
|
|
18390
17960
|
});
|
|
18391
17961
|
});
|
|
@@ -18440,7 +18010,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18440
18010
|
onClick: withModifiers(handleCloseStickyNotice, ["stop"])
|
|
18441
18011
|
})
|
|
18442
18012
|
], 4)), [
|
|
18443
|
-
[unref(vElementExposure), { trigger: (
|
|
18013
|
+
[unref(vElementExposure), { trigger: () => handleStickyNoticeExpo() }]
|
|
18444
18014
|
]) : createCommentVNode("", true),
|
|
18445
18015
|
createVNode(SiteAnnouncement),
|
|
18446
18016
|
withDirectives((openBlock(), createElementBlock("div", {
|
|
@@ -18506,16 +18076,24 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18506
18076
|
inAIHub: inAIHub.value,
|
|
18507
18077
|
key: _ctx.$route.fullPath,
|
|
18508
18078
|
sceneValue: _ctx.sceneValue,
|
|
18509
|
-
isShowStickyNotice: isShowStickyNoticeByClose.value
|
|
18510
|
-
|
|
18511
|
-
|
|
18512
|
-
|
|
18513
|
-
|
|
18514
|
-
|
|
18515
|
-
|
|
18516
|
-
|
|
18517
|
-
|
|
18518
|
-
|
|
18079
|
+
isShowStickyNotice: isShowStickyNoticeByClose.value,
|
|
18080
|
+
defaultGlobalSearchType: props.defaultGlobalSearchType
|
|
18081
|
+
}, createSlots({ _: 2 }, [
|
|
18082
|
+
_ctx.$slots.searchRecommend ? {
|
|
18083
|
+
name: "searchRecommend",
|
|
18084
|
+
fn: withCtx(() => [
|
|
18085
|
+
renderSlot(_ctx.$slots, "searchRecommend", {}, void 0, true)
|
|
18086
|
+
]),
|
|
18087
|
+
key: "0"
|
|
18088
|
+
} : void 0,
|
|
18089
|
+
_ctx.$slots.globalSearch ? {
|
|
18090
|
+
name: "globalSearch",
|
|
18091
|
+
fn: withCtx(({ searchStr, searchMore }) => [
|
|
18092
|
+
renderSlot(_ctx.$slots, "globalSearch", normalizeProps(guardReactiveProps({ searchStr, searchMore })), void 0, true)
|
|
18093
|
+
]),
|
|
18094
|
+
key: "1"
|
|
18095
|
+
} : void 0
|
|
18096
|
+
]), 1032, ["inAIHub", "sceneValue", "isShowStickyNotice", "defaultGlobalSearchType"]))
|
|
18519
18097
|
], true) : createCommentVNode("", true)
|
|
18520
18098
|
])) : createCommentVNode("", true),
|
|
18521
18099
|
createElementVNode("div", {
|
|
@@ -18594,7 +18172,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18594
18172
|
], 64))
|
|
18595
18173
|
], 2)
|
|
18596
18174
|
])), [
|
|
18597
|
-
[unref(vElementExposure), { trigger: (
|
|
18175
|
+
[unref(vElementExposure), { trigger: () => handleToolbarExpo() }]
|
|
18598
18176
|
]),
|
|
18599
18177
|
_ctx.$slots.info || _ctx.$slots.menu || _ctx.$slots.bodyHeader ? (openBlock(), createElementBlock("div", _hoisted_5$7, [
|
|
18600
18178
|
renderSlot(_ctx.$slots, "bodyHeader", {}, () => [
|
|
@@ -18615,45 +18193,6 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18615
18193
|
}
|
|
18616
18194
|
});
|
|
18617
18195
|
const GitCodeHeader = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
18618
|
-
const createSetting = () => {
|
|
18619
|
-
const { t: t2 } = i18n.global;
|
|
18620
|
-
const isGitCodeHost2 = typeof window !== "undefined" && window.location.hostname.includes("gitcode");
|
|
18621
|
-
const settings = {
|
|
18622
|
-
slogan: t2("gitCodeLayout.home.slogon"),
|
|
18623
|
-
copyright: {
|
|
18624
|
-
digest: (/* @__PURE__ */ new Date()).getFullYear() + " " + t2("gitCodeLayout.home.digest"),
|
|
18625
|
-
digestAbbr: (/* @__PURE__ */ new Date()).getFullYear() + " " + t2("gitCodeLayout.home.companyInformation"),
|
|
18626
|
-
icp: t2("gitCodeLayout.home.recordInformation"),
|
|
18627
|
-
beian: "11010502055713",
|
|
18628
|
-
phone: "400-6868-951",
|
|
18629
|
-
serviceTime: "9:00-18:00",
|
|
18630
|
-
publicSecurity: t2("gitCodeLayout.common.publicSecurity"),
|
|
18631
|
-
publicSecurity_url: "https://beian.mps.gov.cn/#/query/webSearch?code=11010502055713",
|
|
18632
|
-
aboutUs: t2("gitCodeLayout.common.aboutUs"),
|
|
18633
|
-
recruitment: t2("gitCodeLayout.common.recruitment"),
|
|
18634
|
-
price: t2("gitCodeLayout.common.prices"),
|
|
18635
|
-
beian_url: "https://www.zhipin.com/gongsi/job/b1eccc6dba1cc0d41Hd60tW0GVc~.html?ka=company-jobs"
|
|
18636
|
-
}
|
|
18637
|
-
};
|
|
18638
|
-
if (!isGitCodeHost2) {
|
|
18639
|
-
settings.slogan = "";
|
|
18640
|
-
settings.copyright = {
|
|
18641
|
-
digest: (/* @__PURE__ */ new Date()).getFullYear() + " " + t2("gitCodeLayout.home.copyright_atomgit.digest"),
|
|
18642
|
-
digestAbbr: (/* @__PURE__ */ new Date()).getFullYear() + " " + t2("gitCodeLayout.home.copyright_atomgit.companyInformation"),
|
|
18643
|
-
icp: t2("gitCodeLayout.home.copyright_atomgit.recordInformation"),
|
|
18644
|
-
beian: "11010502058321",
|
|
18645
|
-
phone: "400-6868-951",
|
|
18646
|
-
serviceTime: "9:00-18:00",
|
|
18647
|
-
publicSecurity: t2("gitCodeLayout.home.copyright_atomgit.publicSecurity"),
|
|
18648
|
-
publicSecurity_url: "https://beian.mps.gov.cn/#/query/webSearch?code=11010502058321",
|
|
18649
|
-
aboutUs: t2("gitCodeLayout.common.aboutUs"),
|
|
18650
|
-
recruitment: t2("gitCodeLayout.common.recruitment"),
|
|
18651
|
-
price: t2("gitCodeLayout.common.prices"),
|
|
18652
|
-
beian_url: "https://www.zhipin.com/gongsi/job/b1eccc6dba1cc0d41Hd60tW0GVc~.html?ka=company-jobs"
|
|
18653
|
-
};
|
|
18654
|
-
}
|
|
18655
|
-
return settings;
|
|
18656
|
-
};
|
|
18657
18196
|
const _hoisted_1$m = { class: "tools-item-wrapper" };
|
|
18658
18197
|
const _hoisted_2$g = { class: "tools-item-wrapper-checkbox" };
|
|
18659
18198
|
const _hoisted_3$f = ["onClick", "title"];
|
|
@@ -19217,6 +18756,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
19217
18756
|
const injectGlobalStore = inject("globalStore", props.globalStore);
|
|
19218
18757
|
const { useReport: useReport2 } = useRequestReport(injectRequest, injectGlobalStore);
|
|
19219
18758
|
const API = asideV2Request(injectRequest);
|
|
18759
|
+
function unwrapRequestData(response) {
|
|
18760
|
+
const data = response.data;
|
|
18761
|
+
if (data && typeof data === "object" && "data" in data) {
|
|
18762
|
+
return data.data;
|
|
18763
|
+
}
|
|
18764
|
+
return data;
|
|
18765
|
+
}
|
|
19220
18766
|
const isEn = computed(() => getLocaleLang() === LANG_EN);
|
|
19221
18767
|
const showThemeSetting = computed(() => {
|
|
19222
18768
|
if (props.showThemeSetting !== void 0) return props.showThemeSetting;
|
|
@@ -19228,13 +18774,6 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
19228
18774
|
});
|
|
19229
18775
|
const isDarkTheme = computed(() => currentTheme.value === "black");
|
|
19230
18776
|
const newTagSrc = computed(() => isDarkTheme.value ? newTagDarkImg : newTagImg);
|
|
19231
|
-
const copyright = computed(() => createSetting().copyright);
|
|
19232
|
-
computed(() => `© ${(/* @__PURE__ */ new Date()).getFullYear()} ${t2("gitCodeLayout.home.companyInformationAtomgit")}`);
|
|
19233
|
-
computed(() => `https://beian.mps.gov.cn/#/query/webSearch?code=${copyright.value.beian}`);
|
|
19234
|
-
computed(() => transformUrl("https://docs.gitcode.com/docs/help/home/aboutus/"));
|
|
19235
|
-
computed(
|
|
19236
|
-
() => copyright.value.beian_url || "https://www.zhipin.com/gongsi/job/b1eccc6dba1cc0d41Hd60tW0GVc~.html?ka=company-jobs"
|
|
19237
|
-
);
|
|
19238
18777
|
const siteShortcutLinks = computed(() => [
|
|
19239
18778
|
{
|
|
19240
18779
|
name: t2("gitCodeLayout.home.informationCenter"),
|
|
@@ -19356,7 +18895,6 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
19356
18895
|
return channelsList.value;
|
|
19357
18896
|
});
|
|
19358
18897
|
async function fetchChannelsData() {
|
|
19359
|
-
var _a, _b;
|
|
19360
18898
|
if (props.channels && props.channels.length > 0) return;
|
|
19361
18899
|
loading.value = true;
|
|
19362
18900
|
try {
|
|
@@ -19364,8 +18902,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
19364
18902
|
API.homeFirstChannel(),
|
|
19365
18903
|
API.getPromoSlot()
|
|
19366
18904
|
]);
|
|
19367
|
-
const rawChannels = (
|
|
19368
|
-
const promoBlocks = (
|
|
18905
|
+
const rawChannels = unwrapRequestData(channelsRes) || [];
|
|
18906
|
+
const promoBlocks = unwrapRequestData(promoRes) || [];
|
|
19369
18907
|
const merged = mergeChannelsWithRecommendBlocks(rawChannels, promoBlocks);
|
|
19370
18908
|
localChannels.value = merged;
|
|
19371
18909
|
} catch (err) {
|
|
@@ -19613,10 +19151,6 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
19613
19151
|
computed(() => props.userInfo)
|
|
19614
19152
|
);
|
|
19615
19153
|
provide("useReport", useReport2);
|
|
19616
|
-
computed(() => {
|
|
19617
|
-
if (route.meta.showBgColor) return true;
|
|
19618
|
-
return false;
|
|
19619
|
-
});
|
|
19620
19154
|
const logoConfig = getCurrentLogoMap();
|
|
19621
19155
|
const logoStyle = computed(() => {
|
|
19622
19156
|
const isBlackTheme = currentTheme.value === "black";
|
|
@@ -19812,10 +19346,11 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
19812
19346
|
headerBorder: { type: Boolean, default: false },
|
|
19813
19347
|
independence: { type: Boolean, default: false },
|
|
19814
19348
|
userMenus: {},
|
|
19815
|
-
loginChildComponents: {},
|
|
19349
|
+
loginChildComponents: { default: void 0 },
|
|
19816
19350
|
atomcodeLaunchQs: { default: "" },
|
|
19817
19351
|
showAtomCodeLauncher: { type: Boolean, default: false },
|
|
19818
|
-
launchAtomCode: { type: Function, default: void 0 }
|
|
19352
|
+
launchAtomCode: { type: Function, default: void 0 },
|
|
19353
|
+
defaultGlobalSearchType: { default: "repo" }
|
|
19819
19354
|
},
|
|
19820
19355
|
emits: ["followDevCommunity", "followUser", "resetPwdDirectlySuccess"],
|
|
19821
19356
|
setup(__props, { emit: __emit }) {
|
|
@@ -19980,8 +19515,10 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
19980
19515
|
window.addEventListener("message", (event) => {
|
|
19981
19516
|
var _a2, _b;
|
|
19982
19517
|
const action = HandleParentWindowGetLoginInfo(props.request);
|
|
19983
|
-
if (
|
|
19984
|
-
action[
|
|
19518
|
+
if (((_a2 = event.data) == null ? void 0 : _a2.type) === AuthResType.SUCCESS) {
|
|
19519
|
+
action[AuthResType.SUCCESS](event);
|
|
19520
|
+
} else if (((_b = event.data) == null ? void 0 : _b.type) === AuthResType.FAIL) {
|
|
19521
|
+
action[AuthResType.FAIL](event);
|
|
19985
19522
|
}
|
|
19986
19523
|
});
|
|
19987
19524
|
});
|
|
@@ -20033,16 +19570,24 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
20033
19570
|
inAIHub: false,
|
|
20034
19571
|
key: _ctx.$route.fullPath,
|
|
20035
19572
|
sceneValue: unref(SceneValue).home,
|
|
20036
|
-
isShowStickyNotice: false
|
|
20037
|
-
|
|
20038
|
-
|
|
20039
|
-
|
|
20040
|
-
|
|
20041
|
-
|
|
20042
|
-
|
|
20043
|
-
|
|
20044
|
-
|
|
20045
|
-
|
|
19573
|
+
isShowStickyNotice: false,
|
|
19574
|
+
defaultGlobalSearchType: _ctx.defaultGlobalSearchType
|
|
19575
|
+
}, createSlots({ _: 2 }, [
|
|
19576
|
+
_ctx.$slots.searchRecommend ? {
|
|
19577
|
+
name: "searchRecommend",
|
|
19578
|
+
fn: withCtx(() => [
|
|
19579
|
+
renderSlot(_ctx.$slots, "searchRecommend", {}, void 0, true)
|
|
19580
|
+
]),
|
|
19581
|
+
key: "0"
|
|
19582
|
+
} : void 0,
|
|
19583
|
+
_ctx.$slots.globalSearch ? {
|
|
19584
|
+
name: "globalSearch",
|
|
19585
|
+
fn: withCtx(({ searchStr, searchMore }) => [
|
|
19586
|
+
renderSlot(_ctx.$slots, "globalSearch", normalizeProps(guardReactiveProps({ searchStr, searchMore })), void 0, true)
|
|
19587
|
+
]),
|
|
19588
|
+
key: "1"
|
|
19589
|
+
} : void 0
|
|
19590
|
+
]), 1032, ["sceneValue", "defaultGlobalSearchType"]))
|
|
20046
19591
|
], true) : createCommentVNode("", true)
|
|
20047
19592
|
]),
|
|
20048
19593
|
createElementVNode("div", _hoisted_7$3, [
|
|
@@ -20100,7 +19645,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
20100
19645
|
color: "var(--theme-light-text)",
|
|
20101
19646
|
class: "btn-add-icon"
|
|
20102
19647
|
}),
|
|
20103
|
-
createTextVNode(toDisplayString$1(unref(t2)("gitCodeLayout.header.
|
|
19648
|
+
createTextVNode(toDisplayString$1(unref(t2)("gitCodeLayout.header.create")), 1)
|
|
20104
19649
|
]),
|
|
20105
19650
|
_: 1
|
|
20106
19651
|
})) : createCommentVNode("", true),
|
|
@@ -20375,9 +19920,9 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
20375
19920
|
const layoutConfig2 = useLayoutConfig();
|
|
20376
19921
|
const { t: t2 } = i18n.global;
|
|
20377
19922
|
const route = useRoute();
|
|
20378
|
-
const MenuItem = defineAsyncComponent(() => import("./MenuItem-
|
|
20379
|
-
const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-
|
|
20380
|
-
const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList
|
|
19923
|
+
const MenuItem = defineAsyncComponent(() => import("./MenuItem-CpNGRzXl.js"));
|
|
19924
|
+
const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-BWAcoaLB.js"));
|
|
19925
|
+
const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-i-DG-Lp_.js"));
|
|
20381
19926
|
const props = __props;
|
|
20382
19927
|
const useReport2 = inject("useReport");
|
|
20383
19928
|
const userInfo = inject("userInfo");
|
|
@@ -20496,7 +20041,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
20496
20041
|
};
|
|
20497
20042
|
const defaultProject = ref({ loading: true });
|
|
20498
20043
|
const defaultOrg = ref({});
|
|
20499
|
-
const defaultEnterprise = ref({});
|
|
20044
|
+
const defaultEnterprise = ref({ loading: true });
|
|
20500
20045
|
const getOrgProject = async () => {
|
|
20501
20046
|
if (props.isLogin) {
|
|
20502
20047
|
defaultOrg.value = {
|
|
@@ -20748,6 +20293,45 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
20748
20293
|
}
|
|
20749
20294
|
});
|
|
20750
20295
|
const SubMenuList = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
20296
|
+
const createSetting = () => {
|
|
20297
|
+
const { t: t2 } = i18n.global;
|
|
20298
|
+
const isGitCodeHost2 = typeof window !== "undefined" && window.location.hostname.includes("gitcode");
|
|
20299
|
+
const settings = {
|
|
20300
|
+
slogan: t2("gitCodeLayout.home.slogon"),
|
|
20301
|
+
copyright: {
|
|
20302
|
+
digest: (/* @__PURE__ */ new Date()).getFullYear() + " " + t2("gitCodeLayout.home.digest"),
|
|
20303
|
+
digestAbbr: (/* @__PURE__ */ new Date()).getFullYear() + " " + t2("gitCodeLayout.home.companyInformation"),
|
|
20304
|
+
icp: t2("gitCodeLayout.home.recordInformation"),
|
|
20305
|
+
beian: "11010502055713",
|
|
20306
|
+
phone: "400-6868-951",
|
|
20307
|
+
serviceTime: "9:00-18:00",
|
|
20308
|
+
publicSecurity: t2("gitCodeLayout.common.publicSecurity"),
|
|
20309
|
+
publicSecurity_url: "https://beian.mps.gov.cn/#/query/webSearch?code=11010502055713",
|
|
20310
|
+
aboutUs: t2("gitCodeLayout.common.aboutUs"),
|
|
20311
|
+
recruitment: t2("gitCodeLayout.common.recruitment"),
|
|
20312
|
+
price: t2("gitCodeLayout.common.prices"),
|
|
20313
|
+
beian_url: "https://www.zhipin.com/gongsi/job/b1eccc6dba1cc0d41Hd60tW0GVc~.html?ka=company-jobs"
|
|
20314
|
+
}
|
|
20315
|
+
};
|
|
20316
|
+
if (!isGitCodeHost2) {
|
|
20317
|
+
settings.slogan = "";
|
|
20318
|
+
settings.copyright = {
|
|
20319
|
+
digest: (/* @__PURE__ */ new Date()).getFullYear() + " " + t2("gitCodeLayout.home.copyright_atomgit.digest"),
|
|
20320
|
+
digestAbbr: (/* @__PURE__ */ new Date()).getFullYear() + " " + t2("gitCodeLayout.home.copyright_atomgit.companyInformation"),
|
|
20321
|
+
icp: t2("gitCodeLayout.home.copyright_atomgit.recordInformation"),
|
|
20322
|
+
beian: "11010502058321",
|
|
20323
|
+
phone: "400-6868-951",
|
|
20324
|
+
serviceTime: "9:00-18:00",
|
|
20325
|
+
publicSecurity: t2("gitCodeLayout.home.copyright_atomgit.publicSecurity"),
|
|
20326
|
+
publicSecurity_url: "https://beian.mps.gov.cn/#/query/webSearch?code=11010502058321",
|
|
20327
|
+
aboutUs: t2("gitCodeLayout.common.aboutUs"),
|
|
20328
|
+
recruitment: t2("gitCodeLayout.common.recruitment"),
|
|
20329
|
+
price: t2("gitCodeLayout.common.prices"),
|
|
20330
|
+
beian_url: "https://www.zhipin.com/gongsi/job/b1eccc6dba1cc0d41Hd60tW0GVc~.html?ka=company-jobs"
|
|
20331
|
+
};
|
|
20332
|
+
}
|
|
20333
|
+
return settings;
|
|
20334
|
+
};
|
|
20751
20335
|
const _hoisted_1$f = { class: "aside-footer" };
|
|
20752
20336
|
const _hoisted_2$a = { class: "remake-message" };
|
|
20753
20337
|
const _hoisted_3$a = ["title"];
|
|
@@ -20869,7 +20453,6 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
20869
20453
|
},
|
|
20870
20454
|
setup(__props) {
|
|
20871
20455
|
const layoutConfig2 = useLayoutConfig();
|
|
20872
|
-
const userInfo = inject("userInfo");
|
|
20873
20456
|
const globalStore = inject("globalStore");
|
|
20874
20457
|
const route = useRoute();
|
|
20875
20458
|
const serverList = ref([]);
|
|
@@ -20919,7 +20502,6 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
20919
20502
|
const isModuleVisible = (auth) => {
|
|
20920
20503
|
return visibleItems.value.includes(auth);
|
|
20921
20504
|
};
|
|
20922
|
-
computed(() => (userInfo == null ? void 0 : userInfo.username) || JSON.parse(localStorage$2.getItem("userInfo") || "{}").username);
|
|
20923
20505
|
const showPreferencesSetting = computed(() => {
|
|
20924
20506
|
if (props.showPreferencesSetting !== void 0) return props.showPreferencesSetting;
|
|
20925
20507
|
return (route == null ? void 0 : route.name) !== AICopilot_ROUTE_NAME && isModuleVisible(AsideDisplayItem.PREFERENCE);
|
|
@@ -21126,10 +20708,6 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
21126
20708
|
computed(() => props.userInfo)
|
|
21127
20709
|
);
|
|
21128
20710
|
provide("useReport", useReport2);
|
|
21129
|
-
computed(() => {
|
|
21130
|
-
if (route.meta.showBgColor) return true;
|
|
21131
|
-
return false;
|
|
21132
|
-
});
|
|
21133
20711
|
const logoConfig = getCurrentLogoMap();
|
|
21134
20712
|
const logoStyle = computed(() => {
|
|
21135
20713
|
const isBlackTheme = currentTheme.value === "black";
|
|
@@ -21998,7 +21576,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
21998
21576
|
const isLogin = ref(false);
|
|
21999
21577
|
const userInfo = ref({});
|
|
22000
21578
|
const repoInfo = ref({});
|
|
22001
|
-
const orgInfo = ref({});
|
|
21579
|
+
const orgInfo = ref({ avatar: "", name: "" });
|
|
22002
21580
|
const otherUserInfo = ref({});
|
|
22003
21581
|
const enterpriseInfo = ref(enterpriseInfoData);
|
|
22004
21582
|
const headerCustomProps = ref(headerCustomPropsData);
|
|
@@ -22291,12 +21869,13 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
22291
21869
|
return (_ctx, _cache) => {
|
|
22292
21870
|
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
22293
21871
|
createVNode(_sfc_main, {
|
|
21872
|
+
isLogin: isLogin.value,
|
|
22294
21873
|
request: unref(proxyService),
|
|
22295
21874
|
loginSuccess,
|
|
22296
21875
|
loginOutFinish,
|
|
22297
21876
|
openHarmonyGuide: true,
|
|
22298
21877
|
globalStore: globalStore.value
|
|
22299
|
-
}, null, 8, ["request", "globalStore"]),
|
|
21878
|
+
}, null, 8, ["isLogin", "request", "globalStore"]),
|
|
22300
21879
|
createElementVNode("button", { onClick: login }, "Login")
|
|
22301
21880
|
]);
|
|
22302
21881
|
};
|
|
@@ -22749,12 +22328,12 @@ async function successResolve(params, API, isRegister = false) {
|
|
|
22749
22328
|
const { path, userInfo, type, loginMethod } = params;
|
|
22750
22329
|
const transformUserInfo = {
|
|
22751
22330
|
...userInfo,
|
|
22752
|
-
avatar: transformUrl(userInfo == null ? void 0 : userInfo.avatar)
|
|
22331
|
+
avatar: transformUrl((userInfo == null ? void 0 : userInfo.avatar) || "")
|
|
22753
22332
|
};
|
|
22754
22333
|
if (userInfo) {
|
|
22755
22334
|
emitEvent("updateUserInfo", transformUserInfo);
|
|
22756
22335
|
const { username, email } = transformUserInfo;
|
|
22757
|
-
setEmailValid(username, email);
|
|
22336
|
+
setEmailValid(username || "", email || "");
|
|
22758
22337
|
}
|
|
22759
22338
|
saveLastLoginType(loginMethod);
|
|
22760
22339
|
removeLoginTriggerSourceCookie();
|
|
@@ -22847,7 +22426,7 @@ function defaultBackResolve(url) {
|
|
|
22847
22426
|
const HandleParentWindowGetLoginInfo = (request) => {
|
|
22848
22427
|
const API = headRequest(request);
|
|
22849
22428
|
return {
|
|
22850
|
-
[AuthResType.SUCCESS]: (
|
|
22429
|
+
[AuthResType.SUCCESS]: (_event) => {
|
|
22851
22430
|
const { unMount, isMounted } = usePopup();
|
|
22852
22431
|
if (isMounted()) {
|
|
22853
22432
|
unMount();
|
|
@@ -23155,13 +22734,17 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
23155
22734
|
},
|
|
23156
22735
|
emits: ["change", "selectChange", "update:modelValue"],
|
|
23157
22736
|
setup(__props, { emit: __emit }) {
|
|
23158
|
-
const
|
|
22737
|
+
const request = inject("request") || (() => Promise.resolve({ data: [] }));
|
|
22738
|
+
const API = headRequest(request);
|
|
23159
22739
|
const props = __props;
|
|
23160
22740
|
const emits = __emit;
|
|
23161
22741
|
const cache_countdown = JSON.parse(localStorage$2.getItem("cache_countdown"));
|
|
23162
22742
|
const { vModels } = useModel(props, emits);
|
|
23163
22743
|
const country = ref((cache_countdown == null ? void 0 : cache_countdown.country) || DEFAULT_COUNTRY);
|
|
23164
22744
|
const options = ref([]);
|
|
22745
|
+
const forwardedProps = computed(() => Object.fromEntries(
|
|
22746
|
+
Object.entries(props).filter(([key]) => !["modelValue", "placeholder", "onUpdate:modelValue"].includes(key))
|
|
22747
|
+
));
|
|
23165
22748
|
const handleChange = () => {
|
|
23166
22749
|
emits("change");
|
|
23167
22750
|
};
|
|
@@ -23249,7 +22832,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
23249
22832
|
createVNode(unref(EditableSelect), mergeProps({
|
|
23250
22833
|
modelValue: unref(vModels),
|
|
23251
22834
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(vModels) ? vModels.value = $event : null)
|
|
23252
|
-
},
|
|
22835
|
+
}, forwardedProps.value, {
|
|
23253
22836
|
size: "lg",
|
|
23254
22837
|
width: 342,
|
|
23255
22838
|
options: loginMobileList.value,
|
|
@@ -23274,8 +22857,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
23274
22857
|
key: 1,
|
|
23275
22858
|
modelValue: unref(vModels),
|
|
23276
22859
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(vModels) ? vModels.value = $event : null)
|
|
23277
|
-
},
|
|
23278
|
-
placeholder:
|
|
22860
|
+
}, forwardedProps.value, {
|
|
22861
|
+
placeholder: props.placeholder,
|
|
23279
22862
|
onChange: handleChange
|
|
23280
22863
|
}), {
|
|
23281
22864
|
prepend: withCtx(() => [
|
|
@@ -23353,11 +22936,11 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
23353
22936
|
size: { default: "lg" },
|
|
23354
22937
|
labelSize: { default: "sm" },
|
|
23355
22938
|
labelAlign: { default: "start" },
|
|
23356
|
-
errors: { default: {
|
|
22939
|
+
errors: { default: () => ({
|
|
23357
22940
|
msgError: false
|
|
23358
|
-
} },
|
|
22941
|
+
}) },
|
|
23359
22942
|
isForget: { type: Boolean, default: false },
|
|
23360
|
-
formErrors: { default: {} }
|
|
22943
|
+
formErrors: { default: () => ({}) }
|
|
23361
22944
|
},
|
|
23362
22945
|
emits: ["change", "countDown", "complete"],
|
|
23363
22946
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -23695,7 +23278,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
23695
23278
|
_: 2
|
|
23696
23279
|
}, 1032, ["content", "disabled"]),
|
|
23697
23280
|
createElementVNode("div", _hoisted_5$2, [
|
|
23698
|
-
checkIsRecentLogin(icon.loginMethodList) ? (openBlock(), createElementBlock("img", {
|
|
23281
|
+
checkIsRecentLogin(icon.loginMethodList || []) ? (openBlock(), createElementBlock("img", {
|
|
23699
23282
|
key: 0,
|
|
23700
23283
|
src: unref(recentLoginImg),
|
|
23701
23284
|
class: "recent-login-img__icon"
|
|
@@ -26436,8 +26019,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
26436
26019
|
return !coverCode.value || ((_a = coverCode.value) == null ? void 0 : _a.length) !== 10;
|
|
26437
26020
|
});
|
|
26438
26021
|
const activeInputIndex = ref(0);
|
|
26439
|
-
const inputChange = (
|
|
26440
|
-
if (!
|
|
26022
|
+
const inputChange = (event, index2) => {
|
|
26023
|
+
if (!event) return;
|
|
26441
26024
|
activeInputIndex.value = index2 + 1;
|
|
26442
26025
|
if (activeInputIndex.value >= inputList.value.length) {
|
|
26443
26026
|
activeInputIndex.value = inputList.value.length - 1;
|
|
@@ -26445,14 +26028,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
26445
26028
|
focusInput();
|
|
26446
26029
|
};
|
|
26447
26030
|
const currentInputValue = ref("");
|
|
26448
|
-
const keyDown = (
|
|
26031
|
+
const keyDown = (_event, index2) => {
|
|
26449
26032
|
var _a;
|
|
26450
|
-
currentInputValue.value = (_a = inputList.value[index2]) == null ? void 0 : _a.value;
|
|
26033
|
+
currentInputValue.value = ((_a = inputList.value[index2]) == null ? void 0 : _a.value) || "";
|
|
26451
26034
|
};
|
|
26452
|
-
const keyUp = (
|
|
26035
|
+
const keyUp = (event, index2) => {
|
|
26453
26036
|
activeInputIndex.value = index2;
|
|
26454
|
-
if (
|
|
26455
|
-
if (
|
|
26037
|
+
if (event.key === "Tab") return;
|
|
26038
|
+
if (event.key === "Backspace") {
|
|
26456
26039
|
inputList.value[activeInputIndex.value] && (inputList.value[activeInputIndex.value].value = "");
|
|
26457
26040
|
if (!currentInputValue.value) {
|
|
26458
26041
|
activeInputIndex.value--;
|
|
@@ -26466,8 +26049,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
26466
26049
|
dom && dom.focus();
|
|
26467
26050
|
};
|
|
26468
26051
|
const paste = (event) => {
|
|
26469
|
-
|
|
26470
|
-
|
|
26052
|
+
const clipboardData = event.clipboardData || window.clipboardData;
|
|
26053
|
+
if (!clipboardData) return;
|
|
26054
|
+
const pastedText = clipboardData.getData("text");
|
|
26471
26055
|
if (mode.value === "code") {
|
|
26472
26056
|
const valueList = pastedText.split("").filter((item) => item.trim()).slice(0, 6);
|
|
26473
26057
|
inputList.value.forEach((item, index2) => {
|
|
@@ -26791,7 +26375,7 @@ const _SlidCaptchaManager = class _SlidCaptchaManager {
|
|
|
26791
26375
|
__publicField(_SlidCaptchaManager, "instance");
|
|
26792
26376
|
let SlidCaptchaManager = _SlidCaptchaManager;
|
|
26793
26377
|
const slidCaptchaManager = SlidCaptchaManager.getInstance();
|
|
26794
|
-
const SlidCaptcha = defineAsyncComponent(() => import("./index-
|
|
26378
|
+
const SlidCaptcha = defineAsyncComponent(() => import("./index-CDZJ6srp.js"));
|
|
26795
26379
|
const useSlidCaptcha = () => {
|
|
26796
26380
|
const { mount, unMount, isMounted } = usePopup("slid-captcha-popup");
|
|
26797
26381
|
const open = (config) => {
|
|
@@ -26821,7 +26405,7 @@ const useSlidCaptcha = () => {
|
|
|
26821
26405
|
close
|
|
26822
26406
|
};
|
|
26823
26407
|
};
|
|
26824
|
-
const YunpianCaptcha = defineAsyncComponent(() => import("./index-
|
|
26408
|
+
const YunpianCaptcha = defineAsyncComponent(() => import("./index-BsMZ1sa2.js"));
|
|
26825
26409
|
const useYunpianCaptcha = () => {
|
|
26826
26410
|
const { mount, unMount } = usePopup("yunpian-captcha-popup");
|
|
26827
26411
|
const open = (config) => {
|
|
@@ -27545,7 +27129,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
27545
27129
|
const getQiwuLoginOpen = async () => {
|
|
27546
27130
|
var _a;
|
|
27547
27131
|
const res = await API.getCampusWelcomeConfig();
|
|
27548
|
-
const { entry_enabled = false } = (_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data;
|
|
27132
|
+
const { entry_enabled = false } = ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data) || {};
|
|
27549
27133
|
if (entry_enabled && !logos.some(({ alt }) => alt === qiwuLogo.alt)) {
|
|
27550
27134
|
logos.unshift(qiwuLogo);
|
|
27551
27135
|
}
|
|
@@ -27660,7 +27244,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
27660
27244
|
const usernameCheckLoading = ref(false);
|
|
27661
27245
|
const usernameValidator = {
|
|
27662
27246
|
trigger: "blur",
|
|
27663
|
-
validator: (
|
|
27247
|
+
validator: (_rule, val, cb) => {
|
|
27664
27248
|
const debouncedValidate = useDebounceFn(async () => {
|
|
27665
27249
|
var _a, _b, _c;
|
|
27666
27250
|
if (!(val == null ? void 0 : val.trim())) {
|
|
@@ -27833,7 +27417,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
27833
27417
|
]);
|
|
27834
27418
|
const status = ref(false);
|
|
27835
27419
|
const dataShareChecked = ref(false);
|
|
27836
|
-
ref(true);
|
|
27837
27420
|
const FormRef = shallowRef(null);
|
|
27838
27421
|
const tabPanel = ref("miniProgram");
|
|
27839
27422
|
const formType = ref(props.defaultType);
|
|
@@ -29093,8 +28676,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
29093
28676
|
header: withCtx(() => [
|
|
29094
28677
|
!mfaCheck.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
29095
28678
|
createVNode(GTitle, {
|
|
29096
|
-
icon: unref(IconB),
|
|
29097
|
-
title: FormConfig.value.title,
|
|
28679
|
+
icon: unref(IconB) || "",
|
|
28680
|
+
title: FormConfig.value.title || "",
|
|
29098
28681
|
"show-title": FormConfig.value.showTitle,
|
|
29099
28682
|
onBack: handleTitleBackClick,
|
|
29100
28683
|
"show-back": FormConfig.value.showBack,
|
|
@@ -29467,7 +29050,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
29467
29050
|
createVNode(GAuth, {
|
|
29468
29051
|
logos,
|
|
29469
29052
|
onAuth: pcAuthLogin,
|
|
29470
|
-
recentLoginType: recentLoginType.value,
|
|
29053
|
+
recentLoginType: recentLoginType.value || "",
|
|
29471
29054
|
class: "login-modal-footer__auth"
|
|
29472
29055
|
}, null, 8, ["logos", "recentLoginType"])
|
|
29473
29056
|
])
|
|
@@ -29687,13 +29270,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29687
29270
|
notice();
|
|
29688
29271
|
}
|
|
29689
29272
|
};
|
|
29690
|
-
computed(() => {
|
|
29691
|
-
const urlParams = new URLSearchParams(window.location.search);
|
|
29692
|
-
const isLogin = urlParams.get("isLogin");
|
|
29693
|
-
const fromId = urlParams.get("from_id");
|
|
29694
|
-
const webId = urlParams.get("web_id");
|
|
29695
|
-
return isLogin === "1" && fromId && webId;
|
|
29696
|
-
});
|
|
29697
29273
|
const isQuickAppLoginReportParams = computed(() => {
|
|
29698
29274
|
return api.get("isRegister") && api.get("success") && api.get("registerLoginMethod");
|
|
29699
29275
|
});
|
|
@@ -29771,8 +29347,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29771
29347
|
window.addEventListener("message", (event) => {
|
|
29772
29348
|
var _a, _b;
|
|
29773
29349
|
const action = HandleParentWindowGetLoginInfo(props.request);
|
|
29774
|
-
if (
|
|
29775
|
-
action[
|
|
29350
|
+
if (((_a = event == null ? void 0 : event.data) == null ? void 0 : _a.type) === AuthResType.SUCCESS) {
|
|
29351
|
+
action[AuthResType.SUCCESS](event);
|
|
29352
|
+
} else if (((_b = event == null ? void 0 : event.data) == null ? void 0 : _b.type) === AuthResType.FAIL) {
|
|
29353
|
+
action[AuthResType.FAIL](event);
|
|
29776
29354
|
}
|
|
29777
29355
|
});
|
|
29778
29356
|
});
|
|
@@ -29802,43 +29380,44 @@ const index = {
|
|
|
29802
29380
|
}
|
|
29803
29381
|
};
|
|
29804
29382
|
export {
|
|
29805
|
-
|
|
29806
|
-
|
|
29807
|
-
|
|
29808
|
-
|
|
29809
|
-
|
|
29383
|
+
HeaderCreateMenu as $,
|
|
29384
|
+
isZh as A,
|
|
29385
|
+
ThemeType as B,
|
|
29386
|
+
currentTheme as C,
|
|
29387
|
+
LANG_EN as D,
|
|
29810
29388
|
EVENT_NAME as E,
|
|
29811
|
-
|
|
29389
|
+
getLocaleLang as F,
|
|
29812
29390
|
GIcon as G,
|
|
29813
|
-
|
|
29814
|
-
|
|
29815
|
-
|
|
29816
|
-
|
|
29391
|
+
emitEvent as H,
|
|
29392
|
+
ASIDE_MENU_REPO as I,
|
|
29393
|
+
isHttps as J,
|
|
29394
|
+
navigateWithMigrationGuard as K,
|
|
29817
29395
|
LANG_ZH as L,
|
|
29818
|
-
|
|
29819
|
-
|
|
29820
|
-
|
|
29821
|
-
|
|
29822
|
-
|
|
29396
|
+
asideRequest as M,
|
|
29397
|
+
_sfc_main$M as N,
|
|
29398
|
+
loadAsideData as O,
|
|
29399
|
+
ToolsFloat as P,
|
|
29400
|
+
_sfc_main as Q,
|
|
29823
29401
|
REPO_MODULE as R,
|
|
29824
29402
|
SceneValue as S,
|
|
29825
29403
|
TOPIC_TYPE as T,
|
|
29826
|
-
|
|
29827
|
-
|
|
29828
|
-
|
|
29829
|
-
|
|
29830
|
-
|
|
29831
|
-
|
|
29404
|
+
GitCodeAside as U,
|
|
29405
|
+
GitCodeAsideV2 as V,
|
|
29406
|
+
ScrollActiveContainer as W,
|
|
29407
|
+
GitCodeHeader as X,
|
|
29408
|
+
HomeHeaderActions as Y,
|
|
29409
|
+
AtomCodeLauncher as Z,
|
|
29832
29410
|
_export_sfc as _,
|
|
29833
29411
|
i18n as a,
|
|
29834
|
-
|
|
29835
|
-
|
|
29836
|
-
|
|
29837
|
-
|
|
29838
|
-
|
|
29839
|
-
|
|
29840
|
-
|
|
29841
|
-
|
|
29412
|
+
EnterpriseHeader as a0,
|
|
29413
|
+
SiteAnnouncement as a1,
|
|
29414
|
+
AsideFooterTools as a2,
|
|
29415
|
+
useLogin as a3,
|
|
29416
|
+
setLayoutConfig as a4,
|
|
29417
|
+
GitCodeLayoutEmitter as a5,
|
|
29418
|
+
setTheme as a6,
|
|
29419
|
+
HEADER_CREATE_MENU_PATHS as a7,
|
|
29420
|
+
index as a8,
|
|
29842
29421
|
REPO_EVENT as b,
|
|
29843
29422
|
REPO_TYPE as c,
|
|
29844
29423
|
transferNumber as d,
|
|
@@ -29851,17 +29430,17 @@ export {
|
|
|
29851
29430
|
usePageResize as k,
|
|
29852
29431
|
localStorage$2 as l,
|
|
29853
29432
|
isGstarRepo as m,
|
|
29854
|
-
|
|
29855
|
-
|
|
29856
|
-
|
|
29857
|
-
|
|
29433
|
+
normalizeSearchHistoryEntry as n,
|
|
29434
|
+
_sfc_main$L as o,
|
|
29435
|
+
isIncubationRepo as p,
|
|
29436
|
+
highlightWords as q,
|
|
29858
29437
|
reqCatch as r,
|
|
29859
29438
|
setLoginTriggerSource as s,
|
|
29860
29439
|
transformUrl as t,
|
|
29861
29440
|
useModel as u,
|
|
29862
29441
|
vElementExposure as v,
|
|
29863
|
-
|
|
29864
|
-
|
|
29865
|
-
|
|
29866
|
-
|
|
29442
|
+
_frEventTrack as w,
|
|
29443
|
+
LANG_KEY as x,
|
|
29444
|
+
slidCaptchaManager as y,
|
|
29445
|
+
useLayoutConfig as z
|
|
29867
29446
|
};
|