vue-layout-gitcode 1.12.15-beta.67 → 1.12.15-beta.68

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.
@@ -11039,52 +11039,6 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
11039
11039
  };
11040
11040
  }
11041
11041
  });
11042
- const FIRST_NAMESPACE_KEY = "parent_org_path";
11043
- const useBreadcrumb = () => {
11044
- const router2 = useRouter();
11045
- if (!router2) {
11046
- return computed(() => []);
11047
- }
11048
- const repoInfo = inject(
11049
- "repoInfo",
11050
- computed(() => ({}))
11051
- );
11052
- const breadcrumb = computed(() => {
11053
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
11054
- const isSubOrg = !!((_b = (_a = router2 == null ? void 0 : router2.currentRoute) == null ? void 0 : _a.value) == null ? void 0 : _b.params[FIRST_NAMESPACE_KEY]);
11055
- const full_name = ((_d = (_c = repoInfo.value) == null ? void 0 : _c.namespace) == null ? void 0 : _d.full_name) || "";
11056
- const name = ((_f = (_e = repoInfo.value) == null ? void 0 : _e.namespace) == null ? void 0 : _f.name) || "";
11057
- const orgName = isSubOrg ? full_name : name;
11058
- const repoName = ((_g = repoInfo.value) == null ? void 0 : _g.name) || "";
11059
- const breadcrumbList = [
11060
- {
11061
- label: orgName,
11062
- path: ""
11063
- },
11064
- {
11065
- label: repoName,
11066
- path: ""
11067
- }
11068
- ];
11069
- const params = cloneDeep((_i = (_h = router2.currentRoute) == null ? void 0 : _h.value) == null ? void 0 : _i.params);
11070
- if (isSubOrg) {
11071
- params.namespace = params[FIRST_NAMESPACE_KEY];
11072
- delete params[FIRST_NAMESPACE_KEY];
11073
- }
11074
- breadcrumbList[0].path = router2.resolve({
11075
- name: "homepage",
11076
- params
11077
- }).path;
11078
- breadcrumbList[breadcrumbList.length - 1].path = router2.resolve({
11079
- name: "repoDashboard",
11080
- params: {
11081
- ...(_k = (_j = router2.currentRoute) == null ? void 0 : _j.value) == null ? void 0 : _k.params
11082
- }
11083
- }).path;
11084
- return breadcrumbList;
11085
- });
11086
- return breadcrumb;
11087
- };
11088
11042
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
11089
11043
  function getDefaultExportFromCjs(x) {
11090
11044
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
@@ -11113,1138 +11067,66 @@ function getAugmentedNamespace(n) {
11113
11067
  });
11114
11068
  return a;
11115
11069
  }
