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

91 lines
2.7 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: b715dd3a8a120944.5a7f07e15c.js
* Module id: 343554
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e, t, r) => {
"use strict";
var i =
(e.e && e.e.__assign) ||
function () {
return (i =
Object.assign ||
function (e) {
for (var t, r = 1, i = arguments.length; r < i; r++)
for (var o in (t = arguments[r]))
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
return e;
}).apply(this, arguments);
};
Object.defineProperty(r, "__esModule", { value: !0 }),
(r.revalidateCookies =
r.hasCookie =
r.deleteCookie =
r.setCookie =
r.getCookie =
r.getCookies =
void 0);
var o = e.r(222792),
n = e.r(759717),
a = function (e) {
if (!(0, n.isClientSide)(e))
throw Error(
"You are trying to access cookies on the server side. Please, use the server-side import with `cookies-next/server` instead.",
);
},
s = function (e) {
if ((a(e), "server" !== (0, n.getRenderPhase)())) {
for (
var t = {},
r = document.cookie ? document.cookie.split("; ") : [],
i = 0,
o = r.length;
i < o;
i++
) {
var s = r[i].split("="),
u = s.slice(1).join("=");
t[s[0]] = u;
}
return t;
}
};
(r.getCookies = s),
(r.getCookie = function (e, t) {
a(t);
var r = s(t),
i = null == r ? void 0 : r[e];
if (void 0 !== i) return (0, n.decode)(i);
});
var u = function (e, t, r) {
if ((a(r), "server" !== (0, n.getRenderPhase)())) {
var s = (0, o.serialize)(
e,
(0, n.stringify)(t),
i({ path: "/" }, r || {}),
);
document.cookie = s;
}
};
(r.setCookie = u),
(r.deleteCookie = function (e, t) {
a(t), u(e, "", i(i({}, t), { maxAge: -1 }));
}),
(r.hasCookie = function (e, t) {
if ((a(t), !e)) return !1;
var r = s(t);
return !!r && Object.prototype.hasOwnProperty.call(r, e);
}),
(r.revalidateCookies = function (e, t) {
if ((a(), "server" !== (0, n.getRenderPhase)())) {
var r = s();
Object.keys(i(i({}, r), t)).some(function (e) {
return (null == r ? void 0 : r[e]) !== (null == t ? void 0 : t[e]);
}) && (e(r), (t = r));
}
});
};
export default moduleFactory;