11116
- var relativeTime$1 = { exports: {} };
11117
- (function(module, exports) {
11118
- !function(r, e) {
11119
- module.exports = e();
11120
- }(commonjsGlobal, function() {
11121
- return function(r, e, t2) {
11122
- r = r || {};
11123
- var n = e.prototype, o = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
11124
- function i(r2, e2, t3, o2) {
11125
- return n.fromToBase(r2, e2, t3, o2);
11070
+ var aes = { exports: {} };
11071
+ function commonjsRequire(path) {
11072
+ throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
11073
+ }
11074
+ var core = { exports: {} };
11075
+ const __viteBrowserExternal = {};
11076
+ const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11077
+ __proto__: null,
11078
+ default: __viteBrowserExternal
11079
+ }, Symbol.toStringTag, { value: "Module" }));
11080
+ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1);
11081
+ var hasRequiredCore;
11082
+ function requireCore() {
11083
+ if (hasRequiredCore) return core.exports;
11084
+ hasRequiredCore = 1;
11085
+ (function(module, exports) {
11086
+ (function(root, factory) {
11087
+ {
11088
+ module.exports = factory();
11126
11089
  }
11127
- t2.en.relativeTime = o, n.fromToBase = function(e2, n2, i2, d2, u) {
11128
- for (var f, a, s, l = i2.$locale().relativeTime || o, h2 = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], m = h2.length, c = 0; c < m; c += 1) {
11129
- var y = h2[c];
11130
- y.d && (f = d2 ? t2(e2).diff(i2, y.d, true) : i2.diff(e2, y.d, true));
11131
- var p = (r.rounding || Math.round)(Math.abs(f));
11132
- if (s = f > 0, p <= y.r || !y.r) {
11133
- p <= 1 && c > 0 && (y = h2[c - 1]);
11134
- var v = l[y.l];
11135
- u && (p = u("" + p)), a = "string" == typeof v ? v.replace("%d", p) : v(p, n2, y.l, s);
11136
- break;
11137
- }
11090
+ })(commonjsGlobal, function() {
11091
+ var CryptoJS = CryptoJS || function(Math2, undefined$1) {
11092
+ var crypto;
11093
+ if (typeof window !== "undefined" && window.crypto) {
11094
+ crypto = window.crypto;
11138
11095
  }
11139
- if (n2) return a;
11140
- var M = s ? l.future : l.past;
11141
- return "function" == typeof M ? M(a) : M.replace("%s", a);
11142
- }, n.to = function(r2, e2) {
11143
- return i(r2, e2, this, true);
11144
- }, n.from = function(r2, e2) {
11145
- return i(r2, e2, this);
11146
- };
11147
- var d = function(r2) {
11148
- return r2.$u ? t2.utc() : t2();
11149
- };
11150
- n.toNow = function(r2) {
11151
- return this.to(d(this), r2);
11152
- }, n.fromNow = function(r2) {
11153
- return this.from(d(this), r2);
11154
- };
11155
- };
11156
- });
11157
- })(relativeTime$1);
11158
- var relativeTimeExports = relativeTime$1.exports;
11159
- const relativeTime = /* @__PURE__ */ getDefaultExportFromCjs(relativeTimeExports);
11160
- var zhCn = { exports: {} };
11161
- (function(module, exports) {
11162
- !function(e, _) {
11163
- module.exports = _(dayjs);
11164
- }(commonjsGlobal, function(e) {
11165
- function _(e2) {
11166
- return e2 && "object" == typeof e2 && "default" in e2 ? e2 : { default: e2 };
11167
- }
11168
- 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) {
11169
- return "W" === _2 ? e2 + "周" : e2 + "日";
11170
- }, 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) {
11171
- var t3 = 100 * e2 + _2;
11172
- return t3 < 600 ? "凌晨" : t3 < 900 ? "早上" : t3 < 1100 ? "上午" : t3 < 1300 ? "中午" : t3 < 1800 ? "下午" : "晚上";
11173
- } };
11174
- return t2.default.locale(d, null, true), d;
11175
- });
11176
- })(zhCn);
11177
- var zhCnExports = zhCn.exports;
11178
- const locale = /* @__PURE__ */ getDefaultExportFromCjs(zhCnExports);
11179
- var timezone = { exports: {} };
11180
- (function(module, exports) {
11181
- !function(t2, e) {
11182
- module.exports = e();
11183
- }(commonjsGlobal, function() {
11184
- var t2 = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, e = {};
11185
- return function(n, i, r) {
11186
- var o, a = function(t3, n2, i2) {
11187
- void 0 === i2 && (i2 = {});
11188
- var r2 = new Date(t3), o2 = function(t4, n3) {
11189
- void 0 === n3 && (n3 = {});
11190
- var i3 = n3.timeZoneName || "short", r3 = t4 + "|" + i3, o3 = e[r3];
11191
- return o3 || (o3 = new Intl.DateTimeFormat("en-US", { hour12: false, timeZone: t4, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: i3 }), e[r3] = o3), o3;
11192
- }(n2, i2);
11193
- return o2.formatToParts(r2);
11194
- }, u = function(e2, n2) {
11195
- for (var i2 = a(e2, n2), o2 = [], u2 = 0; u2 < i2.length; u2 += 1) {
11196
- var f2 = i2[u2], s2 = f2.type, m = f2.value, c = t2[s2];
11197
- c >= 0 && (o2[c] = parseInt(m, 10));
11096
+ if (typeof self !== "undefined" && self.crypto) {
11097
+ crypto = self.crypto;
11198
11098
  }
11199
- var l = o2[3], d = 24 === l ? 0 : l, h2 = o2[0] + "-" + o2[1] + "-" + o2[2] + " " + d + ":" + o2[4] + ":" + o2[5] + ":000", v = +e2;
11200
- return (r.utc(h2).valueOf() - (v -= v % 1e3)) / 6e4;
11201
- }, f = i.prototype;
11202
- f.tz = function(t3, e2) {
11203
- if (void 0 === t3 && (t3 = o), !this.isValid()) return this;
11204
- var n2, i2 = this.utcOffset(), a2 = this.toDate(), f2 = a2.toLocaleString("en-US", { timeZone: t3 }), s2 = u(+a2, t3);
11205
- if (!Number(s2)) n2 = this.utcOffset(0, e2);
11206
- else if (n2 = r(f2, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(s2, true), e2) {
11207
- var m = n2.utcOffset();
11208
- n2 = n2.add(i2 - m, "minute");
11099
+ if (typeof globalThis !== "undefined" && globalThis.crypto) {
11100
+ crypto = globalThis.crypto;
11209
11101
  }
11210
- return n2.$x.$timezone = t3, n2;
11211
- }, f.offsetName = function(t3) {
11212
- var e2 = this.$x.$timezone || r.tz.guess(), n2 = a(this.valueOf(), e2, { timeZoneName: t3 }).find(function(t4) {
11213
- return "timezonename" === t4.type.toLowerCase();
11214
- });
11215
- return n2 && n2.value;
11216
- };
11217
- var s = f.startOf;
11218
- f.startOf = function(t3, e2) {
11219
- if (!this.$x || !this.$x.$timezone) return s.call(this, t3, e2);
11220
- var n2 = r(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
11221
- return s.call(n2, t3, e2).tz(this.$x.$timezone, true);
11222
- }, r.tz = function(t3, e2, n2) {
11223
- var i2 = n2 && e2, a2 = n2 || e2 || o, f2 = u(+r(), a2);
11224
- if ("string" != typeof t3) return r(t3).tz(a2);
11225
- var s2 = r.utc(t3, i2).valueOf();
11226
- if (Number.isNaN(s2)) {
11227
- var m = r(NaN);
11228
- return m.$x.$timezone = a2, m;
11102
+ if (!crypto && typeof window !== "undefined" && window.msCrypto) {
11103
+ crypto = window.msCrypto;
11229
11104
  }
11230
- var c = function(t4, e3, n3) {
11231
- var i3 = t4 - 60 * e3 * 1e3, r2 = u(i3, n3);
11232
- if (e3 === r2) return [i3, e3];
11233
- var o2 = u(i3 -= 60 * (r2 - e3) * 1e3, n3);
11234
- return r2 === o2 ? [i3, r2] : [t4 - 60 * Math.min(r2, o2) * 1e3, Math.max(r2, o2)];
11235
- }(s2, f2, a2), l = c[0], d = c[1], h2 = r(l).utcOffset(d);
11236
- return h2.$x.$timezone = a2, h2;
11237
- }, r.tz.guess = function() {
11238
- return Intl.DateTimeFormat().resolvedOptions().timeZone;
11239
- }, r.tz.setDefault = function(t3) {
11240
- o = t3;
11241
- };
11242
- };
11243
- });
11244
- })(timezone);
11245
- var timezoneExports = timezone.exports;
11246
- const tz = /* @__PURE__ */ getDefaultExportFromCjs(timezoneExports);
11247
- var utc$1 = { exports: {} };
11248
- (function(module, exports) {
11249
- !function(t2, i) {
11250
- module.exports = i();
11251
- }(commonjsGlobal, function() {
11252
- var t2 = "minute", i = /[+-]\d\d(?::?\d\d)?/g, e = /([+-]|\d\d)/g;
11253
- return function(s, f, n) {
11254
- var u = f.prototype;
11255
- n.utc = function(t3) {
11256
- var i2 = { date: t3, utc: true, args: arguments };
11257
- return new f(i2);
11258
- }, u.utc = function(i2) {
11259
- var e2 = n(this.toDate(), { locale: this.$L, utc: true });
11260
- return i2 ? e2.add(this.utcOffset(), t2) : e2;
11261
- }, u.local = function() {
11262
- return n(this.toDate(), { locale: this.$L, utc: false });
11263
- };
11264
- var r = u.parse;
11265
- u.parse = function(t3) {
11266
- t3.utc && (this.$u = true), this.$utils().u(t3.$offset) || (this.$offset = t3.$offset), r.call(this, t3);
11267
- };
11268
- var o = u.init;
11269
- u.init = function() {
11270
- if (this.$u) {
11271
- var t3 = this.$d;
11272
- this.$y = t3.getUTCFullYear(), this.$M = t3.getUTCMonth(), this.$D = t3.getUTCDate(), this.$W = t3.getUTCDay(), this.$H = t3.getUTCHours(), this.$m = t3.getUTCMinutes(), this.$s = t3.getUTCSeconds(), this.$ms = t3.getUTCMilliseconds();
11273
- } else o.call(this);
11274
- };
11275
- var a = u.utcOffset;
11276
- u.utcOffset = function(s2, f2) {
11277
- var n2 = this.$utils().u;
11278
- if (n2(s2)) return this.$u ? 0 : n2(this.$offset) ? a.call(this) : this.$offset;
11279
- if ("string" == typeof s2 && (s2 = function(t3) {
11280
- void 0 === t3 && (t3 = "");
11281
- var s3 = t3.match(i);
11282
- if (!s3) return null;
11283
- var f3 = ("" + s3[0]).match(e) || ["-", 0, 0], n3 = f3[0], u3 = 60 * +f3[1] + +f3[2];
11284
- return 0 === u3 ? 0 : "+" === n3 ? u3 : -u3;
11285
- }(s2), null === s2)) return this;
11286
- var u2 = Math.abs(s2) <= 16 ? 60 * s2 : s2;
11287
- if (0 === u2) return this.utc(f2);
11288
- var r2 = this.clone();
11289
- if (f2) return r2.$offset = u2, r2.$u = false, r2;
11290
- var o2 = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
11291
- return (r2 = this.local().add(u2 + o2, t2)).$offset = u2, r2.$x.$localOffset = o2, r2;
11292
- };
11293
- var h2 = u.format;
11294
- u.format = function(t3) {
11295
- var i2 = t3 || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
11296
- return h2.call(this, i2);
11297
- }, u.valueOf = function() {
11298
- var t3 = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
11299
- return this.$d.valueOf() - 6e4 * t3;
11300
- }, u.isUTC = function() {
11301
- return !!this.$u;
11302
- }, u.toISOString = function() {
11303
- return this.toDate().toISOString();
11304
- }, u.toString = function() {
11305
- return this.toDate().toUTCString();
11306
- };
11307
- var l = u.toDate;
11308
- u.toDate = function(t3) {
11309
- return "s" === t3 && this.$offset ? n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : l.call(this);
11310
- };
11311
- var c = u.diff;
11312
- u.diff = function(t3, i2, e2) {
11313
- if (t3 && this.$u === t3.$u) return c.call(this, t3, i2, e2);
11314
- var s2 = this.local(), f2 = n(t3).local();
11315
- return c.call(s2, f2, i2, e2);
11316
- };
11317
- };
11318
- });
11319
- })(utc$1);
11320
- var utcExports = utc$1.exports;
11321
- const utc = /* @__PURE__ */ getDefaultExportFromCjs(utcExports);
11322
- dayjs.locale(locale);
11323
- dayjs.extend(relativeTime);
11324
- dayjs.extend(tz);
11325
- dayjs.extend(utc);
11326
- dayjs.tz.setDefault("Asia/Shanghai");
11327
- const useTimeFormat = () => {
11328
- const formatTimeFromNow = (time) => {
11329
- if (!time) return "-";
11330
- const targetDate = isDate$1(time) ? time : new Date(time);
11331
- return formatTimeDifference(targetDate);
11332
- };
11333
- const formatTime = (time, format2) => {
11334
- if (!time) return "-";
11335
- return dayjs(time).format(format2);
11336
- };
11337
- return {
11338
- formatTimeFromNow,
11339
- formatTime
11340
- };
11341
- };
11342
- const _hoisted_1$F = {
11343
- key: 0,
11344
- class: "org-layout-toolbar"
11345
- };
11346
- const _hoisted_2$v = { class: "org-layout-toolbar-title ellipsis-two-line" };
11347
- const _hoisted_3$u = { class: "header-custom-btn-label" };
11348
- const _hoisted_4$n = { class: "g-repo-breadcrumb-custom" };
11349
- const _hoisted_5$i = {
11350
- key: 1,
11351
- class: "header-custom-mirrors-avatar"
11352
- };
11353
- const _hoisted_6$g = {
11354
- key: 0,
11355
- src: _imports_0,
11356
- alt: "mirrors-avatar-phone",
11357
- class: "header-custom-mirrors-img"
11358
- };
11359
- const _hoisted_7$d = {
11360
- key: 1,
11361
- src: "https://cdn-static.gitcode.com/static/images/mirrors-avata_20250411.gif",
11362
- alt: "mirrors-avatar",
11363
- class: "header-custom-mirrors-img-tall"
11364
- };
11365
- const _hoisted_8$b = { class: "g-repo-breadcrumb-container" };
11366
- const _hoisted_9$a = {
11367
- key: 0,
11368
- class: "header-custom-breadcrumb-row"
11369
- };
11370
- const _hoisted_10$9 = ["title"];
11371
- const _hoisted_11$7 = ["title"];
11372
- const _hoisted_12$7 = {
11373
- key: 0,
11374
- class: "header-custom-tag-mb"
11375
- };
11376
- const _hoisted_13$4 = {
11377
- key: 1,
11378
- class: "header-custom-tag-mb"
11379
- };
11380
- const _hoisted_14$2 = {
11381
- key: 2,
11382
- class: "header-custom-tag-mb"
11383
- };
11384
- const _hoisted_15$2 = {
11385
- key: 3,
11386
- class: "header-custom-tag-mb"
11387
- };
11388
- const _hoisted_16$2 = { class: "header-custom-topic-label" };
11389
- const _hoisted_17$2 = {
11390
- key: 5,
11391
- class: "topic-tag font-color-t2 gh_mirros_tag"
11392
- };
11393
- const _hoisted_18$2 = { class: "header-custom-topic-label" };
11394
- const _hoisted_19$2 = { class: "header-custom-skeleton" };
11395
- const _hoisted_20$2 = {
11396
- key: 2,
11397
- class: "user-layout-toolbar"
11398
- };
11399
- const _hoisted_21$2 = { class: "user-layout-toolbar-title ellipsis-two-line" };
11400
- const _hoisted_22$2 = { class: "header-custom-btn-label" };
11401
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
11402
- __name: "HeaderCustom",
11403
- props: {
11404
- scene: { default: SceneValue.home },
11405
- isLogin: { type: Boolean, default: false },
11406
- errorCode: { default: 0 },
11407
- orgProps: { default: () => ({}) },
11408
- repoProps: { default: () => ({}) },
11409
- userProps: { default: () => ({}) }
11410
- },
11411
- emits: ["followDevCommunity", "followUser"],
11412
- setup(__props, { emit: __emit }) {
11413
- const { t: t2 } = i18n.global;
11414
- const layoutConfig2 = useLayoutConfig();
11415
- const breadcrumb = useBreadcrumb();
11416
- console.log("breadcrumb", breadcrumb);
11417
- const breadcrumbRef = ref(null);
11418
- const breadcrumbTextRef = ref(null);
11419
- const breadcrumbNextRef = ref(null);
11420
- const breadcrumbNextTextRef = ref(null);
11421
- const { formatTimeFromNow } = useTimeFormat();
11422
- const props = __props;
11423
- const repoInfo = inject("repoInfo", computed(() => void 0));
11424
- console.log("repoInfo", repoInfo);
11425
- const orgInfo = inject("orgInfo", computed(() => void 0));
11426
- const otherUserInfo = inject("otherUserInfo", computed(() => void 0));
11427
- const emits = __emit;
11428
- const handleOrgFollow = (val) => {
11429
- if (props.scene !== SceneValue.org) return;
11430
- if (!props.isLogin) {
11431
- emitEvent("login", { triggerType: "关注组织", loginTriggerSource: "toolbar_org_follow" });
11432
- return;
11433
- }
11434
- emits("followDevCommunity", !val);
11435
- };
11436
- const topicTag = computed(() => {
11437
- var _a, _b;
11438
- if (props.scene !== SceneValue.repo) return false;
11439
- let repoType = 1;
11440
- repoType = Number((_a = repoInfo.value) == null ? void 0 : _a.repo_type) - 1;
11441
- if ((_b = props.repoProps) == null ? void 0 : _b.isSpaces) {
11442
- repoType = 2;
11443
- }
11444
- if (repoType < 0) {
11445
- return false;
11446
- }
11447
- const name = ["模型", "数据集", "Space"];
11448
- const icon = ["gt-line-Models", "gt-line-Datasets", "gt-line-space"];
11449
- const linkName = ["models", "datasets", "spaces"];
11450
- const linkUrl = ["/models", "/datasets", "/space"];
11451
- const suffix = ["Model", "Datasets", "Space"];
11452
- const obj = {
11453
- name: name[repoType],
11454
- icon: icon[repoType],
11455
- linkName: linkName[repoType],
11456
- linkUrl: linkUrl[repoType],
11457
- suffix: suffix[repoType]
11458
- };
11459
- return obj;
11460
- });
11461
- const isOrg = computed(() => {
11462
- var _a, _b;
11463
- if (props.scene === SceneValue.repo) {
11464
- return ((_b = (_a = repoInfo.value) == null ? void 0 : _a.namespace) == null ? void 0 : _b.kind) === "group";
11465
- }
11466
- return false;
11467
- });
11468
- const toAiHub = () => {
11469
- if (props.scene !== SceneValue.repo) return;
11470
- if (!topicTag.value) return;
11471
- const aiUrl = `${layoutConfig2.VITE_AI_HOST}${topicTag.value.linkUrl}`;
11472
- if (typeof window !== "undefined" && window.location) {
11473
- window.location.href = aiUrl;
11474
- }
11475
- };
11476
- const showTimeTopic = computed(() => {
11477
- var _a, _b;
11478
- if (props.scene !== SceneValue.repo) return false;
11479
- if (!((_a = repoInfo.value) == null ? void 0 : _a.last_repository_updated_at)) {
11480
- return false;
11481
- }
11482
- try {
11483
- return (/* @__PURE__ */ new Date()).getTime() - new Date((_b = repoInfo.value) == null ? void 0 : _b.last_repository_updated_at).getTime() < 7 * 24 * 60 * 60 * 1e3;
11484
- } catch (error) {
11485
- return false;
11486
- }
11487
- });
11488
- const formatTime = computed(() => {
11489
- var _a;
11490
- return formatTimeFromNow(((_a = repoInfo.value) == null ? void 0 : _a.last_repository_updated_at) || "");
11491
- });
11492
- const handleFollowUser = () => {
11493
- if (props.scene !== SceneValue.user) return;
11494
- emits("followUser");
11495
- };
11496
- const handleBreadcrumbCopy = (e) => {
11497
- const container = document.querySelector(".g-repo-breadcrumb-custom");
11498
- if (!container) return;
11499
- const selection = window.getSelection();
11500
- if (!selection || !selection.rangeCount) return;
11501
- const range = selection.getRangeAt(0);
11502
- const selectedText = selection.toString().trim();
11503
- const isSelectionInContainer = container.contains(range.startContainer) && container.contains(range.endContainer);
11504
- if (isSelectionInContainer && selectedText) {
11505
- e.preventDefault();
11506
- if (e.clipboardData) {
11507
- e.clipboardData.setData("text/plain", selectedText.replace(/\s+/g, ""));
11105
+ if (!crypto && typeof commonjsGlobal !== "undefined" && commonjsGlobal.crypto) {
11106
+ crypto = commonjsGlobal.crypto;
11508
11107
  }
11509
- }
11510
- };
11511
- onMounted(() => {
11512
- document.addEventListener("copy", handleBreadcrumbCopy);
11513
- });
11514
- onUnmounted(() => {
11515
- document.removeEventListener("copy", handleBreadcrumbCopy);
11516
- });
11517
- return (_ctx, _cache) => {
11518
- var _a, _b, _c;
11519
- return __props.scene === unref(SceneValue).org && !__props.errorCode ? (openBlock(), createElementBlock("div", _hoisted_1$F, [
11520
- createVNode(GLink, {
11521
- href: ((_a = __props.orgProps) == null ? void 0 : _a.orgHomepageUrl) || "",
11522
- class: "header-custom-link"
11523
- }, {
11524
- default: withCtx(() => {
11525
- var _a2, _b2, _c2;
11526
- return [
11527
- createVNode(_sfc_main$N, {
11528
- class: "g-border",
11529
- src: ((_a2 = unref(orgInfo)) == null ? void 0 : _a2.avatar) || "",
11530
- name: ((_b2 = unref(orgInfo)) == null ? void 0 : _b2.name) || "",
11531
- width: 28,
11532
- height: 28,
11533
- is_round: false
11534
- }, null, 8, ["src", "name"]),
11535
- createElementVNode("div", _hoisted_2$v, toDisplayString$1((_c2 = unref(orgInfo)) == null ? void 0 : _c2.name), 1)
11536
- ];
11537
- }),
11538
- _: 1
11539
- }, 8, ["href"]),
11540
- createVNode(unref(Button), {
11541
- onClick: _cache[0] || (_cache[0] = ($event) => {
11542
- var _a2;
11543
- return handleOrgFollow((_a2 = __props.orgProps) == null ? void 0 : _a2.isOrgFollow);
11544
- }),
11545
- class: "org-layout-toolbar-follow"
11546
- }, {
11547
- default: withCtx(() => {
11548
- var _a2;
11549
- return [
11550
- createElementVNode("span", _hoisted_3$u, toDisplayString$1(((_a2 = __props.orgProps) == null ? void 0 : _a2.isOrgFollow) ? unref(t2)("gitCodeLayout.home.alreadyFollowed") : unref(t2)("gitCodeLayout.home.focusOn")), 1)
11551
- ];
11552
- }),
11553
- _: 1
11554
- })
11555
- ])) : __props.scene === unref(SceneValue).repo && !__props.errorCode ? (openBlock(), createBlock(unref(Skeleton), {
11556
- key: 1,
11557
- loading: (_b = __props.repoProps) == null ? void 0 : _b.repoNameLoading,
11558
- rows: 1
11559
- }, {
11560
- placeholder: withCtx(() => [
11561
- createElementVNode("div", _hoisted_19$2, [
11562
- createVNode(unref(SkeletonItem), {
11563
- round: "",
11564
- style: { "width": "30px", "height": "30px" }
11565
- }),
11566
- createVNode(unref(SkeletonItem), { style: { "margin-left": "12px", "width": "80px", "height": "24px" } })
11567
- ])
11568
- ]),
11569
- default: withCtx(() => {
11570
- var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
11571
- return [
11572
- createElementVNode("h2", _hoisted_4$n, [
11573
- createVNode(GLink, {
11574
- href: (_a2 = unref(breadcrumb)[0]) == null ? void 0 : _a2.path,
11575
- class: "header-custom-avatar-link"
11576
- }, {
11577
- default: withCtx(() => {
11578
- var _a3, _b3, _c3, _d2;
11579
- return [
11580
- !((_a3 = __props.repoProps) == null ? void 0 : _a3.isGhMirrors) ? (openBlock(), createBlock(_sfc_main$N, {
11581
- key: 0,
11582
- class: normalizeClass({ "g-border": isOrg.value }),
11583
- src: ((_c3 = (_b3 = unref(repoInfo)) == null ? void 0 : _b3.namespace) == null ? void 0 : _c3.avatar_url) || "",
11584
- name: ((_d2 = unref(repoInfo)) == null ? void 0 : _d2.name) || "",
11585
- width: 28,
11586
- height: 28,
11587
- is_round: !isOrg.value
11588
- }, null, 8, ["class", "src", "name", "is_round"])) : (openBlock(), createElementBlock("div", _hoisted_5$i, [
11589
- unref(isPhone)() ? (openBlock(), createElementBlock("img", _hoisted_6$g)) : (openBlock(), createElementBlock("img", _hoisted_7$d))
11590
- ]))
11591
- ];
11592
- }),
11593
- _: 1
11594
- }, 8, ["href"]),
11595
- createElementVNode("div", _hoisted_8$b, [
11596
- !((_b2 = __props.repoProps) == null ? void 0 : _b2.isGhMirrors) ? (openBlock(), createElementBlock("div", {
11597
- key: 0,
11598
- ref_key: "breadcrumbRef",
11599
- ref: breadcrumbRef,
11600
- class: "g-repo-layout-breadcrumb"
11601
- }, [
11602
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(breadcrumb), (item, index2) => {
11603
- return openBlock(), createElementBlock(Fragment, {
11604
- key: item.path
11605
- }, [
11606
- index2 !== unref(breadcrumb).length - 1 ? (openBlock(), createElementBlock("span", _hoisted_9$a, [
11607
- createVNode(GLink, {
11608
- class: "linkTx",
11609
- href: item.path
11610
- }, {
11611
- default: withCtx(() => [
11612
- createElementVNode("span", {
11613
- ref_for: true,
11614
- ref_key: "breadcrumbTextRef",
11615
- ref: breadcrumbTextRef,
11616
- title: item.label,
11617
- class: normalizeClass(["linkTx", index2 === unref(breadcrumb).length - 1 ? "header-custom-bold" : ""])
11618
- }, toDisplayString$1(item.label), 11, _hoisted_10$9)
11619
- ]),
11620
- _: 2
11621
- }, 1032, ["href"]),
11622
- _cache[1] || (_cache[1] = createElementVNode("span", { class: "breadcrumb-splitter font-color-t1" }, " / ", -1))
11623
- ])) : createCommentVNode("", true)
11624
- ], 64);
11625
- }), 128))
11626
- ], 512)) : createCommentVNode("", true),
11627
- unref(breadcrumb)[unref(breadcrumb).length - 1] ? (openBlock(), createElementBlock("div", {
11628
- key: 1,
11629
- ref_key: "breadcrumbNextRef",
11630
- ref: breadcrumbNextRef,
11631
- class: normalizeClass(["g-repo-layout-breadcrumb-next", [((_c2 = __props.repoProps) == null ? void 0 : _c2.isGhMirrors) ? "g-repo-layout-breadcrumb-next--full" : "g-repo-layout-breadcrumb-next--limit"]])
11632
- }, [
11633
- createVNode(GLink, {
11634
- class: "linkTx",
11635
- href: (_d = unref(breadcrumb)[unref(breadcrumb).length - 1]) == null ? void 0 : _d.path
11636
- }, {
11637
- default: withCtx(() => [
11638
- createElementVNode("span", {
11639
- ref_key: "breadcrumbNextTextRef",
11640
- ref: breadcrumbNextTextRef,
11641
- title: unref(breadcrumb)[unref(breadcrumb).length - 1].label,
11642
- class: "linkTx header-custom-bold"
11643
- }, toDisplayString$1(unref(breadcrumb)[unref(breadcrumb).length - 1].label), 9, _hoisted_11$7)
11644
- ]),
11645
- _: 1
11646
- }, 8, ["href"]),
11647
- unref(isGstarRepo)((_e = unref(repoInfo)) == null ? void 0 : _e.topic_names) ? (openBlock(), createElementBlock("div", _hoisted_12$7, [
11648
- createVNode(_sfc_main$M, {
11649
- origin: "repo",
11650
- icon: "",
11651
- type: "gstar",
11652
- message: `G-Star ${unref(t2)("gitCodeLayout.GStar.project.graduation")}`
11653
- }, {
11654
- default: withCtx(() => [..._cache[2] || (_cache[2] = [
11655
- createTextVNode("G-Star ", -1)
11656
- ])]),
11657
- _: 1
11658
- }, 8, ["message"])
11659
- ])) : unref(isIncubationRepo)((_f = unref(repoInfo)) == null ? void 0 : _f.topic_names) ? (openBlock(), createElementBlock("div", _hoisted_13$4, [
11660
- createVNode(_sfc_main$M, {
11661
- origin: "repo",
11662
- icon: "",
11663
- type: "incubation",
11664
- message: `G-Star ${unref(t2)("gitCodeLayout.GStar.project.incubation")}`
11665
- }, {
11666
- default: withCtx(() => [..._cache[3] || (_cache[3] = [
11667
- createTextVNode(" G-Star ", -1)
11668
- ])]),
11669
- _: 1
11670
- }, 8, ["message"])
11671
- ])) : createCommentVNode("", true),
11672
- unref(isTrustedRepo)((_g = unref(repoInfo)) == null ? void 0 : _g.topic_names) ? (openBlock(), createElementBlock("div", _hoisted_14$2, [
11673
- createVNode(_sfc_main$M, {
11674
- trusted: "",
11675
- message: unref(t2)("gitCodeLayout.trusted.title"),
11676
- icon: "",
11677
- type: "trusted",
11678
- href: "/trusted"
11679
- }, null, 8, ["message"])
11680
- ])) : createCommentVNode("", true),
11681
- ((_h = __props.repoProps) == null ? void 0 : _h.isPrivate) ? (openBlock(), createElementBlock("div", _hoisted_15$2, [
11682
- createVNode(GIcon, {
11683
- size: "16px",
11684
- class: "header-custom-lock-icon",
11685
- name: "gt-line-lock"
11686
- })
11687
- ])) : createCommentVNode("", true),
11688
- topicTag.value ? (openBlock(), createElementBlock("div", {
11689
- key: 4,
11690
- class: "topic-tag font-color-t2",
11691
- onClick: toAiHub
11692
- }, [
11693
- createVNode(GIcon, {
11694
- name: (_i = topicTag.value) == null ? void 0 : _i.icon,
11695
- color: "var(--devui-shape-icon-fill)",
11696
- class: "header-custom-topic-icon"
11697
- }, null, 8, ["name"]),
11698
- createElementVNode("span", _hoisted_16$2, toDisplayString$1((_j = topicTag.value) == null ? void 0 : _j.suffix), 1)
11699
- ])) : createCommentVNode("", true),
11700
- ((_k = __props.repoProps) == null ? void 0 : _k.isGhMirrors) && showTimeTopic.value && !unref(isPhone)() ? (openBlock(), createElementBlock("div", _hoisted_17$2, [
11701
- createVNode(GIcon, {
11702
- name: "gt-line-time",
11703
- color: "var(--devui-shape-icon-fill)",
11704
- class: "header-custom-topic-icon"
11705
- }),
11706
- createElementVNode("span", _hoisted_18$2, toDisplayString$1(formatTime.value) + toDisplayString$1(unref(t2)("gitCodeLayout.repo.code.syncText")), 1)
11707
- ])) : createCommentVNode("", true)
11708
- ], 2)) : createCommentVNode("", true)
11709
- ])
11710
- ])
11711
- ];
11712
- }),
11713
- _: 1
11714
- }, 8, ["loading"])) : __props.scene === unref(SceneValue).user && ((_c = __props.userProps) == null ? void 0 : _c.isOtherUser) ? (openBlock(), createElementBlock("div", _hoisted_20$2, [
11715
- createVNode(GLink, {
11716
- to: { name: "homepage" },
11717
- class: "header-custom-link"
11718
- }, {
11719
- default: withCtx(() => {
11720
- var _a2, _b2, _c2, _d, _e;
11721
- return [
11722
- createVNode(_sfc_main$N, {
11723
- src: (_a2 = unref(otherUserInfo)) == null ? void 0 : _a2.avatarUrl,
11724
- name: ((_b2 = unref(otherUserInfo)) == null ? void 0 : _b2.name) || ((_c2 = unref(otherUserInfo)) == null ? void 0 : _c2.nickname),
11725
- width: 28,
11726
- height: 28
11727
- }, null, 8, ["src", "name"]),
11728
- createElementVNode("div", _hoisted_21$2, toDisplayString$1(((_d = unref(otherUserInfo)) == null ? void 0 : _d.name) || ((_e = unref(otherUserInfo)) == null ? void 0 : _e.nickname)), 1)
11729
- ];
11730
- }),
11731
- _: 1
11732
- }),
11733
- createVNode(unref(Button), {
11734
- onClick: handleFollowUser,
11735
- class: "user-layout-toolbar-follow"
11736
- }, {
11737
- default: withCtx(() => {
11738
- var _a2;
11739
- return [
11740
- createElementVNode("span", _hoisted_22$2, toDisplayString$1(((_a2 = unref(otherUserInfo)) == null ? void 0 : _a2.isFollow) ? unref(t2)("gitCodeLayout.org.following") : unref(t2)("gitCodeLayout.common.topic.attention")), 1)
11741
- ];
11742
- }),
11743
- _: 1
11744
- })
11745
- ])) : createCommentVNode("", true);
11746
- };
11747
- }
11748
- });
11749
- const HeaderCustom = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-vue-layout-gitcode"]]);
11750
- const _hoisted_1$E = ["src"];
11751
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
11752
- ...{ name: "OperationEntry" },
11753
- __name: "OperationEntry",
11754
- setup(__props) {
11755
- const request = inject("request");
11756
- const API = asideRequest(request);
11757
- const headerEntryConfig = ref({
11758
- img_light: "",
11759
- img_dark: "",
11760
- url: ""
11761
- });
11762
- const handleClick = () => {
11763
- var _a;
11764
- window.open(`${transformUrl((_a = headerEntryConfig.value) == null ? void 0 : _a.url)}`, "_blank");
11765
- };
11766
- const img = computed(() => {
11767
- const { img_light, img_dark } = headerEntryConfig.value;
11768
- return (currentTheme.value === ThemeType.BLACK ? img_dark : img_light) || img_light;
11769
- });
11770
- const getHeaderEntryConfig = async () => {
11771
- var _a;
11772
- try {
11773
- const res = await API.getHeaderEntryConfig();
11774
- const data = ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data) || {};
11775
- headerEntryConfig.value = {
11776
- img_light: data.img_light,
11777
- img_dark: data.img_dark,
11778
- url: data.url
11779
- };
11780
- } catch (error) {
11781
- console.error(error);
11782
- }
11783
- };
11784
- getHeaderEntryConfig();
11785
- return (_ctx, _cache) => {
11786
- return img.value && headerEntryConfig.value.url ? (openBlock(), createElementBlock("div", {
11787
- key: 0,
11788
- class: "operation-entry",
11789
- onClick: handleClick
11790
- }, [
11791
- createElementVNode("img", {
11792
- class: "operation-entry__img",
11793
- src: img.value,
11794
- alt: "operation-entry"
11795
- }, null, 8, _hoisted_1$E)
11796
- ])) : createCommentVNode("", true);
11797
- };
11798
- }
11799
- });
11800
- const OperationEntry = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-vue-layout-gitcode"]]);
11801
- const _hoisted_1$D = ["src"];
11802
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
11803
- __name: "ClaimPower",
11804
- props: {
11805
- config: {}
11806
- },
11807
- setup(__props) {
11808
- const props = __props;
11809
- const visible = computed(() => {
11810
- return props.config.visible;
11811
- });
11812
- const handleClick = () => {
11813
- console.log("handleClick");
11814
- window.open(props.config.jump_url, "_blank");
11815
- };
11816
- return (_ctx, _cache) => {
11817
- return visible.value ? (openBlock(), createElementBlock("div", {
11818
- key: 0,
11819
- class: "computing-power",
11820
- onClick: handleClick
11821
- }, [
11822
- createElementVNode("img", {
11823
- src: __props.config.logo_url,
11824
- alt: "claim power"
11825
- }, null, 8, _hoisted_1$D)
11826
- ])) : createCommentVNode("", true);
11827
- };
11828
- }
11829
- });
11830
- const ClaimPower = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-vue-layout-gitcode"]]);
11831
- const DEFAULT_APPLICATION_HOST = "https://gitcode.com";
11832
- function normalizeApplicationHost(host) {
11833
- return (host || DEFAULT_APPLICATION_HOST).replace(/\/+$/, "");
11834
- }
11835
- function getRoutePart(href, baseUrl) {
11836
- try {
11837
- const url = new URL(href || "/", `${baseUrl}/`);
11838
- return `${url.pathname || "/"}${url.search}${url.hash}`;
11839
- } catch {
11840
- const value = href.trim();
11841
- return value.startsWith("/") ? value : `/${value}`;
11842
- }
11843
- }
11844
- function toApplicationUrl(applicationHost, href) {
11845
- const host = normalizeApplicationHost(applicationHost);
11846
- return `${host}${getRoutePart(href, host)}`;
11847
- }
11848
- function toApplicationRoute(applicationHost, href) {
11849
- try {
11850
- const url = new URL(toApplicationUrl(applicationHost, href));
11851
- return `${url.pathname || "/"}${url.search}${url.hash}`;
11852
- } catch {
11853
- return null;
11854
- }
11855
- }
11856
- const HEADER_CREATE_MENU_PATHS = [
11857
- "/create?position=nav_top",
11858
- "/create/migrate?type=3",
11859
- "/models/create",
11860
- "/datasets/create",
11861
- "/space/create",
11862
- "/collections/create",
11863
- "/org/create"
11864
- ];
11865
- const HEADER_CREATE_ENTERPRISE_PATH = "/enterprises/new";
11866
- const _hoisted_1$C = { class: "g-header-create dashboard-create-menu" };
11867
- const _hoisted_2$u = ["title", "aria-label", "aria-expanded"];
11868
- const _hoisted_3$t = { class: "dashboard-create-menu__trigger-text" };
11869
- const _hoisted_4$m = ["aria-label"];
11870
- const _hoisted_5$h = {
11871
- key: 0,
11872
- class: "dashboard-create-menu__divider",
11873
- role: "separator"
11874
- };
11875
- const _hoisted_6$f = ["href", "onClick", "onKeydown"];
11876
- const _hoisted_7$c = { class: "dashboard-create-menu__title-row" };
11877
- const _hoisted_8$a = { class: "dashboard-create-menu__title" };
11878
- const _hoisted_9$9 = {
11879
- key: 0,
11880
- class: "dashboard-create-menu__desc"
11881
- };
11882
- const menuId = "gitcode-header-create-menu";
11883
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
11884
- ...{
11885
- name: "HeaderCreateMenu"
11886
- },
11887
- __name: "index",
11888
- props: {
11889
- dropdownVisible: { type: Boolean, default: false },
11890
- isCreateOrg: { type: Boolean, default: true },
11891
- isCreateEnterprise: { type: Boolean, default: true },
11892
- items: { default: void 0 },
11893
- onNavigate: { type: Function, default: void 0 }
11894
- },
11895
- emits: ["update:dropdownVisible", "navigate"],
11896
- setup(__props, { emit: __emit }) {
11897
- const props = __props;
11898
- const emit = __emit;
11899
- const { t: t2 } = i18n.global;
11900
- const layoutConfig2 = useLayoutConfig();
11901
- const route = useRoute();
11902
- const router2 = useRouter();
11903
- const triggerRef = ref(null);
11904
- const menuRef = ref(null);
11905
- const menuOpen = ref(false);
11906
- const defaultMenuItems = computed(() => {
11907
- const [repoPath, importPath, modelPath, datasetPath, spacePath, collectionPath, orgPath] = HEADER_CREATE_MENU_PATHS;
11908
- return [
11909
- {
11910
- key: "repo",
11911
- icon: "gt-a-Property1default",
11912
- label: t2("gitCodeLayout.header.createMenuRepository"),
11913
- href: toApplicationUrl(layoutConfig2.VITE_HOST, repoPath)
11914
- },
11915
- {
11916
- key: "import-repository",
11917
- icon: "gt-a-plane-fileinport",
11918
- label: t2("gitCodeLayout.header.createMenuImportRepository"),
11919
- href: toApplicationUrl(layoutConfig2.VITE_HOST, importPath)
11920
- },
11921
- {
11922
- key: "model",
11923
- icon: "gt-plane-Models",
11924
- label: t2("gitCodeLayout.header.createMenuModel"),
11925
- href: toApplicationUrl(layoutConfig2.VITE_HOST, modelPath)
11926
- },
11927
- {
11928
- key: "dataset",
11929
- icon: "gt-plane-Datasets",
11930
- label: t2("gitCodeLayout.header.createMenuDataset"),
11931
- href: toApplicationUrl(layoutConfig2.VITE_HOST, datasetPath)
11932
- },
11933
- {
11934
- key: "space",
11935
- icon: "gt-plane-Space",
11936
- label: t2("gitCodeLayout.header.createMenuSpace"),
11937
- href: toApplicationUrl(layoutConfig2.VITE_HOST, spacePath)
11938
- },
11939
- {
11940
- key: "collection",
11941
- icon: "gt-a-dashujuyufenxishuxing1guan",
11942
- label: t2("gitCodeLayout.header.createMenuCollection"),
11943
- href: toApplicationUrl(layoutConfig2.VITE_HOST, collectionPath)
11944
- },
11945
- {
11946
- key: "organization",
11947
- icon: "gt-plane-organization",
11948
- label: t2("gitCodeLayout.header.createMenuOrganization"),
11949
- href: toApplicationUrl(layoutConfig2.VITE_HOST, orgPath),
11950
- dividerBefore: true
11951
- }
11952
- ];
11953
- });
11954
- const enterpriseMenuItem = {
11955
- key: "enterprise",
11956
- icon: "gt-a-plane-enterprise",
11957
- label: t2("gitCodeLayout.header.createMenuEnterprise"),
11958
- href: toApplicationUrl(layoutConfig2.VITE_HOST, HEADER_CREATE_ENTERPRISE_PATH),
11959
- useHref: true
11960
- };
11961
- const menuItems = computed(() => {
11962
- const baseItems = props.items || defaultMenuItems.value;
11963
- const items = props.isCreateOrg ? baseItems : baseItems.filter((item) => item.key !== "organization");
11964
- return props.isCreateEnterprise ? [...items, enterpriseMenuItem] : items;
11965
- });
11966
- function getMenuItems() {
11967
- var _a;
11968
- return Array.from(((_a = menuRef.value) == null ? void 0 : _a.querySelectorAll('[role="menuitem"]')) || []);
11969
- }
11970
- function focusMenuItem(index2) {
11971
- void nextTick(() => {
11972
- var _a;
11973
- const items = getMenuItems();
11974
- if (!items.length) return;
11975
- const safeIndex = Math.min(Math.max(index2, 0), items.length - 1);
11976
- (_a = items[safeIndex]) == null ? void 0 : _a.focus();
11977
- });
11978
- }
11979
- function closeMenu(restoreFocus = false) {
11980
- if (!menuOpen.value) return;
11981
- menuOpen.value = false;
11982
- emit("update:dropdownVisible", false);
11983
- if (restoreFocus) {
11984
- void nextTick(() => {
11985
- var _a;
11986
- return (_a = triggerRef.value) == null ? void 0 : _a.focus();
11987
- });
11988
- }
11989
- }
11990
- const handleToggle = (value) => {
11991
- if (menuOpen.value === value) return;
11992
- menuOpen.value = value;
11993
- emit("update:dropdownVisible", value);
11994
- };
11995
- function onTriggerKeydown(event) {
11996
- if (event.key === "ArrowDown") {
11997
- event.preventDefault();
11998
- menuOpen.value = true;
11999
- emit("update:dropdownVisible", true);
12000
- focusMenuItem(0);
12001
- } else if (event.key === "ArrowUp") {
12002
- event.preventDefault();
12003
- menuOpen.value = true;
12004
- emit("update:dropdownVisible", true);
12005
- focusMenuItem(menuItems.value.length - 1);
12006
- } else if (event.key === "Escape") {
12007
- event.preventDefault();
12008
- closeMenu(true);
12009
- }
12010
- }
12011
- function onMenuItemKeydown(event, index2) {
12012
- if (event.key === "ArrowDown") {
12013
- event.preventDefault();
12014
- focusMenuItem((index2 + 1) % menuItems.value.length);
12015
- } else if (event.key === "ArrowUp") {
12016
- event.preventDefault();
12017
- focusMenuItem((index2 - 1 + menuItems.value.length) % menuItems.value.length);
12018
- } else if (event.key === "Home") {
12019
- event.preventDefault();
12020
- focusMenuItem(0);
12021
- } else if (event.key === "End") {
12022
- event.preventDefault();
12023
- focusMenuItem(menuItems.value.length - 1);
12024
- } else if (event.key === "Escape") {
12025
- event.preventDefault();
12026
- closeMenu(true);
12027
- } else if (event.key === " ") {
12028
- event.preventDefault();
12029
- if (event.currentTarget instanceof HTMLElement) event.currentTarget.click();
12030
- }
12031
- }
12032
- function stripRouterBase(route2) {
12033
- const base = router2.options.history.base;
12034
- if (!base || base === "/") return route2;
12035
- if (route2 === base) return "/";
12036
- return route2.startsWith(`${base}/`) ? route2.slice(base.length) : route2;
12037
- }
12038
- function navigateTo(href) {
12039
- const applicationHref = toApplicationUrl(layoutConfig2.VITE_HOST, href);
12040
- const applicationRoute = toApplicationRoute(layoutConfig2.VITE_HOST, href);
12041
- if (!applicationRoute) return;
12042
- if (typeof window !== "undefined") {
12043
- const applicationUrl = new URL(applicationHref);
12044
- if (applicationUrl.origin !== window.location.origin) {
12045
- window.location.href = applicationHref;
12046
- return;
12047
- }
12048
- } else {
12049
- void router2.push(stripRouterBase(applicationRoute));
12050
- return;
12051
- }
12052
- void router2.push(stripRouterBase(applicationRoute));
12053
- }
12054
- async function selectCreateItem(item) {
12055
- closeMenu();
12056
- emit("navigate", item);
12057
- if (item.useHref) {
12058
- if (typeof window !== "undefined") {
12059
- window.location.href = toApplicationUrl(layoutConfig2.VITE_HOST, item.href);
12060
- }
12061
- return;
12062
- }
12063
- if (props.onNavigate) {
12064
- await props.onNavigate(item);
12065
- return;
12066
- }
12067
- navigateTo(item.href);
12068
- }
12069
- watch(
12070
- () => props.dropdownVisible,
12071
- (visible) => {
12072
- menuOpen.value = visible;
12073
- },
12074
- { immediate: true }
12075
- );
12076
- watch(
12077
- () => route == null ? void 0 : route.fullPath,
12078
- () => closeMenu()
12079
- );
12080
- return (_ctx, _cache) => {
12081
- return openBlock(), createElementBlock("div", _hoisted_1$C, [
12082
- createVNode(unref(Dropdown), {
12083
- position: ["bottom-end", "bottom-start"],
12084
- "destroy-on-hide": false,
12085
- trigger: "hover",
12086
- offset: { mainAxis: 4, crossAxis: 0 },
12087
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {
12088
- }, ["stop"])),
12089
- "overlay-class": "dashboard-create-dropdown",
12090
- visible: menuOpen.value,
12091
- onToggle: handleToggle
12092
- }, {
12093
- menu: withCtx(() => [
12094
- createElementVNode("div", {
12095
- id: menuId,
12096
- ref_key: "menuRef",
12097
- ref: menuRef,
12098
- class: "dashboard-create-menu__panel",
12099
- role: "menu",
12100
- "aria-label": unref(t2)("gitCodeLayout.header.create")
12101
- }, [
12102
- (openBlock(true), createElementBlock(Fragment, null, renderList(menuItems.value, (item, index2) => {
12103
- return openBlock(), createElementBlock(Fragment, {
12104
- key: item.key
12105
- }, [
12106
- item.dividerBefore ? (openBlock(), createElementBlock("div", _hoisted_5$h)) : createCommentVNode("", true),
12107
- createElementVNode("a", {
12108
- href: unref(toApplicationUrl)(unref(layoutConfig2).VITE_HOST, item.href),
12109
- class: normalizeClass(["dashboard-create-menu__item", { "dashboard-create-menu__item--with-desc": Boolean(item.desc) }]),
12110
- role: "menuitem",
12111
- tabindex: "-1",
12112
- onClick: withModifiers(($event) => selectCreateItem(item), ["prevent"]),
12113
- onKeydown: ($event) => onMenuItemKeydown($event, index2)
12114
- }, [
12115
- createElementVNode("div", _hoisted_7$c, [
12116
- createVNode(GIcon, {
12117
- name: item.icon,
12118
- size: "16px",
12119
- color: "currentColor",
12120
- class: "dashboard-create-menu__icon",
12121
- "aria-hidden": "true"
12122
- }, null, 8, ["name"]),
12123
- createElementVNode("span", _hoisted_8$a, toDisplayString$1(item.label), 1)
12124
- ]),
12125
- item.desc ? (openBlock(), createElementBlock("div", _hoisted_9$9, toDisplayString$1(item.desc), 1)) : createCommentVNode("", true)
12126
- ], 42, _hoisted_6$f)
12127
- ], 64);
12128
- }), 128))
12129
- ], 8, _hoisted_4$m)
12130
- ]),
12131
- default: withCtx(() => [
12132
- createElementVNode("button", {
12133
- id: "guide-step3",
12134
- ref_key: "triggerRef",
12135
- ref: triggerRef,
12136
- type: "button",
12137
- class: "dashboard-create-menu__trigger dashboard-create-menu__trigger--header",
12138
- title: unref(t2)("gitCodeLayout.header.create"),
12139
- "aria-label": unref(t2)("gitCodeLayout.header.create"),
12140
- "aria-expanded": menuOpen.value,
12141
- "aria-controls": menuId,
12142
- "aria-haspopup": "menu",
12143
- onKeydown: onTriggerKeydown
12144
- }, [
12145
- createVNode(GIcon, {
12146
- name: "gt-add",
12147
- size: "16px",
12148
- color: "var(--theme-light-text)",
12149
- class: "dashboard-create-menu__trigger-icon",
12150
- "aria-hidden": "true"
12151
- }),
12152
- createElementVNode("span", _hoisted_3$t, toDisplayString$1(unref(t2)("gitCodeLayout.header.create")), 1)
12153
- ], 40, _hoisted_2$u)
12154
- ]),
12155
- _: 1
12156
- }, 8, ["visible"])
12157
- ]);
12158
- };
12159
- }
12160
- });
12161
- const HeaderCreateMenu = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-vue-layout-gitcode"]]);
12162
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
12163
- ...{
12164
- name: "DocumentCenter"
12165
- },
12166
- __name: "DocumentCenter",
12167
- props: {
12168
- whiteColor: { type: Boolean, default: false }
12169
- },
12170
- setup(__props) {
12171
- const { t: t2 } = i18n.global;
12172
- return (_ctx, _cache) => {
12173
- return openBlock(), createBlock(GLink, {
12174
- variant: "text",
12175
- class: normalizeClass(["g-toolbar-docs", __props.whiteColor ? "white" : "black"]),
12176
- href: unref(currentHelpDocsAiCommunityUrl)(),
12177
- target: "_blank"
12178
- }, {
12179
- default: withCtx(() => [
12180
- createTextVNode(toDisplayString$1(unref(t2)("gitCodeLayout.header.aihub.documentCenter")), 1)
12181
- ]),
12182
- _: 1
12183
- }, 8, ["class", "href"]);
12184
- };
12185
- }
12186
- });
12187
- const DocumentCenter = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-vue-layout-gitcode"]]);
12188
- var aes = { exports: {} };
12189
- function commonjsRequire(path) {
12190
- throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
12191
- }
12192
- var core = { exports: {} };
12193
- const __viteBrowserExternal = {};
12194
- const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12195
- __proto__: null,
12196
- default: __viteBrowserExternal
12197
- }, Symbol.toStringTag, { value: "Module" }));
12198
- const require$$0 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1);
12199
- var hasRequiredCore;
12200
- function requireCore() {
12201
- if (hasRequiredCore) return core.exports;
12202
- hasRequiredCore = 1;
12203
- (function(module, exports) {
12204
- (function(root, factory) {
12205
- {
12206
- module.exports = factory();
12207
- }
12208
- })(commonjsGlobal, function() {
12209
- var CryptoJS = CryptoJS || function(Math2, undefined$1) {
12210
- var crypto;
12211
- if (typeof window !== "undefined" && window.crypto) {
12212
- crypto = window.crypto;
12213
- }
12214
- if (typeof self !== "undefined" && self.crypto) {
12215
- crypto = self.crypto;
12216
- }
12217
- if (typeof globalThis !== "undefined" && globalThis.crypto) {
12218
- crypto = globalThis.crypto;
12219
- }
12220
- if (!crypto && typeof window !== "undefined" && window.msCrypto) {
12221
- crypto = window.msCrypto;
12222
- }
12223
- if (!crypto && typeof commonjsGlobal !== "undefined" && commonjsGlobal.crypto) {
12224
- crypto = commonjsGlobal.crypto;
12225
- }
12226
- if (!crypto && typeof commonjsRequire === "function") {
12227
- try {
12228
- crypto = require$$0;
12229
- } catch (err) {
12230
- }
12231
- }
12232
- var cryptoSecureRandomInt = function() {
12233
- if (crypto) {
12234
- if (typeof crypto.getRandomValues === "function") {
12235
- try {
12236
- return crypto.getRandomValues(new Uint32Array(1))[0];
12237
- } catch (err) {
12238
- }
12239
- }
12240
- if (typeof crypto.randomBytes === "function") {
12241
- try {
12242
- return crypto.randomBytes(4).readInt32LE();
12243
- } catch (err) {
12244
- }
12245
- }
12246
- }
12247
- throw new Error("Native crypto module could not be used to get secure random number.");
11108
+ if (!crypto && typeof commonjsRequire === "function") {
11109
+ try {
11110
+ crypto = require$$0;
11111
+ } catch (err) {
11112
+ }
11113
+ }
11114
+ var cryptoSecureRandomInt = function() {
11115
+ if (crypto) {
11116
+ if (typeof crypto.getRandomValues === "function") {
11117
+ try {
11118
+ return crypto.getRandomValues(new Uint32Array(1))[0];
11119
+ } catch (err) {
11120
+ }
11121
+ }
11122
+ if (typeof crypto.randomBytes === "function") {
11123
+ try {
11124
+ return crypto.randomBytes(4).readInt32LE();
11125
+ } catch (err) {
11126
+ }
11127
+ }
11128
+ }
11129
+ throw new Error("Native crypto module could not be used to get secure random number.");
12248
11130
  };
12249
11131
  var create2 = Object.create || /* @__PURE__ */ function() {
12250
11132
  function F() {
@@ -14531,119 +13413,1344 @@ function headRequest(request) {
14531
13413
  submitData
14532
13414
  );
14533
13415
  },
14534
- /** gitcode手机号验证注册 */
14535
- registerByMobile(data) {
14536
- return reqCatch(
13416
+ /** gitcode手机号验证注册 */
13417
+ registerByMobile(data) {
13418
+ return reqCatch(
13419
+ () => request({
13420
+ url: "/api/v1/user/register",
13421
+ method: "post",
13422
+ data,
13423
+ headers: {
13424
+ "last-repo-id": getLastTimeRepoId(),
13425
+ "X-Source": getFullStepSource()
13426
+ }
13427
+ })
13428
+ );
13429
+ },
13430
+ /** 创建小程序二维码 */
13431
+ createMiniProgramQRCode(data) {
13432
+ return reqCatch(
13433
+ () => request({
13434
+ url: `/uc/api/v1/qrcode/${data.platform}`,
13435
+ method: "post",
13436
+ headers: {
13437
+ "X-Source": getLoginTriggerSource()
13438
+ }
13439
+ })
13440
+ );
13441
+ },
13442
+ /** 获取二维码状态 */
13443
+ getMiniProgramQRCodeStatus(params) {
13444
+ const { platform, scene_id } = params;
13445
+ return reqCatch(
13446
+ () => request({
13447
+ url: `/uc/api/v1/qrcode/${platform}`,
13448
+ method: "get",
13449
+ params: { scene_id }
13450
+ }),
13451
+ params
13452
+ );
13453
+ },
13454
+ /** 二维码扫码认证,登录 */
13455
+ miniProgramQRCodeLogin(params) {
13456
+ const { platform, scene_id } = params;
13457
+ return reqCatch(
13458
+ () => request({
13459
+ url: `/api/v1/user/oauth/login/qrcode/${platform}`,
13460
+ method: "post",
13461
+ params: { scene_id },
13462
+ headers: {
13463
+ "X-Source": getLoginTriggerSource()
13464
+ }
13465
+ })
13466
+ );
13467
+ },
13468
+ /** 获取配置的图片验证码类型 */
13469
+ getCaptchaType() {
13470
+ return reqCatch(
13471
+ () => request({
13472
+ url: `/uc/api/v1/captcha/config`,
13473
+ method: "get"
13474
+ })
13475
+ );
13476
+ },
13477
+ // mfa 恢复码登陆
13478
+ postMfaRecover(data) {
13479
+ return reqCatchV2(
14537
13480
  () => request({
14538
- url: "/api/v1/user/register",
13481
+ url: "/api/v1/user/oauth/login/mfa_recover",
14539
13482
  method: "post",
14540
13483
  data,
14541
13484
  headers: {
14542
- "last-repo-id": getLastTimeRepoId(),
14543
- "X-Source": getFullStepSource()
13485
+ "content-type": "application/x-www-form-urlencoded",
13486
+ "X-Source": getLoginTriggerSource()
14544
13487
  }
14545
13488
  })
14546
13489
  );
14547
13490
  },
14548
- /** 创建小程序二维码 */
14549
- createMiniProgramQRCode(data) {
14550
- return reqCatch(
13491
+ // mfa 验证码登陆
13492
+ postMfaLogin(data) {
13493
+ return reqCatchV2(
14551
13494
  () => request({
14552
- url: `/uc/api/v1/qrcode/${data.platform}`,
13495
+ url: "/api/v1/user/oauth/login/mfa",
14553
13496
  method: "post",
13497
+ data,
14554
13498
  headers: {
13499
+ "content-type": "application/x-www-form-urlencoded",
14555
13500
  "X-Source": getLoginTriggerSource()
14556
13501
  }
14557
13502
  })
14558
- );
14559
- },
14560
- /** 获取二维码状态 */
14561
- getMiniProgramQRCodeStatus(params) {
14562
- const { platform, scene_id } = params;
14563
- return reqCatch(
14564
- () => request({
14565
- url: `/uc/api/v1/qrcode/${platform}`,
14566
- method: "get",
14567
- params: { scene_id }
13503
+ );
13504
+ },
13505
+ getProjectIssuePrInfo() {
13506
+ return reqCatchV2(
13507
+ () => request({
13508
+ url: "/api/v2/projects/profile/project_issue_pr_info",
13509
+ method: "get"
13510
+ })
13511
+ );
13512
+ },
13513
+ // 获取主题菜单
13514
+ getThemeConfigList() {
13515
+ return reqCatch(() => request({
13516
+ url: `/aihub/api/v1/theme/label/config/list`,
13517
+ method: "get"
13518
+ }));
13519
+ },
13520
+ // 获取今日技术历史
13521
+ getTodayTechHistory() {
13522
+ return reqCatch(() => request({
13523
+ url: `/uc/api/v1/operation/tech-history`,
13524
+ method: "get"
13525
+ }));
13526
+ },
13527
+ // 查询是否是组织归属企业的企业成员
13528
+ getMemberByEnterprise(params) {
13529
+ return reqCatch(() => request({
13530
+ url: `/api/v2/ac/auth/enterprises/${params.enterpriseId}`,
13531
+ method: "get"
13532
+ }, {
13533
+ customError: true
13534
+ }));
13535
+ }
13536
+ };
13537
+ }
13538
+ const FIRST_NAMESPACE_KEY = "parent_org_path";
13539
+ const useBreadcrumb = () => {
13540
+ const router2 = useRouter();
13541
+ if (!router2) {
13542
+ return computed(() => []);
13543
+ }
13544
+ const repoInfo = inject(
13545
+ "repoInfo",
13546
+ computed(() => ({}))
13547
+ );
13548
+ const breadcrumb = computed(() => {
13549
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
13550
+ const isSubOrg = !!((_b = (_a = router2 == null ? void 0 : router2.currentRoute) == null ? void 0 : _a.value) == null ? void 0 : _b.params[FIRST_NAMESPACE_KEY]);
13551
+ const full_name = ((_d = (_c = repoInfo.value) == null ? void 0 : _c.namespace) == null ? void 0 : _d.full_name) || "";
13552
+ const name = ((_f = (_e = repoInfo.value) == null ? void 0 : _e.namespace) == null ? void 0 : _f.name) || "";
13553
+ const orgName = isSubOrg ? full_name : name;
13554
+ const repoName = ((_g = repoInfo.value) == null ? void 0 : _g.name) || "";
13555
+ const breadcrumbList = [
13556
+ {
13557
+ label: orgName,
13558
+ path: ""
13559
+ },
13560
+ {
13561
+ label: repoName,
13562
+ path: ""
13563
+ }
13564
+ ];
13565
+ const params = cloneDeep((_i = (_h = router2.currentRoute) == null ? void 0 : _h.value) == null ? void 0 : _i.params);
13566
+ if (isSubOrg) {
13567
+ params.namespace = params[FIRST_NAMESPACE_KEY];
13568
+ delete params[FIRST_NAMESPACE_KEY];
13569
+ }
13570
+ breadcrumbList[0].path = router2.resolve({
13571
+ name: "homepage",
13572
+ params
13573
+ }).path;
13574
+ breadcrumbList[breadcrumbList.length - 1].path = router2.resolve({
13575
+ name: "repoDashboard",
13576
+ params: {
13577
+ ...(_k = (_j = router2.currentRoute) == null ? void 0 : _j.value) == null ? void 0 : _k.params
13578
+ }
13579
+ }).path;
13580
+ return breadcrumbList;
13581
+ });
13582
+ return breadcrumb;
13583
+ };
13584
+ var relativeTime$1 = { exports: {} };
13585
+ (function(module, exports) {
13586
+ !function(r, e) {
13587
+ module.exports = e();
13588
+ }(commonjsGlobal, function() {
13589
+ return function(r, e, t2) {
13590
+ r = r || {};
13591
+ var n = e.prototype, o = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
13592
+ function i(r2, e2, t3, o2) {
13593
+ return n.fromToBase(r2, e2, t3, o2);
13594
+ }
13595
+ t2.en.relativeTime = o, n.fromToBase = function(e2, n2, i2, d2, u) {
13596
+ for (var f, a, s, l = i2.$locale().relativeTime || o, h2 = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], m = h2.length, c = 0; c < m; c += 1) {
13597
+ var y = h2[c];
13598
+ y.d && (f = d2 ? t2(e2).diff(i2, y.d, true) : i2.diff(e2, y.d, true));
13599
+ var p = (r.rounding || Math.round)(Math.abs(f));
13600
+ if (s = f > 0, p <= y.r || !y.r) {
13601
+ p <= 1 && c > 0 && (y = h2[c - 1]);
13602
+ var v = l[y.l];
13603
+ u && (p = u("" + p)), a = "string" == typeof v ? v.replace("%d", p) : v(p, n2, y.l, s);
13604
+ break;
13605
+ }
13606
+ }
13607
+ if (n2) return a;
13608
+ var M = s ? l.future : l.past;
13609
+ return "function" == typeof M ? M(a) : M.replace("%s", a);
13610
+ }, n.to = function(r2, e2) {
13611
+ return i(r2, e2, this, true);
13612
+ }, n.from = function(r2, e2) {
13613
+ return i(r2, e2, this);
13614
+ };
13615
+ var d = function(r2) {
13616
+ return r2.$u ? t2.utc() : t2();
13617
+ };
13618
+ n.toNow = function(r2) {
13619
+ return this.to(d(this), r2);
13620
+ }, n.fromNow = function(r2) {
13621
+ return this.from(d(this), r2);
13622
+ };
13623
+ };
13624
+ });
13625
+ })(relativeTime$1);
13626
+ var relativeTimeExports = relativeTime$1.exports;
13627
+ const relativeTime = /* @__PURE__ */ getDefaultExportFromCjs(relativeTimeExports);
13628
+ var zhCn = { exports: {} };
13629
+ (function(module, exports) {
13630
+ !function(e, _) {
13631
+ module.exports = _(dayjs);
13632
+ }(commonjsGlobal, function(e) {
13633
+ function _(e2) {
13634
+ return e2 && "object" == typeof e2 && "default" in e2 ? e2 : { default: e2 };
13635
+ }
13636
+ 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) {
13637
+ return "W" === _2 ? e2 + "周" : e2 + "日";
13638
+ }, 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) {
13639
+ var t3 = 100 * e2 + _2;
13640
+ return t3 < 600 ? "凌晨" : t3 < 900 ? "早上" : t3 < 1100 ? "上午" : t3 < 1300 ? "中午" : t3 < 1800 ? "下午" : "晚上";
13641
+ } };
13642
+ return t2.default.locale(d, null, true), d;
13643
+ });
13644
+ })(zhCn);
13645
+ var zhCnExports = zhCn.exports;
13646
+ const locale = /* @__PURE__ */ getDefaultExportFromCjs(zhCnExports);
13647
+ var timezone = { exports: {} };
13648
+ (function(module, exports) {
13649
+ !function(t2, e) {
13650
+ module.exports = e();
13651
+ }(commonjsGlobal, function() {
13652
+ var t2 = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, e = {};
13653
+ return function(n, i, r) {
13654
+ var o, a = function(t3, n2, i2) {
13655
+ void 0 === i2 && (i2 = {});
13656
+ var r2 = new Date(t3), o2 = function(t4, n3) {
13657
+ void 0 === n3 && (n3 = {});
13658
+ var i3 = n3.timeZoneName || "short", r3 = t4 + "|" + i3, o3 = e[r3];
13659
+ return o3 || (o3 = new Intl.DateTimeFormat("en-US", { hour12: false, timeZone: t4, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: i3 }), e[r3] = o3), o3;
13660
+ }(n2, i2);
13661
+ return o2.formatToParts(r2);
13662
+ }, u = function(e2, n2) {
13663
+ for (var i2 = a(e2, n2), o2 = [], u2 = 0; u2 < i2.length; u2 += 1) {
13664
+ var f2 = i2[u2], s2 = f2.type, m = f2.value, c = t2[s2];
13665
+ c >= 0 && (o2[c] = parseInt(m, 10));
13666
+ }
13667
+ var l = o2[3], d = 24 === l ? 0 : l, h2 = o2[0] + "-" + o2[1] + "-" + o2[2] + " " + d + ":" + o2[4] + ":" + o2[5] + ":000", v = +e2;
13668
+ return (r.utc(h2).valueOf() - (v -= v % 1e3)) / 6e4;
13669
+ }, f = i.prototype;
13670
+ f.tz = function(t3, e2) {
13671
+ if (void 0 === t3 && (t3 = o), !this.isValid()) return this;
13672
+ var n2, i2 = this.utcOffset(), a2 = this.toDate(), f2 = a2.toLocaleString("en-US", { timeZone: t3 }), s2 = u(+a2, t3);
13673
+ if (!Number(s2)) n2 = this.utcOffset(0, e2);
13674
+ else if (n2 = r(f2, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(s2, true), e2) {
13675
+ var m = n2.utcOffset();
13676
+ n2 = n2.add(i2 - m, "minute");
13677
+ }
13678
+ return n2.$x.$timezone = t3, n2;
13679
+ }, f.offsetName = function(t3) {
13680
+ var e2 = this.$x.$timezone || r.tz.guess(), n2 = a(this.valueOf(), e2, { timeZoneName: t3 }).find(function(t4) {
13681
+ return "timezonename" === t4.type.toLowerCase();
13682
+ });
13683
+ return n2 && n2.value;
13684
+ };
13685
+ var s = f.startOf;
13686
+ f.startOf = function(t3, e2) {
13687
+ if (!this.$x || !this.$x.$timezone) return s.call(this, t3, e2);
13688
+ var n2 = r(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
13689
+ return s.call(n2, t3, e2).tz(this.$x.$timezone, true);
13690
+ }, r.tz = function(t3, e2, n2) {
13691
+ var i2 = n2 && e2, a2 = n2 || e2 || o, f2 = u(+r(), a2);
13692
+ if ("string" != typeof t3) return r(t3).tz(a2);
13693
+ var s2 = r.utc(t3, i2).valueOf();
13694
+ if (Number.isNaN(s2)) {
13695
+ var m = r(NaN);
13696
+ return m.$x.$timezone = a2, m;
13697
+ }
13698
+ var c = function(t4, e3, n3) {
13699
+ var i3 = t4 - 60 * e3 * 1e3, r2 = u(i3, n3);
13700
+ if (e3 === r2) return [i3, e3];
13701
+ var o2 = u(i3 -= 60 * (r2 - e3) * 1e3, n3);
13702
+ return r2 === o2 ? [i3, r2] : [t4 - 60 * Math.min(r2, o2) * 1e3, Math.max(r2, o2)];
13703
+ }(s2, f2, a2), l = c[0], d = c[1], h2 = r(l).utcOffset(d);
13704
+ return h2.$x.$timezone = a2, h2;
13705
+ }, r.tz.guess = function() {
13706
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
13707
+ }, r.tz.setDefault = function(t3) {
13708
+ o = t3;
13709
+ };
13710
+ };
13711
+ });
13712
+ })(timezone);
13713
+ var timezoneExports = timezone.exports;
13714
+ const tz = /* @__PURE__ */ getDefaultExportFromCjs(timezoneExports);
13715
+ var utc$1 = { exports: {} };
13716
+ (function(module, exports) {
13717
+ !function(t2, i) {
13718
+ module.exports = i();
13719
+ }(commonjsGlobal, function() {
13720
+ var t2 = "minute", i = /[+-]\d\d(?::?\d\d)?/g, e = /([+-]|\d\d)/g;
13721
+ return function(s, f, n) {
13722
+ var u = f.prototype;
13723
+ n.utc = function(t3) {
13724
+ var i2 = { date: t3, utc: true, args: arguments };
13725
+ return new f(i2);
13726
+ }, u.utc = function(i2) {
13727
+ var e2 = n(this.toDate(), { locale: this.$L, utc: true });
13728
+ return i2 ? e2.add(this.utcOffset(), t2) : e2;
13729
+ }, u.local = function() {
13730
+ return n(this.toDate(), { locale: this.$L, utc: false });
13731
+ };
13732
+ var r = u.parse;
13733
+ u.parse = function(t3) {
13734
+ t3.utc && (this.$u = true), this.$utils().u(t3.$offset) || (this.$offset = t3.$offset), r.call(this, t3);
13735
+ };
13736
+ var o = u.init;
13737
+ u.init = function() {
13738
+ if (this.$u) {
13739
+ var t3 = this.$d;
13740
+ this.$y = t3.getUTCFullYear(), this.$M = t3.getUTCMonth(), this.$D = t3.getUTCDate(), this.$W = t3.getUTCDay(), this.$H = t3.getUTCHours(), this.$m = t3.getUTCMinutes(), this.$s = t3.getUTCSeconds(), this.$ms = t3.getUTCMilliseconds();
13741
+ } else o.call(this);
13742
+ };
13743
+ var a = u.utcOffset;
13744
+ u.utcOffset = function(s2, f2) {
13745
+ var n2 = this.$utils().u;
13746
+ if (n2(s2)) return this.$u ? 0 : n2(this.$offset) ? a.call(this) : this.$offset;
13747
+ if ("string" == typeof s2 && (s2 = function(t3) {
13748
+ void 0 === t3 && (t3 = "");
13749
+ var s3 = t3.match(i);
13750
+ if (!s3) return null;
13751
+ var f3 = ("" + s3[0]).match(e) || ["-", 0, 0], n3 = f3[0], u3 = 60 * +f3[1] + +f3[2];
13752
+ return 0 === u3 ? 0 : "+" === n3 ? u3 : -u3;
13753
+ }(s2), null === s2)) return this;
13754
+ var u2 = Math.abs(s2) <= 16 ? 60 * s2 : s2;
13755
+ if (0 === u2) return this.utc(f2);
13756
+ var r2 = this.clone();
13757
+ if (f2) return r2.$offset = u2, r2.$u = false, r2;
13758
+ var o2 = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
13759
+ return (r2 = this.local().add(u2 + o2, t2)).$offset = u2, r2.$x.$localOffset = o2, r2;
13760
+ };
13761
+ var h2 = u.format;
13762
+ u.format = function(t3) {
13763
+ var i2 = t3 || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
13764
+ return h2.call(this, i2);
13765
+ }, u.valueOf = function() {
13766
+ var t3 = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
13767
+ return this.$d.valueOf() - 6e4 * t3;
13768
+ }, u.isUTC = function() {
13769
+ return !!this.$u;
13770
+ }, u.toISOString = function() {
13771
+ return this.toDate().toISOString();
13772
+ }, u.toString = function() {
13773
+ return this.toDate().toUTCString();
13774
+ };
13775
+ var l = u.toDate;
13776
+ u.toDate = function(t3) {
13777
+ return "s" === t3 && this.$offset ? n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : l.call(this);
13778
+ };
13779
+ var c = u.diff;
13780
+ u.diff = function(t3, i2, e2) {
13781
+ if (t3 && this.$u === t3.$u) return c.call(this, t3, i2, e2);
13782
+ var s2 = this.local(), f2 = n(t3).local();
13783
+ return c.call(s2, f2, i2, e2);
13784
+ };
13785
+ };
13786
+ });
13787
+ })(utc$1);
13788
+ var utcExports = utc$1.exports;
13789
+ const utc = /* @__PURE__ */ getDefaultExportFromCjs(utcExports);
13790
+ dayjs.locale(locale);
13791
+ dayjs.extend(relativeTime);
13792
+ dayjs.extend(tz);
13793
+ dayjs.extend(utc);
13794
+ dayjs.tz.setDefault("Asia/Shanghai");
13795
+ const useTimeFormat = () => {
13796
+ const formatTimeFromNow = (time) => {
13797
+ if (!time) return "-";
13798
+ const targetDate = isDate$1(time) ? time : new Date(time);
13799
+ return formatTimeDifference(targetDate);
13800
+ };
13801
+ const formatTime = (time, format2) => {
13802
+ if (!time) return "-";
13803
+ return dayjs(time).format(format2);
13804
+ };
13805
+ return {
13806
+ formatTimeFromNow,
13807
+ formatTime
13808
+ };
13809
+ };
13810
+ const _hoisted_1$F = {
13811
+ key: 0,
13812
+ class: "org-layout-toolbar"
13813
+ };
13814
+ const _hoisted_2$v = { class: "org-layout-toolbar-title ellipsis-two-line" };
13815
+ const _hoisted_3$u = { class: "org-layout-toolbar-name" };
13816
+ const _hoisted_4$n = { class: "header-custom-btn-label" };
13817
+ const _hoisted_5$i = { class: "g-repo-breadcrumb-custom" };
13818
+ const _hoisted_6$g = {
13819
+ key: 1,
13820
+ class: "header-custom-mirrors-avatar"
13821
+ };
13822
+ const _hoisted_7$d = {
13823
+ key: 0,
13824
+ src: _imports_0,
13825
+ alt: "mirrors-avatar-phone",
13826
+ class: "header-custom-mirrors-img"
13827
+ };
13828
+ const _hoisted_8$b = {
13829
+ key: 1,
13830
+ src: "https://cdn-static.gitcode.com/static/images/mirrors-avata_20250411.gif",
13831
+ alt: "mirrors-avatar",
13832
+ class: "header-custom-mirrors-img-tall"
13833
+ };
13834
+ const _hoisted_9$a = { class: "g-repo-breadcrumb-container" };
13835
+ const _hoisted_10$9 = {
13836
+ key: 0,
13837
+ class: "header-custom-breadcrumb-row"
13838
+ };
13839
+ const _hoisted_11$7 = ["title"];
13840
+ const _hoisted_12$7 = ["title"];
13841
+ const _hoisted_13$4 = {
13842
+ key: 0,
13843
+ class: "header-custom-tag-mb"
13844
+ };
13845
+ const _hoisted_14$2 = {
13846
+ key: 1,
13847
+ class: "header-custom-tag-mb"
13848
+ };
13849
+ const _hoisted_15$2 = {
13850
+ key: 3,
13851
+ class: "header-custom-tag-mb"
13852
+ };
13853
+ const _hoisted_16$2 = {
13854
+ key: 4,
13855
+ class: "header-custom-tag-mb"
13856
+ };
13857
+ const _hoisted_17$2 = { class: "header-custom-topic-label" };
13858
+ const _hoisted_18$2 = {
13859
+ key: 6,
13860
+ class: "topic-tag font-color-t2 gh_mirros_tag"
13861
+ };
13862
+ const _hoisted_19$2 = { class: "header-custom-topic-label" };
13863
+ const _hoisted_20$2 = { class: "header-custom-skeleton" };
13864
+ const _hoisted_21$2 = {
13865
+ key: 2,
13866
+ class: "user-layout-toolbar"
13867
+ };
13868
+ const _hoisted_22$2 = { class: "user-layout-toolbar-title ellipsis-two-line" };
13869
+ const _hoisted_23$2 = { class: "header-custom-btn-label" };
13870
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
13871
+ __name: "HeaderCustom",
13872
+ props: {
13873
+ scene: { default: SceneValue.home },
13874
+ isLogin: { type: Boolean, default: false },
13875
+ errorCode: { default: 0 },
13876
+ orgProps: { default: () => ({}) },
13877
+ repoProps: { default: () => ({}) },
13878
+ userProps: { default: () => ({}) }
13879
+ },
13880
+ emits: ["followDevCommunity", "followUser"],
13881
+ setup(__props, { emit: __emit }) {
13882
+ const { t: t2 } = i18n.global;
13883
+ const layoutConfig2 = useLayoutConfig();
13884
+ const breadcrumb = useBreadcrumb();
13885
+ console.log("breadcrumb", breadcrumb);
13886
+ const breadcrumbRef = ref(null);
13887
+ const breadcrumbTextRef = ref(null);
13888
+ const breadcrumbNextRef = ref(null);
13889
+ const breadcrumbNextTextRef = ref(null);
13890
+ const { formatTimeFromNow } = useTimeFormat();
13891
+ const props = __props;
13892
+ const repoInfo = inject("repoInfo", computed(() => void 0));
13893
+ console.log("repoInfo", repoInfo);
13894
+ const orgInfo = inject("orgInfo", computed(() => void 0));
13895
+ const otherUserInfo = inject("otherUserInfo", computed(() => void 0));
13896
+ const API = headRequest(inject("request", proxyService));
13897
+ const emits = __emit;
13898
+ const handleOrgFollow = (val) => {
13899
+ if (props.scene !== SceneValue.org) return;
13900
+ if (!props.isLogin) {
13901
+ emitEvent("login", { triggerType: "关注组织", loginTriggerSource: "toolbar_org_follow" });
13902
+ return;
13903
+ }
13904
+ emits("followDevCommunity", !val);
13905
+ };
13906
+ const topicTag = computed(() => {
13907
+ var _a, _b;
13908
+ if (props.scene !== SceneValue.repo) return false;
13909
+ let repoType = 1;
13910
+ repoType = Number((_a = repoInfo.value) == null ? void 0 : _a.repo_type) - 1;
13911
+ if ((_b = props.repoProps) == null ? void 0 : _b.isSpaces) {
13912
+ repoType = 2;
13913
+ }
13914
+ if (repoType < 0) {
13915
+ return false;
13916
+ }
13917
+ const name = ["模型", "数据集", "Space"];
13918
+ const icon = ["gt-line-Models", "gt-line-Datasets", "gt-line-space"];
13919
+ const linkName = ["models", "datasets", "spaces"];
13920
+ const linkUrl = ["/models", "/datasets", "/space"];
13921
+ const suffix = ["Model", "Datasets", "Space"];
13922
+ const obj = {
13923
+ name: name[repoType],
13924
+ icon: icon[repoType],
13925
+ linkName: linkName[repoType],
13926
+ linkUrl: linkUrl[repoType],
13927
+ suffix: suffix[repoType]
13928
+ };
13929
+ return obj;
13930
+ });
13931
+ const isOrg = computed(() => {
13932
+ var _a, _b;
13933
+ if (props.scene === SceneValue.repo) {
13934
+ return ((_b = (_a = repoInfo.value) == null ? void 0 : _a.namespace) == null ? void 0 : _b.kind) === "group";
13935
+ }
13936
+ return false;
13937
+ });
13938
+ const orgEnterpriseId = computed(() => {
13939
+ var _a, _b;
13940
+ return (_b = (_a = orgInfo.value) == null ? void 0 : _a.enterprise) == null ? void 0 : _b.id;
13941
+ });
13942
+ const repoEnterpriseId = computed(() => {
13943
+ var _a, _b;
13944
+ return (_b = (_a = repoInfo.value) == null ? void 0 : _a.enterprise) == null ? void 0 : _b.id;
13945
+ });
13946
+ const orgEnterpriseName = computed(() => {
13947
+ var _a, _b;
13948
+ return ((_b = (_a = orgInfo.value) == null ? void 0 : _a.enterprise) == null ? void 0 : _b.name) || "";
13949
+ });
13950
+ const repoEnterpriseName = computed(() => {
13951
+ var _a, _b;
13952
+ return ((_b = (_a = repoInfo.value) == null ? void 0 : _a.enterprise) == null ? void 0 : _b.name) || "";
13953
+ });
13954
+ const ENTERPRISE_TIP_TEXT = {
13955
+ /** 组织场景 */
13956
+ org: { zh: "企业组织", en: "Enterprise organization" },
13957
+ /** 项目场景 */
13958
+ repo: { zh: "企业项目", en: "Enterprise project" }
13959
+ };
13960
+ const orgEnterpriseTip = isZh ? ENTERPRISE_TIP_TEXT.org.zh : ENTERPRISE_TIP_TEXT.org.en;
13961
+ const repoEnterpriseTip = isZh ? ENTERPRISE_TIP_TEXT.repo.zh : ENTERPRISE_TIP_TEXT.repo.en;
13962
+ const enterpriseMemberCache = /* @__PURE__ */ new Map();
13963
+ const pendingEnterpriseMemberReqs = /* @__PURE__ */ new Map();
13964
+ const fetchIsEnterpriseMember = (enterpriseId) => {
13965
+ const cached = enterpriseMemberCache.get(enterpriseId);
13966
+ if (cached !== void 0) {
13967
+ return Promise.resolve(cached);
13968
+ }
13969
+ const pending = pendingEnterpriseMemberReqs.get(enterpriseId);
13970
+ if (pending) {
13971
+ return pending;
13972
+ }
13973
+ const req = (async () => {
13974
+ var _a, _b;
13975
+ const res = await API.getMemberByEnterprise({ enterpriseId });
13976
+ const data = (_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data;
13977
+ const level = ((_b = data == null ? void 0 : data.role_info) == null ? void 0 : _b.access_level) || 0;
13978
+ const isMember = level > 10;
13979
+ enterpriseMemberCache.set(enterpriseId, isMember);
13980
+ pendingEnterpriseMemberReqs.delete(enterpriseId);
13981
+ return isMember;
13982
+ })();
13983
+ pendingEnterpriseMemberReqs.set(enterpriseId, req);
13984
+ return req;
13985
+ };
13986
+ const handleEnterpriseClick = async (enterpriseId, enterpriseName) => {
13987
+ if (!enterpriseId) return;
13988
+ const isMember = await fetchIsEnterpriseMember(String(enterpriseId));
13989
+ if (!isMember || !enterpriseName) return;
13990
+ if (typeof window !== "undefined" && window.location) {
13991
+ window.location.href = `${window.location.origin}/enterprises/${enterpriseName}`;
13992
+ }
13993
+ };
13994
+ const toAiHub = () => {
13995
+ if (props.scene !== SceneValue.repo) return;
13996
+ if (!topicTag.value) return;
13997
+ const aiUrl = `${layoutConfig2.VITE_AI_HOST}${topicTag.value.linkUrl}`;
13998
+ if (typeof window !== "undefined" && window.location) {
13999
+ window.location.href = aiUrl;
14000
+ }
14001
+ };
14002
+ const showTimeTopic = computed(() => {
14003
+ var _a, _b;
14004
+ if (props.scene !== SceneValue.repo) return false;
14005
+ if (!((_a = repoInfo.value) == null ? void 0 : _a.last_repository_updated_at)) {
14006
+ return false;
14007
+ }
14008
+ try {
14009
+ return (/* @__PURE__ */ new Date()).getTime() - new Date((_b = repoInfo.value) == null ? void 0 : _b.last_repository_updated_at).getTime() < 7 * 24 * 60 * 60 * 1e3;
14010
+ } catch (error) {
14011
+ return false;
14012
+ }
14013
+ });
14014
+ const formatTime = computed(() => {
14015
+ var _a;
14016
+ return formatTimeFromNow(((_a = repoInfo.value) == null ? void 0 : _a.last_repository_updated_at) || "");
14017
+ });
14018
+ const handleFollowUser = () => {
14019
+ if (props.scene !== SceneValue.user) return;
14020
+ emits("followUser");
14021
+ };
14022
+ const handleBreadcrumbCopy = (e) => {
14023
+ const container = document.querySelector(".g-repo-breadcrumb-custom");
14024
+ if (!container) return;
14025
+ const selection = window.getSelection();
14026
+ if (!selection || !selection.rangeCount) return;
14027
+ const range = selection.getRangeAt(0);
14028
+ const selectedText = selection.toString().trim();
14029
+ const isSelectionInContainer = container.contains(range.startContainer) && container.contains(range.endContainer);
14030
+ if (isSelectionInContainer && selectedText) {
14031
+ e.preventDefault();
14032
+ if (e.clipboardData) {
14033
+ e.clipboardData.setData("text/plain", selectedText.replace(/\s+/g, ""));
14034
+ }
14035
+ }
14036
+ };
14037
+ onMounted(() => {
14038
+ document.addEventListener("copy", handleBreadcrumbCopy);
14039
+ });
14040
+ onUnmounted(() => {
14041
+ document.removeEventListener("copy", handleBreadcrumbCopy);
14042
+ });
14043
+ return (_ctx, _cache) => {
14044
+ var _a, _b, _c;
14045
+ return __props.scene === unref(SceneValue).org && !__props.errorCode ? (openBlock(), createElementBlock("div", _hoisted_1$F, [
14046
+ createVNode(GLink, {
14047
+ href: ((_a = __props.orgProps) == null ? void 0 : _a.orgHomepageUrl) || "",
14048
+ class: "header-custom-link"
14049
+ }, {
14050
+ default: withCtx(() => {
14051
+ var _a2, _b2, _c2;
14052
+ return [
14053
+ createVNode(_sfc_main$N, {
14054
+ class: "g-border",
14055
+ src: ((_a2 = unref(orgInfo)) == null ? void 0 : _a2.avatar) || "",
14056
+ name: ((_b2 = unref(orgInfo)) == null ? void 0 : _b2.name) || "",
14057
+ width: 28,
14058
+ height: 28,
14059
+ is_round: false
14060
+ }, null, 8, ["src", "name"]),
14061
+ createElementVNode("div", _hoisted_2$v, [
14062
+ createElementVNode("span", _hoisted_3$u, toDisplayString$1((_c2 = unref(orgInfo)) == null ? void 0 : _c2.name), 1)
14063
+ ]),
14064
+ orgEnterpriseId.value ? (openBlock(), createBlock(unref(Tooltip), {
14065
+ key: 0,
14066
+ content: unref(orgEnterpriseTip),
14067
+ position: ["top", "bottom"]
14068
+ }, {
14069
+ default: withCtx(() => [
14070
+ createElementVNode("span", {
14071
+ class: "header-custom-enterprise-btn org-layout-toolbar-enterprise",
14072
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => handleEnterpriseClick(orgEnterpriseId.value, orgEnterpriseName.value), ["stop", "prevent"]))
14073
+ }, [
14074
+ createVNode(GIcon, {
14075
+ name: "gt-enterprise1",
14076
+ size: "16px",
14077
+ class: "header-custom-enterprise-icon"
14078
+ })
14079
+ ])
14080
+ ]),
14081
+ _: 1
14082
+ }, 8, ["content"])) : createCommentVNode("", true)
14083
+ ];
14084
+ }),
14085
+ _: 1
14086
+ }, 8, ["href"]),
14087
+ createVNode(unref(Button), {
14088
+ onClick: _cache[1] || (_cache[1] = ($event) => {
14089
+ var _a2;
14090
+ return handleOrgFollow((_a2 = __props.orgProps) == null ? void 0 : _a2.isOrgFollow);
14091
+ }),
14092
+ class: "org-layout-toolbar-follow"
14093
+ }, {
14094
+ default: withCtx(() => {
14095
+ var _a2;
14096
+ return [
14097
+ createElementVNode("span", _hoisted_4$n, toDisplayString$1(((_a2 = __props.orgProps) == null ? void 0 : _a2.isOrgFollow) ? unref(t2)("gitCodeLayout.home.alreadyFollowed") : unref(t2)("gitCodeLayout.home.focusOn")), 1)
14098
+ ];
14099
+ }),
14100
+ _: 1
14101
+ })
14102
+ ])) : __props.scene === unref(SceneValue).repo && !__props.errorCode ? (openBlock(), createBlock(unref(Skeleton), {
14103
+ key: 1,
14104
+ loading: (_b = __props.repoProps) == null ? void 0 : _b.repoNameLoading,
14105
+ rows: 1
14106
+ }, {
14107
+ placeholder: withCtx(() => [
14108
+ createElementVNode("div", _hoisted_20$2, [
14109
+ createVNode(unref(SkeletonItem), {
14110
+ round: "",
14111
+ style: { "width": "30px", "height": "30px" }
14112
+ }),
14113
+ createVNode(unref(SkeletonItem), { style: { "margin-left": "12px", "width": "80px", "height": "24px" } })
14114
+ ])
14115
+ ]),
14116
+ default: withCtx(() => {
14117
+ var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
14118
+ return [
14119
+ createElementVNode("h2", _hoisted_5$i, [
14120
+ createVNode(GLink, {
14121
+ href: (_a2 = unref(breadcrumb)[0]) == null ? void 0 : _a2.path,
14122
+ class: "header-custom-avatar-link"
14123
+ }, {
14124
+ default: withCtx(() => {
14125
+ var _a3, _b3, _c3, _d2;
14126
+ return [
14127
+ !((_a3 = __props.repoProps) == null ? void 0 : _a3.isGhMirrors) ? (openBlock(), createBlock(_sfc_main$N, {
14128
+ key: 0,
14129
+ class: normalizeClass({ "g-border": isOrg.value }),
14130
+ src: ((_c3 = (_b3 = unref(repoInfo)) == null ? void 0 : _b3.namespace) == null ? void 0 : _c3.avatar_url) || "",
14131
+ name: ((_d2 = unref(repoInfo)) == null ? void 0 : _d2.name) || "",
14132
+ width: 28,
14133
+ height: 28,
14134
+ is_round: !isOrg.value
14135
+ }, null, 8, ["class", "src", "name", "is_round"])) : (openBlock(), createElementBlock("div", _hoisted_6$g, [
14136
+ unref(isPhone)() ? (openBlock(), createElementBlock("img", _hoisted_7$d)) : (openBlock(), createElementBlock("img", _hoisted_8$b))
14137
+ ]))
14138
+ ];
14139
+ }),
14140
+ _: 1
14141
+ }, 8, ["href"]),
14142
+ createElementVNode("div", _hoisted_9$a, [
14143
+ !((_b2 = __props.repoProps) == null ? void 0 : _b2.isGhMirrors) ? (openBlock(), createElementBlock("div", {
14144
+ key: 0,
14145
+ ref_key: "breadcrumbRef",
14146
+ ref: breadcrumbRef,
14147
+ class: "g-repo-layout-breadcrumb"
14148
+ }, [
14149
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(breadcrumb), (item, index2) => {
14150
+ return openBlock(), createElementBlock(Fragment, {
14151
+ key: item.path
14152
+ }, [
14153
+ index2 !== unref(breadcrumb).length - 1 ? (openBlock(), createElementBlock("span", _hoisted_10$9, [
14154
+ createVNode(GLink, {
14155
+ class: "linkTx",
14156
+ href: item.path
14157
+ }, {
14158
+ default: withCtx(() => [
14159
+ createElementVNode("span", {
14160
+ ref_for: true,
14161
+ ref_key: "breadcrumbTextRef",
14162
+ ref: breadcrumbTextRef,
14163
+ title: item.label,
14164
+ class: normalizeClass(["linkTx", index2 === unref(breadcrumb).length - 1 ? "header-custom-bold" : ""])
14165
+ }, toDisplayString$1(item.label), 11, _hoisted_11$7)
14166
+ ]),
14167
+ _: 2
14168
+ }, 1032, ["href"]),
14169
+ _cache[3] || (_cache[3] = createElementVNode("span", { class: "breadcrumb-splitter font-color-t1" }, " / ", -1))
14170
+ ])) : createCommentVNode("", true)
14171
+ ], 64);
14172
+ }), 128))
14173
+ ], 512)) : createCommentVNode("", true),
14174
+ unref(breadcrumb)[unref(breadcrumb).length - 1] ? (openBlock(), createElementBlock("div", {
14175
+ key: 1,
14176
+ ref_key: "breadcrumbNextRef",
14177
+ ref: breadcrumbNextRef,
14178
+ class: normalizeClass(["g-repo-layout-breadcrumb-next", [((_c2 = __props.repoProps) == null ? void 0 : _c2.isGhMirrors) ? "g-repo-layout-breadcrumb-next--full" : "g-repo-layout-breadcrumb-next--limit"]])
14179
+ }, [
14180
+ createVNode(GLink, {
14181
+ class: "linkTx",
14182
+ href: (_d = unref(breadcrumb)[unref(breadcrumb).length - 1]) == null ? void 0 : _d.path
14183
+ }, {
14184
+ default: withCtx(() => [
14185
+ createElementVNode("span", {
14186
+ ref_key: "breadcrumbNextTextRef",
14187
+ ref: breadcrumbNextTextRef,
14188
+ title: unref(breadcrumb)[unref(breadcrumb).length - 1].label,
14189
+ class: "linkTx header-custom-bold"
14190
+ }, toDisplayString$1(unref(breadcrumb)[unref(breadcrumb).length - 1].label), 9, _hoisted_12$7)
14191
+ ]),
14192
+ _: 1
14193
+ }, 8, ["href"]),
14194
+ unref(isGstarRepo)((_e = unref(repoInfo)) == null ? void 0 : _e.topic_names) ? (openBlock(), createElementBlock("div", _hoisted_13$4, [
14195
+ createVNode(_sfc_main$M, {
14196
+ origin: "repo",
14197
+ icon: "",
14198
+ type: "gstar",
14199
+ message: `G-Star ${unref(t2)("gitCodeLayout.GStar.project.graduation")}`
14200
+ }, {
14201
+ default: withCtx(() => [..._cache[4] || (_cache[4] = [
14202
+ createTextVNode("G-Star ", -1)
14203
+ ])]),
14204
+ _: 1
14205
+ }, 8, ["message"])
14206
+ ])) : unref(isIncubationRepo)((_f = unref(repoInfo)) == null ? void 0 : _f.topic_names) ? (openBlock(), createElementBlock("div", _hoisted_14$2, [
14207
+ createVNode(_sfc_main$M, {
14208
+ origin: "repo",
14209
+ icon: "",
14210
+ type: "incubation",
14211
+ message: `G-Star ${unref(t2)("gitCodeLayout.GStar.project.incubation")}`
14212
+ }, {
14213
+ default: withCtx(() => [..._cache[5] || (_cache[5] = [
14214
+ createTextVNode(" G-Star ", -1)
14215
+ ])]),
14216
+ _: 1
14217
+ }, 8, ["message"])
14218
+ ])) : createCommentVNode("", true),
14219
+ repoEnterpriseId.value ? (openBlock(), createBlock(unref(Tooltip), {
14220
+ key: 2,
14221
+ content: unref(repoEnterpriseTip),
14222
+ position: ["top", "bottom"]
14223
+ }, {
14224
+ default: withCtx(() => [
14225
+ createElementVNode("div", {
14226
+ class: "header-custom-tag-mb header-custom-enterprise-btn",
14227
+ onClick: _cache[2] || (_cache[2] = ($event) => handleEnterpriseClick(repoEnterpriseId.value, repoEnterpriseName.value))
14228
+ }, [
14229
+ createVNode(GIcon, {
14230
+ name: "gt-enterprise1",
14231
+ size: "16px",
14232
+ class: "header-custom-enterprise-icon"
14233
+ })
14234
+ ])
14235
+ ]),
14236
+ _: 1
14237
+ }, 8, ["content"])) : createCommentVNode("", true),
14238
+ unref(isTrustedRepo)((_g = unref(repoInfo)) == null ? void 0 : _g.topic_names) ? (openBlock(), createElementBlock("div", _hoisted_15$2, [
14239
+ createVNode(_sfc_main$M, {
14240
+ trusted: "",
14241
+ message: unref(t2)("gitCodeLayout.trusted.title"),
14242
+ icon: "",
14243
+ type: "trusted",
14244
+ href: "/trusted"
14245
+ }, null, 8, ["message"])
14246
+ ])) : createCommentVNode("", true),
14247
+ ((_h = __props.repoProps) == null ? void 0 : _h.isPrivate) ? (openBlock(), createElementBlock("div", _hoisted_16$2, [
14248
+ createVNode(GIcon, {
14249
+ size: "16px",
14250
+ class: "header-custom-lock-icon",
14251
+ name: "gt-line-lock"
14252
+ })
14253
+ ])) : createCommentVNode("", true),
14254
+ topicTag.value ? (openBlock(), createElementBlock("div", {
14255
+ key: 5,
14256
+ class: "topic-tag font-color-t2",
14257
+ onClick: toAiHub
14258
+ }, [
14259
+ createVNode(GIcon, {
14260
+ name: (_i = topicTag.value) == null ? void 0 : _i.icon,
14261
+ color: "var(--devui-shape-icon-fill)",
14262
+ class: "header-custom-topic-icon"
14263
+ }, null, 8, ["name"]),
14264
+ createElementVNode("span", _hoisted_17$2, toDisplayString$1((_j = topicTag.value) == null ? void 0 : _j.suffix), 1)
14265
+ ])) : createCommentVNode("", true),
14266
+ ((_k = __props.repoProps) == null ? void 0 : _k.isGhMirrors) && showTimeTopic.value && !unref(isPhone)() ? (openBlock(), createElementBlock("div", _hoisted_18$2, [
14267
+ createVNode(GIcon, {
14268
+ name: "gt-line-time",
14269
+ color: "var(--devui-shape-icon-fill)",
14270
+ class: "header-custom-topic-icon"
14271
+ }),
14272
+ createElementVNode("span", _hoisted_19$2, toDisplayString$1(formatTime.value) + toDisplayString$1(unref(t2)("gitCodeLayout.repo.code.syncText")), 1)
14273
+ ])) : createCommentVNode("", true)
14274
+ ], 2)) : createCommentVNode("", true)
14275
+ ])
14276
+ ])
14277
+ ];
14568
14278
  }),
14569
- params
14570
- );
14571
- },
14572
- /** 二维码扫码认证,登录 */
14573
- miniProgramQRCodeLogin(params) {
14574
- const { platform, scene_id } = params;
14575
- return reqCatch(
14576
- () => request({
14577
- url: `/api/v1/user/oauth/login/qrcode/${platform}`,
14578
- method: "post",
14579
- params: { scene_id },
14580
- headers: {
14581
- "X-Source": getLoginTriggerSource()
14582
- }
14583
- })
14584
- );
14585
- },
14586
- /** 获取配置的图片验证码类型 */
14587
- getCaptchaType() {
14588
- return reqCatch(
14589
- () => request({
14590
- url: `/uc/api/v1/captcha/config`,
14591
- method: "get"
14592
- })
14593
- );
14594
- },
14595
- // mfa 恢复码登陆
14596
- postMfaRecover(data) {
14597
- return reqCatchV2(
14598
- () => request({
14599
- url: "/api/v1/user/oauth/login/mfa_recover",
14600
- method: "post",
14601
- data,
14602
- headers: {
14603
- "content-type": "application/x-www-form-urlencoded",
14604
- "X-Source": getLoginTriggerSource()
14605
- }
14606
- })
14607
- );
14608
- },
14609
- // mfa 验证码登陆
14610
- postMfaLogin(data) {
14611
- return reqCatchV2(
14612
- () => request({
14613
- url: "/api/v1/user/oauth/login/mfa",
14614
- method: "post",
14615
- data,
14616
- headers: {
14617
- "content-type": "application/x-www-form-urlencoded",
14618
- "X-Source": getLoginTriggerSource()
14619
- }
14620
- })
14621
- );
14622
- },
14623
- getProjectIssuePrInfo() {
14624
- return reqCatchV2(
14625
- () => request({
14626
- url: "/api/v2/projects/profile/project_issue_pr_info",
14627
- method: "get"
14279
+ _: 1
14280
+ }, 8, ["loading"])) : __props.scene === unref(SceneValue).user && ((_c = __props.userProps) == null ? void 0 : _c.isOtherUser) ? (openBlock(), createElementBlock("div", _hoisted_21$2, [
14281
+ createVNode(GLink, {
14282
+ to: { name: "homepage" },
14283
+ class: "header-custom-link"
14284
+ }, {
14285
+ default: withCtx(() => {
14286
+ var _a2, _b2, _c2, _d, _e;
14287
+ return [
14288
+ createVNode(_sfc_main$N, {
14289
+ src: (_a2 = unref(otherUserInfo)) == null ? void 0 : _a2.avatarUrl,
14290
+ name: ((_b2 = unref(otherUserInfo)) == null ? void 0 : _b2.name) || ((_c2 = unref(otherUserInfo)) == null ? void 0 : _c2.nickname),
14291
+ width: 28,
14292
+ height: 28
14293
+ }, null, 8, ["src", "name"]),
14294
+ createElementVNode("div", _hoisted_22$2, toDisplayString$1(((_d = unref(otherUserInfo)) == null ? void 0 : _d.name) || ((_e = unref(otherUserInfo)) == null ? void 0 : _e.nickname)), 1)
14295
+ ];
14296
+ }),
14297
+ _: 1
14298
+ }),
14299
+ createVNode(unref(Button), {
14300
+ onClick: handleFollowUser,
14301
+ class: "user-layout-toolbar-follow"
14302
+ }, {
14303
+ default: withCtx(() => {
14304
+ var _a2;
14305
+ return [
14306
+ createElementVNode("span", _hoisted_23$2, toDisplayString$1(((_a2 = unref(otherUserInfo)) == null ? void 0 : _a2.isFollow) ? unref(t2)("gitCodeLayout.org.following") : unref(t2)("gitCodeLayout.common.topic.attention")), 1)
14307
+ ];
14308
+ }),
14309
+ _: 1
14628
14310
  })
14629
- );
14630
- },
14631
- // 获取主题菜单
14632
- getThemeConfigList() {
14633
- return reqCatch(() => request({
14634
- url: `/aihub/api/v1/theme/label/config/list`,
14635
- method: "get"
14636
- }));
14637
- },
14638
- // 获取今日技术历史
14639
- getTodayTechHistory() {
14640
- return reqCatch(() => request({
14641
- url: `/uc/api/v1/operation/tech-history`,
14642
- method: "get"
14643
- }));
14311
+ ])) : createCommentVNode("", true);
14312
+ };
14313
+ }
14314
+ });
14315
+ const HeaderCustom = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-vue-layout-gitcode"]]);
14316
+ const _hoisted_1$E = ["src"];
14317
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
14318
+ ...{ name: "OperationEntry" },
14319
+ __name: "OperationEntry",
14320
+ setup(__props) {
14321
+ const request = inject("request");
14322
+ const API = asideRequest(request);
14323
+ const headerEntryConfig = ref({
14324
+ img_light: "",
14325
+ img_dark: "",
14326
+ url: ""
14327
+ });
14328
+ const handleClick = () => {
14329
+ var _a;
14330
+ window.open(`${transformUrl((_a = headerEntryConfig.value) == null ? void 0 : _a.url)}`, "_blank");
14331
+ };
14332
+ const img = computed(() => {
14333
+ const { img_light, img_dark } = headerEntryConfig.value;
14334
+ return (currentTheme.value === ThemeType.BLACK ? img_dark : img_light) || img_light;
14335
+ });
14336
+ const getHeaderEntryConfig = async () => {
14337
+ var _a;
14338
+ try {
14339
+ const res = await API.getHeaderEntryConfig();
14340
+ const data = ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data) || {};
14341
+ headerEntryConfig.value = {
14342
+ img_light: data.img_light,
14343
+ img_dark: data.img_dark,
14344
+ url: data.url
14345
+ };
14346
+ } catch (error) {
14347
+ console.error(error);
14348
+ }
14349
+ };
14350
+ getHeaderEntryConfig();
14351
+ return (_ctx, _cache) => {
14352
+ return img.value && headerEntryConfig.value.url ? (openBlock(), createElementBlock("div", {
14353
+ key: 0,
14354
+ class: "operation-entry",
14355
+ onClick: handleClick
14356
+ }, [
14357
+ createElementVNode("img", {
14358
+ class: "operation-entry__img",
14359
+ src: img.value,
14360
+ alt: "operation-entry"
14361
+ }, null, 8, _hoisted_1$E)
14362
+ ])) : createCommentVNode("", true);
14363
+ };
14364
+ }
14365
+ });
14366
+ const OperationEntry = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-vue-layout-gitcode"]]);
14367
+ const _hoisted_1$D = ["src"];
14368
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
14369
+ __name: "ClaimPower",
14370
+ props: {
14371
+ config: {}
14372
+ },
14373
+ setup(__props) {
14374
+ const props = __props;
14375
+ const visible = computed(() => {
14376
+ return props.config.visible;
14377
+ });
14378
+ const handleClick = () => {
14379
+ console.log("handleClick");
14380
+ window.open(props.config.jump_url, "_blank");
14381
+ };
14382
+ return (_ctx, _cache) => {
14383
+ return visible.value ? (openBlock(), createElementBlock("div", {
14384
+ key: 0,
14385
+ class: "computing-power",
14386
+ onClick: handleClick
14387
+ }, [
14388
+ createElementVNode("img", {
14389
+ src: __props.config.logo_url,
14390
+ alt: "claim power"
14391
+ }, null, 8, _hoisted_1$D)
14392
+ ])) : createCommentVNode("", true);
14393
+ };
14394
+ }
14395
+ });
14396
+ const ClaimPower = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-vue-layout-gitcode"]]);
14397
+ const DEFAULT_APPLICATION_HOST = "https://gitcode.com";
14398
+ function normalizeApplicationHost(host) {
14399
+ return (host || DEFAULT_APPLICATION_HOST).replace(/\/+$/, "");
14400
+ }
14401
+ function getRoutePart(href, baseUrl) {
14402
+ try {
14403
+ const url = new URL(href || "/", `${baseUrl}/`);
14404
+ return `${url.pathname || "/"}${url.search}${url.hash}`;
14405
+ } catch {
14406
+ const value = href.trim();
14407
+ return value.startsWith("/") ? value : `/${value}`;
14408
+ }
14409
+ }
14410
+ function toApplicationUrl(applicationHost, href) {
14411
+ const host = normalizeApplicationHost(applicationHost);
14412
+ return `${host}${getRoutePart(href, host)}`;
14413
+ }
14414
+ function toApplicationRoute(applicationHost, href) {
14415
+ try {
14416
+ const url = new URL(toApplicationUrl(applicationHost, href));
14417
+ return `${url.pathname || "/"}${url.search}${url.hash}`;
14418
+ } catch {
14419
+ return null;
14420
+ }
14421
+ }
14422
+ const HEADER_CREATE_MENU_PATHS = [
14423
+ "/create?position=nav_top",
14424
+ "/create/migrate?type=3",
14425
+ "/models/create",
14426
+ "/datasets/create",
14427
+ "/space/create",
14428
+ "/collections/create",
14429
+ "/org/create"
14430
+ ];
14431
+ const HEADER_CREATE_ENTERPRISE_PATH = "/enterprises/new";
14432
+ const _hoisted_1$C = { class: "g-header-create dashboard-create-menu" };
14433
+ const _hoisted_2$u = ["title", "aria-label", "aria-expanded"];
14434
+ const _hoisted_3$t = { class: "dashboard-create-menu__trigger-text" };
14435
+ const _hoisted_4$m = ["aria-label"];
14436
+ const _hoisted_5$h = {
14437
+ key: 0,
14438
+ class: "dashboard-create-menu__divider",
14439
+ role: "separator"
14440
+ };
14441
+ const _hoisted_6$f = ["href", "onClick", "onKeydown"];
14442
+ const _hoisted_7$c = { class: "dashboard-create-menu__title-row" };
14443
+ const _hoisted_8$a = { class: "dashboard-create-menu__title" };
14444
+ const _hoisted_9$9 = {
14445
+ key: 0,
14446
+ class: "dashboard-create-menu__desc"
14447
+ };
14448
+ const menuId = "gitcode-header-create-menu";
14449
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
14450
+ ...{
14451
+ name: "HeaderCreateMenu"
14452
+ },
14453
+ __name: "index",
14454
+ props: {
14455
+ dropdownVisible: { type: Boolean, default: false },
14456
+ isCreateOrg: { type: Boolean, default: true },
14457
+ isCreateEnterprise: { type: Boolean, default: true },
14458
+ items: { default: void 0 },
14459
+ onNavigate: { type: Function, default: void 0 }
14460
+ },
14461
+ emits: ["update:dropdownVisible", "navigate"],
14462
+ setup(__props, { emit: __emit }) {
14463
+ const props = __props;
14464
+ const emit = __emit;
14465
+ const { t: t2 } = i18n.global;
14466
+ const layoutConfig2 = useLayoutConfig();
14467
+ const route = useRoute();
14468
+ const router2 = useRouter();
14469
+ const triggerRef = ref(null);
14470
+ const menuRef = ref(null);
14471
+ const menuOpen = ref(false);
14472
+ const defaultMenuItems = computed(() => {
14473
+ const [repoPath, importPath, modelPath, datasetPath, spacePath, collectionPath, orgPath] = HEADER_CREATE_MENU_PATHS;
14474
+ return [
14475
+ {
14476
+ key: "repo",
14477
+ icon: "gt-a-Property1default",
14478
+ label: t2("gitCodeLayout.header.createMenuRepository"),
14479
+ href: toApplicationUrl(layoutConfig2.VITE_HOST, repoPath)
14480
+ },
14481
+ {
14482
+ key: "import-repository",
14483
+ icon: "gt-a-plane-fileinport",
14484
+ label: t2("gitCodeLayout.header.createMenuImportRepository"),
14485
+ href: toApplicationUrl(layoutConfig2.VITE_HOST, importPath)
14486
+ },
14487
+ {
14488
+ key: "model",
14489
+ icon: "gt-plane-Models",
14490
+ label: t2("gitCodeLayout.header.createMenuModel"),
14491
+ href: toApplicationUrl(layoutConfig2.VITE_HOST, modelPath)
14492
+ },
14493
+ {
14494
+ key: "dataset",
14495
+ icon: "gt-plane-Datasets",
14496
+ label: t2("gitCodeLayout.header.createMenuDataset"),
14497
+ href: toApplicationUrl(layoutConfig2.VITE_HOST, datasetPath)
14498
+ },
14499
+ {
14500
+ key: "space",
14501
+ icon: "gt-plane-Space",
14502
+ label: t2("gitCodeLayout.header.createMenuSpace"),
14503
+ href: toApplicationUrl(layoutConfig2.VITE_HOST, spacePath)
14504
+ },
14505
+ {
14506
+ key: "collection",
14507
+ icon: "gt-a-dashujuyufenxishuxing1guan",
14508
+ label: t2("gitCodeLayout.header.createMenuCollection"),
14509
+ href: toApplicationUrl(layoutConfig2.VITE_HOST, collectionPath)
14510
+ },
14511
+ {
14512
+ key: "organization",
14513
+ icon: "gt-plane-organization",
14514
+ label: t2("gitCodeLayout.header.createMenuOrganization"),
14515
+ href: toApplicationUrl(layoutConfig2.VITE_HOST, orgPath),
14516
+ dividerBefore: true
14517
+ }
14518
+ ];
14519
+ });
14520
+ const enterpriseMenuItem = {
14521
+ key: "enterprise",
14522
+ icon: "gt-a-plane-enterprise",
14523
+ label: t2("gitCodeLayout.header.createMenuEnterprise"),
14524
+ href: toApplicationUrl(layoutConfig2.VITE_HOST, HEADER_CREATE_ENTERPRISE_PATH),
14525
+ useHref: true
14526
+ };
14527
+ const menuItems = computed(() => {
14528
+ const baseItems = props.items || defaultMenuItems.value;
14529
+ const items = props.isCreateOrg ? baseItems : baseItems.filter((item) => item.key !== "organization");
14530
+ return props.isCreateEnterprise ? [...items, enterpriseMenuItem] : items;
14531
+ });
14532
+ function getMenuItems() {
14533
+ var _a;
14534
+ return Array.from(((_a = menuRef.value) == null ? void 0 : _a.querySelectorAll('[role="menuitem"]')) || []);
14644
14535
  }
14645
- };
14646
- }
14536
+ function focusMenuItem(index2) {
14537
+ void nextTick(() => {
14538
+ var _a;
14539
+ const items = getMenuItems();
14540
+ if (!items.length) return;
14541
+ const safeIndex = Math.min(Math.max(index2, 0), items.length - 1);
14542
+ (_a = items[safeIndex]) == null ? void 0 : _a.focus();
14543
+ });
14544
+ }
14545
+ function closeMenu(restoreFocus = false) {
14546
+ if (!menuOpen.value) return;
14547
+ menuOpen.value = false;
14548
+ emit("update:dropdownVisible", false);
14549
+ if (restoreFocus) {
14550
+ void nextTick(() => {
14551
+ var _a;
14552
+ return (_a = triggerRef.value) == null ? void 0 : _a.focus();
14553
+ });
14554
+ }
14555
+ }
14556
+ const handleToggle = (value) => {
14557
+ if (menuOpen.value === value) return;
14558
+ menuOpen.value = value;
14559
+ emit("update:dropdownVisible", value);
14560
+ };
14561
+ function onTriggerKeydown(event) {
14562
+ if (event.key === "ArrowDown") {
14563
+ event.preventDefault();
14564
+ menuOpen.value = true;
14565
+ emit("update:dropdownVisible", true);
14566
+ focusMenuItem(0);
14567
+ } else if (event.key === "ArrowUp") {
14568
+ event.preventDefault();
14569
+ menuOpen.value = true;
14570
+ emit("update:dropdownVisible", true);
14571
+ focusMenuItem(menuItems.value.length - 1);
14572
+ } else if (event.key === "Escape") {
14573
+ event.preventDefault();
14574
+ closeMenu(true);
14575
+ }
14576
+ }
14577
+ function onMenuItemKeydown(event, index2) {
14578
+ if (event.key === "ArrowDown") {
14579
+ event.preventDefault();
14580
+ focusMenuItem((index2 + 1) % menuItems.value.length);
14581
+ } else if (event.key === "ArrowUp") {
14582
+ event.preventDefault();
14583
+ focusMenuItem((index2 - 1 + menuItems.value.length) % menuItems.value.length);
14584
+ } else if (event.key === "Home") {
14585
+ event.preventDefault();
14586
+ focusMenuItem(0);
14587
+ } else if (event.key === "End") {
14588
+ event.preventDefault();
14589
+ focusMenuItem(menuItems.value.length - 1);
14590
+ } else if (event.key === "Escape") {
14591
+ event.preventDefault();
14592
+ closeMenu(true);
14593
+ } else if (event.key === " ") {
14594
+ event.preventDefault();
14595
+ if (event.currentTarget instanceof HTMLElement) event.currentTarget.click();
14596
+ }
14597
+ }
14598
+ function stripRouterBase(route2) {
14599
+ const base = router2.options.history.base;
14600
+ if (!base || base === "/") return route2;
14601
+ if (route2 === base) return "/";
14602
+ return route2.startsWith(`${base}/`) ? route2.slice(base.length) : route2;
14603
+ }
14604
+ function navigateTo(href) {
14605
+ const applicationHref = toApplicationUrl(layoutConfig2.VITE_HOST, href);
14606
+ const applicationRoute = toApplicationRoute(layoutConfig2.VITE_HOST, href);
14607
+ if (!applicationRoute) return;
14608
+ if (typeof window !== "undefined") {
14609
+ const applicationUrl = new URL(applicationHref);
14610
+ if (applicationUrl.origin !== window.location.origin) {
14611
+ window.location.href = applicationHref;
14612
+ return;
14613
+ }
14614
+ } else {
14615
+ void router2.push(stripRouterBase(applicationRoute));
14616
+ return;
14617
+ }
14618
+ void router2.push(stripRouterBase(applicationRoute));
14619
+ }
14620
+ async function selectCreateItem(item) {
14621
+ closeMenu();
14622
+ emit("navigate", item);
14623
+ if (item.useHref) {
14624
+ if (typeof window !== "undefined") {
14625
+ window.location.href = toApplicationUrl(layoutConfig2.VITE_HOST, item.href);
14626
+ }
14627
+ return;
14628
+ }
14629
+ if (props.onNavigate) {
14630
+ await props.onNavigate(item);
14631
+ return;
14632
+ }
14633
+ navigateTo(item.href);
14634
+ }
14635
+ watch(
14636
+ () => props.dropdownVisible,
14637
+ (visible) => {
14638
+ menuOpen.value = visible;
14639
+ },
14640
+ { immediate: true }
14641
+ );
14642
+ watch(
14643
+ () => route == null ? void 0 : route.fullPath,
14644
+ () => closeMenu()
14645
+ );
14646
+ return (_ctx, _cache) => {
14647
+ return openBlock(), createElementBlock("div", _hoisted_1$C, [
14648
+ createVNode(unref(Dropdown), {
14649
+ position: ["bottom-end", "bottom-start"],
14650
+ "destroy-on-hide": false,
14651
+ trigger: "hover",
14652
+ offset: { mainAxis: 4, crossAxis: 0 },
14653
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
14654
+ }, ["stop"])),
14655
+ "overlay-class": "dashboard-create-dropdown",
14656
+ visible: menuOpen.value,
14657
+ onToggle: handleToggle
14658
+ }, {
14659
+ menu: withCtx(() => [
14660
+ createElementVNode("div", {
14661
+ id: menuId,
14662
+ ref_key: "menuRef",
14663
+ ref: menuRef,
14664
+ class: "dashboard-create-menu__panel",
14665
+ role: "menu",
14666
+ "aria-label": unref(t2)("gitCodeLayout.header.create")
14667
+ }, [
14668
+ (openBlock(true), createElementBlock(Fragment, null, renderList(menuItems.value, (item, index2) => {
14669
+ return openBlock(), createElementBlock(Fragment, {
14670
+ key: item.key
14671
+ }, [
14672
+ item.dividerBefore ? (openBlock(), createElementBlock("div", _hoisted_5$h)) : createCommentVNode("", true),
14673
+ createElementVNode("a", {
14674
+ href: unref(toApplicationUrl)(unref(layoutConfig2).VITE_HOST, item.href),
14675
+ class: normalizeClass(["dashboard-create-menu__item", { "dashboard-create-menu__item--with-desc": Boolean(item.desc) }]),
14676
+ role: "menuitem",
14677
+ tabindex: "-1",
14678
+ onClick: withModifiers(($event) => selectCreateItem(item), ["prevent"]),
14679
+ onKeydown: ($event) => onMenuItemKeydown($event, index2)
14680
+ }, [
14681
+ createElementVNode("div", _hoisted_7$c, [
14682
+ createVNode(GIcon, {
14683
+ name: item.icon,
14684
+ size: "16px",
14685
+ color: "currentColor",
14686
+ class: "dashboard-create-menu__icon",
14687
+ "aria-hidden": "true"
14688
+ }, null, 8, ["name"]),
14689
+ createElementVNode("span", _hoisted_8$a, toDisplayString$1(item.label), 1)
14690
+ ]),
14691
+ item.desc ? (openBlock(), createElementBlock("div", _hoisted_9$9, toDisplayString$1(item.desc), 1)) : createCommentVNode("", true)
14692
+ ], 42, _hoisted_6$f)
14693
+ ], 64);
14694
+ }), 128))
14695
+ ], 8, _hoisted_4$m)
14696
+ ]),
14697
+ default: withCtx(() => [
14698
+ createElementVNode("button", {
14699
+ id: "guide-step3",
14700
+ ref_key: "triggerRef",
14701
+ ref: triggerRef,
14702
+ type: "button",
14703
+ class: "dashboard-create-menu__trigger dashboard-create-menu__trigger--header",
14704
+ title: unref(t2)("gitCodeLayout.header.create"),
14705
+ "aria-label": unref(t2)("gitCodeLayout.header.create"),
14706
+ "aria-expanded": menuOpen.value,
14707
+ "aria-controls": menuId,
14708
+ "aria-haspopup": "menu",
14709
+ onKeydown: onTriggerKeydown
14710
+ }, [
14711
+ createVNode(GIcon, {
14712
+ name: "gt-add",
14713
+ size: "16px",
14714
+ color: "var(--theme-light-text)",
14715
+ class: "dashboard-create-menu__trigger-icon",
14716
+ "aria-hidden": "true"
14717
+ }),
14718
+ createElementVNode("span", _hoisted_3$t, toDisplayString$1(unref(t2)("gitCodeLayout.header.create")), 1)
14719
+ ], 40, _hoisted_2$u)
14720
+ ]),
14721
+ _: 1
14722
+ }, 8, ["visible"])
14723
+ ]);
14724
+ };
14725
+ }
14726
+ });
14727
+ const HeaderCreateMenu = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-vue-layout-gitcode"]]);
14728
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
14729
+ ...{
14730
+ name: "DocumentCenter"
14731
+ },
14732
+ __name: "DocumentCenter",
14733
+ props: {
14734
+ whiteColor: { type: Boolean, default: false }
14735
+ },
14736
+ setup(__props) {
14737
+ const { t: t2 } = i18n.global;
14738
+ return (_ctx, _cache) => {
14739
+ return openBlock(), createBlock(GLink, {
14740
+ variant: "text",
14741
+ class: normalizeClass(["g-toolbar-docs", __props.whiteColor ? "white" : "black"]),
14742
+ href: unref(currentHelpDocsAiCommunityUrl)(),
14743
+ target: "_blank"
14744
+ }, {
14745
+ default: withCtx(() => [
14746
+ createTextVNode(toDisplayString$1(unref(t2)("gitCodeLayout.header.aihub.documentCenter")), 1)
14747
+ ]),
14748
+ _: 1
14749
+ }, 8, ["class", "href"]);
14750
+ };
14751
+ }
14752
+ });
14753
+ const DocumentCenter = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-vue-layout-gitcode"]]);
14647
14754
  const _hoisted_1$B = {
14648
14755
  key: 1,
14649
14756
  class: "g-text-all"
@@ -16270,16 +16377,19 @@ const parseSearchInput = (input) => {
16270
16377
  params.l = token.value;
16271
16378
  break;
16272
16379
  case "symbol":
16273
- params.type = "code";
16274
16380
  params.symbol = encodeURIComponent(token.value);
16275
16381
  break;
16276
16382
  case "path":
16277
- params.type = "code";
16278
16383
  params.path = encodeURIComponent(token.value);
16279
16384
  break;
16280
16385
  }
16281
16386
  }
16282
16387
  params.q = keywords.join(" ");
16388
+ if (params.path || params.symbol) {
16389
+ params.type = params.scope === "repo" ? "code" : "repo";
16390
+ } else if (params.l && params.scope !== "repo") {
16391
+ params.type = "repo";
16392
+ }
16283
16393
  return { tokens, params };
16284
16394
  };
16285
16395
  const buildQualifierPrefix = (info) => {
@@ -16297,6 +16407,31 @@ const buildQualifierPrefix = (info) => {
16297
16407
  }
16298
16408
  return `${key}:${info.searchScopeName} `;
16299
16409
  };
16410
+ const buildSearchInput = (params = {}) => {
16411
+ const query = params;
16412
+ const text2 = (value) => {
16413
+ const first = Array.isArray(value) ? value[0] : value;
16414
+ return first == null ? "" : String(first);
16415
+ };
16416
+ const decode = (value) => {
16417
+ const raw = text2(value);
16418
+ try {
16419
+ return decodeURIComponent(raw);
16420
+ } catch {
16421
+ return raw;
16422
+ }
16423
+ };
16424
+ const parts = [];
16425
+ if (query.repo) parts.push(`repo:${decode(query.repo)}`);
16426
+ else if (query.user || query.scope === "user" && query.namespace) {
16427
+ parts.push(`user:${decode(query.user || query.namespace)}`);
16428
+ } else if (query.org || query.namespace) parts.push(`org:${decode(query.org || query.namespace)}`);
16429
+ if (query.l) parts.push(`lang:${text2(query.l)}`);
16430
+ if (query.path) parts.push(`path:${decode(query.path)}`);
16431
+ if (query.symbol) parts.push(`symbol:${decode(query.symbol)}`);
16432
+ if (query.q) parts.push(text2(query.q));
16433
+ return parts.join(" ");
16434
+ };
16300
16435
  const _hoisted_1$t = {
16301
16436
  key: 0,
16302
16437
  class: "devui-input-slot__prefix"
@@ -16520,12 +16655,16 @@ const firstNonEmpty = (...values) => {
16520
16655
  };
16521
16656
  const resolveSearchType = (input) => {
16522
16657
  const explicitType = firstNonEmpty(input.pendingType);
16523
- if (explicitType) return explicitType;
16658
+ const qualifierType = firstNonEmpty(input.qualifierType);
16659
+ const repoTypes = ["code", "issue", "pullrequest", "commit", "wiki"];
16660
+ if (explicitType === "all" && (qualifierType === "repo" || input.scope === "group" || input.scope === "user")) return "repo";
16661
+ if (explicitType && (input.scope !== "repo" || repoTypes.includes(explicitType))) return explicitType;
16662
+ if (qualifierType && qualifierType !== "repo") return qualifierType;
16524
16663
  if (input.isSearchPage) {
16525
16664
  const currentPageType = firstNonEmpty(input.currentPageType);
16526
- if (currentPageType && currentPageType !== "commit") return currentPageType;
16665
+ if (input.scope === "repo" && repoTypes.includes(currentPageType)) return currentPageType;
16666
+ if (currentPageType && currentPageType !== "commit" && input.scope !== "repo" && (currentPageType !== "all" || qualifierType !== "repo") && !(["group", "user"].includes(input.scope || "") && ["all", "group", "user"].includes(currentPageType))) return currentPageType;
16527
16667
  }
16528
- const qualifierType = firstNonEmpty(input.qualifierType);
16529
16668
  if (qualifierType) return qualifierType;
16530
16669
  if (input.scope === "repo") return "code";
16531
16670
  if (input.scope === "group" || input.scope === "user") return "repo";
@@ -16582,12 +16721,12 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
16582
16721
  setup(__props) {
16583
16722
  const layoutConfig2 = useLayoutConfig();
16584
16723
  const { t: $t } = i18n.global;
16585
- const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-CtFakerA.js"));
16586
- const UserSearch = defineAsyncComponent(() => import("./UserSearch-Bp2I3R2Z.js"));
16587
- const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-CwbCgDdJ.js"));
16588
- const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-BLg4OuDp.js"));
16589
- const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-BaJHPP1Z.js"));
16590
- const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-13VdUFCm.js"));
16724
+ const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-BGkdpIP6.js"));
16725
+ const UserSearch = defineAsyncComponent(() => import("./UserSearch-Brf46y3U.js"));
16726
+ const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-B0wIE39O.js"));
16727
+ const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-Ds1zbGk2.js"));
16728
+ const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-CZOmkppy.js"));
16729
+ const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-DZanoUB-.js"));
16591
16730
  const props = __props;
16592
16731
  const repoInfo = inject("repoInfo", computed(() => void 0));
16593
16732
  const orgInfo = inject("orgInfo", computed(() => void 0));
@@ -16637,33 +16776,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
16637
16776
  const activeSearchKey = ref(0);
16638
16777
  const interval = ref(null);
16639
16778
  const isSearchPage = ref(false);
16640
- const buildStrFromParams = (params = {}) => {
16641
- const parts = [];
16642
- if (params.scope === "repo" && params.repo) {
16643
- parts.push(`repo:${decodeURIComponent(params.repo)}`);
16644
- } else {
16645
- const userVal = params.user || (params.scope === "user" ? params.namespace : "");
16646
- const orgVal = params.org || (params.scope === "user" ? "" : params.namespace);
16647
- if (userVal) {
16648
- parts.push(`user:${decodeURIComponent(userVal)}`);
16649
- } else if (orgVal) {
16650
- parts.push(`org:${decodeURIComponent(orgVal)}`);
16651
- }
16652
- }
16653
- if (params.l) {
16654
- parts.push(`lang:${params.l}`);
16655
- }
16656
- if (params.path) {
16657
- parts.push(`path:${decodeURIComponent(params.path)}`);
16658
- }
16659
- if (params.symbol) {
16660
- parts.push(`symbol:${decodeURIComponent(params.symbol)}`);
16661
- }
16662
- if (params.q) {
16663
- parts.push(String(params.q));
16664
- }
16665
- return parts.join(" ");
16666
- };
16779
+ const buildStrFromParams = buildSearchInput;
16667
16780
  const SEARCH_QUERY_KEYS = ["q", "repo", "org", "user", "namespace", "scope", "l", "path", "symbol"];
16668
16781
  const initSearchStrFromQuery = () => {
16669
16782
  const query = route == null ? void 0 : route.query;
@@ -16674,6 +16787,10 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
16674
16787
  return hasSearchQuery ? buildStrFromParams(query) : "";
16675
16788
  };
16676
16789
  const searchStr = ref(initSearchStrFromQuery());
16790
+ watch(() => route == null ? void 0 : route.fullPath, () => {
16791
+ isSearchPage.value = (route == null ? void 0 : route.name) === "search";
16792
+ if (isSearchPage.value) searchStr.value = initSearchStrFromQuery();
16793
+ });
16677
16794
  const isContextScopePrefill = ref(false);
16678
16795
  const parsedResult = computed(() => parseSearchInput(searchStr.value));
16679
16796
  const keyword = computed(() => parsedResult.value.params.q);
@@ -16924,7 +17041,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
16924
17041
  }
16925
17042
  isSearchHistory.value = false;
16926
17043
  const queryKey = params.q || (searchStr.value ? "" : targetHotWord == null ? void 0 : targetHotWord.content) || "";
16927
- const hasManualScope = !scopeOnly && (params.scope === "group" || params.scope === "repo");
17044
+ const hasManualScope = !scopeOnly && Boolean(params.scope);
16928
17045
  const hasSearchable = Boolean(
16929
17046
  queryKey || params.l || params.path || params.symbol || hasManualScope
16930
17047
  );
@@ -17978,7 +18095,7 @@ const vElementExposure = {
17978
18095
  beforeUnmount() {
17979
18096
  }
17980
18097
  };
17981
- const NoticeModal = defineAsyncComponent(() => import("./notice-CebMhCRS.js"));
18098
+ const NoticeModal = defineAsyncComponent(() => import("./notice-CtuWUZZ8.js"));
17982
18099
  function clearNotice() {
17983
18100
  if (localStorage$2.getItem("validator_email")) {
17984
18101
  localStorage$2.removeItem("validator_email");
@@ -20427,9 +20544,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
20427
20544
  const layoutConfig2 = useLayoutConfig();
20428
20545
  const { t: t2 } = i18n.global;
20429
20546
  const route = useRoute();
20430
- const MenuItem = defineAsyncComponent(() => import("./MenuItem-hlBK-DsB.js"));
20431
- const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-CX1-06i7.js"));
20432
- const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-XUYTmyR3.js"));
20547
+ const MenuItem = defineAsyncComponent(() => import("./MenuItem-CsHiiACR.js"));
20548
+ const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-B15AqjCJ.js"));
20549
+ const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-BrCjzTrr.js"));
20433
20550
  const props = __props;
20434
20551
  const useReport2 = inject("useReport");
20435
20552
  const userInfo = inject("userInfo");
@@ -21514,7 +21631,14 @@ const repoInfoData = {
21514
21631
  "fork_network_projects": null,
21515
21632
  "secure_issue_assignees": null,
21516
21633
  "forked_by_secure_issue": null,
21517
- "enterprise": null,
21634
+ "enterprise": {
21635
+ "name": "hello-worldsss",
21636
+ "avatar": null,
21637
+ "id": 1,
21638
+ "creator_id": 303745,
21639
+ "created_at": null,
21640
+ "updated_at": null
21641
+ },
21518
21642
  "template": false,
21519
21643
  "module_setting": {
21520
21644
  "repo_id": 686859,
@@ -21620,7 +21744,18 @@ const repoInfoData = {
21620
21744
  ],
21621
21745
  "gc_allow": null
21622
21746
  },
21623
- "topic_names": null,
21747
+ // namespace 区域标签的展示条件(判定见 src/utils/index.ts),topic_id 需命中对应配置:
21748
+ // - G-Star(毕业): VITE_GSTAR_TOPIC,本地 dev 为 6653f80e91a72b11f2478e99
21749
+ // - G-Star(孵化): type 为 0 且 name 含「孵化项目」或命中 VITE_INCUBATION_TOPIC,本地 dev 为 6653f7a191a72b11f2478e93
21750
+ // - 可信开源: VITE_TRUSTED_TOPIC,本地 dev 为 6715c49554670a12f26fb08d
21751
+ "topic_names": [
21752
+ {
21753
+ "topic_id": "6653f80e91a72b11f2478e99",
21754
+ "id": "6653f80e91a72b11f2478e99",
21755
+ "name": "G-Star",
21756
+ "type": 0
21757
+ }
21758
+ ],
21624
21759
  "is_recommend": null,
21625
21760
  "deploy_info": "",
21626
21761
  "deploy_allow": false,
@@ -22063,8 +22198,8 @@ const headerCustomPropsData = {
22063
22198
  },
22064
22199
  repoProps: {
22065
22200
  repoNameLoading: false,
22066
- isGhMirrors: true,
22067
- isPrivate: false,
22201
+ isGhMirrors: false,
22202
+ isPrivate: true,
22068
22203
  isSpaces: false
22069
22204
  },
22070
22205
  userProps: {
@@ -26952,7 +27087,7 @@ const _SlidCaptchaManager = class _SlidCaptchaManager {
26952
27087
  __publicField(_SlidCaptchaManager, "instance");
26953
27088
  let SlidCaptchaManager = _SlidCaptchaManager;
26954
27089
  const slidCaptchaManager = SlidCaptchaManager.getInstance();
26955
- const SlidCaptcha = defineAsyncComponent(() => import("./index-CMQVrAyP.js"));
27090
+ const SlidCaptcha = defineAsyncComponent(() => import("./index-7OmUcYU-.js"));
26956
27091
  const useSlidCaptcha = () => {
26957
27092
  const { mount, unMount, isMounted } = usePopup("slid-captcha-popup");
26958
27093
  const open = (config) => {
@@ -26982,7 +27117,7 @@ const useSlidCaptcha = () => {
26982
27117
  close
26983
27118
  };
26984
27119
  };
26985
- const YunpianCaptcha = defineAsyncComponent(() => import("./index-BG-BxIZg.js"));
27120
+ const YunpianCaptcha = defineAsyncComponent(() => import("./index-DhX-BVJb.js"));
26986
27121
  const useYunpianCaptcha = () => {
26987
27122
  const { mount, unMount } = usePopup("yunpian-captcha-popup");
26988
27123
  const open = (config) => {