Commit 7491cb53 authored by Xvying Dong's avatar Xvying Dong
Browse files

Merge branch 'master' into 'main'

Moved to xlab gitlab

See merge request !1
parents 0b0febc6 1d645240
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
module.exports = [
"[project]/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
"use strict";
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
exports._ = _interop_require_default;
}),
"[project]/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
"use strict";
function _getRequireWildcardCache(nodeInterop) {
if (typeof WeakMap !== "function") return null;
var cacheBabelInterop = new WeakMap();
var cacheNodeInterop = new WeakMap();
return (_getRequireWildcardCache = function(nodeInterop) {
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
})(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
if (!nodeInterop && obj && obj.__esModule) return obj;
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return {
default: obj
};
var cache = _getRequireWildcardCache(nodeInterop);
if (cache && cache.has(obj)) return cache.get(obj);
var newObj = {
__proto__: null
};
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
for(var key in obj){
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
else newObj[key] = obj[key];
}
}
newObj.default = obj;
if (cache) cache.set(obj, newObj);
return newObj;
}
exports._ = _interop_require_wildcard;
}),
"[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
"use strict";
module.exports = __turbopack_context__.r("[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-ssr] (ecmascript)").vendored['contexts'].HeadManagerContext; //# sourceMappingURL=head-manager-context.js.map
}),
"[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/set-attributes-from-props.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "setAttributesFromProps", {
enumerable: true,
get: function() {
return setAttributesFromProps;
}
});
const DOMAttributeNames = {
acceptCharset: 'accept-charset',
className: 'class',
htmlFor: 'for',
httpEquiv: 'http-equiv',
noModule: 'noModule'
};
const ignoreProps = [
'onLoad',
'onReady',
'dangerouslySetInnerHTML',
'children',
'onError',
'strategy',
'stylesheets'
];
function isBooleanScriptAttribute(attr) {
return [
'async',
'defer',
'noModule'
].includes(attr);
}
function setAttributesFromProps(el, props) {
for (const [p, value] of Object.entries(props)){
if (!props.hasOwnProperty(p)) continue;
if (ignoreProps.includes(p)) continue;
// we don't render undefined props to the DOM
if (value === undefined) {
continue;
}
const attr = DOMAttributeNames[p] || p.toLowerCase();
if (el.tagName === 'SCRIPT' && isBooleanScriptAttribute(attr)) {
// Correctly assign boolean script attributes
// https://github.com/vercel/next.js/pull/20748
;
el[attr] = !!value;
} else {
el.setAttribute(attr, String(value));
}
// Remove falsy non-zero boolean attributes so they are correctly interpreted
// (e.g. if we set them to false, this coerces to the string "false", which the browser interprets as true)
if (value === false || el.tagName === 'SCRIPT' && isBooleanScriptAttribute(attr) && (!value || value === 'false')) {
// Call setAttribute before, as we need to set and unset the attribute to override force async:
// https://html.spec.whatwg.org/multipage/scripting.html#script-force-async
el.setAttribute(attr, '');
el.removeAttribute(attr);
}
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=set-attributes-from-props.js.map
}),
"[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/request-idle-callback.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
cancelIdleCallback: null,
requestIdleCallback: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
cancelIdleCallback: function() {
return cancelIdleCallback;
},
requestIdleCallback: function() {
return requestIdleCallback;
}
});
const requestIdleCallback = typeof self !== 'undefined' && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) {
let start = Date.now();
return self.setTimeout(function() {
cb({
didTimeout: false,
timeRemaining: function() {
return Math.max(0, 50 - (Date.now() - start));
}
});
}, 1);
};
const cancelIdleCallback = typeof self !== 'undefined' && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) {
return clearTimeout(id);
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=request-idle-callback.js.map
}),
"[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/script.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
default: null,
handleClientScriptLoad: null,
initScriptLoader: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
default: function() {
return _default;
},
handleClientScriptLoad: function() {
return handleClientScriptLoad;
},
initScriptLoader: function() {
return initScriptLoader;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-ssr] (ecmascript)");
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-ssr] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)");
const _reactdom = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-dom.js [app-ssr] (ecmascript)"));
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"));
const _headmanagercontextsharedruntime = __turbopack_context__.r("[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js [app-ssr] (ecmascript)");
const _setattributesfromprops = __turbopack_context__.r("[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/set-attributes-from-props.js [app-ssr] (ecmascript)");
const _requestidlecallback = __turbopack_context__.r("[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/client/request-idle-callback.js [app-ssr] (ecmascript)");
const ScriptCache = new Map();
const LoadCache = new Set();
const insertStylesheets = (stylesheets)=>{
// Case 1: Styles for afterInteractive/lazyOnload with appDir injected via handleClientScriptLoad
//
// Using ReactDOM.preinit to feature detect appDir and inject styles
// Stylesheets might have already been loaded if initialized with Script component
// Re-inject styles here to handle scripts loaded via handleClientScriptLoad
// ReactDOM.preinit handles dedup and ensures the styles are loaded only once
if (_reactdom.default.preinit) {
stylesheets.forEach((stylesheet)=>{
_reactdom.default.preinit(stylesheet, {
as: 'style'
});
});
return;
}
// Case 2: Styles for afterInteractive/lazyOnload with pages injected via handleClientScriptLoad
//
// We use this function to load styles when appdir is not detected
// TODO: Use React float APIs to load styles once available for pages dir
if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable
;
};
const loadScript = (props)=>{
const { src, id, onLoad = ()=>{}, onReady = null, dangerouslySetInnerHTML, children = '', strategy = 'afterInteractive', onError, stylesheets } = props;
const cacheKey = id || src;
// Script has already loaded
if (cacheKey && LoadCache.has(cacheKey)) {
return;
}
// Contents of this script are already loading/loaded
if (ScriptCache.has(src)) {
LoadCache.add(cacheKey);
// It is possible that multiple `next/script` components all have same "src", but has different "onLoad"
// This is to make sure the same remote script will only load once, but "onLoad" are executed in order
ScriptCache.get(src).then(onLoad, onError);
return;
}
/** Execute after the script first loaded */ const afterLoad = ()=>{
// Run onReady for the first time after load event
if (onReady) {
onReady();
}
// add cacheKey to LoadCache when load successfully
LoadCache.add(cacheKey);
};
const el = document.createElement('script');
const loadPromise = new Promise((resolve, reject)=>{
el.addEventListener('load', function(e) {
resolve();
if (onLoad) {
onLoad.call(this, e);
}
afterLoad();
});
el.addEventListener('error', function(e) {
reject(e);
});
}).catch(function(e) {
if (onError) {
onError(e);
}
});
if (dangerouslySetInnerHTML) {
// Casting since lib.dom.d.ts doesn't have TrustedHTML yet.
el.innerHTML = dangerouslySetInnerHTML.__html || '';
afterLoad();
} else if (children) {
el.textContent = typeof children === 'string' ? children : Array.isArray(children) ? children.join('') : '';
afterLoad();
} else if (src) {
el.src = src;
// do not add cacheKey into LoadCache for remote script here
// cacheKey will be added to LoadCache when it is actually loaded (see loadPromise above)
ScriptCache.set(src, loadPromise);
}
(0, _setattributesfromprops.setAttributesFromProps)(el, props);
if (strategy === 'worker') {
el.setAttribute('type', 'text/partytown');
}
el.setAttribute('data-nscript', strategy);
// Load styles associated with this script
if (stylesheets) {
insertStylesheets(stylesheets);
}
document.body.appendChild(el);
};
function handleClientScriptLoad(props) {
const { strategy = 'afterInteractive' } = props;
if (strategy === 'lazyOnload') {
window.addEventListener('load', ()=>{
(0, _requestidlecallback.requestIdleCallback)(()=>loadScript(props));
});
} else {
loadScript(props);
}
}
function loadLazyScript(props) {
if (document.readyState === 'complete') {
(0, _requestidlecallback.requestIdleCallback)(()=>loadScript(props));
} else {
window.addEventListener('load', ()=>{
(0, _requestidlecallback.requestIdleCallback)(()=>loadScript(props));
});
}
}
function addBeforeInteractiveToCache() {
const scripts = [
...document.querySelectorAll('[data-nscript="beforeInteractive"]'),
...document.querySelectorAll('[data-nscript="beforePageRender"]')
];
scripts.forEach((script)=>{
const cacheKey = script.id || script.getAttribute('src');
LoadCache.add(cacheKey);
});
}
function initScriptLoader(scriptLoaderItems) {
scriptLoaderItems.forEach(handleClientScriptLoad);
addBeforeInteractiveToCache();
}
/**
* Load a third-party scripts in an optimized way.
*
* Read more: [Next.js Docs: `next/script`](https://nextjs.org/docs/app/api-reference/components/script)
*/ function Script(props) {
const { id, src = '', onLoad = ()=>{}, onReady = null, strategy = 'afterInteractive', onError, stylesheets, ...restProps } = props;
// Context is available only during SSR
let { updateScripts, scripts, getIsSsr, appDir, nonce } = (0, _react.useContext)(_headmanagercontextsharedruntime.HeadManagerContext);
// if a nonce is explicitly passed to the script tag, favor that over the automatic handling
nonce = restProps.nonce || nonce;
/**
* - First mount:
* 1. The useEffect for onReady executes
* 2. hasOnReadyEffectCalled.current is false, but the script hasn't loaded yet (not in LoadCache)
* onReady is skipped, set hasOnReadyEffectCalled.current to true
* 3. The useEffect for loadScript executes
* 4. hasLoadScriptEffectCalled.current is false, loadScript executes
* Once the script is loaded, the onLoad and onReady will be called by then
* [If strict mode is enabled / is wrapped in <OffScreen /> component]
* 5. The useEffect for onReady executes again
* 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped
* 7. The useEffect for loadScript executes again
* 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped
*
* - Second mount:
* 1. The useEffect for onReady executes
* 2. hasOnReadyEffectCalled.current is false, but the script has already loaded (found in LoadCache)
* onReady is called, set hasOnReadyEffectCalled.current to true
* 3. The useEffect for loadScript executes
* 4. The script is already loaded, loadScript bails out
* [If strict mode is enabled / is wrapped in <OffScreen /> component]
* 5. The useEffect for onReady executes again
* 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped
* 7. The useEffect for loadScript executes again
* 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped
*/ const hasOnReadyEffectCalled = (0, _react.useRef)(false);
(0, _react.useEffect)(()=>{
const cacheKey = id || src;
if (!hasOnReadyEffectCalled.current) {
// Run onReady if script has loaded before but component is re-mounted
if (onReady && cacheKey && LoadCache.has(cacheKey)) {
onReady();
}
hasOnReadyEffectCalled.current = true;
}
}, [
onReady,
id,
src
]);
const hasLoadScriptEffectCalled = (0, _react.useRef)(false);
(0, _react.useEffect)(()=>{
if (!hasLoadScriptEffectCalled.current) {
if (strategy === 'afterInteractive') {
loadScript(props);
} else if (strategy === 'lazyOnload') {
loadLazyScript(props);
}
hasLoadScriptEffectCalled.current = true;
}
}, [
props,
strategy
]);
if (strategy === 'beforeInteractive' || strategy === 'worker') {
if (updateScripts) {
scripts[strategy] = (scripts[strategy] || []).concat([
{
id,
src,
onLoad,
onReady,
onError,
...restProps,
nonce
}
]);
updateScripts(scripts);
} else if (getIsSsr && getIsSsr()) {
// Script has already loaded during SSR
LoadCache.add(id || src);
} else if (getIsSsr && !getIsSsr()) {
loadScript({
...props,
nonce
});
}
}
// For the app directory, we need React Float to preload these scripts.
if (appDir) {
// Injecting stylesheets here handles beforeInteractive and worker scripts correctly
// For other strategies injecting here ensures correct stylesheet order
// ReactDOM.preinit handles loading the styles in the correct order,
// also ensures the stylesheet is loaded only once and in a consistent manner
//
// Case 1: Styles for beforeInteractive/worker with appDir - handled here
// Case 2: Styles for beforeInteractive/worker with pages dir - Not handled yet
// Case 3: Styles for afterInteractive/lazyOnload with appDir - handled here
// Case 4: Styles for afterInteractive/lazyOnload with pages dir - handled in insertStylesheets function
if (stylesheets) {
stylesheets.forEach((styleSrc)=>{
_reactdom.default.preinit(styleSrc, {
as: 'style'
});
});
}
// Before interactive scripts need to be loaded by Next.js' runtime instead
// of native <script> tags, because they no longer have `defer`.
if (strategy === 'beforeInteractive') {
if (!src) {
// For inlined scripts, we put the content in `children`.
if (restProps.dangerouslySetInnerHTML) {
// Casting since lib.dom.d.ts doesn't have TrustedHTML yet.
restProps.children = restProps.dangerouslySetInnerHTML.__html;
delete restProps.dangerouslySetInnerHTML;
}
return /*#__PURE__*/ (0, _jsxruntime.jsx)("script", {
nonce: nonce,
dangerouslySetInnerHTML: {
__html: "(self.__next_s=self.__next_s||[]).push(" + JSON.stringify([
0,
{
...restProps,
id
}
]) + ")"
}
});
} else {
// @ts-ignore
_reactdom.default.preload(src, restProps.integrity ? {
as: 'script',
integrity: restProps.integrity,
nonce,
crossOrigin: restProps.crossOrigin
} : {
as: 'script',
nonce,
crossOrigin: restProps.crossOrigin
});
return /*#__PURE__*/ (0, _jsxruntime.jsx)("script", {
nonce: nonce,
dangerouslySetInnerHTML: {
__html: "(self.__next_s=self.__next_s||[]).push(" + JSON.stringify([
src,
{
...restProps,
id
}
]) + ")"
}
});
}
} else if (strategy === 'afterInteractive') {
if (src) {
// @ts-ignore
_reactdom.default.preload(src, restProps.integrity ? {
as: 'script',
integrity: restProps.integrity,
nonce,
crossOrigin: restProps.crossOrigin
} : {
as: 'script',
nonce,
crossOrigin: restProps.crossOrigin
});
}
}
}
return null;
}
Object.defineProperty(Script, '__nextScript', {
value: true
});
const _default = Script;
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=script.js.map
}),
];
//# sourceMappingURL=node_modules__pnpm_cc111d3f._.js.map
\ No newline at end of file
{
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/my-app/node_modules/.pnpm/%40swc%2Bhelpers%400.5.15/node_modules/%40swc/helpers/cjs/_interop_require_default.cjs"],"sourcesContent":["\"use strict\";\n\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nexports._ = _interop_require_default;\n"],"names":[],"mappings":"AAEA,SAAS,yBAAyB,GAAG;IACjC,OAAO,OAAO,IAAI,UAAU,GAAG,MAAM;QAAE,SAAS;IAAI;AACxD;AACA,QAAQ,CAAC,GAAG","ignoreList":[0],"debugId":null}},
{"offset": {"line": 14, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/my-app/node_modules/.pnpm/%40swc%2Bhelpers%400.5.15/node_modules/%40swc/helpers/cjs/_interop_require_wildcard.cjs"],"sourcesContent":["\"use strict\";\n\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n\n return (_getRequireWildcardCache = function(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interop_require_wildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) return obj;\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") return { default: obj };\n\n var cache = _getRequireWildcardCache(nodeInterop);\n\n if (cache && cache.has(obj)) return cache.get(obj);\n\n var newObj = { __proto__: null };\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);\n else newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n\n if (cache) cache.set(obj, newObj);\n\n return newObj;\n}\nexports._ = _interop_require_wildcard;\n"],"names":[],"mappings":"AAEA,SAAS,yBAAyB,WAAW;IACzC,IAAI,OAAO,YAAY,YAAY,OAAO;IAE1C,IAAI,oBAAoB,IAAI;IAC5B,IAAI,mBAAmB,IAAI;IAE3B,OAAO,CAAC,2BAA2B,SAAS,WAAW;QACnD,OAAO,cAAc,mBAAmB;IAC5C,CAAC,EAAE;AACP;AACA,SAAS,0BAA0B,GAAG,EAAE,WAAW;IAC/C,IAAI,CAAC,eAAe,OAAO,IAAI,UAAU,EAAE,OAAO;IAClD,IAAI,QAAQ,QAAQ,OAAO,QAAQ,YAAY,OAAO,QAAQ,YAAY,OAAO;QAAE,SAAS;IAAI;IAEhG,IAAI,QAAQ,yBAAyB;IAErC,IAAI,SAAS,MAAM,GAAG,CAAC,MAAM,OAAO,MAAM,GAAG,CAAC;IAE9C,IAAI,SAAS;QAAE,WAAW;IAAK;IAC/B,IAAI,wBAAwB,OAAO,cAAc,IAAI,OAAO,wBAAwB;IAEpF,IAAK,IAAI,OAAO,IAAK;QACjB,IAAI,QAAQ,aAAa,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,MAAM;YACrE,IAAI,OAAO,wBAAwB,OAAO,wBAAwB,CAAC,KAAK,OAAO;YAC/E,IAAI,QAAQ,CAAC,KAAK,GAAG,IAAI,KAAK,GAAG,GAAG,OAAO,cAAc,CAAC,QAAQ,KAAK;iBAClE,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI;QAC/B;IACJ;IAEA,OAAO,OAAO,GAAG;IAEjB,IAAI,OAAO,MAAM,GAAG,CAAC,KAAK;IAE1B,OAAO;AACX;AACA,QAAQ,CAAC,GAAG","ignoreList":[0],"debugId":null}},
{"offset": {"line": 49, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/my-app/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/server/route-modules/app-page/vendored/contexts/head-manager-context.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].HeadManagerContext\n"],"names":["module","exports","require","vendored","HeadManagerContext"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,uMACRC,QAAQ,CAAC,WAAW,CAACC,kBAAkB","ignoreList":[0],"debugId":null}},
{"offset": {"line": 54, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/my-app/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/set-attributes-from-props.ts"],"sourcesContent":["const DOMAttributeNames: Record<string, string> = {\n acceptCharset: 'accept-charset',\n className: 'class',\n htmlFor: 'for',\n httpEquiv: 'http-equiv',\n noModule: 'noModule',\n}\n\nconst ignoreProps = [\n 'onLoad',\n 'onReady',\n 'dangerouslySetInnerHTML',\n 'children',\n 'onError',\n 'strategy',\n 'stylesheets',\n]\n\nfunction isBooleanScriptAttribute(\n attr: string\n): attr is 'async' | 'defer' | 'noModule' {\n return ['async', 'defer', 'noModule'].includes(attr)\n}\n\nexport function setAttributesFromProps(el: HTMLElement, props: object) {\n for (const [p, value] of Object.entries(props)) {\n if (!props.hasOwnProperty(p)) continue\n if (ignoreProps.includes(p)) continue\n\n // we don't render undefined props to the DOM\n if (value === undefined) {\n continue\n }\n\n const attr = DOMAttributeNames[p] || p.toLowerCase()\n\n if (el.tagName === 'SCRIPT' && isBooleanScriptAttribute(attr)) {\n // Correctly assign boolean script attributes\n // https://github.com/vercel/next.js/pull/20748\n ;(el as HTMLScriptElement)[attr] = !!value\n } else {\n el.setAttribute(attr, String(value))\n }\n\n // Remove falsy non-zero boolean attributes so they are correctly interpreted\n // (e.g. if we set them to false, this coerces to the string \"false\", which the browser interprets as true)\n if (\n value === false ||\n (el.tagName === 'SCRIPT' &&\n isBooleanScriptAttribute(attr) &&\n (!value || value === 'false'))\n ) {\n // Call setAttribute before, as we need to set and unset the attribute to override force async:\n // https://html.spec.whatwg.org/multipage/scripting.html#script-force-async\n el.setAttribute(attr, '')\n el.removeAttribute(attr)\n }\n }\n}\n"],"names":["setAttributesFromProps","DOMAttributeNames","acceptCharset","className","htmlFor","httpEquiv","noModule","ignoreProps","isBooleanScriptAttribute","attr","includes","el","props","p","value","Object","entries","hasOwnProperty","undefined","toLowerCase","tagName","setAttribute","String","removeAttribute"],"mappings":";;;+BAwBgBA,0BAAAA;;;eAAAA;;;AAxBhB,MAAMC,oBAA4C;IAChDC,eAAe;IACfC,WAAW;IACXC,SAAS;IACTC,WAAW;IACXC,UAAU;AACZ;AAEA,MAAMC,cAAc;IAClB;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,SAASC,yBACPC,IAAY;IAEZ,OAAO;QAAC;QAAS;QAAS;KAAW,CAACC,QAAQ,CAACD;AACjD;AAEO,SAAST,uBAAuBW,EAAe,EAAEC,KAAa;IACnE,KAAK,MAAM,CAACC,GAAGC,MAAM,IAAIC,OAAOC,OAAO,CAACJ,OAAQ;QAC9C,IAAI,CAACA,MAAMK,cAAc,CAACJ,IAAI;QAC9B,IAAIN,YAAYG,QAAQ,CAACG,IAAI;QAE7B,6CAA6C;QAC7C,IAAIC,UAAUI,WAAW;YACvB;QACF;QAEA,MAAMT,OAAOR,iBAAiB,CAACY,EAAE,IAAIA,EAAEM,WAAW;QAElD,IAAIR,GAAGS,OAAO,KAAK,YAAYZ,yBAAyBC,OAAO;YAC7D,6CAA6C;YAC7C,+CAA+C;;YAC7CE,EAAwB,CAACF,KAAK,GAAG,CAAC,CAACK;QACvC,OAAO;YACLH,GAAGU,YAAY,CAACZ,MAAMa,OAAOR;QAC/B;QAEA,6EAA6E;QAC7E,2GAA2G;QAC3G,IACEA,UAAU,SACTH,GAAGS,OAAO,KAAK,YACdZ,yBAAyBC,SACxB,CAAA,CAACK,SAASA,UAAU,OAAM,GAC7B;YACA,+FAA+F;YAC/F,2EAA2E;YAC3EH,GAAGU,YAAY,CAACZ,MAAM;YACtBE,GAAGY,eAAe,CAACd;QACrB;IACF;AACF","ignoreList":[0],"debugId":null}},
{"offset": {"line": 124, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/my-app/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/request-idle-callback.ts"],"sourcesContent":["export const requestIdleCallback =\n (typeof self !== 'undefined' &&\n self.requestIdleCallback &&\n self.requestIdleCallback.bind(window)) ||\n function (cb: IdleRequestCallback): number {\n let start = Date.now()\n return self.setTimeout(function () {\n cb({\n didTimeout: false,\n timeRemaining: function () {\n return Math.max(0, 50 - (Date.now() - start))\n },\n })\n }, 1)\n }\n\nexport const cancelIdleCallback =\n (typeof self !== 'undefined' &&\n self.cancelIdleCallback &&\n self.cancelIdleCallback.bind(window)) ||\n function (id: number) {\n return clearTimeout(id)\n }\n"],"names":["cancelIdleCallback","requestIdleCallback","self","bind","window","cb","start","Date","now","setTimeout","didTimeout","timeRemaining","Math","max","id","clearTimeout"],"mappings":";;;;;;;;;;;;;;IAgBaA,kBAAkB,EAAA;eAAlBA;;IAhBAC,mBAAmB,EAAA;eAAnBA;;;AAAN,MAAMA,sBACV,OAAOC,SAAS,eACfA,KAAKD,mBAAmB,IACxBC,KAAKD,mBAAmB,CAACE,IAAI,CAACC,WAChC,SAAUC,EAAuB;IAC/B,IAAIC,QAAQC,KAAKC,GAAG;IACpB,OAAON,KAAKO,UAAU,CAAC;QACrBJ,GAAG;YACDK,YAAY;YACZC,eAAe;gBACb,OAAOC,KAAKC,GAAG,CAAC,GAAG,KAAMN,CAAAA,KAAKC,GAAG,KAAKF,KAAI;YAC5C;QACF;IACF,GAAG;AACL;AAEK,MAAMN,qBACV,OAAOE,SAAS,eACfA,KAAKF,kBAAkB,IACvBE,KAAKF,kBAAkB,CAACG,IAAI,CAACC,WAC/B,SAAUU,EAAU;IAClB,OAAOC,aAAaD;AACtB","ignoreList":[0],"debugId":null}},
{"offset": {"line": 170, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/my-app/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/script.tsx"],"sourcesContent":["'use client'\n\nimport ReactDOM from 'react-dom'\nimport React, { useEffect, useContext, useRef, type JSX } from 'react'\nimport type { ScriptHTMLAttributes } from 'react'\nimport { HeadManagerContext } from '../shared/lib/head-manager-context.shared-runtime'\nimport { setAttributesFromProps } from './set-attributes-from-props'\nimport { requestIdleCallback } from './request-idle-callback'\n\nconst ScriptCache = new Map()\nconst LoadCache = new Set()\n\nexport interface ScriptProps extends ScriptHTMLAttributes<HTMLScriptElement> {\n strategy?: 'afterInteractive' | 'lazyOnload' | 'beforeInteractive' | 'worker'\n id?: string\n onLoad?: (e: any) => void\n onReady?: () => void | null\n onError?: (e: any) => void\n children?: React.ReactNode\n stylesheets?: string[]\n}\n\n/**\n * @deprecated Use `ScriptProps` instead.\n */\nexport type Props = ScriptProps\n\nconst insertStylesheets = (stylesheets: string[]) => {\n // Case 1: Styles for afterInteractive/lazyOnload with appDir injected via handleClientScriptLoad\n //\n // Using ReactDOM.preinit to feature detect appDir and inject styles\n // Stylesheets might have already been loaded if initialized with Script component\n // Re-inject styles here to handle scripts loaded via handleClientScriptLoad\n // ReactDOM.preinit handles dedup and ensures the styles are loaded only once\n if (ReactDOM.preinit) {\n stylesheets.forEach((stylesheet: string) => {\n ReactDOM.preinit(stylesheet, { as: 'style' })\n })\n\n return\n }\n\n // Case 2: Styles for afterInteractive/lazyOnload with pages injected via handleClientScriptLoad\n //\n // We use this function to load styles when appdir is not detected\n // TODO: Use React float APIs to load styles once available for pages dir\n if (typeof window !== 'undefined') {\n let head = document.head\n stylesheets.forEach((stylesheet: string) => {\n let link = document.createElement('link')\n\n link.type = 'text/css'\n link.rel = 'stylesheet'\n link.href = stylesheet\n\n head.appendChild(link)\n })\n }\n}\n\nconst loadScript = (props: ScriptProps): void => {\n const {\n src,\n id,\n onLoad = () => {},\n onReady = null,\n dangerouslySetInnerHTML,\n children = '',\n strategy = 'afterInteractive',\n onError,\n stylesheets,\n } = props\n\n const cacheKey = id || src\n\n // Script has already loaded\n if (cacheKey && LoadCache.has(cacheKey)) {\n return\n }\n\n // Contents of this script are already loading/loaded\n if (ScriptCache.has(src)) {\n LoadCache.add(cacheKey)\n // It is possible that multiple `next/script` components all have same \"src\", but has different \"onLoad\"\n // This is to make sure the same remote script will only load once, but \"onLoad\" are executed in order\n ScriptCache.get(src).then(onLoad, onError)\n return\n }\n\n /** Execute after the script first loaded */\n const afterLoad = () => {\n // Run onReady for the first time after load event\n if (onReady) {\n onReady()\n }\n // add cacheKey to LoadCache when load successfully\n LoadCache.add(cacheKey)\n }\n\n const el = document.createElement('script')\n\n const loadPromise = new Promise<void>((resolve, reject) => {\n el.addEventListener('load', function (e) {\n resolve()\n if (onLoad) {\n onLoad.call(this, e)\n }\n afterLoad()\n })\n el.addEventListener('error', function (e) {\n reject(e)\n })\n }).catch(function (e) {\n if (onError) {\n onError(e)\n }\n })\n\n if (dangerouslySetInnerHTML) {\n // Casting since lib.dom.d.ts doesn't have TrustedHTML yet.\n el.innerHTML = (dangerouslySetInnerHTML.__html as string) || ''\n\n afterLoad()\n } else if (children) {\n el.textContent =\n typeof children === 'string'\n ? children\n : Array.isArray(children)\n ? children.join('')\n : ''\n\n afterLoad()\n } else if (src) {\n el.src = src\n // do not add cacheKey into LoadCache for remote script here\n // cacheKey will be added to LoadCache when it is actually loaded (see loadPromise above)\n\n ScriptCache.set(src, loadPromise)\n }\n\n setAttributesFromProps(el, props)\n\n if (strategy === 'worker') {\n el.setAttribute('type', 'text/partytown')\n }\n\n el.setAttribute('data-nscript', strategy)\n\n // Load styles associated with this script\n if (stylesheets) {\n insertStylesheets(stylesheets)\n }\n\n document.body.appendChild(el)\n}\n\nexport function handleClientScriptLoad(props: ScriptProps) {\n const { strategy = 'afterInteractive' } = props\n if (strategy === 'lazyOnload') {\n window.addEventListener('load', () => {\n requestIdleCallback(() => loadScript(props))\n })\n } else {\n loadScript(props)\n }\n}\n\nfunction loadLazyScript(props: ScriptProps) {\n if (document.readyState === 'complete') {\n requestIdleCallback(() => loadScript(props))\n } else {\n window.addEventListener('load', () => {\n requestIdleCallback(() => loadScript(props))\n })\n }\n}\n\nfunction addBeforeInteractiveToCache() {\n const scripts = [\n ...document.querySelectorAll('[data-nscript=\"beforeInteractive\"]'),\n ...document.querySelectorAll('[data-nscript=\"beforePageRender\"]'),\n ]\n scripts.forEach((script) => {\n const cacheKey = script.id || script.getAttribute('src')\n LoadCache.add(cacheKey)\n })\n}\n\nexport function initScriptLoader(scriptLoaderItems: ScriptProps[]) {\n scriptLoaderItems.forEach(handleClientScriptLoad)\n addBeforeInteractiveToCache()\n}\n\n/**\n * Load a third-party scripts in an optimized way.\n *\n * Read more: [Next.js Docs: `next/script`](https://nextjs.org/docs/app/api-reference/components/script)\n */\nfunction Script(props: ScriptProps): JSX.Element | null {\n const {\n id,\n src = '',\n onLoad = () => {},\n onReady = null,\n strategy = 'afterInteractive',\n onError,\n stylesheets,\n ...restProps\n } = props\n\n // Context is available only during SSR\n let { updateScripts, scripts, getIsSsr, appDir, nonce } =\n useContext(HeadManagerContext)\n\n // if a nonce is explicitly passed to the script tag, favor that over the automatic handling\n nonce = restProps.nonce || nonce\n\n /**\n * - First mount:\n * 1. The useEffect for onReady executes\n * 2. hasOnReadyEffectCalled.current is false, but the script hasn't loaded yet (not in LoadCache)\n * onReady is skipped, set hasOnReadyEffectCalled.current to true\n * 3. The useEffect for loadScript executes\n * 4. hasLoadScriptEffectCalled.current is false, loadScript executes\n * Once the script is loaded, the onLoad and onReady will be called by then\n * [If strict mode is enabled / is wrapped in <OffScreen /> component]\n * 5. The useEffect for onReady executes again\n * 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped\n * 7. The useEffect for loadScript executes again\n * 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped\n *\n * - Second mount:\n * 1. The useEffect for onReady executes\n * 2. hasOnReadyEffectCalled.current is false, but the script has already loaded (found in LoadCache)\n * onReady is called, set hasOnReadyEffectCalled.current to true\n * 3. The useEffect for loadScript executes\n * 4. The script is already loaded, loadScript bails out\n * [If strict mode is enabled / is wrapped in <OffScreen /> component]\n * 5. The useEffect for onReady executes again\n * 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped\n * 7. The useEffect for loadScript executes again\n * 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped\n */\n const hasOnReadyEffectCalled = useRef(false)\n\n useEffect(() => {\n const cacheKey = id || src\n if (!hasOnReadyEffectCalled.current) {\n // Run onReady if script has loaded before but component is re-mounted\n if (onReady && cacheKey && LoadCache.has(cacheKey)) {\n onReady()\n }\n\n hasOnReadyEffectCalled.current = true\n }\n }, [onReady, id, src])\n\n const hasLoadScriptEffectCalled = useRef(false)\n\n useEffect(() => {\n if (!hasLoadScriptEffectCalled.current) {\n if (strategy === 'afterInteractive') {\n loadScript(props)\n } else if (strategy === 'lazyOnload') {\n loadLazyScript(props)\n }\n\n hasLoadScriptEffectCalled.current = true\n }\n }, [props, strategy])\n\n if (strategy === 'beforeInteractive' || strategy === 'worker') {\n if (updateScripts) {\n scripts[strategy] = (scripts[strategy] || []).concat([\n {\n id,\n src,\n onLoad,\n onReady,\n onError,\n ...restProps,\n nonce,\n },\n ])\n updateScripts(scripts)\n } else if (getIsSsr && getIsSsr()) {\n // Script has already loaded during SSR\n LoadCache.add(id || src)\n } else if (getIsSsr && !getIsSsr()) {\n loadScript({\n ...props,\n nonce,\n })\n }\n }\n\n // For the app directory, we need React Float to preload these scripts.\n if (appDir) {\n // Injecting stylesheets here handles beforeInteractive and worker scripts correctly\n // For other strategies injecting here ensures correct stylesheet order\n // ReactDOM.preinit handles loading the styles in the correct order,\n // also ensures the stylesheet is loaded only once and in a consistent manner\n //\n // Case 1: Styles for beforeInteractive/worker with appDir - handled here\n // Case 2: Styles for beforeInteractive/worker with pages dir - Not handled yet\n // Case 3: Styles for afterInteractive/lazyOnload with appDir - handled here\n // Case 4: Styles for afterInteractive/lazyOnload with pages dir - handled in insertStylesheets function\n if (stylesheets) {\n stylesheets.forEach((styleSrc) => {\n ReactDOM.preinit(styleSrc, { as: 'style' })\n })\n }\n\n // Before interactive scripts need to be loaded by Next.js' runtime instead\n // of native <script> tags, because they no longer have `defer`.\n if (strategy === 'beforeInteractive') {\n if (!src) {\n // For inlined scripts, we put the content in `children`.\n if (restProps.dangerouslySetInnerHTML) {\n // Casting since lib.dom.d.ts doesn't have TrustedHTML yet.\n restProps.children = restProps.dangerouslySetInnerHTML\n .__html as string\n delete restProps.dangerouslySetInnerHTML\n }\n\n return (\n <script\n nonce={nonce}\n dangerouslySetInnerHTML={{\n __html: `(self.__next_s=self.__next_s||[]).push(${JSON.stringify([\n 0,\n { ...restProps, id },\n ])})`,\n }}\n />\n )\n } else {\n // @ts-ignore\n ReactDOM.preload(\n src,\n restProps.integrity\n ? {\n as: 'script',\n integrity: restProps.integrity,\n nonce,\n crossOrigin: restProps.crossOrigin,\n }\n : { as: 'script', nonce, crossOrigin: restProps.crossOrigin }\n )\n return (\n <script\n nonce={nonce}\n dangerouslySetInnerHTML={{\n __html: `(self.__next_s=self.__next_s||[]).push(${JSON.stringify([\n src,\n { ...restProps, id },\n ])})`,\n }}\n />\n )\n }\n } else if (strategy === 'afterInteractive') {\n if (src) {\n // @ts-ignore\n ReactDOM.preload(\n src,\n restProps.integrity\n ? {\n as: 'script',\n integrity: restProps.integrity,\n nonce,\n crossOrigin: restProps.crossOrigin,\n }\n : { as: 'script', nonce, crossOrigin: restProps.crossOrigin }\n )\n }\n }\n }\n\n return null\n}\n\nObject.defineProperty(Script, '__nextScript', { value: true })\n\nexport default Script\n"],"names":["handleClientScriptLoad","initScriptLoader","ScriptCache","Map","LoadCache","Set","insertStylesheets","stylesheets","ReactDOM","preinit","forEach","stylesheet","as","window","head","document","link","createElement","type","rel","href","appendChild","loadScript","props","src","id","onLoad","onReady","dangerouslySetInnerHTML","children","strategy","onError","cacheKey","has","add","get","then","afterLoad","el","loadPromise","Promise","resolve","reject","addEventListener","e","call","catch","innerHTML","__html","textContent","Array","isArray","join","set","setAttributesFromProps","setAttribute","body","requestIdleCallback","loadLazyScript","readyState","addBeforeInteractiveToCache","scripts","querySelectorAll","script","getAttribute","scriptLoaderItems","Script","restProps","updateScripts","getIsSsr","appDir","nonce","useContext","HeadManagerContext","hasOnReadyEffectCalled","useRef","useEffect","current","hasLoadScriptEffectCalled","concat","styleSrc","JSON","stringify","preload","integrity","crossOrigin","Object","defineProperty","value"],"mappings":";;;;;;;;;;;;;;;IAgYA,OAAqB,EAAA;eAArB;;IApOgBA,sBAAsB,EAAA;eAAtBA;;IAgCAC,gBAAgB,EAAA;eAAhBA;;;;;;mEA1LK;iEAC0C;iDAE5B;wCACI;qCACH;AAEpC,MAAMC,cAAc,IAAIC;AACxB,MAAMC,YAAY,IAAIC;AAiBtB,MAAMC,oBAAoB,CAACC;IACzB,iGAAiG;IACjG,EAAE;IACF,oEAAoE;IACpE,kFAAkF;IAClF,4EAA4E;IAC5E,6EAA6E;IAC7E,IAAIC,UAAAA,OAAQ,CAACC,OAAO,EAAE;QACpBF,YAAYG,OAAO,CAAC,CAACC;YACnBH,UAAAA,OAAQ,CAACC,OAAO,CAACE,YAAY;gBAAEC,IAAI;YAAQ;QAC7C;QAEA;IACF;IAEA,gGAAgG;IAChG,EAAE;IAC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C9Bb;oBACAc,aAAalB,UAAUkB,WAAW;gBACpC,IACA;oBAAEzE,IAAI;oBAAU2D;oBAAOc,aAAalB,UAAUkB,WAAW;gBAAC;gBAEhE,OAAA,WAAA,GACE,CAAA,GAAA,YAAA,GAAA,EAACtB,UAAAA;oBACCQ,OAAOA;oBACP3C,yBAAyB;wBACvBoB,QAAS,4CAAyCiC,KAAKC,SAAS,CAAC;4BAC/D1D;4BACA;gCAAE,GAAG2C,SAAS;gCAAE1C;4BAAG;yBACpB,IAAE;oBACL;;YAGN;QACF,OAAO,IAAIK,aAAa,oBAAoB;YAC1C,IAAIN,KAAK;gBACP,aAAa;gBACbhB,UAAAA,OAAQ,CAAC2E,OAAO,CACd3D,KACA2C,UAAUiB,SAAS,GACf;oBACExE,IAAI;oBACJwE,WAAWjB,UAAUiB,SAAS;oBAC9Bb;oBACAc,aAAalB,UAAUkB,WAAW;gBACpC,IACA;oBAAEzE,IAAI;oBAAU2D;oBAAOc,aAAalB,UAAUkB,WAAW;gBAAC;YAElE;QACF;IACF;IAEA,OAAO;AACT;AAEAC,OAAOC,cAAc,CAACrB,QAAQ,gBAAgB;IAAEsB,OAAO;AAAK;MAE5D,WAAetB","ignoreList":[0],"debugId":null}}]
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactJsxDevRuntime\n"],"names":["module","exports","require","vendored","ReactJsxDevRuntime"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,uMACRC,QAAQ,CAAC,YAAY,CAAEC,kBAAkB","ignoreList":[0],"debugId":null}},
{"offset": {"line": 9, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/router-reducer/reducers/get-segment-value.ts"],"sourcesContent":["import type { Segment } from '../../../../server/app-render/types'\n\nexport function getSegmentValue(segment: Segment) {\n return Array.isArray(segment) ? segment[1] : segment\n}\n"],"names":["getSegmentValue","segment","Array","isArray"],"mappings":";;;+BAEgBA,mBAAAA;;;eAAAA;;;AAAT,SAASA,gBAAgBC,OAAgB;IAC9C,OAAOC,MAAMC,OAAO,CAACF,WAAWA,OAAO,CAAC,EAAE,GAAGA;AAC/C","ignoreList":[0],"debugId":null}},
{"offset": {"line": 32, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/shared/lib/segment.ts"],"sourcesContent":["import type { Segment } from '../../server/app-render/types'\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record<string, string | string[] | undefined>\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\n"],"names":["DEFAULT_SEGMENT_KEY","PAGE_SEGMENT_KEY","addSearchParamsIfPageSegment","isGroupSegment","isParallelRouteSegment","segment","endsWith","startsWith","searchParams","isPageSegment","includes","stringifiedQuery","JSON","stringify"],"mappings":";;;;;;;;;;;;;;;;;IA4BaA,mBAAmB,EAAA;eAAnBA;;IADAC,gBAAgB,EAAA;eAAhBA;;IAhBGC,4BAA4B,EAAA;eAA5BA;;IATAC,cAAc,EAAA;eAAdA;;IAKAC,sBAAsB,EAAA;eAAtBA;;;AALT,SAASD,eAAeE,OAAe;IAC5C,sCAAsC;IACtC,OAAOA,OAAO,CAAC,EAAE,KAAK,OAAOA,QAAQC,QAAQ,CAAC;AAChD;AAEO,SAASF,uBAAuBC,OAAe;IACpD,OAAOA,QAAQE,UAAU,CAAC,QAAQF,YAAY;AAChD;AAEO,SAASH,6BACdG,OAAgB,EAChBG,YAA2D;IAE3D,MAAMC,gBAAgBJ,QAAQK,QAAQ,CAACT;IAEvC,IAAIQ,eAAe;QACjB,MAAME,mBAAmBC,KAAKC,SAAS,CAACL;QACxC,OAAOG,qBAAqB,OACxBV,mBAAmB,MAAMU,mBACzBV;IACN;IAEA,OAAOI;AACT;AAEO,MAAMJ,mBAAmB;AACzB,MAAMD,sBAAsB","ignoreList":[0],"debugId":null}},
{"offset": {"line": 86, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/redirect-status-code.ts"],"sourcesContent":["export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n"],"names":["RedirectStatusCode"],"mappings":";;;+BAAYA,sBAAAA;;;eAAAA;;;AAAL,IAAKA,qBAAAA,WAAAA,GAAAA,SAAAA,kBAAAA;;;;WAAAA","ignoreList":[0],"debugId":null}},
{"offset": {"line": 112, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/redirect-error.ts"],"sourcesContent":["import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport enum RedirectType {\n push = 'push',\n replace = 'replace',\n}\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n"],"names":["REDIRECT_ERROR_CODE","RedirectType","isRedirectError","error","digest","split","errorCode","type","destination","slice","join","status","at","statusCode","Number","isNaN","RedirectStatusCode"],"mappings":";;;;;;;;;;;;;;;IAEaA,mBAAmB,EAAA;eAAnBA;;IAEDC,YAAY,EAAA;eAAZA;;IAgBIC,eAAe,EAAA;eAAfA;;;oCApBmB;AAE5B,MAAMF,sBAAsB;AAE5B,IAAKC,eAAAA,WAAAA,GAAAA,SAAAA,YAAAA;;;WAAAA;;AAgBL,SAASC,gBAAgBC,KAAc;IAC5C,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAI,KAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IAEA,MAAMA,SAASD,MAAMC,MAAM,CAACC,KAAK,CAAC;IAClC,MAAM,CAACC,WAAWC,KAAK,GAAGH;IAC1B,MAAMI,cAAcJ,OAAOK,KAAK,CAAC,GAAG,CAAC,GAAGC,IAAI,CAAC;IAC7C,MAAMC,SAASP,OAAOQ,EAAE,CAAC,CAAC;IAE1B,MAAMC,aAAaC,OAAOH;IAE1B,OACEL,cAAcN,uBACbO,CAAAA,SAAS,aAAaA,SAAS,MAAK,KACrC,OAAOC,gBAAgB,YACvB,CAACO,MAAMF,eACPA,cAAcG,oBAAAA,kBAAkB;AAEpC","ignoreList":[0],"debugId":null}},
{"offset": {"line": 166, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/redirect.ts"],"sourcesContent":["import { RedirectStatusCode } from './redirect-status-code'\nimport {\n RedirectType,\n type RedirectError,\n isRedirectError,\n REDIRECT_ERROR_CODE,\n} from './redirect-error'\n\nconst actionAsyncStorage =\n typeof window === 'undefined'\n ? (\n require('../../server/app-render/action-async-storage.external') as typeof import('../../server/app-render/action-async-storage.external')\n ).actionAsyncStorage\n : undefined\n\nexport function getRedirectError(\n url: string,\n type: RedirectType,\n statusCode: RedirectStatusCode = RedirectStatusCode.TemporaryRedirect\n): RedirectError {\n const error = new Error(REDIRECT_ERROR_CODE) as RedirectError\n error.digest = `${REDIRECT_ERROR_CODE};${type};${url};${statusCode};`\n return error\n}\n\n/**\n * This function allows you to redirect the user to another URL. It can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * - In a Server Component, this will insert a meta tag to redirect the user to the target page.\n * - In a Route Handler or Server Action, it will serve a 307/303 to the caller.\n * - In a Server Action, type defaults to 'push' and 'replace' elsewhere.\n *\n * Read more: [Next.js Docs: `redirect`](https://nextjs.org/docs/app/api-reference/functions/redirect)\n */\nexport function redirect(\n /** The URL to redirect to */\n url: string,\n type?: RedirectType\n): never {\n type ??= actionAsyncStorage?.getStore()?.isAction\n ? RedirectType.push\n : RedirectType.replace\n\n throw getRedirectError(url, type, RedirectStatusCode.TemporaryRedirect)\n}\n\n/**\n * This function allows you to redirect the user to another URL. It can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * - In a Server Component, this will insert a meta tag to redirect the user to the target page.\n * - In a Route Handler or Server Action, it will serve a 308/303 to the caller.\n *\n * Read more: [Next.js Docs: `redirect`](https://nextjs.org/docs/app/api-reference/functions/redirect)\n */\nexport function permanentRedirect(\n /** The URL to redirect to */\n url: string,\n type: RedirectType = RedirectType.replace\n): never {\n throw getRedirectError(url, type, RedirectStatusCode.PermanentRedirect)\n}\n\n/**\n * Returns the encoded URL from the error if it's a RedirectError, null\n * otherwise. Note that this does not validate the URL returned.\n *\n * @param error the error that may be a redirect error\n * @return the url if the error was a redirect error\n */\nexport function getURLFromRedirectError(error: RedirectError): string\nexport function getURLFromRedirectError(error: unknown): string | null {\n if (!isRedirectError(error)) return null\n\n // Slices off the beginning of the digest that contains the code and the\n // separating ';'.\n return error.digest.split(';').slice(2, -2).join(';')\n}\n\nexport function getRedirectTypeFromError(error: RedirectError): RedirectType {\n if (!isRedirectError(error)) {\n throw new Error('Not a redirect error')\n }\n\n return error.digest.split(';', 2)[1] as RedirectType\n}\n\nexport function getRedirectStatusCodeFromError(error: RedirectError): number {\n if (!isRedirectError(error)) {\n throw new Error('Not a redirect error')\n }\n\n return Number(error.digest.split(';').at(-2))\n}\n"],"names":["getRedirectError","getRedirectStatusCodeFromError","getRedirectTypeFromError","getURLFromRedirectError","permanentRedirect","redirect","actionAsyncStorage","window","require","undefined","url","type","statusCode","RedirectStatusCode","TemporaryRedirect","error","Error","REDIRECT_ERROR_CODE","digest","getStore","isAction","RedirectType","push","replace","PermanentRedirect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E;AAUO,SAASrB,wBAAwBY,KAAc;IACpD,IAAI,CAACU,CAAAA,GAAAA,eAAAA,eAAe,EAACV,QAAQ,OAAO;IAEpC,wEAAwE;IACxE,kBAAkB;IAClB,OAAOA,MAAMG,MAAM,CAACQ,KAAK,CAAC,KAAKC,KAAK,CAAC,GAAG,CAAC,GAAGC,IAAI,CAAC;AACnD;AAEO,SAAS1B,yBAAyBa,KAAoB;IAC3D,IAAI,CAACU,CAAAA,GAAAA,eAAAA,eAAe,EAACV,QAAQ;QAC3B,MAAM,OAAA,cAAiC,CAAjC,IAAIC,MAAM,yBAAV,qBAAA;mBAAA;wBAAA;0BAAA;QAAgC;IACxC;IAEA,OAAOD,MAAMG,MAAM,CAACQ,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE;AACtC;AAEO,SAASzB,+BAA+Bc,KAAoB;IACjE,IAAI,CAACU,CAAAA,GAAAA,eAAAA,eAAe,EAACV,QAAQ;QAC3B,MAAM,OAAA,cAAiC,CAAjC,IAAIC,MAAM,yBAAV,qBAAA;mBAAA;wBAAA;0BAAA;QAAgC;IACxC;IAEA,OAAOa,OAAOd,MAAMG,MAAM,CAACQ,KAAK,CAAC,KAAKI,EAAE,CAAC,CAAC;AAC5C","ignoreList":[0],"debugId":null}},
{"offset": {"line": 262, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/http-access-fallback/http-access-fallback.ts"],"sourcesContent":["export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n"],"names":["HTTPAccessErrorStatus","HTTP_ERROR_FALLBACK_ERROR_CODE","getAccessFallbackErrorTypeByStatus","getAccessFallbackHTTPStatus","isHTTPAccessFallbackError","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","Set","Object","values","error","digest","prefix","httpStatus","split","has","Number","status"],"mappings":";;;;;;;;;;;;;;;;;IAAaA,qBAAqB,EAAA;eAArBA;;IAQAC,8BAA8B,EAAA;eAA9BA;;IAuCGC,kCAAkC,EAAA;eAAlCA;;IAPAC,2BAA2B,EAAA;eAA3BA;;IAnBAC,yBAAyB,EAAA;eAAzBA;;;AArBT,MAAMJ,wBAAwB;IACnCK,WAAW;IACXC,WAAW;IACXC,cAAc;AAChB;AAEA,MAAMC,gBAAgB,IAAIC,IAAIC,OAAOC,MAAM,CAACX;AAErC,MAAMC,iCAAiC;AAavC,SAASG,0BACdQ,KAAc;IAEd,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAI,KAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IACA,MAAM,CAACC,QAAQC,WAAW,GAAGH,MAAMC,MAAM,CAACG,KAAK,CAAC;IAEhD,OACEF,WAAWb,kCACXO,cAAcS,GAAG,CAACC,OAAOH;AAE7B;AAEO,SAASZ,4BACdS,KAA8B;IAE9B,MAAMG,aAAaH,MAAMC,MAAM,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,OAAOE,OAAOH;AAChB;AAEO,SAASb,mCACdiB,MAAc;IAEd,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE;IACJ;AACF","ignoreList":[0],"debugId":null}},
{"offset": {"line": 336, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/not-found.ts"],"sourcesContent":["import {\n HTTP_ERROR_FALLBACK_ERROR_CODE,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\n\n/**\n * This function allows you to render the [not-found.js file](https://nextjs.org/docs/app/api-reference/file-conventions/not-found)\n * within a route segment as well as inject a tag.\n *\n * `notFound()` can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * - In a Server Component, this will insert a `<meta name=\"robots\" content=\"noindex\" />` meta tag and set the status code to 404.\n * - In a Route Handler or Server Action, it will serve a 404 to the caller.\n *\n * Read more: [Next.js Docs: `notFound`](https://nextjs.org/docs/app/api-reference/functions/not-found)\n */\n\nconst DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};404`\n\nexport function notFound(): never {\n // eslint-disable-next-line no-throw-literal\n const error = new Error(DIGEST) as HTTPAccessFallbackError\n ;(error as HTTPAccessFallbackError).digest = DIGEST\n\n throw error\n}\n"],"names":["notFound","DIGEST","HTTP_ERROR_FALLBACK_ERROR_CODE","error","Error","digest"],"mappings":";;;+BAsBgBA,YAAAA;;;eAAAA;;;oCAnBT;AAEP;;;;;;;;;;;;;CAaC,GAED,MAAMC,SAAU,KAAEC,oBAAAA,8BAA8B,GAAC;AAE1C,SAASF;IACd,4CAA4C;IAC5C,MAAMG,QAAQ,OAAA,cAAiB,CAAjB,IAAIC,MAAMH,SAAV,qBAAA;eAAA;oBAAA;sBAAA;IAAgB;IAC5BE,MAAkCE,MAAM,GAAGJ;IAE7C,MAAME;AACR","ignoreList":[0],"debugId":null}},
{"offset": {"line": 381, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/forbidden.ts"],"sourcesContent":["import {\n HTTP_ERROR_FALLBACK_ERROR_CODE,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\n\n// TODO: Add `forbidden` docs\n/**\n * @experimental\n * This function allows you to render the [forbidden.js file](https://nextjs.org/docs/app/api-reference/file-conventions/forbidden)\n * within a route segment as well as inject a tag.\n *\n * `forbidden()` can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * Read more: [Next.js Docs: `forbidden`](https://nextjs.org/docs/app/api-reference/functions/forbidden)\n */\n\nconst DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};403`\n\nexport function forbidden(): never {\n if (!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS) {\n throw new Error(\n `\\`forbidden()\\` is experimental and only allowed to be enabled when \\`experimental.authInterrupts\\` is enabled.`\n )\n }\n\n // eslint-disable-next-line no-throw-literal\n const error = new Error(DIGEST) as HTTPAccessFallbackError\n ;(error as HTTPAccessFallbackError).digest = DIGEST\n throw error\n}\n"],"names":["forbidden","DIGEST","HTTP_ERROR_FALLBACK_ERROR_CODE","process","env","__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS","Error","error","digest"],"mappings":";;;+BAqBgBA,aAAAA;;;eAAAA;;;oCAlBT;AAEP,6BAA6B;AAC7B;;;;;;;;;;;CAWC,GAED,MAAMC,SAAU,KAAEC,oBAAAA,8BAA8B,GAAC;AAE1C,SAASF;IACd,IAAI,CAACG,QAAQC,GAAG,CAACC,uBAAqC,YAAF;QAClD,MAAM,OAAA,cAEL,CAFK,IAAIC,MACP,gHADG,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEA,4CAA4C;IAC5C,MAAMC,QAAQ,OAAA,cAAiB,CAAjB,IAAID,MAAML,SAAV,qBAAA;eAAA;oBAAA;sBAAA;IAAgB;IAC5BM,MAAkCC,MAAM,GAAGP;IAC7C,MAAMM;AACR","ignoreList":[0],"debugId":null}},
{"offset": {"line": 432, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/unauthorized.ts"],"sourcesContent":["import {\n HTTP_ERROR_FALLBACK_ERROR_CODE,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\n\n// TODO: Add `unauthorized` docs\n/**\n * @experimental\n * This function allows you to render the [unauthorized.js file](https://nextjs.org/docs/app/api-reference/file-conventions/unauthorized)\n * within a route segment as well as inject a tag.\n *\n * `unauthorized()` can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n *\n * Read more: [Next.js Docs: `unauthorized`](https://nextjs.org/docs/app/api-reference/functions/unauthorized)\n */\n\nconst DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};401`\n\nexport function unauthorized(): never {\n if (!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS) {\n throw new Error(\n `\\`unauthorized()\\` is experimental and only allowed to be used when \\`experimental.authInterrupts\\` is enabled.`\n )\n }\n\n // eslint-disable-next-line no-throw-literal\n const error = new Error(DIGEST) as HTTPAccessFallbackError\n ;(error as HTTPAccessFallbackError).digest = DIGEST\n throw error\n}\n"],"names":["unauthorized","DIGEST","HTTP_ERROR_FALLBACK_ERROR_CODE","process","env","__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS","Error","error","digest"],"mappings":";;;+BAsBgBA,gBAAAA;;;eAAAA;;;oCAnBT;AAEP,gCAAgC;AAChC;;;;;;;;;;;;CAYC,GAED,MAAMC,SAAU,KAAEC,oBAAAA,8BAA8B,GAAC;AAE1C,SAASF;IACd,IAAI,CAACG,QAAQC,GAAG,CAACC,uBAAqC,YAAF;QAClD,MAAM,OAAA,cAEL,CAFK,IAAIC,MACP,gHADG,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEA,4CAA4C;IAC5C,MAAMC,QAAQ,OAAA,cAAiB,CAAjB,IAAID,MAAML,SAAV,qBAAA;eAAA;oBAAA;sBAAA;IAAgB;IAC5BM,MAAkCC,MAAM,GAAGP;IAC7C,MAAMM;AACR","ignoreList":[0],"debugId":null}},
{"offset": {"line": 484, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/server/dynamic-rendering-utils.ts"],"sourcesContent":["export function isHangingPromiseRejectionError(\n err: unknown\n): err is HangingPromiseRejectionError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === HANGING_PROMISE_REJECTION\n}\n\nconst HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'\n\nclass HangingPromiseRejectionError extends Error {\n public readonly digest = HANGING_PROMISE_REJECTION\n\n constructor(\n public readonly route: string,\n public readonly expression: string\n ) {\n super(\n `During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \\`setTimeout\\`, \\`after\\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route \"${route}\".`\n )\n }\n}\n\ntype AbortListeners = Array<(err: unknown) => void>\nconst abortListenersBySignal = new WeakMap<AbortSignal, AbortListeners>()\n\n/**\n * This function constructs a promise that will never resolve. This is primarily\n * useful for cacheComponents where we use promise resolution timing to determine which\n * parts of a render can be included in a prerender.\n *\n * @internal\n */\nexport function makeHangingPromise<T>(\n signal: AbortSignal,\n route: string,\n expression: string\n): Promise<T> {\n if (signal.aborted) {\n return Promise.reject(new HangingPromiseRejectionError(route, expression))\n } else {\n const hangingPromise = new Promise<T>((_, reject) => {\n const boundRejection = reject.bind(\n null,\n new HangingPromiseRejectionError(route, expression)\n )\n let currentListeners = abortListenersBySignal.get(signal)\n if (currentListeners) {\n currentListeners.push(boundRejection)\n } else {\n const listeners = [boundRejection]\n abortListenersBySignal.set(signal, listeners)\n signal.addEventListener(\n 'abort',\n () => {\n for (let i = 0; i < listeners.length; i++) {\n listeners[i]()\n }\n },\n { once: true }\n )\n }\n })\n // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so\n // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct\n // your own promise out of it you'll need to ensure you handle the error when it rejects.\n hangingPromise.catch(ignoreReject)\n return hangingPromise\n }\n}\n\nfunction ignoreReject() {}\n\nexport function makeDevtoolsIOAwarePromise<T>(underlying: T): Promise<T> {\n // in React DevTools if we resolve in a setTimeout we will observe\n // the promise resolution as something that can suspend a boundary or root.\n return new Promise<T>((resolve) => {\n // Must use setTimeout to be considered IO React DevTools. setImmediate will not work.\n setTimeout(() => {\n resolve(underlying)\n }, 0)\n })\n}\n"],"names":["isHangingPromiseRejectionError","makeDevtoolsIOAwarePromise","makeHangingPromise","err","digest","HANGING_PROMISE_REJECTION","HangingPromiseRejectionError","Error","constructor","route","expression","abortListenersBySignal","WeakMap","signal","aborted","Promise","reject","hangingPromise","_","boundRejection","bind","currentListeners","get","push","listeners","set","addEventListener","i","length","once","catch","ignoreReject","underlying","resolve","setTimeout"],"mappings":";;;;;;;;;;;;;;;IAAgBA,8BAA8B,EAAA;eAA9BA;;IA2EAC,0BAA0B,EAAA;eAA1BA;;IAxCAC,kBAAkB,EAAA;eAAlBA;;;AAnCT,SAASF,+BACdG,GAAY;IAEZ,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,CAAA,YAAYA,GAAE,GAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAIC,MAAM,KAAKC;AACxB;AAEA,MAAMA,4BAA4B;AAElC,MAAMC,qCAAqCC;IAGzCC,YACkBC,KAAa,EACbC,UAAkB,CAClC;QACA,KAAK,CACH,CAAC,qBAAqB,EAAEA,WAAW,qGAAqG,EAAEA,WAAW,8KAA8K,EAAED,MAAM,EAAE,CAAC,GAAA,IAAA,CAJhUA,KAAAA,GAAAA,OAAAA,IAAAA,CACAC,UAAAA,GAAAA,YAAAA,IAAAA,CAJFN,MAAAA,GAASC;IASzB;AACF;AAGA,MAAMM,yBAAyB,IAAIC;AAS5B,SAASV,mBACdW,MAAmB,EACnBJ,KAAa,EACbC,UAAkB;IAElB,IAAIG,OAAOC,OAAO,EAAE;QAClB,OAAOC,QAAQC,MAAM,CAAC,IAAIV,6BAA6BG,OAAOC;IAChE,OAAO;QACL,MAAMO,iBAAiB,IAAIF,QAAW,CAACG,GAAGF;YACxC,MAAMG,iBAAiBH,OAAOI,IAAI,CAChC,MACA,IAAId,6BAA6BG,OAAOC;YAE1C,IAAIW,mBAAmBV,uBAAuBW,GAAG,CAACT;YAClD,IAAIQ,kBAAkB;gBACpBA,iBAAiBE,IAAI,CAACJ;YACxB,OAAO;gBACL,MAAMK,YAAY;oBAACL;iBAAe;gBAClCR,uBAAuBc,GAAG,CAACZ,QAAQW;gBACnCX,OAAOa,gBAAgB,CACrB,SACA;oBACE,IAAK,IAAIC,IAAI,GAAGA,IAAIH,UAAUI,MAAM,EAAED,IAAK;wBACzCH,SAAS,CAACG,EAAE;oBACd;gBACF,GACA;oBAAEE,MAAM;gBAAK;YAEjB;QACF;QACA,2GAA2G;QAC3G,6GAA6G;QAC7G,yFAAyF;QACzFZ,eAAea,KAAK,CAACC;QACrB,OAAOd;IACT;AACF;AAEA,SAASc,gBAAgB;AAElB,SAAS9B,2BAA8B+B,UAAa;IACzD,kEAAkE;IAClE,2EAA2E;IAC3E,OAAO,IAAIjB,QAAW,CAACkB;QACrB,sFAAsF;QACtFC,WAAW;YACTD,QAAQD;QACV,GAAG;IACL;AACF","ignoreList":[0],"debugId":null}},
{"offset": {"line": 567, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/server/lib/router-utils/is-postpone.ts"],"sourcesContent":["const REACT_POSTPONE_TYPE: symbol = Symbol.for('react.postpone')\n\nexport function isPostpone(error: any): boolean {\n return (\n typeof error === 'object' &&\n error !== null &&\n error.$$typeof === REACT_POSTPONE_TYPE\n )\n}\n"],"names":["isPostpone","REACT_POSTPONE_TYPE","Symbol","for","error","$$typeof"],"mappings":";;;+BAEgBA,cAAAA;;;eAAAA;;;AAFhB,MAAMC,sBAA8BC,OAAOC,GAAG,CAAC;AAExC,SAASH,WAAWI,KAAU;IACnC,OACE,OAAOA,UAAU,YACjBA,UAAU,QACVA,MAAMC,QAAQ,KAAKJ;AAEvB","ignoreList":[0],"debugId":null}},
{"offset": {"line": 584, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/shared/lib/lazy-dynamic/bailout-to-csr.ts"],"sourcesContent":["// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n"],"names":["BailoutToCSRError","isBailoutToCSRError","BAILOUT_TO_CSR","Error","constructor","reason","digest","err"],"mappings":"AAAA,+GAA+G;;;;;;;;;;;;;;;IAIlGA,iBAAiB,EAAA;eAAjBA;;IASGC,mBAAmB,EAAA;eAAnBA;;;AAZhB,MAAMC,iBAAiB;AAGhB,MAAMF,0BAA0BG;IAGrCC,YAA4BC,MAAc,CAAE;QAC1C,KAAK,CAAE,wCAAqCA,SAAAA,IAAAA,CADlBA,MAAAA,GAAAA,QAAAA,IAAAA,CAFZC,MAAAA,GAASJ;IAIzB;AACF;AAGO,SAASD,oBAAoBM,GAAY;IAC9C,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,CAAA,YAAYA,GAAE,GAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAID,MAAM,KAAKJ;AACxB","ignoreList":[0],"debugId":null}},
{"offset": {"line": 622, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/is-next-router-error.ts"],"sourcesContent":["import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n"],"names":["isNextRouterError","error","isRedirectError","isHTTPAccessFallbackError"],"mappings":";;;+BAWgBA,qBAAAA;;;eAAAA;;;oCART;+BAC6C;AAO7C,SAASA,kBACdC,KAAc;IAEd,OAAOC,CAAAA,GAAAA,eAAAA,eAAe,EAACD,UAAUE,CAAAA,GAAAA,oBAAAA,yBAAyB,EAACF;AAC7D","ignoreList":[0],"debugId":null}},
{"offset": {"line": 647, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/hooks-server-context.ts"],"sourcesContent":["const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n"],"names":["DynamicServerError","isDynamicServerError","DYNAMIC_ERROR_CODE","Error","constructor","description","digest","err"],"mappings":";;;;;;;;;;;;;;IAEaA,kBAAkB,EAAA;eAAlBA;;IAQGC,oBAAoB,EAAA;eAApBA;;;AAVhB,MAAMC,qBAAqB;AAEpB,MAAMF,2BAA2BG;IAGtCC,YAA4BC,WAAmB,CAAE;QAC/C,KAAK,CAAE,2BAAwBA,cAAAA,IAAAA,CADLA,WAAAA,GAAAA,aAAAA,IAAAA,CAF5BC,MAAAA,GAAoCJ;IAIpC;AACF;AAEO,SAASD,qBAAqBM,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,CAAA,YAAYA,GAAE,KAChB,OAAOA,IAAID,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOC,IAAID,MAAM,KAAKJ;AACxB","ignoreList":[0],"debugId":null}},
{"offset": {"line": 691, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/static-generation-bailout.ts"],"sourcesContent":["const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n error: unknown\n): error is StaticGenBailoutError {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false\n }\n\n return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n"],"names":["StaticGenBailoutError","isStaticGenBailoutError","NEXT_STATIC_GEN_BAILOUT","Error","code","error"],"mappings":";;;;;;;;;;;;;;IAEaA,qBAAqB,EAAA;eAArBA;;IAIGC,uBAAuB,EAAA;eAAvBA;;;AANhB,MAAMC,0BAA0B;AAEzB,MAAMF,8BAA8BG;;QAApC,KAAA,IAAA,OAAA,IAAA,CACWC,IAAAA,GAAOF;;AACzB;AAEO,SAASD,wBACdI,KAAc;IAEd,IAAI,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAAE,CAAA,UAAUA,KAAI,GAAI;QACrE,OAAO;IACT;IAEA,OAAOA,MAAMD,IAAI,KAAKF;AACxB","ignoreList":[0],"debugId":null}},
{"offset": {"line": 735, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/lib/framework/boundary-constants.tsx"],"sourcesContent":["export const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'\nexport const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'\nexport const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'\nexport const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'\n"],"names":["METADATA_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME"],"mappings":";;;;;;;;;;;;;;;;IAAaA,sBAAsB,EAAA;eAAtBA;;IAEAC,oBAAoB,EAAA;eAApBA;;IACAC,yBAAyB,EAAA;eAAzBA;;IAFAC,sBAAsB,EAAA;eAAtBA;;;AADN,MAAMH,yBAAyB;AAC/B,MAAMG,yBAAyB;AAC/B,MAAMF,uBAAuB;AAC7B,MAAMC,4BAA4B","ignoreList":[0],"debugId":null}},
{"offset": {"line": 772, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/lib/scheduler.ts"],"sourcesContent":["export type ScheduledFn<T = void> = () => T | PromiseLike<T>\nexport type SchedulerFn<T = void> = (cb: ScheduledFn<T>) => void\n\n/**\n * Schedules a function to be called on the next tick after the other promises\n * have been resolved.\n *\n * @param cb the function to schedule\n */\nexport const scheduleOnNextTick = (cb: ScheduledFn<void>) => {\n // We use Promise.resolve().then() here so that the operation is scheduled at\n // the end of the promise job queue, we then add it to the next process tick\n // to ensure it's evaluated afterwards.\n //\n // This was inspired by the implementation of the DataLoader interface: https://github.com/graphql/dataloader/blob/d336bd15282664e0be4b4a657cb796f09bafbc6b/src/index.js#L213-L255\n //\n Promise.resolve().then(() => {\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0)\n } else {\n process.nextTick(cb)\n }\n })\n}\n\n/**\n * Schedules a function to be called using `setImmediate` or `setTimeout` if\n * `setImmediate` is not available (like in the Edge runtime).\n *\n * @param cb the function to schedule\n */\nexport const scheduleImmediate = (cb: ScheduledFn<void>): void => {\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0)\n } else {\n setImmediate(cb)\n }\n}\n\n/**\n * returns a promise than resolves in a future task. There is no guarantee that the task it resolves in\n * will be the next task but if you await it you can at least be sure that the current task is over and\n * most usefully that the entire microtask queue of the current task has been emptied.\n */\nexport function atLeastOneTask() {\n return new Promise<void>((resolve) => scheduleImmediate(resolve))\n}\n\n/**\n * This utility function is extracted to make it easier to find places where we are doing\n * specific timing tricks to try to schedule work after React has rendered. This is especially\n * important at the moment because Next.js uses the edge builds of React which use setTimeout to\n * schedule work when you might expect that something like setImmediate would do the trick.\n *\n * Long term we should switch to the node versions of React rendering when possible and then\n * update this to use setImmediate rather than setTimeout\n */\nexport function waitAtLeastOneReactRenderTask(): Promise<void> {\n if (process.env.NEXT_RUNTIME === 'edge') {\n return new Promise((r) => setTimeout(r, 0))\n } else {\n return new Promise((r) => setImmediate(r))\n }\n}\n"],"names":["atLeastOneTask","scheduleImmediate","scheduleOnNextTick","waitAtLeastOneReactRenderTask","cb","Promise","resolve","then","process","env","NEXT_RUNTIME","setTimeout","nextTick","setImmediate","r"],"mappings":";;;;;;;;;;;;;;;;IA4CgBA,cAAc,EAAA;eAAdA;;IAbHC,iBAAiB,EAAA;eAAjBA;;IAtBAC,kBAAkB,EAAA;eAAlBA;;IAgDGC,6BAA6B,EAAA;eAA7BA;;;AAhDT,MAAMD,qBAAqB,CAACE;IACjC,6EAA6E;IAC7E,4EAA4E;IAC5E,uCAAuC;IACvC,EAAE;IACF,kLAAkL;IAClL,EAAE;IACFC,QAAQC,OAAO,GAAGC,IAAI,CAAC;QACrB,IAAIC,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;aAElC;YACLF,QAAQI,QAAQ,CAACR;QACnB;IACF;AACF;AAQO,MAAMH,oBAAoB,CAACG;IAChC,IAAII,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;SAElC;QACLG,aAAaT;IACf;AACF;AAOO,SAASJ;IACd,OAAO,IAAIK,QAAc,CAACC,UAAYL,kBAAkBK;AAC1D;AAWO,SAASH;IACd,IAAIK,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;SAElC;QACL,OAAO,IAAIL,QAAQ,CAACS,IAAMD,aAAaC;IACzC;AACF","ignoreList":[0],"debugId":null}},
{"offset": {"line": 837, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/shared/lib/invariant-error.ts"],"sourcesContent":["export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n"],"names":["InvariantError","Error","constructor","message","options","endsWith","name"],"mappings":";;;+BAAaA,kBAAAA;;;eAAAA;;;AAAN,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACF,gBAAaD,CAAAA,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,GAAE,IAAE,8BAC9DC;QAEF,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0],"debugId":null}},
{"offset": {"line": 856, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/server/app-render/dynamic-rendering.ts"],"sourcesContent":["/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n WorkUnitStore,\n RequestStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n PrerenderStoreModernRuntime,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n getRuntimeStagePromise,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n /**\n * If debugging, this will contain the stack trace of where the dynamic access\n * occurred. This is used to provide more information to the user about why\n * their page is being rendered dynamically.\n */\n stack?: string\n\n /**\n * The expression that was accessed dynamically.\n */\n expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n /**\n * When true, stack information will also be tracked during dynamic access.\n */\n readonly isDebugDynamicAccesses: boolean | undefined\n\n /**\n * The dynamic accesses that occurred during the render.\n */\n readonly dynamicAccesses: Array<DynamicAccess>\n\n syncDynamicErrorWithStack: null | Error\n}\n\n// Stores dynamic reasons used during an SSR render.\nexport type DynamicValidationState = {\n hasSuspenseAboveBody: boolean\n hasDynamicMetadata: boolean\n hasDynamicViewport: boolean\n hasAllowedDynamic: boolean\n dynamicErrors: Array<Error>\n}\n\nexport function createDynamicTrackingState(\n isDebugDynamicAccesses: boolean | undefined\n): DynamicTrackingState {\n return {\n isDebugDynamicAccesses,\n dynamicAccesses: [],\n syncDynamicErrorWithStack: null,\n }\n}\n\nexport function createDynamicValidationState(): DynamicValidationState {\n return {\n hasSuspenseAboveBody: false,\n hasDynamicMetadata: false,\n hasDynamicViewport: false,\n hasAllowedDynamic: false,\n dynamicErrors: [],\n }\n}\n\nexport function getFirstDynamicReason(\n trackingState: DynamicTrackingState\n): undefined | string {\n return trackingState.dynamicAccesses[0]?.expression\n}\n\n/**\n * This function communicates that the current scope should be treated as dynamic.\n *\n * In most cases this function is a no-op but if called during\n * a PPR prerender it will postpone the current sub-tree and calling\n * it during a normal prerender will cause the entire prerender to abort\n */\nexport function markCurrentScopeAsDynamic(\n store: WorkStore,\n workUnitStore: undefined | Exclude<WorkUnitStore, PrerenderStoreModern>,\n expression: string\n): void {\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'request':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n // If we're forcing dynamic rendering or we're forcing static rendering, we\n // don't need to do anything here because the entire page is already dynamic\n // or it's static and it should not throw or postpone here.\n if (store.forceDynamic || store.forceStatic) return\n\n if (store.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${store.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-ppr':\n return postponeWithTracking(\n store.route,\n expression,\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n workUnitStore.revalidate = 0\n\n // We aren't prerendering, but we are generating a static page. We need\n // to bail out of static generation.\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\n/**\n * This function is meant to be used when prerendering without cacheComponents or PPR.\n * When called during a build it will cause Next.js to consider the route as dynamic.\n *\n * @internal\n */\nexport function throwToInterruptStaticGeneration(\n expression: string,\n store: WorkStore,\n prerenderStore: PrerenderStoreLegacy\n): never {\n // We aren't prerendering but we are generating a static page. We need to bail out of static generation\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n\n prerenderStore.revalidate = 0\n\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n}\n\n/**\n * This function should be used to track whether something dynamic happened even when\n * we are in a dynamic render. This is useful for Dev where all renders are dynamic but\n * we still track whether dynamic APIs were accessed for helpful messaging\n *\n * @internal\n */\nexport function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'prerender-client':\n break\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n}\n\nfunction abortOnSynchronousDynamicDataAccess(\n route: string,\n expression: string,\n prerenderStore: PrerenderStoreModern\n): void {\n const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n\n const error = createPrerenderInterruptedError(reason)\n\n prerenderStore.controller.abort(error)\n\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function abortOnSynchronousPlatformIOAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): void {\n const dynamicTracking = prerenderStore.dynamicTracking\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n}\n\nexport function trackSynchronousPlatformIOAccessInDev(\n requestStore: RequestStore\n): void {\n // We don't actually have a controller to abort but we do the semantic equivalent by\n // advancing the request store out of prerender mode\n requestStore.prerenderPhase = false\n}\n\n/**\n * use this function when prerendering with cacheComponents. If we are doing a\n * prospective prerender we don't actually abort because we want to discover\n * all caches for the shell. If this is the actual prerender we do abort.\n *\n * This function accepts a prerenderStore but the caller should ensure we're\n * actually running in cacheComponents mode.\n *\n * @internal\n */\nexport function abortAndThrowOnSynchronousRequestDataAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): never {\n const prerenderSignal = prerenderStore.controller.signal\n if (prerenderSignal.aborted === false) {\n // TODO it would be better to move this aborted check into the callsite so we can avoid making\n // the error object when it isn't relevant to the aborting of the prerender however\n // since we need the throw semantics regardless of whether we abort it is easier to land\n // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer\n // to ideal implementation\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n }\n throw createPrerenderInterruptedError(\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n )\n}\n\n/**\n * Use this function when dynamically prerendering with dynamicIO.\n * We don't want to error, because it's better to return something\n * (and we've already aborted the render at the point where the sync dynamic error occured),\n * but we should log an error server-side.\n * @internal\n */\nexport function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) {\n if (dynamicTracking.syncDynamicErrorWithStack) {\n // the server did something sync dynamic, likely\n // leading to an early termination of the prerender.\n console.error(dynamicTracking.syncDynamicErrorWithStack)\n }\n}\n\n// For now these implementations are the same so we just reexport\nexport const trackSynchronousRequestDataAccessInDev =\n trackSynchronousPlatformIOAccessInDev\n\n/**\n * This component will call `React.postpone` that throws the postponed error.\n */\ntype PostponeProps = {\n reason: string\n route: string\n}\nexport function Postpone({ reason, route }: PostponeProps): never {\n const prerenderStore = workUnitAsyncStorage.getStore()\n const dynamicTracking =\n prerenderStore && prerenderStore.type === 'prerender-ppr'\n ? prerenderStore.dynamicTracking\n : null\n postponeWithTracking(route, reason, dynamicTracking)\n}\n\nexport function postponeWithTracking(\n route: string,\n expression: string,\n dynamicTracking: null | DynamicTrackingState\n): never {\n assertPostpone()\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n\n React.unstable_postpone(createPostponeReason(route, expression))\n}\n\nfunction createPostponeReason(route: string, expression: string) {\n return (\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` +\n `React throws this special object to indicate where. It should not be caught by ` +\n `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`\n )\n}\n\nexport function isDynamicPostpone(err: unknown) {\n if (\n typeof err === 'object' &&\n err !== null &&\n typeof (err as any).message === 'string'\n ) {\n return isDynamicPostponeReason((err as any).message)\n }\n return false\n}\n\nfunction isDynamicPostponeReason(reason: string) {\n return (\n reason.includes(\n 'needs to bail out of prerendering at this point because it used'\n ) &&\n reason.includes(\n 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error'\n )\n )\n}\n\nif (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {\n throw new Error(\n 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'\n )\n}\n\nconst NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'\n\nfunction createPrerenderInterruptedError(message: string): Error {\n const error = new Error(message)\n ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED\n return error\n}\n\ntype DigestError = Error & {\n digest: string\n}\n\nexport function isPrerenderInterruptedError(\n error: unknown\n): error is DigestError {\n return (\n typeof error === 'object' &&\n error !== null &&\n (error as any).digest === NEXT_PRERENDER_INTERRUPTED &&\n 'name' in error &&\n 'message' in error &&\n error instanceof Error\n )\n}\n\nexport function accessedDynamicData(\n dynamicAccesses: Array<DynamicAccess>\n): boolean {\n return dynamicAccesses.length > 0\n}\n\nexport function consumeDynamicAccess(\n serverDynamic: DynamicTrackingState,\n clientDynamic: DynamicTrackingState\n): DynamicTrackingState['dynamicAccesses'] {\n // We mutate because we only call this once we are no longer writing\n // to the dynamicTrackingState and it's more efficient than creating a new\n // array.\n serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses)\n return serverDynamic.dynamicAccesses\n}\n\nexport function formatDynamicAPIAccesses(\n dynamicAccesses: Array<DynamicAccess>\n): string[] {\n return dynamicAccesses\n .filter(\n (access): access is Required<DynamicAccess> =>\n typeof access.stack === 'string' && access.stack.length > 0\n )\n .map(({ expression, stack }) => {\n stack = stack\n .split('\\n')\n // Remove the \"Error: \" prefix from the first line of the stack trace as\n // well as the first 4 lines of the stack trace which is the distance\n // from the user code and the `new Error().stack` call.\n .slice(4)\n .filter((line) => {\n // Exclude Next.js internals from the stack trace.\n if (line.includes('node_modules/next/')) {\n return false\n }\n\n // Exclude anonymous functions from the stack trace.\n if (line.includes(' (<anonymous>)')) {\n return false\n }\n\n // Exclude Node.js internals from the stack trace.\n if (line.includes(' (node:')) {\n return false\n }\n\n return true\n })\n .join('\\n')\n return `Dynamic API Usage Debug - ${expression}:\\n${stack}`\n })\n}\n\nfunction assertPostpone() {\n if (!hasPostpone) {\n throw new Error(\n `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`\n )\n }\n}\n\n/**\n * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's\n * abort semantics slightly.\n */\nexport function createRenderInBrowserAbortSignal(): AbortSignal {\n const controller = new AbortController()\n controller.abort(new BailoutToCSRError('Render in Browser'))\n return controller.signal\n}\n\n/**\n * In a prerender, we may end up with hanging Promises as inputs due them\n * stalling on connection() or because they're loading dynamic data. In that\n * case we need to abort the encoding of arguments since they'll never complete.\n */\nexport function createHangingInputAbortSignal(\n workUnitStore: WorkUnitStore\n): AbortSignal | undefined {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-runtime':\n const controller = new AbortController()\n\n if (workUnitStore.cacheSignal) {\n // If we have a cacheSignal it means we're in a prospective render. If\n // the input we're waiting on is coming from another cache, we do want\n // to wait for it so that we can resolve this cache entry too.\n workUnitStore.cacheSignal.inputReady().then(() => {\n controller.abort()\n })\n } else {\n // Otherwise we're in the final render and we should already have all\n // our caches filled.\n // If the prerender uses stages, we have wait until the runtime stage,\n // at which point all runtime inputs will be resolved.\n // (otherwise, a runtime prerender might consider `cookies()` hanging\n // even though they'd resolve in the next task.)\n //\n // We might still be waiting on some microtasks so we\n // wait one tick before giving up. When we give up, we still want to\n // render the content of this cache as deeply as we can so that we can\n // suspend as deeply as possible in the tree or not at all if we don't\n // end up waiting for the input.\n const runtimeStagePromise = getRuntimeStagePromise(workUnitStore)\n if (runtimeStagePromise) {\n runtimeStagePromise.then(() =>\n scheduleOnNextTick(() => controller.abort())\n )\n } else {\n scheduleOnNextTick(() => controller.abort())\n }\n }\n\n return controller.signal\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return undefined\n default:\n workUnitStore satisfies never\n }\n}\n\nexport function annotateDynamicAccess(\n expression: string,\n prerenderStore: PrerenderStoreModern\n) {\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function useDynamicRouteParams(expression: string) {\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workStore && workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-client':\n case 'prerender': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n // We are in a prerender with cacheComponents semantics. We are going to\n // hang here and never resolve. This will cause the currently\n // rendering component to effectively be a dynamic hole.\n React.use(\n makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n expression\n )\n )\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n return postponeWithTracking(\n workStore.route,\n expression,\n workUnitStore.dynamicTracking\n )\n }\n break\n }\n case 'prerender-runtime':\n throw new InvariantError(\n `\\`${expression}\\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'cache':\n case 'private-cache':\n throw new InvariantError(\n `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'prerender-legacy':\n case 'request':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\nconst hasSuspenseRegex = /\\n\\s+at Suspense \\(<anonymous>\\)/\n\n// Common implicit body tags that React will treat as body when placed directly in html\nconst bodyAndImplicitTags =\n 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'\n\n// Detects when RootLayoutBoundary (our framework marker component) appears\n// after Suspense in the component stack, indicating the root layout is wrapped\n// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.\n//\n// Example matches:\n// at Suspense (<anonymous>)\n// at __next_root_layout_boundary__ (<anonymous>)\n//\n// Or with other components in between (but not body/html/implicit-body):\n// at Suspense (<anonymous>)\n// at SomeComponent (<anonymous>)\n// at __next_root_layout_boundary__ (<anonymous>)\nconst hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(\n `\\\\n\\\\s+at Suspense \\\\(<anonymous>\\\\)(?:(?!\\\\n\\\\s+at (?:${bodyAndImplicitTags}) \\\\(<anonymous>\\\\))[\\\\s\\\\S])*?\\\\n\\\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\\\([^\\\\n]*\\\\)`\n)\n\nconst hasMetadataRegex = new RegExp(\n `\\\\n\\\\s+at ${METADATA_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasViewportRegex = new RegExp(\n `\\\\n\\\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasOutletRegex = new RegExp(`\\\\n\\\\s+at ${OUTLET_BOUNDARY_NAME}[\\\\n\\\\s]`)\n\nexport function trackAllowedDynamicAccess(\n workStore: WorkStore,\n componentStack: string,\n dynamicValidation: DynamicValidationState,\n clientDynamic: DynamicTrackingState\n) {\n if (hasOutletRegex.test(componentStack)) {\n // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n return\n } else if (hasMetadataRegex.test(componentStack)) {\n dynamicValidation.hasDynamicMetadata = true\n return\n } else if (hasViewportRegex.test(componentStack)) {\n dynamicValidation.hasDynamicViewport = true\n return\n } else if (\n hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n componentStack\n )\n ) {\n // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n dynamicValidation.hasAllowedDynamic = true\n dynamicValidation.hasSuspenseAboveBody = true\n return\n } else if (hasSuspenseRegex.test(componentStack)) {\n // this error had a Suspense boundary above it so we don't need to report it as a source\n // of disallowed\n dynamicValidation.hasAllowedDynamic = true\n return\n } else if (clientDynamic.syncDynamicErrorWithStack) {\n // This task was the task that called the sync error.\n dynamicValidation.dynamicErrors.push(\n clientDynamic.syncDynamicErrorWithStack\n )\n return\n } else {\n const message = `Route \"${workStore.route}\": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a \"use cache\" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`\n const error = createErrorWithComponentOrOwnerStack(message, componentStack)\n dynamicValidation.dynamicErrors.push(error)\n return\n }\n}\n\n/**\n * In dev mode, we prefer using the owner stack, otherwise the provided\n * component stack is used.\n */\nfunction createErrorWithComponentOrOwnerStack(\n message: string,\n componentStack: string\n) {\n const ownerStack =\n process.env.NODE_ENV !== 'production' && React.captureOwnerStack\n ? React.captureOwnerStack()\n : null\n\n const error = new Error(message)\n error.stack = error.name + ': ' + message + (ownerStack ?? componentStack)\n return error\n}\n\nexport enum PreludeState {\n Full = 0,\n Empty = 1,\n Errored = 2,\n}\n\nexport function logDisallowedDynamicError(\n workStore: WorkStore,\n error: Error\n): void {\n console.error(error)\n\n if (!workStore.dev) {\n if (workStore.hasReadableErrorStacks) {\n console.error(\n `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.`\n )\n } else {\n console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:\n - Start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.\n - Rerun the production build with \\`next build --debug-prerender\\` to generate better stack traces.`)\n }\n }\n}\n\nexport function throwIfDisallowedDynamic(\n workStore: WorkStore,\n prelude: PreludeState,\n dynamicValidation: DynamicValidationState,\n serverDynamic: DynamicTrackingState\n): void {\n if (prelude !== PreludeState.Full) {\n if (dynamicValidation.hasSuspenseAboveBody) {\n // This route has opted into allowing fully dynamic rendering\n // by including a Suspense boundary above the body. In this case\n // a lack of a shell is not considered disallowed so we simply return\n return\n }\n\n if (serverDynamic.syncDynamicErrorWithStack) {\n // There is no shell and the server did something sync dynamic likely\n // leading to an early termination of the prerender before the shell\n // could be completed. We terminate the build/validating render.\n logDisallowedDynamicError(\n workStore,\n serverDynamic.syncDynamicErrorWithStack\n )\n throw new StaticGenBailoutError()\n }\n\n // We didn't have any sync bailouts but there may be user code which\n // blocked the root. We would have captured these during the prerender\n // and can log them here and then terminate the build/validating render\n const dynamicErrors = dynamicValidation.dynamicErrors\n if (dynamicErrors.length > 0) {\n for (let i = 0; i < dynamicErrors.length; i++) {\n logDisallowedDynamicError(workStore, dynamicErrors[i])\n }\n\n throw new StaticGenBailoutError()\n }\n\n // If we got this far then the only other thing that could be blocking\n // the root is dynamic Viewport. If this is dynamic then\n // you need to opt into that by adding a Suspense boundary above the body\n // to indicate your are ok with fully dynamic rendering.\n if (dynamicValidation.hasDynamicViewport) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateViewport\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n )\n throw new StaticGenBailoutError()\n }\n\n if (prelude === PreludeState.Empty) {\n // If we ever get this far then we messed up the tracking of invalid dynamic.\n // We still adhere to the constraint that you must produce a shell but invite the\n // user to report this as a bug in Next.js.\n console.error(\n `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`\n )\n throw new StaticGenBailoutError()\n }\n } else {\n if (\n dynamicValidation.hasAllowedDynamic === false &&\n dynamicValidation.hasDynamicMetadata\n ) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateMetadata\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n )\n throw new StaticGenBailoutError()\n }\n }\n}\n\nexport function delayUntilRuntimeStage<T>(\n prerenderStore: PrerenderStoreModernRuntime,\n result: Promise<T>\n): Promise<T> {\n if (prerenderStore.runtimeStagePromise) {\n return prerenderStore.runtimeStagePromise.then(() => result)\n }\n return result\n}\n"],"names":["Postpone","PreludeState","abortAndThrowOnSynchronousRequestDataAccess","abortOnSynchronousPlatformIOAccess","accessedDynamicData","annotateDynamicAccess","consumeDynamicAccess","createDynamicTrackingState","createDynamicValidationState","createHangingInputAbortSignal","createRenderInBrowserAbortSignal","delayUntilRuntimeStage","formatDynamicAPIAccesses","getFirstDynamicReason","isDynamicPostpone","isPrerenderInterruptedError","logDisallowedDynamicError","markCurrentScopeAsDynamic","postponeWithTracking","throwIfDisallowedDynamic","throwToInterruptStaticGeneration","trackAllowedDynamicAccess","trackDynamicDataInDynamicRender","trackSynchronousPlatformIOAccessInDev","trackSynchronousRequestDataAccessInDev","useDynamicRouteParams","warnOnSyncDynamicError","hasPostpone","React","unstable_postpone","isDebugDynamicAccesses","dynamicAccesses","syncDynamicErrorWithStack","hasSuspenseAboveBody","hasDynamicMetadata","hasDynamicViewport","hasAllowedDynamic","dynamicErrors","trackingState","expression","store","workUnitStore","type","forceDynamic","forceStatic","dynamicShouldError","StaticGenBailoutError","route","dynamicTracking","revalidate","err","DynamicServerError","dynamicUsageDescription","dynamicUsageStack","stack","process","env","NODE_ENV","usedDynamic","prerenderStore","abortOnSynchronousDynamicDataAccess","reason","error","createPrerenderInterruptedError","controller","abort","push","Error","undefined","errorWithStack","requestStore","prerenderPhase","prerenderSignal","signal","aborted","console","workUnitAsyncStorage","getStore","assertPostpone","createPostponeReason","message","isDynamicPostponeReason","includes","NEXT_PRERENDER_INTERRUPTED","digest","length","serverDynamic","clientDynamic","filter","access","map","split","slice","line","join","AbortController","BailoutToCSRError","cacheSignal","inputReady","then","runtimeStagePromise","getRuntimeStagePromise","scheduleOnNextTick","workStore","workAsyncStorage","fallbackParams","fallbackRouteParams","size","use","makeHangingPromise","renderSignal","InvariantError","hasSuspenseRegex","bodyAndImplicitTags","hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex","RegExp","ROOT_LAYOUT_BOUNDARY_NAME","hasMetadataRegex","METADATA_BOUNDARY_NAME","hasViewportRegex","VIEWPORT_BOUNDARY_NAME","hasOutletRegex","OUTLET_BOUNDARY_NAME","componentStack","dynamicValidation","test","createErrorWithComponentOrOwnerStack","ownerStack","captureOwnerStack","name","dev","hasReadableErrorStacks","prelude","i","result"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;CAoBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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yC,mBAAmB,EAAE;QACtC,OAAOzC,eAAeyC,mBAAmB,CAACD,IAAI,CAAC,IAAMmC;IACvD;IACA,OAAOA;AACT","ignoreList":[0],"debugId":null}},
{"offset": {"line": 1533, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/unstable-rethrow.server.ts"],"sourcesContent":["import { isHangingPromiseRejectionError } from '../../server/dynamic-rendering-utils'\nimport { isPostpone } from '../../server/lib/router-utils/is-postpone'\nimport { isBailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { isNextRouterError } from './is-next-router-error'\nimport { isDynamicPostpone } from '../../server/app-render/dynamic-rendering'\nimport { isDynamicServerError } from './hooks-server-context'\n\nexport function unstable_rethrow(error: unknown): void {\n if (\n isNextRouterError(error) ||\n isBailoutToCSRError(error) ||\n isDynamicServerError(error) ||\n isDynamicPostpone(error) ||\n isPostpone(error) ||\n isHangingPromiseRejectionError(error)\n ) {\n throw error\n }\n\n if (error instanceof Error && 'cause' in error) {\n unstable_rethrow(error.cause)\n }\n}\n"],"names":["unstable_rethrow","error","isNextRouterError","isBailoutToCSRError","isDynamicServerError","isDynamicPostpone","isPostpone","isHangingPromiseRejectionError","Error","cause"],"mappings":";;;+BAOgBA,oBAAAA;;;eAAAA;;;uCAP+B;4BACpB;8BACS;mCACF;kCACA;oCACG;AAE9B,SAASA,iBAAiBC,KAAc;IAC7C,IACEC,CAAAA,GAAAA,mBAAAA,iBAAiB,EAACD,UAClBE,CAAAA,GAAAA,cAAAA,mBAAmB,EAACF,UACpBG,CAAAA,GAAAA,oBAAAA,oBAAoB,EAACH,UACrBI,CAAAA,GAAAA,kBAAAA,iBAAiB,EAACJ,UAClBK,CAAAA,GAAAA,YAAAA,UAAU,EAACL,UACXM,CAAAA,GAAAA,uBAAAA,8BAA8B,EAACN,QAC/B;QACA,MAAMA;IACR;IAEA,IAAIA,iBAAiBO,SAAS,WAAWP,OAAO;QAC9CD,iBAAiBC,MAAMQ,KAAK;IAC9B;AACF","ignoreList":[0],"debugId":null}},
{"offset": {"line": 1567, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/unstable-rethrow.ts"],"sourcesContent":["/**\n * This function should be used to rethrow internal Next.js errors so that they can be handled by the framework.\n * When wrapping an API that uses errors to interrupt control flow, you should use this function before you do any error handling.\n * This function will rethrow the error if it is a Next.js error so it can be handled, otherwise it will do nothing.\n *\n * Read more: [Next.js Docs: `unstable_rethrow`](https://nextjs.org/docs/app/api-reference/functions/unstable_rethrow)\n */\nexport const unstable_rethrow =\n typeof window === 'undefined'\n ? (\n require('./unstable-rethrow.server') as typeof import('./unstable-rethrow.server')\n ).unstable_rethrow\n : (\n require('./unstable-rethrow.browser') as typeof import('./unstable-rethrow.browser')\n ).unstable_rethrow\n"],"names":["unstable_rethrow","window","require"],"mappings":"AAAA;;;;;;CAMC;;;+BACYA,oBAAAA;;;eAAAA;;;AAAN,MAAMA,mBACX,OAAOC,WAAW,qBAEZC,QAAQ,mMACRF,gBAAgB,GAEhBE,QAAQ,8BACRF,gBAAgB","ignoreList":[0],"debugId":null}},
{"offset": {"line": 1594, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/navigation.react-server.ts"],"sourcesContent":["/** @internal */\nclass ReadonlyURLSearchParamsError extends Error {\n constructor() {\n super(\n 'Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams'\n )\n }\n}\n\nclass ReadonlyURLSearchParams extends URLSearchParams {\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n append() {\n throw new ReadonlyURLSearchParamsError()\n }\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n delete() {\n throw new ReadonlyURLSearchParamsError()\n }\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n set() {\n throw new ReadonlyURLSearchParamsError()\n }\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n sort() {\n throw new ReadonlyURLSearchParamsError()\n }\n}\n\nexport function unstable_isUnrecognizedActionError(): boolean {\n throw new Error(\n '`unstable_isUnrecognizedActionError` can only be used on the client.'\n )\n}\n\nexport { redirect, permanentRedirect } from './redirect'\nexport { RedirectType } from './redirect-error'\nexport { notFound } from './not-found'\nexport { forbidden } from './forbidden'\nexport { unauthorized } from './unauthorized'\nexport { unstable_rethrow } from './unstable-rethrow'\nexport { ReadonlyURLSearchParams }\n"],"names":["ReadonlyURLSearchParams","RedirectType","forbidden","notFound","permanentRedirect","redirect","unauthorized","unstable_isUnrecognizedActionError","unstable_rethrow","ReadonlyURLSearchParamsError","Error","constructor","URLSearchParams","append","delete","set","sort"],"mappings":"AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;IAwCLA,uBAAuB,EAAA;eAAvBA;;IALAC,YAAY,EAAA;eAAZA,eAAAA,YAAY;;IAEZC,SAAS,EAAA;eAATA,WAAAA,SAAS;;IADTC,QAAQ,EAAA;eAARA,UAAAA,QAAQ;;IAFEC,iBAAiB,EAAA;eAAjBA,UAAAA,iBAAiB;;IAA3BC,QAAQ,EAAA;eAARA,UAAAA,QAAQ;;IAIRC,YAAY,EAAA;eAAZA,cAAAA,YAAY;;IAVLC,kCAAkC,EAAA;eAAlCA;;IAWPC,gBAAgB,EAAA;eAAhBA,iBAAAA,gBAAgB;;;0BALmB;+BACf;0BACJ;2BACC;8BACG;iCACI;AAtCjC,MAAMC,qCAAqCC;IACzCC,aAAc;QACZ,KAAK,CACH;IAEJ;AACF;AAEA,MAAMX,gCAAgCY;IACpC,wKAAwK,GACxKC,SAAS;QACP,MAAM,IAAIJ;IACZ;IACA,wKAAwK,GACxKK,SAAS;QACP,MAAM,IAAIL;IACZ;IACA,wKAAwK,GACxKM,MAAM;QACJ,MAAM,IAAIN;IACZ;IACA,wKAAwK,GACxKO,OAAO;QACL,MAAM,IAAIP;IACZ;AACF;AAEO,SAASF;IACd,MAAM,OAAA,cAEL,CAFK,IAAIG,MACR,yEADI,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF","ignoreList":[0],"debugId":null}},
{"offset": {"line": 1686, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/unrecognized-action-error.ts"],"sourcesContent":["export class UnrecognizedActionError extends Error {\n constructor(...args: ConstructorParameters<typeof Error>) {\n super(...args)\n this.name = 'UnrecognizedActionError'\n }\n}\n\n/**\n * Check whether a server action call failed because the server action was not recognized by the server.\n * This can happen if the client and the server are not from the same deployment.\n *\n * Example usage:\n * ```ts\n * try {\n * await myServerAction();\n * } catch (err) {\n * if (unstable_isUnrecognizedActionError(err)) {\n * // The client is from a different deployment than the server.\n * // Reloading the page will fix this mismatch.\n * window.alert(\"Please refresh the page and try again\");\n * return;\n * }\n * }\n * ```\n * */\nexport function unstable_isUnrecognizedActionError(\n error: unknown\n): error is UnrecognizedActionError {\n return !!(\n error &&\n typeof error === 'object' &&\n error instanceof UnrecognizedActionError\n )\n}\n"],"names":["UnrecognizedActionError","unstable_isUnrecognizedActionError","Error","constructor","args","name","error"],"mappings":";;;;;;;;;;;;;;IAAaA,uBAAuB,EAAA;eAAvBA;;IAyBGC,kCAAkC,EAAA;eAAlCA;;;AAzBT,MAAMD,gCAAgCE;IAC3CC,YAAY,GAAGC,IAAyC,CAAE;QACxD,KAAK,IAAIA;QACT,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAoBO,SAASJ,mCACdK,KAAc;IAEd,OAAO,CAAC,CACNA,CAAAA,SACA,OAAOA,UAAU,YACjBA,iBAAiBN,uBAAsB;AAE3C","ignoreList":[0],"debugId":null}},
{"offset": {"line": 1727, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/bailout-to-client-rendering.ts"],"sourcesContent":["import { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { workAsyncStorage } from '../../server/app-render/work-async-storage.external'\nimport { workUnitAsyncStorage } from '../../server/app-render/work-unit-async-storage.external'\n\nexport function bailoutToClientRendering(reason: string): void | never {\n const workStore = workAsyncStorage.getStore()\n\n if (workStore?.forceStatic) return\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n throw new BailoutToCSRError(reason)\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n"],"names":["bailoutToClientRendering","reason","workStore","workAsyncStorage","getStore","forceStatic","workUnitStore","workUnitAsyncStorage","type","BailoutToCSRError"],"mappings":";;;+BAIgBA,4BAAAA;;;eAAAA;;;8BAJkB;0CACD;8CACI;AAE9B,SAASA,yBAAyBC,MAAc;IACrD,MAAMC,YAAYC,0BAAAA,gBAAgB,CAACC,QAAQ;IAE3C,IAAIF,aAAAA,OAAAA,KAAAA,IAAAA,UAAWG,WAAW,EAAE;IAE5B,MAAMC,gBAAgBC,8BAAAA,oBAAoB,CAACH,QAAQ;IAEnD,IAAIE,eAAe;QACjB,OAAQA,cAAcE,IAAI;YACxB,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;gBACH,MAAM,OAAA,cAA6B,CAA7B,IAAIC,cAAAA,iBAAiB,CAACR,SAAtB,qBAAA;2BAAA;gCAAA;kCAAA;gBAA4B;YACpC,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;gBACH;YACF;gBACEK;QACJ;IACF;AACF","ignoreList":[0],"debugId":null}},
{"offset": {"line": 1776, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/src/client/components/navigation.ts"],"sourcesContent":["import type { FlightRouterState } from '../../server/app-render/types'\nimport type { Params } from '../../server/request/params'\n\nimport { useContext, useMemo } from 'react'\nimport {\n AppRouterContext,\n LayoutRouterContext,\n type AppRouterInstance,\n} from '../../shared/lib/app-router-context.shared-runtime'\nimport {\n SearchParamsContext,\n PathnameContext,\n PathParamsContext,\n} from '../../shared/lib/hooks-client-context.shared-runtime'\nimport { getSegmentValue } from './router-reducer/reducers/get-segment-value'\nimport { PAGE_SEGMENT_KEY, DEFAULT_SEGMENT_KEY } from '../../shared/lib/segment'\nimport { ReadonlyURLSearchParams } from './navigation.react-server'\n\nconst useDynamicRouteParams =\n typeof window === 'undefined'\n ? (\n require('../../server/app-render/dynamic-rendering') as typeof import('../../server/app-render/dynamic-rendering')\n ).useDynamicRouteParams\n : undefined\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you *read* the current URL's search parameters.\n *\n * Learn more about [`URLSearchParams` on MDN](https://developer.mozilla.org/docs/Web/API/URLSearchParams)\n *\n * @example\n * ```ts\n * \"use client\"\n * import { useSearchParams } from 'next/navigation'\n *\n * export default function Page() {\n * const searchParams = useSearchParams()\n * searchParams.get('foo') // returns 'bar' when ?foo=bar\n * // ...\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useSearchParams`](https://nextjs.org/docs/app/api-reference/functions/use-search-params)\n */\n// Client components API\nexport function useSearchParams(): ReadonlyURLSearchParams {\n const searchParams = useContext(SearchParamsContext)\n\n // In the case where this is `null`, the compat types added in\n // `next-env.d.ts` will add a new overload that changes the return type to\n // include `null`.\n const readonlySearchParams = useMemo(() => {\n if (!searchParams) {\n // When the router is not ready in pages, we won't have the search params\n // available.\n return null\n }\n\n return new ReadonlyURLSearchParams(searchParams)\n }, [searchParams]) as ReadonlyURLSearchParams\n\n if (typeof window === 'undefined') {\n // AsyncLocalStorage should not be included in the client bundle.\n const { bailoutToClientRendering } =\n require('./bailout-to-client-rendering') as typeof import('./bailout-to-client-rendering')\n // TODO-APP: handle dynamic = 'force-static' here and on the client\n bailoutToClientRendering('useSearchParams()')\n }\n\n return readonlySearchParams\n}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you read the current URL's pathname.\n *\n * @example\n * ```ts\n * \"use client\"\n * import { usePathname } from 'next/navigation'\n *\n * export default function Page() {\n * const pathname = usePathname() // returns \"/dashboard\" on /dashboard?foo=bar\n * // ...\n * }\n * ```\n *\n * Read more: [Next.js Docs: `usePathname`](https://nextjs.org/docs/app/api-reference/functions/use-pathname)\n */\n// Client components API\nexport function usePathname(): string {\n useDynamicRouteParams?.('usePathname()')\n\n // In the case where this is `null`, the compat types added in `next-env.d.ts`\n // will add a new overload that changes the return type to include `null`.\n return useContext(PathnameContext) as string\n}\n\n// Client components API\nexport {\n ServerInsertedHTMLContext,\n useServerInsertedHTML,\n} from '../../shared/lib/server-inserted-html.shared-runtime'\n\n/**\n *\n * This hook allows you to programmatically change routes inside [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components).\n *\n * @example\n * ```ts\n * \"use client\"\n * import { useRouter } from 'next/navigation'\n *\n * export default function Page() {\n * const router = useRouter()\n * // ...\n * router.push('/dashboard') // Navigate to /dashboard\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useRouter`](https://nextjs.org/docs/app/api-reference/functions/use-router)\n */\n// Client components API\nexport function useRouter(): AppRouterInstance {\n const router = useContext(AppRouterContext)\n if (router === null) {\n throw new Error('invariant expected app router to be mounted')\n }\n\n return router\n}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you read a route's dynamic params filled in by the current URL.\n *\n * @example\n * ```ts\n * \"use client\"\n * import { useParams } from 'next/navigation'\n *\n * export default function Page() {\n * // on /dashboard/[team] where pathname is /dashboard/nextjs\n * const { team } = useParams() // team === \"nextjs\"\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useParams`](https://nextjs.org/docs/app/api-reference/functions/use-params)\n */\n// Client components API\nexport function useParams<T extends Params = Params>(): T {\n useDynamicRouteParams?.('useParams()')\n\n return useContext(PathParamsContext) as T\n}\n\n/** Get the canonical parameters from the current level to the leaf node. */\n// Client components API\nfunction getSelectedLayoutSegmentPath(\n tree: FlightRouterState,\n parallelRouteKey: string,\n first = true,\n segmentPath: string[] = []\n): string[] {\n let node: FlightRouterState\n if (first) {\n // Use the provided parallel route key on the first parallel route\n node = tree[1][parallelRouteKey]\n } else {\n // After first parallel route prefer children, if there's no children pick the first parallel route.\n const parallelRoutes = tree[1]\n node = parallelRoutes.children ?? Object.values(parallelRoutes)[0]\n }\n\n if (!node) return segmentPath\n const segment = node[0]\n\n let segmentValue = getSegmentValue(segment)\n\n if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {\n return segmentPath\n }\n\n segmentPath.push(segmentValue)\n\n return getSelectedLayoutSegmentPath(\n node,\n parallelRouteKey,\n false,\n segmentPath\n )\n}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you read the active route segments **below** the Layout it is called from.\n *\n * @example\n * ```ts\n * 'use client'\n *\n * import { useSelectedLayoutSegments } from 'next/navigation'\n *\n * export default function ExampleClientComponent() {\n * const segments = useSelectedLayoutSegments()\n *\n * return (\n * <ul>\n * {segments.map((segment, index) => (\n * <li key={index}>{segment}</li>\n * ))}\n * </ul>\n * )\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useSelectedLayoutSegments`](https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments)\n */\n// Client components API\nexport function useSelectedLayoutSegments(\n parallelRouteKey: string = 'children'\n): string[] {\n useDynamicRouteParams?.('useSelectedLayoutSegments()')\n\n const context = useContext(LayoutRouterContext)\n // @ts-expect-error This only happens in `pages`. Type is overwritten in navigation.d.ts\n if (!context) return null\n\n return getSelectedLayoutSegmentPath(context.parentTree, parallelRouteKey)\n}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you read the active route segment **one level below** the Layout it is called from.\n *\n * @example\n * ```ts\n * 'use client'\n * import { useSelectedLayoutSegment } from 'next/navigation'\n *\n * export default function ExampleClientComponent() {\n * const segment = useSelectedLayoutSegment()\n *\n * return <p>Active segment: {segment}</p>\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useSelectedLayoutSegment`](https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment)\n */\n// Client components API\nexport function useSelectedLayoutSegment(\n parallelRouteKey: string = 'children'\n): string | null {\n useDynamicRouteParams?.('useSelectedLayoutSegment()')\n\n const selectedLayoutSegments = useSelectedLayoutSegments(parallelRouteKey)\n\n if (!selectedLayoutSegments || selectedLayoutSegments.length === 0) {\n return null\n }\n\n const selectedLayoutSegment =\n parallelRouteKey === 'children'\n ? selectedLayoutSegments[0]\n : selectedLayoutSegments[selectedLayoutSegments.length - 1]\n\n // if the default slot is showing, we return null since it's not technically \"selected\" (it's a fallback)\n // and returning an internal value like `__DEFAULT__` would be confusing.\n return selectedLayoutSegment === DEFAULT_SEGMENT_KEY\n ? null\n : selectedLayoutSegment\n}\n\nexport { unstable_isUnrecognizedActionError } from './unrecognized-action-error'\n\n// Shared components APIs\nexport {\n notFound,\n forbidden,\n unauthorized,\n redirect,\n permanentRedirect,\n RedirectType,\n ReadonlyURLSearchParams,\n unstable_rethrow,\n} from './navigation.react-server'\n"],"names":["ReadonlyURLSearchParams","RedirectType","ServerInsertedHTMLContext","forbidden","notFound","permanentRedirect","redirect","unauthorized","unstable_isUnrecognizedActionError","unstable_rethrow","useParams","usePathname","useRouter","useSearchParams","useSelectedLayoutSegment","useSelectedLayoutSegments","useServerInsertedHTML","useDynamicRouteParams","window","require","undefined","searchParams","useContext","SearchParamsContext","readonlySearchParams","useMemo","bailoutToClientRendering","PathnameContext","router","AppRouterContext","Error","PathParamsContext","getSelectedLayoutSegmentPath","tree","parallelRouteKey","first","segmentPath","node","parallelRoutes","children","Object","values","segment","segmentValue","getSegmentValue","startsWith","PAGE_SEGMENT_KEY","push","context","LayoutRouterContext","parentTree","selectedLayoutSegments","length","selectedLayoutSegment","DEFAULT_SEGMENT_KEY"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4REA,uBAAuB,EAAA;eAAvBA,uBAAAA,uBAAuB;;IADvBC,YAAY,EAAA;eAAZA,uBAAAA,YAAY;;IAtLZC,yBAAyB,EAAA;eAAzBA,iCAAAA,yBAAyB;;IAkLzBC,SAAS,EAAA;eAATA,uBAAAA,SAAS;;IADTC,QAAQ,EAAA;eAARA,uBAAAA,QAAQ;;IAIRC,iBAAiB,EAAA;eAAjBA,uBAAAA,iBAAiB;;IADjBC,QAAQ,EAAA;eAARA,uBAAAA,QAAQ;;IADRC,YAAY,EAAA;eAAZA,uBAAAA,YAAY;;IANLC,kCAAkC,EAAA;eAAlCA,yBAAAA,kCAAkC;;IAWzCC,gBAAgB,EAAA;eAAhBA,uBAAAA,gBAAgB;;IAtIFC,SAAS,EAAA;eAATA;;IA5DAC,WAAW,EAAA;eAAXA;;IAiCAC,SAAS,EAAA;eAATA;;IA9EAC,eAAe,EAAA;eAAfA;;IA6MAC,wBAAwB,EAAA;eAAxBA;;IA/BAC,yBAAyB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GAAG;QAClE,OAAO;IACT;IAEA,MAAMC,wBACJnB,qBAAqB,aACjBiB,sBAAsB,CAAC,EAAE,GACzBA,sBAAsB,CAACA,uBAAuBC,MAAM,GAAG,EAAE;IAE/D,yGAAyG;IACzG,yEAAyE;IACzE,OAAOC,0BAA0BC,SAAAA,mBAAmB,GAChD,OACAD;AACN","ignoreList":[0],"debugId":null}},
{"offset": {"line": 1963, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/next%4015.5.0_react-dom%4019.1.0_react%4019.1.0__react%4019.1.0/node_modules/next/navigation.js"],"sourcesContent":["module.exports = require('./dist/client/components/navigation')\n"],"names":[],"mappings":"AAAA,OAAO,OAAO","ignoreList":[0],"debugId":null}},
{"offset": {"line": 1968, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/use-sync-external-store%401.5.0_react%4019.1.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n"],"names":[],"mappings":"AA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2BAA2B,CAAC;IAC7D,IAAI,2NACF,WAAW,eAAe,OAAO,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,IACzD,WAAW,MAAM,QAAQ,EACzB,YAAY,MAAM,SAAS,EAC3B,kBAAkB,MAAM,eAAe,EACvC,gBAAgB,MAAM,aAAa,EACnC,oBAAoB,CAAC,GACrB,6BAA6B,CAAC,GAC9B,OACE,uCAGI,yBACA;IACR,QAAQ,oBAAoB,GAC1B,KAAK,MAAM,MAAM,oBAAoB,GAAG,MAAM,oBAAoB,GAAG;IACvE,gBAAgB,OAAO,kCACrB,eACE,OAAO,+BAA+B,0BAA0B,IAClE,+BAA+B,0BAA0B,CAAC;AAC9D","ignoreList":[0],"debugId":null}},
{"offset": {"line": 2042, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/use-sync-external-store%401.5.0_react%4019.1.0/node_modules/use-sync-external-store/shim/index.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n"],"names":[],"mappings":"AAEA;;KAEO;IACL,OAAO,OAAO;AAChB","ignoreList":[0],"debugId":null}},
{"offset": {"line": 2051, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/swr%402.3.6_react%4019.1.0/node_modules/swr/dist/_internal/events.mjs"],"sourcesContent":["const FOCUS_EVENT = 0;\nconst RECONNECT_EVENT = 1;\nconst MUTATE_EVENT = 2;\nconst ERROR_REVALIDATE_EVENT = 3;\n\nexport { ERROR_REVALIDATE_EVENT, FOCUS_EVENT, MUTATE_EVENT, RECONNECT_EVENT };\n"],"names":[],"mappings":";;;;;;;;;;AAAA,MAAM,cAAc;AACpB,MAAM,kBAAkB;AACxB,MAAM,eAAe;AACrB,MAAM,yBAAyB","ignoreList":[0],"debugId":null}},
{"offset": {"line": 2070, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/dequal%402.0.3/node_modules/dequal/lite/index.mjs"],"sourcesContent":["var has = Object.prototype.hasOwnProperty;\n\nexport function dequal(foo, bar) {\n\tvar ctor, len;\n\tif (foo === bar) return true;\n\n\tif (foo && bar && (ctor=foo.constructor) === bar.constructor) {\n\t\tif (ctor === Date) return foo.getTime() === bar.getTime();\n\t\tif (ctor === RegExp) return foo.toString() === bar.toString();\n\n\t\tif (ctor === Array) {\n\t\t\tif ((len=foo.length) === bar.length) {\n\t\t\t\twhile (len-- && dequal(foo[len], bar[len]));\n\t\t\t}\n\t\t\treturn len === -1;\n\t\t}\n\n\t\tif (!ctor || typeof foo === 'object') {\n\t\t\tlen = 0;\n\t\t\tfor (ctor in foo) {\n\t\t\t\tif (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;\n\t\t\t\tif (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;\n\t\t\t}\n\t\t\treturn Object.keys(bar).length === len;\n\t\t}\n\t}\n\n\treturn foo !== foo && bar !== bar;\n}\n"],"names":[],"mappings":";;;;AAAA,IAAI,MAAM,OAAO,SAAS,CAAC,cAAc;AAElC,SAAS,OAAO,GAAG,EAAE,GAAG;IAC9B,IAAI,MAAM;IACV,IAAI,QAAQ,KAAK,OAAO;IAExB,IAAI,OAAO,OAAO,CAAC,OAAK,IAAI,WAAW,MAAM,IAAI,WAAW,EAAE;QAC7D,IAAI,SAAS,MAAM,OAAO,IAAI,OAAO,OAAO,IAAI,OAAO;QACvD,IAAI,SAAS,QAAQ,OAAO,IAAI,QAAQ,OAAO,IAAI,QAAQ;QAE3D,IAAI,SAAS,OAAO;YACnB,IAAI,CAAC,MAAI,IAAI,MAAM,MAAM,IAAI,MAAM,EAAE;gBACpC,MAAO,SAAS,OAAO,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI;YAC1C;YACA,OAAO,QAAQ,CAAC;QACjB;QAEA,IAAI,CAAC,QAAQ,OAAO,QAAQ,UAAU;YACrC,MAAM;YACN,IAAK,QAAQ,IAAK;gBACjB,IAAI,IAAI,IAAI,CAAC,KAAK,SAAS,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC,KAAK,OAAO,OAAO;gBACjE,IAAI,CAAC,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,OAAO;YAC7D;YACA,OAAO,OAAO,IAAI,CAAC,KAAK,MAAM,KAAK;QACpC;IACD;IAEA,OAAO,QAAQ,OAAO,QAAQ;AAC/B","ignoreList":[0],"debugId":null}},
{"offset": {"line": 2102, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/swr%402.3.6_react%4019.1.0/node_modules/swr/dist/_internal/config-context-client-BoS53ST9.mjs"],"sourcesContent":["'use client';\nimport React, { useEffect, useLayoutEffect, createContext, useContext, useMemo, useRef, createElement } from 'react';\nimport * as revalidateEvents from './events.mjs';\nimport { dequal } from 'dequal/lite';\n\n// Global state used to deduplicate requests and store listeners\nconst SWRGlobalState = new WeakMap();\n\n// Shared state between server components and client components\nconst noop = ()=>{};\n// Using noop() as the undefined value as undefined can be replaced\n// by something else. Prettier ignore and extra parentheses are necessary here\n// to ensure that tsc doesn't remove the __NOINLINE__ comment.\n// prettier-ignore\nconst UNDEFINED = /*#__NOINLINE__*/ noop();\nconst OBJECT = Object;\nconst isUndefined = (v)=>v === UNDEFINED;\nconst isFunction = (v)=>typeof v == 'function';\nconst mergeObjects = (a, b)=>({\n ...a,\n ...b\n });\nconst isPromiseLike = (x)=>isFunction(x.then);\n\nconst EMPTY_CACHE = {};\nconst INITIAL_CACHE = {};\nconst STR_UNDEFINED = 'undefined';\n// NOTE: Use the function to guarantee it's re-evaluated between jsdom and node runtime for tests.\nconst isWindowDefined = typeof window != STR_UNDEFINED;\nconst isDocumentDefined = typeof document != STR_UNDEFINED;\nconst isLegacyDeno = isWindowDefined && 'Deno' in window;\nconst hasRequestAnimationFrame = ()=>isWindowDefined && typeof window['requestAnimationFrame'] != STR_UNDEFINED;\nconst createCacheHelper = (cache, key)=>{\n const state = SWRGlobalState.get(cache);\n return [\n // Getter\n ()=>!isUndefined(key) && cache.get(key) || EMPTY_CACHE,\n // Setter\n (info)=>{\n if (!isUndefined(key)) {\n const prev = cache.get(key);\n // Before writing to the store, we keep the value in the initial cache\n // if it's not there yet.\n if (!(key in INITIAL_CACHE)) {\n INITIAL_CACHE[key] = prev;\n }\n state[5](key, mergeObjects(prev, info), prev || EMPTY_CACHE);\n }\n },\n // Subscriber\n state[6],\n // Get server cache snapshot\n ()=>{\n if (!isUndefined(key)) {\n // If the cache was updated on the client, we return the stored initial value.\n if (key in INITIAL_CACHE) return INITIAL_CACHE[key];\n }\n // If we haven't done any client-side updates, we return the current value.\n return !isUndefined(key) && cache.get(key) || EMPTY_CACHE;\n }\n ];\n} // export { UNDEFINED, OBJECT, isUndefined, isFunction, mergeObjects, isPromiseLike }\n;\n\n/**\n * Due to the bug https://bugs.chromium.org/p/chromium/issues/detail?id=678075,\n * it's not reliable to detect if the browser is currently online or offline\n * based on `navigator.onLine`.\n * As a workaround, we always assume it's online on the first load, and change\n * the status upon `online` or `offline` events.\n */ let online = true;\nconst isOnline = ()=>online;\n// For node and React Native, `add/removeEventListener` doesn't exist on window.\nconst [onWindowEvent, offWindowEvent] = isWindowDefined && window.addEventListener ? [\n window.addEventListener.bind(window),\n window.removeEventListener.bind(window)\n] : [\n noop,\n noop\n];\nconst isVisible = ()=>{\n const visibilityState = isDocumentDefined && document.visibilityState;\n return isUndefined(visibilityState) || visibilityState !== 'hidden';\n};\nconst initFocus = (callback)=>{\n // focus revalidate\n if (isDocumentDefined) {\n document.addEventListener('visibilitychange', callback);\n }\n onWindowEvent('focus', callback);\n return ()=>{\n if (isDocumentDefined) {\n document.removeEventListener('visibilitychange', callback);\n }\n offWindowEvent('focus', callback);\n };\n};\nconst initReconnect = (callback)=>{\n // revalidate on reconnected\n const onOnline = ()=>{\n online = true;\n callback();\n };\n // nothing to revalidate, just update the status\n const onOffline = ()=>{\n online = false;\n };\n onWindowEvent('online', onOnline);\n onWindowEvent('offline', onOffline);\n return ()=>{\n offWindowEvent('online', onOnline);\n offWindowEvent('offline', onOffline);\n };\n};\nconst preset = {\n isOnline,\n isVisible\n};\nconst defaultConfigOptions = {\n initFocus,\n initReconnect\n};\n\nconst IS_REACT_LEGACY = !React.useId;\nconst IS_SERVER = !isWindowDefined || isLegacyDeno;\n// Polyfill requestAnimationFrame\nconst rAF = (f)=>hasRequestAnimationFrame() ? window['requestAnimationFrame'](f) : setTimeout(f, 1);\n// React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser.\nconst useIsomorphicLayoutEffect = IS_SERVER ? useEffect : useLayoutEffect;\n// This assignment is to extend the Navigator type to use effectiveType.\nconst navigatorConnection = typeof navigator !== 'undefined' && navigator.connection;\n// Adjust the config based on slow connection status (<= 70Kbps).\nconst slowConnection = !IS_SERVER && navigatorConnection && ([\n 'slow-2g',\n '2g'\n].includes(navigatorConnection.effectiveType) || navigatorConnection.saveData);\n\n// use WeakMap to store the object->key mapping\n// so the objects can be garbage collected.\n// WeakMap uses a hashtable under the hood, so the lookup\n// complexity is almost O(1).\nconst table = new WeakMap();\nconst getTypeName = (value)=>OBJECT.prototype.toString.call(value);\nconst isObjectTypeName = (typeName, type)=>typeName === `[object ${type}]`;\n// counter of the key\nlet counter = 0;\n// A stable hash implementation that supports:\n// - Fast and ensures unique hash properties\n// - Handles unserializable values\n// - Handles object key ordering\n// - Generates short results\n//\n// This is not a serialization function, and the result is not guaranteed to be\n// parsable.\nconst stableHash = (arg)=>{\n const type = typeof arg;\n const typeName = getTypeName(arg);\n const isDate = isObjectTypeName(typeName, 'Date');\n const isRegex = isObjectTypeName(typeName, 'RegExp');\n const isPlainObject = isObjectTypeName(typeName, 'Object');\n let result;\n let index;\n if (OBJECT(arg) === arg && !isDate && !isRegex) {\n // Object/function, not null/date/regexp. Use WeakMap to store the id first.\n // If it's already hashed, directly return the result.\n result = table.get(arg);\n if (result) return result;\n // Store the hash first for circular reference detection before entering the\n // recursive `stableHash` calls.\n // For other objects like set and map, we use this id directly as the hash.\n result = ++counter + '~';\n table.set(arg, result);\n if (Array.isArray(arg)) {\n // Array.\n result = '@';\n for(index = 0; index < arg.length; index++){\n result += stableHash(arg[index]) + ',';\n }\n table.set(arg, result);\n }\n if (isPlainObject) {\n // Object, sort keys.\n result = '#';\n const keys = OBJECT.keys(arg).sort();\n while(!isUndefined(index = keys.pop())){\n if (!isUndefined(arg[index])) {\n result += index + ':' + stableHash(arg[index]) + ',';\n }\n }\n table.set(arg, result);\n }\n } else {\n result = isDate ? arg.toJSON() : type == 'symbol' ? arg.toString() : type == 'string' ? JSON.stringify(arg) : '' + arg;\n }\n return result;\n};\n\nconst serialize = (key)=>{\n if (isFunction(key)) {\n try {\n key = key();\n } catch (err) {\n // dependencies not ready\n key = '';\n }\n }\n // Use the original key as the argument of fetcher. This can be a string or an\n // array of values.\n const args = key;\n // If key is not falsy, or not an empty array, hash it.\n key = typeof key == 'string' ? key : (Array.isArray(key) ? key.length : key) ? stableHash(key) : '';\n return [\n key,\n args\n ];\n};\n\n// Global timestamp.\nlet __timestamp = 0;\nconst getTimestamp = ()=>++__timestamp;\n\nasync function internalMutate(...args) {\n const [cache, _key, _data, _opts] = args;\n // When passing as a boolean, it's explicitly used to disable/enable\n // revalidation.\n const options = mergeObjects({\n populateCache: true,\n throwOnError: true\n }, typeof _opts === 'boolean' ? {\n revalidate: _opts\n } : _opts || {});\n let populateCache = options.populateCache;\n const rollbackOnErrorOption = options.rollbackOnError;\n let optimisticData = options.optimisticData;\n const rollbackOnError = (error)=>{\n return typeof rollbackOnErrorOption === 'function' ? rollbackOnErrorOption(error) : rollbackOnErrorOption !== false;\n };\n const throwOnError = options.throwOnError;\n // If the second argument is a key filter, return the mutation results for all\n // filtered keys.\n if (isFunction(_key)) {\n const keyFilter = _key;\n const matchedKeys = [];\n const it = cache.keys();\n for (const key of it){\n if (// Skip the special useSWRInfinite and useSWRSubscription keys.\n !/^\\$(inf|sub)\\$/.test(key) && keyFilter(cache.get(key)._k)) {\n matchedKeys.push(key);\n }\n }\n return Promise.all(matchedKeys.map(mutateByKey));\n }\n return mutateByKey(_key);\n async function mutateByKey(_k) {\n // Serialize key\n const [key] = serialize(_k);\n if (!key) return;\n const [get, set] = createCacheHelper(cache, key);\n const [EVENT_REVALIDATORS, MUTATION, FETCH, PRELOAD] = SWRGlobalState.get(cache);\n const startRevalidate = ()=>{\n const revalidators = EVENT_REVALIDATORS[key];\n const revalidate = isFunction(options.revalidate) ? options.revalidate(get().data, _k) : options.revalidate !== false;\n if (revalidate) {\n // Invalidate the key by deleting the concurrent request markers so new\n // requests will not be deduped.\n delete FETCH[key];\n delete PRELOAD[key];\n if (revalidators && revalidators[0]) {\n return revalidators[0](revalidateEvents.MUTATE_EVENT).then(()=>get().data);\n }\n }\n return get().data;\n };\n // If there is no new data provided, revalidate the key with current state.\n if (args.length < 3) {\n // Revalidate and broadcast state.\n return startRevalidate();\n }\n let data = _data;\n let error;\n let isError = false;\n // Update global timestamps.\n const beforeMutationTs = getTimestamp();\n MUTATION[key] = [\n beforeMutationTs,\n 0\n ];\n const hasOptimisticData = !isUndefined(optimisticData);\n const state = get();\n // `displayedData` is the current value on screen. It could be the optimistic value\n // that is going to be overridden by a `committedData`, or get reverted back.\n // `committedData` is the validated value that comes from a fetch or mutation.\n const displayedData = state.data;\n const currentData = state._c;\n const committedData = isUndefined(currentData) ? displayedData : currentData;\n // Do optimistic data update.\n if (hasOptimisticData) {\n optimisticData = isFunction(optimisticData) ? optimisticData(committedData, displayedData) : optimisticData;\n // When we set optimistic data, backup the current committedData data in `_c`.\n set({\n data: optimisticData,\n _c: committedData\n });\n }\n if (isFunction(data)) {\n // `data` is a function, call it passing current cache value.\n try {\n data = data(committedData);\n } catch (err) {\n // If it throws an error synchronously, we shouldn't update the cache.\n error = err;\n isError = true;\n }\n }\n // `data` is a promise/thenable, resolve the final data first.\n if (data && isPromiseLike(data)) {\n // This means that the mutation is async, we need to check timestamps to\n // avoid race conditions.\n data = await data.catch((err)=>{\n error = err;\n isError = true;\n });\n // Check if other mutations have occurred since we've started this mutation.\n // If there's a race we don't update cache or broadcast the change,\n // just return the data.\n if (beforeMutationTs !== MUTATION[key][0]) {\n if (isError) throw error;\n return data;\n } else if (isError && hasOptimisticData && rollbackOnError(error)) {\n // Rollback. Always populate the cache in this case but without\n // transforming the data.\n populateCache = true;\n // Reset data to be the latest committed data, and clear the `_c` value.\n set({\n data: committedData,\n _c: UNDEFINED\n });\n }\n }\n // If we should write back the cache after request.\n if (populateCache) {\n if (!isError) {\n // Transform the result into data.\n if (isFunction(populateCache)) {\n const populateCachedData = populateCache(data, committedData);\n set({\n data: populateCachedData,\n error: UNDEFINED,\n _c: UNDEFINED\n });\n } else {\n // Only update cached data and reset the error if there's no error. Data can be `undefined` here.\n set({\n data,\n error: UNDEFINED,\n _c: UNDEFINED\n });\n }\n }\n }\n // Reset the timestamp to mark the mutation has ended.\n MUTATION[key][1] = getTimestamp();\n // Update existing SWR Hooks' internal states:\n Promise.resolve(startRevalidate()).then(()=>{\n // The mutation and revalidation are ended, we can clear it since the data is\n // not an optimistic value anymore.\n set({\n _c: UNDEFINED\n });\n });\n // Throw error or return data\n if (isError) {\n if (throwOnError) throw error;\n return;\n }\n return data;\n }\n}\n\nconst revalidateAllKeys = (revalidators, type)=>{\n for(const key in revalidators){\n if (revalidators[key][0]) revalidators[key][0](type);\n }\n};\nconst initCache = (provider, options)=>{\n // The global state for a specific provider will be used to deduplicate\n // requests and store listeners. As well as a mutate function that is bound to\n // the cache.\n // The provider's global state might be already initialized. Let's try to get the\n // global state associated with the provider first.\n if (!SWRGlobalState.has(provider)) {\n const opts = mergeObjects(defaultConfigOptions, options);\n // If there's no global state bound to the provider, create a new one with the\n // new mutate function.\n const EVENT_REVALIDATORS = Object.create(null);\n const mutate = internalMutate.bind(UNDEFINED, provider);\n let unmount = noop;\n const subscriptions = Object.create(null);\n const subscribe = (key, callback)=>{\n const subs = subscriptions[key] || [];\n subscriptions[key] = subs;\n subs.push(callback);\n return ()=>subs.splice(subs.indexOf(callback), 1);\n };\n const setter = (key, value, prev)=>{\n provider.set(key, value);\n const subs = subscriptions[key];\n if (subs) {\n for (const fn of subs){\n fn(value, prev);\n }\n }\n };\n const initProvider = ()=>{\n if (!SWRGlobalState.has(provider)) {\n // Update the state if it's new, or if the provider has been extended.\n SWRGlobalState.set(provider, [\n EVENT_REVALIDATORS,\n Object.create(null),\n Object.create(null),\n Object.create(null),\n mutate,\n setter,\n subscribe\n ]);\n if (!IS_SERVER) {\n // When listening to the native events for auto revalidations,\n // we intentionally put a delay (setTimeout) here to make sure they are\n // fired after immediate JavaScript executions, which can be\n // React's state updates.\n // This avoids some unnecessary revalidations such as\n // https://github.com/vercel/swr/issues/1680.\n const releaseFocus = opts.initFocus(setTimeout.bind(UNDEFINED, revalidateAllKeys.bind(UNDEFINED, EVENT_REVALIDATORS, revalidateEvents.FOCUS_EVENT)));\n const releaseReconnect = opts.initReconnect(setTimeout.bind(UNDEFINED, revalidateAllKeys.bind(UNDEFINED, EVENT_REVALIDATORS, revalidateEvents.RECONNECT_EVENT)));\n unmount = ()=>{\n releaseFocus && releaseFocus();\n releaseReconnect && releaseReconnect();\n // When un-mounting, we need to remove the cache provider from the state\n // storage too because it's a side-effect. Otherwise, when re-mounting we\n // will not re-register those event listeners.\n SWRGlobalState.delete(provider);\n };\n }\n }\n };\n initProvider();\n // This is a new provider, we need to initialize it and setup DOM events\n // listeners for `focus` and `reconnect` actions.\n // We might want to inject an extra layer on top of `provider` in the future,\n // such as key serialization, auto GC, etc.\n // For now, it's just a `Map` interface without any modifications.\n return [\n provider,\n mutate,\n initProvider,\n unmount\n ];\n }\n return [\n provider,\n SWRGlobalState.get(provider)[4]\n ];\n};\n\n// error retry\nconst onErrorRetry = (_, __, config, revalidate, opts)=>{\n const maxRetryCount = config.errorRetryCount;\n const currentRetryCount = opts.retryCount;\n // Exponential backoff\n const timeout = ~~((Math.random() + 0.5) * (1 << (currentRetryCount < 8 ? currentRetryCount : 8))) * config.errorRetryInterval;\n if (!isUndefined(maxRetryCount) && currentRetryCount > maxRetryCount) {\n return;\n }\n setTimeout(revalidate, timeout, opts);\n};\nconst compare = dequal;\n// Default cache provider\nconst [cache, mutate] = initCache(new Map());\n// Default config\nconst defaultConfig = mergeObjects({\n // events\n onLoadingSlow: noop,\n onSuccess: noop,\n onError: noop,\n onErrorRetry,\n onDiscarded: noop,\n // switches\n revalidateOnFocus: true,\n revalidateOnReconnect: true,\n revalidateIfStale: true,\n shouldRetryOnError: true,\n // timeouts\n errorRetryInterval: slowConnection ? 10000 : 5000,\n focusThrottleInterval: 5 * 1000,\n dedupingInterval: 2 * 1000,\n loadingTimeout: slowConnection ? 5000 : 3000,\n // providers\n compare,\n isPaused: ()=>false,\n cache,\n mutate,\n fallback: {}\n}, // use web preset by default\npreset);\n\nconst mergeConfigs = (a, b)=>{\n // Need to create a new object to avoid mutating the original here.\n const v = mergeObjects(a, b);\n // If two configs are provided, merge their `use` and `fallback` options.\n if (b) {\n const { use: u1, fallback: f1 } = a;\n const { use: u2, fallback: f2 } = b;\n if (u1 && u2) {\n v.use = u1.concat(u2);\n }\n if (f1 && f2) {\n v.fallback = mergeObjects(f1, f2);\n }\n }\n return v;\n};\n\nconst SWRConfigContext = createContext({});\nconst SWRConfig = (props)=>{\n const { value } = props;\n const parentConfig = useContext(SWRConfigContext);\n const isFunctionalConfig = isFunction(value);\n const config = useMemo(()=>isFunctionalConfig ? value(parentConfig) : value, [\n isFunctionalConfig,\n parentConfig,\n value\n ]);\n // Extend parent context values and middleware.\n const extendedConfig = useMemo(()=>isFunctionalConfig ? config : mergeConfigs(parentConfig, config), [\n isFunctionalConfig,\n parentConfig,\n config\n ]);\n // Should not use the inherited provider.\n const provider = config && config.provider;\n // initialize the cache only on first access.\n const cacheContextRef = useRef(UNDEFINED);\n if (provider && !cacheContextRef.current) {\n cacheContextRef.current = initCache(provider(extendedConfig.cache || cache), config);\n }\n const cacheContext = cacheContextRef.current;\n // Override the cache if a new provider is given.\n if (cacheContext) {\n extendedConfig.cache = cacheContext[0];\n extendedConfig.mutate = cacheContext[1];\n }\n // Unsubscribe events.\n useIsomorphicLayoutEffect(()=>{\n if (cacheContext) {\n cacheContext[2] && cacheContext[2]();\n return cacheContext[3];\n }\n }, []);\n return createElement(SWRConfigContext.Provider, mergeObjects(props, {\n value: extendedConfig\n }));\n};\n\nexport { noop as A, isPromiseLike as B, IS_REACT_LEGACY as I, OBJECT as O, SWRConfigContext as S, UNDEFINED as U, isFunction as a, SWRGlobalState as b, cache as c, defaultConfig as d, isUndefined as e, mergeConfigs as f, SWRConfig as g, initCache as h, isWindowDefined as i, mutate as j, compare as k, stableHash as l, mergeObjects as m, internalMutate as n, getTimestamp as o, preset as p, defaultConfigOptions as q, IS_SERVER as r, serialize as s, rAF as t, useIsomorphicLayoutEffect as u, slowConnection as v, isDocumentDefined as w, isLegacyDeno as x, hasRequestAnimationFrame as y, createCacheHelper as z };\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AAHA;;;;AAKA,gEAAgE;AAChE,MAAM,iBAAiB,IAAI;AAE3B,+DAA+D;AAC/D,MAAM,OAAO,KAAK;AAClB,mEAAmE;AACnE,8EAA8E;AAC9E,8DAA8D;AAC9D,kBAAkB;AAClB,MAAM,YAAY,eAAe,GAAG;AACpC,MAAM,SAAS;AACf,MAAM,cAAc,CAAC,IAAI,MAAM;AAC/B,MAAM,aAAa,CAAC,IAAI,OAAO,KAAK;AACpC,MAAM,eAAe,CAAC,GAAG,IAAI,CAAC;QACtB,GAAG,CAAC;QACJ,GA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M,eAAe,IAAA,kVAAU,EAAC;IAChC,MAAM,qBAAqB,WAAW;IACtC,MAAM,SAAS,IAAA,+UAAO,EAAC,IAAI,qBAAqB,MAAM,gBAAgB,OAAO;QACzE;QACA;QACA;KACH;IACD,+CAA+C;IAC/C,MAAM,iBAAiB,IAAA,+UAAO,EAAC,IAAI,qBAAqB,SAAS,aAAa,cAAc,SAAS;QACjG;QACA;QACA;KACH;IACD,yCAAyC;IACzC,MAAM,WAAW,UAAU,OAAO,QAAQ;IAC1C,6CAA6C;IAC7C,MAAM,kBAAkB,IAAA,8UAAM,EAAC;IAC/B,IAAI,YAAY,CAAC,gBAAgB,OAAO,EAAE;QACtC,gBAAgB,OAAO,GAAG,UAAU,SAAS,eAAe,KAAK,IAAI,QAAQ;IACjF;IACA,MAAM,eAAe,gBAAgB,OAAO;IAC5C,iDAAiD;IACjD,IAAI,cAAc;QACd,eAAe,KAAK,GAAG,YAAY,CAAC,EAAE;QACtC,eAAe,MAAM,GAAG,YAAY,CAAC,EAAE;IAC3C;IACA,sBAAsB;IACtB,0BAA0B;QACtB,IAAI,cAAc;YACd,YAAY,CAAC,EAAE,IAAI,YAAY,CAAC,EAAE;YAClC,OAAO,YAAY,CAAC,EAAE;QAC1B;IACJ,GAAG,EAAE;IACL,OAAO,IAAA,qVAAa,EAAC,iBAAiB,QAAQ,EAAE,aAAa,OAAO;QAChE,OAAO;IACX;AACJ","ignoreList":[0],"debugId":null}},
{"offset": {"line": 2744, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/swr%402.3.6_react%4019.1.0/node_modules/swr/dist/_internal/constants.mjs"],"sourcesContent":["const INFINITE_PREFIX = '$inf$';\n\nexport { INFINITE_PREFIX };\n"],"names":[],"mappings":";;;;AAAA,MAAM,kBAAkB","ignoreList":[0],"debugId":null}},
{"offset": {"line": 2754, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/swr%402.3.6_react%4019.1.0/node_modules/swr/dist/_internal/index.mjs"],"sourcesContent":["import { i as isWindowDefined, a as isFunction, S as SWRConfigContext, m as mergeObjects, d as defaultConfig, s as serialize, b as SWRGlobalState, c as cache, e as isUndefined, f as mergeConfigs } from './config-context-client-BoS53ST9.mjs';\nexport { I as IS_REACT_LEGACY, r as IS_SERVER, O as OBJECT, g as SWRConfig, U as UNDEFINED, k as compare, z as createCacheHelper, q as defaultConfigOptions, o as getTimestamp, y as hasRequestAnimationFrame, h as initCache, n as internalMutate, w as isDocumentDefined, x as isLegacyDeno, B as isPromiseLike, j as mutate, A as noop, p as preset, t as rAF, v as slowConnection, l as stableHash, u as useIsomorphicLayoutEffect } from './config-context-client-BoS53ST9.mjs';\nimport * as revalidateEvents from './events.mjs';\nexport { revalidateEvents };\nimport { INFINITE_PREFIX } from './constants.mjs';\nexport { INFINITE_PREFIX } from './constants.mjs';\nimport React, { useContext, useMemo } from 'react';\nexport * from './types.mjs';\n\n// @ts-expect-error\nconst enableDevtools = isWindowDefined && window.__SWR_DEVTOOLS_USE__;\nconst use = enableDevtools ? window.__SWR_DEVTOOLS_USE__ : [];\nconst setupDevTools = ()=>{\n if (enableDevtools) {\n // @ts-expect-error\n window.__SWR_DEVTOOLS_REACT__ = React;\n }\n};\n\nconst normalize = (args)=>{\n return isFunction(args[1]) ? [\n args[0],\n args[1],\n args[2] || {}\n ] : [\n args[0],\n null,\n (args[1] === null ? args[2] : args[1]) || {}\n ];\n};\n\nconst useSWRConfig = ()=>{\n const parentConfig = useContext(SWRConfigContext);\n const mergedConfig = useMemo(()=>mergeObjects(defaultConfig, parentConfig), [\n parentConfig\n ]);\n return mergedConfig;\n};\n\nconst preload = (key_, fetcher)=>{\n const [key, fnArg] = serialize(key_);\n const [, , , PRELOAD] = SWRGlobalState.get(cache);\n // Prevent preload to be called multiple times before used.\n if (PRELOAD[key]) return PRELOAD[key];\n const req = fetcher(fnArg);\n PRELOAD[key] = req;\n return req;\n};\nconst middleware = (useSWRNext)=>(key_, fetcher_, config)=>{\n // fetcher might be a sync function, so this should not be an async function\n const fetcher = fetcher_ && ((...args)=>{\n const [key] = serialize(key_);\n const [, , , PRELOAD] = SWRGlobalState.get(cache);\n if (key.startsWith(INFINITE_PREFIX)) {\n // we want the infinite fetcher to be called.\n // handling of the PRELOAD cache happens there.\n return fetcher_(...args);\n }\n const req = PRELOAD[key];\n if (isUndefined(req)) return fetcher_(...args);\n delete PRELOAD[key];\n return req;\n });\n return useSWRNext(key_, fetcher, config);\n };\n\nconst BUILT_IN_MIDDLEWARE = use.concat(middleware);\n\n// It's tricky to pass generic types as parameters, so we just directly override\n// the types here.\nconst withArgs = (hook)=>{\n return function useSWRArgs(...args) {\n // Get the default and inherited configuration.\n const fallbackConfig = useSWRConfig();\n // Normalize arguments.\n const [key, fn, _config] = normalize(args);\n // Merge configurations.\n const config = mergeConfigs(fallbackConfig, _config);\n // Apply middleware\n let next = hook;\n const { use } = config;\n const middleware = (use || []).concat(BUILT_IN_MIDDLEWARE);\n for(let i = middleware.length; i--;){\n next = middleware[i](next);\n }\n return next(key, fn || config.fetcher || null, config);\n };\n};\n\n// Add a callback function to a list of keyed callback functions and return\n// the unsubscribe function.\nconst subscribeCallback = (key, callbacks, callback)=>{\n const keyedRevalidators = callbacks[key] || (callbacks[key] = []);\n keyedRevalidators.push(callback);\n return ()=>{\n const index = keyedRevalidators.indexOf(callback);\n if (index >= 0) {\n // O(1): faster than splice\n keyedRevalidators[index] = keyedRevalidators[keyedRevalidators.length - 1];\n keyedRevalidators.pop();\n }\n };\n};\n\n// Create a custom hook with a middleware\nconst withMiddleware = (useSWR, middleware)=>{\n return (...args)=>{\n const [key, fn, config] = normalize(args);\n const uses = (config.use || []).concat(middleware);\n return useSWR(key, fn, {\n ...config,\n use: uses\n });\n };\n};\n\nsetupDevTools();\n\nexport { SWRGlobalState, cache, defaultConfig, isFunction, isUndefined, isWindowDefined, mergeConfigs, mergeObjects, normalize, preload, serialize, subscribeCallback, useSWRCon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AAM,GAAG,EAAE;YAC1E,kBAAkB,GAAG;QACzB;IACJ;AACJ;AAEA,yCAAyC;AACzC,MAAM,iBAAiB,CAAC,QAAQ;IAC5B,OAAO,CAAC,GAAG;QACP,MAAM,CAAC,KAAK,IAAI,OAAO,GAAG,UAAU;QACpC,MAAM,OAAO,CAAC,OAAO,GAAG,IAAI,EAAE,EAAE,MAAM,CAAC;QACvC,OAAO,OAAO,KAAK,IAAI;YACnB,GAAG,MAAM;YACT,KAAK;QACT;IACJ;AACJ;AAEA","ignoreList":[0],"debugId":null}},
{"offset": {"line": 3011, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/node_modules/.pnpm/swr%402.3.6_react%4019.1.0/node_modules/swr/dist/index/index.mjs"],"sourcesContent":["import React, { useRef, useMemo, useCallback, useDebugValue } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim/index.js';\nimport { UNDEFINED as UNDEFINED$1, OBJECT as OBJECT$1, SWRConfig as SWRConfig$1, defaultConfig, withArgs, SWRGlobalState, serialize as serialize$1, createCacheHelper, isUndefined as isUndefined$1, isPromiseLike, getTimestamp, isFunction as isFunction$1, revalidateEvents, internalMutate, useIsomorphicLayoutEffect, subscribeCallback, IS_SERVER, rAF, IS_REACT_LEGACY, mergeObjects } from '../_internal/index.mjs';\nexport { mutate, preload, useSWRConfig } from '../_internal/index.mjs';\n\n// Shared state between server components and client components\nconst noop = ()=>{};\n// Using noop() as the undefined value as undefined can be replaced\n// by something else. Prettier ignore and extra parentheses are necessary here\n// to ensure that tsc doesn't remove the __NOINLINE__ comment.\n// prettier-ignore\nconst UNDEFINED = /*#__NOINLINE__*/ noop();\nconst OBJECT = Object;\nconst isUndefined = (v)=>v === UNDEFINED;\nconst isFunction = (v)=>typeof v == 'function';\n\n// use WeakMap to store the object->key mapping\n// so the objects can be garbage collected.\n// WeakMap uses a hashtable under the hood, so the lookup\n// complexity is almost O(1).\nconst table = new WeakMap();\nconst getTypeName = (value)=>OBJECT.prototype.toString.call(value);\nconst isObjectTypeName = (typeName, type)=>typeName === `[object ${type}]`;\n// counter of the key\nlet counter = 0;\n// A stable hash implementation that supports:\n// - Fast and ensures unique hash properties\n// - Handles unserializable values\n// - Handles object key ordering\n// - Generates short results\n//\n// This is not a serialization function, and the result is not guaranteed to be\n// parsable.\nconst stableHash = (arg)=>{\n const type = typeof arg;\n const typeName = getTypeName(arg);\n const isDate = isObjectTypeName(typeName, 'Date');\n const isRegex = isObjectTypeName(typeName, 'RegExp');\n const isPlainObject = isObjectTypeName(typeName, 'Object');\n let result;\n let index;\n if (OBJECT(arg) === arg && !isDate && !isRegex) {\n // Object/function, not null/date/regexp. Use WeakMap to store the id first.\n // If it's already hashed, directly return the result.\n result = table.get(arg);\n if (result) return result;\n // Store the hash first for circular reference detection before entering the\n // recursive `stableHash` calls.\n // For other objects like set and map, we use this id directly as the hash.\n result = ++counter + '~';\n table.set(arg, result);\n if (Array.isArray(arg)) {\n // Array.\n result = '@';\n for(index = 0; index < arg.length; index++){\n result += stableHash(arg[index]) + ',';\n }\n table.set(arg, result);\n }\n if (isPlainObject) {\n // Object, sort keys.\n result = '#';\n const keys = OBJECT.keys(arg).sort();\n while(!isUndefined(index = keys.pop())){\n if (!isUndefined(arg[index])) {\n result += index + ':' + stableHash(arg[index]) + ',';\n }\n }\n table.set(arg, result);\n }\n } else {\n result = isDate ? arg.toJSON() : type == 'symbol' ? arg.toString() : type == 'string' ? JSON.stringify(arg) : '' + arg;\n }\n return result;\n};\n\nconst serialize = (key)=>{\n if (isFunction(key)) {\n try {\n key = key();\n } catch (err) {\n // dependencies not ready\n key = '';\n }\n }\n // Use the original key as the argument of fetcher. This can be a string or an\n // array of values.\n const args = key;\n // If key is not falsy, or not an empty array, hash it.\n key = typeof key == 'string' ? key : (Array.isArray(key) ? key.length : key) ? stableHash(key) : '';\n return [\n key,\n args\n ];\n};\n\nconst unstable_serialize = (key)=>serialize(key)[0];\n\n/// <reference types=\"react/experimental\" />\nconst use = React.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax\n// and emitting an error.\n// We assume that this is only for the `use(thenable)` case, not `use(context)`.\n// https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45\n((thenable)=>{\n switch(thenable.status){\n case 'pending':\n throw thenable;\n case 'fulfilled':\n return thenable.value;\n case 'rejected':\n throw thenable.reason;\n default:\n thenable.status = 'pending';\n thenable.then((v)=>{\n thenable.status = 'fulfilled';\n thenable.value = v;\n }, (e)=>{\n thenable.status = 'rejected';\n thenable.reason = e;\n });\n throw thenable;\n }\n});\nconst WITH_DEDUPE = {\n dedupe: true\n};\nconst resolvedUndef = Promise.resolve(UNDEFINED$1);\nconst useSWRHandler = (_key, fetcher, config)=>{\n const { cache, compare, suspense, fallbackData, revalidateOnMount, revalidateIfStale, refreshInterval, refreshWhenHidden, refreshWhenOffline, keepPreviousData } = config;\n const [EVENT_REVALIDATORS, MUTATION, FETCH, PRELOAD] = SWRGlobalState.get(cache);\n // `key` is the identifier of the SWR internal state,\n // `fnArg` is the argument/arguments parsed from the key, which will be passed\n // to the fetcher.\n // All of them are derived from `_key`.\n const [key, fnArg] = serialize$1(_key);\n // If it's the initial render of this hook.\n const initialMountedRef = useRef(false);\n // If the hook is unmounted already. This will be used to prevent some effects\n // to be called after unmounting.\n const unmountedRef = useRef(false);\n // Refs to keep the key and config.\n const keyRef = useRef(key);\n const fetcherRef = useRef(fetcher);\n const configRef = useRef(config);\n const getConfig = ()=>configRef.current;\n const isActive = ()=>getConfig().isVisible() && getConfig().isOnline();\n const [getCache, setCache, subscribeCache, getInitialCache] = createCacheHelper(cache, key);\n const stateDependencies = useRef({}).current;\n // Resolve the fallback data from either the inline option, or the global provider.\n // If it's a promise, we simply let React suspend and resolve it for us.\n const fallback = isUndefined$1(fallbackData) ? isUndefined$1(config.fallback) ? UNDEFINED$1 : config.fallback[key] : fallbackData;\n const isEqual = (prev, current)=>{\n for(const _ in stateDependencies){\n const t = _;\n if (t === 'data') {\n if (!compare(prev[t], current[t])) {\n if (!isUndefined$1(prev[t])) {\n return false;\n }\n if (!compare(returnedData, current[t])) {\n return false;\n }\n }\n } else {\n if (current[t] !== prev[t]) {\n return false;\n }\n }\n }\n return true;\n };\n const getSnapshot = useMemo(()=>{\n const shouldStartRequest = (()=>{\n if (!key) return false;\n if (!fetcher) return false;\n // If `revalidateOnMount` is set, we take the value directly.\n if (!isUndefined$1(revalidateOnMount)) return revalidateOnMount;\n // If it's paused, we skip revalidation.\n if (getConfig().isPaused()) return false;\n if (suspense) return false;\n return revalidateIfStale !== false;\n })();\n // Get the cache and merge it with expected states.\n const getSelectedCache = (state)=>{\n // We only select the needed fields from the state.\n const snapshot = mergeObjects(state);\n delete snapshot._k;\n if (!shouldStartRequest) {\n return snapshot;\n }\n return {\n isValidating: true,\n isLoading: true,\n ...snapshot\n };\n };\n const cachedData = getCache();\n const initialData = getInitialCache();\n const clientSnapshot = getSelectedCache(cachedData);\n const serverSnapshot = cachedData === initialData ? clientSnapshot : getSelectedCache(initialData);\n // To make sure that we are returning the same object reference to avoid\n // unnecessary re-renders, we keep the previous snapshot and use deep\n // comparison to check if we need to return a new one.\n let memorizedSnapshot = clientSnapshot;\n return [\n ()=>{\n const newSnapshot = getSelectedCache(getCache());\n const compareResult = isEqual(newSnapshot, memorizedSnapshot);\n if (compareResult) {\n // Mentally, we should always return the `memorizedSnapshot` here\n // as there's no change between the new and old snapshots.\n // However, since the `isEqual` function only compares selected fields,\n // the values of the unselected fields might be changed. That's\n // simply because we didn't track them.\n // To support the case in https://github.com/vercel/swr/pull/2576,\n // we need to update these fields in the `memorizedSnapshot` too\n // with direct mutations to ensure the snapshot is always up-to-date\n // even for the unselected fields, but only trigger re-renders when\n // the selected fields are changed.\n memorizedSnapshot.data = newSnapshot.data;\n memorizedSnapshot.isLoading = newSnapshot.isLoading;\n memorizedSnapshot.isValidating = newSnapshot.isValidating;\n memorizedSnapshot.error = newSnapshot.error;\n return memorizedSnapshot;\n } else {\n memorizedSnapshot = newSnapshot;\n return newSnapshot;\n }\n },\n ()=>serverSnapshot\n ];\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n cache,\n key\n ]);\n // Get the current state that SWR should return.\n const cached = useSyncExternalStore(useCallback((callback)=>subscribeCache(key, (current, prev)=>{\n if (!isEqual(prev, current)) callback();\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n cache,\n key\n ]), getSnapshot[0], getSnapshot[1]);\n const isInitialMount = !initialMountedRef.current;\n const hasRevalidator = EVENT_REVALIDATORS[key] && EVENT_REVALIDATORS[key].length > 0;\n const cachedData = cached.data;\n const data = isUndefined$1(cachedData) ? fallback && isPromiseLike(fallback) ? use(fallback) : fallback : cachedData;\n const error = cached.error;\n // Use a ref to store previously returned data. Use the initial data as its initial value.\n const laggyDataRef = useRef(data);\n const returnedData = keepPreviousData ? isUndefined$1(cachedData) ? isUndefined$1(laggyDataRef.current) ? data : laggyDataRef.current : cachedData : data;\n // - Suspense mode and there's stale data for the initial render.\n // - Not suspense mode and there is no fallback data and `revalidateIfStale` is enabled.\n // - `revalidateIfStale` is enabled but `data` is not defined.\n const shouldDoInitialRevalidation = (()=>{\n // if a key already has revalidators and also has error, we should not trigger revalidation\n if (hasRevalidator && !isUndefined$1(error)) return false;\n // If `revalidateOnMount` is set, we take the value directly.\n if (isInitialMount && !isUndefined$1(revalidateOnMount)) return revalidateOnMount;\n // If it's paused, we skip revalidation.\n if (getConfig().isPaused()) return false;\n // Under suspense mode, it will always fetch on render if there is no\n // stale data so no need to revalidate immediately mount it again.\n // If data exists, only revalidate if `revalidateIfStale` is true.\n if (suspense) return isUndefined$1(data) ? false : revalidateIfStale;\n // If there is no stale data, we need to revalidate when mount;\n // If `revalidateIfStale` is set to true, we will always revalidate.\n return isUndefined$1(data) || revalidateIfStale;\n })();\n // Resolve the default validating state:\n // If it's able to validate, and it should revalidate when mount, this will be true.\n const defaultValidatingState = !!(key && fetcher && isInitialMount && shouldDoInitialRevalidation);\n const isValidating = isUndefined$1(cached.isValidating) ? defaultValidatingState : cached.isValidating;\n const isLoading = isUndefined$1(cached.isLoading) ? defaultValidatingState : cached.isLoading;\n // The revalidation function is a carefully crafted wrapper of the original\n // `fetcher`, to correctly handle the many edge cases.\n const revalidate = useCallback(async (revalidateOpts)=>{\n const currentFetcher = fetcherRef.current;\n if (!key || !currentFetcher || unmountedRef.current || getConfig().isPaused()) {\n return false;\n }\n let newData;\n let startAt;\n let loading = true;\n const opts = revalidateOpts || {};\n // If there is no ongoing concurrent request, or `dedupe` is not set, a\n // new request should be initiated.\n const shouldStartNewRequest = !FETCH[key] || !opts.dedupe;\n /*\n For React 17\n Do unmount check for calls:\n If key has changed during the revalidation, or the component has been\n unmounted, old dispatch and old event callbacks should not take any\n effect\n\n For React 18\n only check if key has changed\n https://github.com/reactwg/react-18/discussions/82\n */ const callbackSafeguard = ()=>{\n if (IS_REACT_LEGACY) {\n return !unmountedRef.current && key === keyRef.current && initialMountedRef.current;\n }\n return key === keyRef.current;\n };\n // The final state object when the request finishes.\n const finalState = {\n isValidating: false,\n isLoading: false\n };\n const finishRequestAndUpdateState = ()=>{\n setCache(finalState);\n };\n const cleanupState = ()=>{\n // Check if it's still the same request before deleting it.\n const requestInfo = FETCH[key];\n if (requestInfo && requestInfo[1] === startAt) {\n delete FETCH[key];\n }\n };\n // Start fetching. Change the `isValidating` state, update the cache.\n const initialState = {\n isValidating: true\n };\n // It is in the `isLoading` state, if and only if there is no cached data.\n // This bypasses fallback data and laggy data.\n if (isUndefined$1(getCache().data)) {\n initialState.isLoading = true;\n }\n try {\n if (shouldStartNewRequest) {\n setCache(initialState);\n // If no cache is being rendered currently (it shows a blank page),\n // we trigger the loading slow event.\n if (config.loadingTimeout && isUndefined$1(getCache().data)) {\n setTimeout(()=>{\n if (loading && callbackSafeguard()) {\n getConfig().onLoadingSlow(key, config);\n }\n }, config.loadingTimeout);\n }\n // Start the request and save the timestamp.\n // Key must be truthy if entering here.\n FETCH[key] = [\n currentFetcher(fnArg),\n getTimestamp()\n ];\n }\n // Wait until the ongoing request is done. Deduplication is also\n // considered here.\n ;\n [newData, startAt] = FETCH[key];\n newData = await newData;\n if (shouldStartNewRequest) {\n // If the request isn't interrupted, clean it up after the\n // deduplication interval.\n setTimeout(cleanupState, config.dedupingInterval);\n }\n // If there're other ongoing request(s), started after the current one,\n // we need to ignore the current one to avoid possible race conditions:\n // req1------------------>res1 (current one)\n // req2---------------->res2\n // the request that fired later will always be kept.\n // The timestamp maybe be `undefined` or a number\n if (!FETCH[key] || FETCH[key][1] !== startAt) {\n if (shouldStartNewRequest) {\n if (callbackSafeguard()) {\n getConfig().onDiscarded(key);\n }\n }\n return false;\n }\n // Clear error.\n finalState.error = UNDEFINED$1;\n // If there're other mutations(s), that overlapped with the current revalidation:\n // case 1:\n // req------------------>res\n // mutate------>end\n // case 2:\n // req------------>res\n // mutate------>end\n // case 3:\n // req------------------>res\n // mutate-------...---------->\n // we have to ignore the revalidation result (res) because it's no longer fresh.\n // meanwhile, a new revalidation should be triggered when the mutation ends.\n const mutationInfo = MUTATION[key];\n if (!isUndefined$1(mutationInfo) && // case 1\n (startAt <= mutationInfo[0] || // case 2\n startAt <= mutationInfo[1] || // case 3\n mutationInfo[1] === 0)) {\n finishRequestAndUpdateState();\n if (shouldStartNewRequest) {\n if (callbackSafeguard()) {\n getConfig().onDiscarded(key);\n }\n }\n return false;\n }\n // Deep compare with the latest state to avoid extra re-renders.\n // For local state, compare and assign.\n const cacheData = getCache().data;\n // Since the compare fn could be custom fn\n // cacheData might be different from newData even when compare fn returns True\n finalState.data = compare(cacheData, newData) ? cacheData : newData;\n // Trigger the successful callback if it's the original request.\n if (shouldStartNewRequest) {\n if (callbackSafeguard()) {\n getConfig().onSuccess(newData, key, config);\n }\n }\n } catch (err) {\n cleanupState();\n const currentConfig = getConfig();\n const { shouldRetryOnError } = currentConfig;\n // Not paused, we continue handling the error. Otherwise, discard it.\n if (!currentConfig.isPaused()) {\n // Get a new error, don't use deep comparison for errors.\n finalState.error = err;\n // Error event and retry logic. Only for the actual request, not\n // deduped ones.\n if (shouldStartNewRequest && callbackSafeguard()) {\n currentConfig.onError(err, key, currentConfig);\n if (shouldRetryOnError === true || isFunction$1(shouldRetryOnError) && shouldRetryOnError(err)) {\n if (!getConfig().revalidateOnFocus || !getConfig().revalidateOnReconnect || isActive()) {\n // If it's inactive, stop. It will auto-revalidate when\n // refocusing or reconnecting.\n // When retrying, deduplication is always enabled.\n currentConfig.onErrorRetry(err, key, currentConfig, (_opts)=>{\n const revalidators = EVENT_REVALIDATORS[key];\n if (revalidators && revalidators[0]) {\n revalidators[0](revalidateEvents.ERROR_REVALIDATE_EVENT, _opts);\n }\n }, {\n retryCount: (opts.retryCount || 0) + 1,\n dedupe: true\n });\n }\n }\n }\n }\n }\n // Mark loading as stopped.\n loading = false;\n // Update the current hook's state.\n finishRequestAndUpdateState();\n return true;\n }, // `setState` is immutable, and `eventsCallback`, `fnArg`, and\n // `keyValidating` are depending on `key`, so we can exclude them from\n // the deps array.\n //\n // FIXME:\n // `fn` and `config` might be changed during the lifecycle,\n // but they might be changed every render like this.\n // `useSWR('key', () => fetch('/api/'), { suspense: true })`\n // So we omit the values from the deps array\n // even though it might cause unexpected behaviors.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n key,\n cache\n ]);\n // Similar to the global mutate but bound to the current cache and key.\n // `cache` isn't allowed to change during the lifecycle.\n const boundMutate = useCallback(// Use callback to make sure `keyRef.current` returns latest result every time\n (...args)=>{\n return internalMutate(cache, keyRef.current, ...args);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n // The logic for updating refs.\n useIsomorphicLayoutEffect(()=>{\n fetcherRef.current = fetcher;\n configRef.current = config;\n // Handle laggy data updates. If there's cached data of the current key,\n // it'll be the correct reference.\n if (!isUndefined$1(cachedData)) {\n laggyDataRef.current = cachedData;\n }\n });\n // After mounted or key changed.\n useIsomorphicLayoutEffect(()=>{\n if (!key) return;\n const softRevalidate = revalidate.bind(UNDEFINED$1, WITH_DEDUPE);\n let nextFocusRevalidatedAt = 0;\n if (getConfig().revalidateOnFocus) {\n const initNow = Date.now();\n nextFocusRevalidatedAt = initNow + getConfig().focusThrottleInterval;\n }\n // Expose revalidators to global event listeners. So we can trigger\n // revalidation from the outside.\n const onRevalidate = (type, opts = {})=>{\n if (type == revalidateEvents.FOCUS_EVENT) {\n const now = Date.now();\n if (getConfig().revalidateOnFocus && now > nextFocusRevalidatedAt && isActive()) {\n nextFocusRevalidatedAt = now + getConfig().focusThrottleInterval;\n softRevalidate();\n }\n } else if (type == revalidateEvents.RECONNECT_EVENT) {\n if (getConfig().revalidateOnReconnect && isActive()) {\n softRevalidate();\n }\n } else if (type == revalidateEvents.MUTATE_EVENT) {\n return revalidate();\n } else if (type == revalidateEvents.ERROR_REVALIDATE_EVENT) {\n return revalidate(opts);\n }\n return;\n };\n const unsubEvents = subscribeCallback(key, EVENT_REVALIDATORS, onRevalidate);\n // Mark the component as mounted and update corresponding refs.\n unmountedRef.current = false;\n keyRef.current = key;\n initialMountedRef.current = true;\n // Keep the original key in the cache.\n setCache({\n _k: fnArg\n });\n // Trigger a revalidation\n if (shouldDoInitialRevalidation) {\n // Performance optimization: if a request is already in progress for this key,\n // skip the revalidation to avoid redundant work\n if (!FETCH[key]) {\n if (isUndefined$1(data) || IS_SERVER) {\n // Revalidate immediately.\n softRevalidate();\n } else {\n // Delay the revalidate if we have data to return so we won't block\n // rendering.\n rAF(softRevalidate);\n }\n }\n }\n return ()=>{\n // Mark it as unmounted.\n unmountedRef.current = true;\n unsubEvents();\n };\n }, [\n key\n ]);\n // Polling\n useIsomorphicLayoutEffect(()=>{\n let timer;\n function next() {\n // Use the passed interval\n // ...or invoke the function with the updated data to get the interval\n const interval = isFunction$1(refreshInterval) ? refreshInterval(getCache().data) : refreshInterval;\n // We only start the next interval if `refreshInterval` is not 0, and:\n // - `force` is true, which is the start of polling\n // - or `timer` is not 0, which means the effect wasn't canceled\n if (interval && timer !== -1) {\n timer = setTimeout(execute, interval);\n }\n }\n function execute() {\n // Check if it's OK to execute:\n // Only revalidate when the page is visible, online, and not errored.\n if (!getCache().error && (refreshWhenHidden || getConfig().isVisible()) && (refreshWhenOffline || getConfig().isOnline())) {\n revalidate(WITH_DEDUPE).then(next);\n } else {\n // Schedule the next interval to check again.\n next();\n }\n }\n next();\n return ()=>{\n if (timer) {\n clearTimeout(timer);\n timer = -1;\n }\n };\n }, [\n refreshInterval,\n refreshWhenHidden,\n refreshWhenOffline,\n key\n ]);\n // Display debug info in React DevTools.\n useDebugValue(returnedData);\n // In Suspense mode, we can't return the empty `data` state.\n // If there is an `error`, the `error` needs to be thrown to the error boundary.\n // If there is no `error`, the `revalidation` promise needs to be thrown to\n // the suspense boundary.\n if (suspense) {\n const hasKeyButNoData = key && isUndefined$1(data);\n // SWR should throw when trying to use Suspense on the server with React 18,\n // without providing any fallback data. This causes hydration errors. See:\n // https://github.com/vercel/swr/issues/1832\n if (!IS_REACT_LEGACY && IS_SERVER && hasKeyButNoData) {\n throw new Error('Fallback data is required when using Suspense in SSR.');\n }\n // Always update fetcher and config refs even with the Suspense mode.\n if (hasKeyButNoData) {\n fetcherRef.current = fetcher;\n configRef.current = config;\n unmountedRef.current = false;\n }\n const req = PRELOAD[key];\n const mutateReq = !isUndefined$1(req) && hasKeyButNoData ? boundMutate(req) : resolvedUndef;\n use(mutateReq);\n if (!isUndefined$1(error) && hasKeyButNoData) {\n throw error;\n }\n const revalidation = hasKeyButNoData ? revalidate(WITH_DEDUPE) : resolvedUndef;\n if (!isUndefined$1(returnedData) && hasKeyButNoData) {\n // @ts-ignore modify react promise status\n revalidation.status = 'fulfilled';\n // @ts-ignore modify react promise value\n revalidation.value = true;\n }\n use(revalidation);\n }\n const swrResponse = {\n mutate: boundMutate,\n get data () {\n stateDependencies.data = true;\n return returnedData;\n },\n get error () {\n stateDependencies.error = true;\n return error;\n },\n get isValidating () {\n stateDependencies.isValidating = true;\n return isValidating;\n },\n get isLoading () {\n stateDependencies.isLoading = true;\n return isLoading;\n }\n };\n return swrResponse;\n};\nconst SWRConfig = OBJECT$1.defineProperty(SWRConfig$1, 'defaultValue', {\n value: defaultConfig\n});\n/**\n * A hook to fetch data.\n *\n * @link https://swr.vercel.app\n * @example\n * ```jsx\n * import useSWR from 'swr'\n * function Profile() {\n * const { data, error, isLoading } = useSWR('/api/user', fetcher)\n * if (error) return <div>failed to load</div>\n * if (isLoading) return <div>loading...</div>\n * return <div>hello {data.name}!</div>\n * }\n * ```\n */ const useSWR = withArgs(useSWRHandler);\n\n// useSWR\n\nexport { SWRConfig, useSWR as default, unstable_serialize };\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;AAGA,+DAA+D;AAC/D,MAAM,OAAO,KAAK;AAClB,mEAAmE;AACnE,8EAA8E;AAC9E,8DAA8D;AAC9D,kBAAkB;AAClB,MAAM,YAAY,eAAe,GAAG;AACpC,MAAM,SAAS;AACf,MAAM,cAAc,CAAC,IAAI,MAAM;AAC/B,MAAM,aAAa,CAAC,IAAI,OAAO,KAAK;AAEpC,+CAA+C;AAC/C,2CAA2C;AAC3C,yDAAyD;AACzD,6BAA6B;AAC7B,MAAM,QAAQ,IAAI;AAClB,MAAM,cAAc,CAAC,QAAQ,OAAO,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC;AAC5D,MAAM,mBAAmB,CAAC,UAAU,OAAO,aAAa,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC1E,qBAAqB;AACrB,IAAI,UAAU;AACd,8CAA8C;AAC9C,4CAA4C;AAC5C,kCAAkC;AAClC,gCAAgC;AAChC,4BAA4B;AAC5B,EAAE;AACF,+EAA+E;AAC/E,YAAY;AACZ,MAAM,aAAa,CAAC;IAChB,MA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Aa,OAAO,GAAG;QAC3B;QACA,MAAM,MAAM,OAAO,CAAC,IAAI;QACxB,MAAM,YAAY,CAAC,IAAA,6SAAa,EAAC,QAAQ,kBAAkB,YAAY,OAAO;QAC9E,IAAI;QACJ,IAAI,CAAC,IAAA,6SAAa,EAAC,UAAU,iBAAiB;YAC1C,MAAM;QACV;QACA,MAAM,eAAe,kBAAkB,WAAW,eAAe;QACjE,IAAI,CAAC,IAAA,6SAAa,EAAC,iBAAiB,iBAAiB;YACjD,yCAAyC;YACzC,aAAa,MAAM,GAAG;YACtB,wCAAwC;YACxC,aAAa,KAAK,GAAG;QACzB;QACA,IAAI;IACR;IACA,MAAM,cAAc;QAChB,QAAQ;QACR,IAAI,QAAQ;YACR,kBAAkB,IAAI,GAAG;YACzB,OAAO;QACX;QACA,IAAI,SAAS;YACT,kBAAkB,KAAK,GAAG;YAC1B,OAAO;QACX;QACA,IAAI,gBAAgB;YAChB,kBAAkB,YAAY,GAAG;YACjC,OAAO;QACX;QACA,IAAI,aAAa;YACb,kBAAkB,SAAS,GAAG;YAC9B,OAAO;QACX;IACJ;IACA,OAAO;AACX;AACA,MAAM,YAAY,mSAAQ,CAAC,cAAc,CAAC,ySAAW,EAAE,gBAAgB;IACnE,OAAO,iTAAa;AACxB;AACA;;;;;;;;;;;;;;CAcC,GAAG,MAAM,SAAS,IAAA,oPAAQ,EAAC","ignoreList":[0],"debugId":null}}]
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
module.exports = [
"[project]/src/app/favicon.ico (static in ecmascript)", ((__turbopack_context__) => {
__turbopack_context__.v("/_next/static/media/favicon.0b3bf435.ico");}),
"[project]/src/app/favicon.ico.mjs { IMAGE => \"[project]/src/app/favicon.ico (static in ecmascript)\" } [app-rsc] (structured image object, ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"default",
()=>__TURBOPACK__default__export__
]);
var __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$app$2f$favicon$2e$ico__$28$static__in__ecmascript$29$__ = __turbopack_context__.i("[project]/src/app/favicon.ico (static in ecmascript)");
;
const __TURBOPACK__default__export__ = {
src: __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$app$2f$favicon$2e$ico__$28$static__in__ecmascript$29$__["default"],
width: 256,
height: 256
};
}),
];
//# sourceMappingURL=src_app_ca777385._.js.map
\ No newline at end of file
{
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 7, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/my-app/src/app/favicon.ico.mjs%20%28structured%20image%20object%29"],"sourcesContent":["import src from \"IMAGE\";\nexport default { src, width: 256, height: 256 }\n"],"names":[],"mappings":";;;;AAAA;;uCACe;IAAE,KAAA,yHAAG;IAAE,OAAO;IAAK,QAAQ;AAAI","debugId":null}}]
}
\ No newline at end of file
module.exports = [
"[project]/src/app/layout.tsx [app-rsc] (ecmascript)", ((__turbopack_context__, module, exports) => {
}),
];
//# sourceMappingURL=src_app_layout_tsx_cc8184fa._.js.map
\ No newline at end of file
{
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"","debugId":null}}]
}
\ No newline at end of file
module.exports = [
"[project]/src/api/apiService.ts [app-ssr] (ecmascript)", ((__turbopack_context__) => {
"use strict";
// api.ts
// get method
__turbopack_context__.s([
"getFetcher",
()=>getFetcher,
"postFetcher",
()=>postFetcher
]);
async function getFetcher(input, body) {
// 处理不同的输入类型
let url;
let arg;
if (typeof input === 'string') {
url = input;
arg = body?.arg;
} else {
url = input.url;
arg = input.arg;
}
let targetUrl = url;
if (arg) {
const params = new URLSearchParams();
for (const [key, value] of Object.entries(arg)){
if (value !== undefined && value !== null) {
if (Array.isArray(value)) {
value.forEach((v)=>params.append(key, String(v)));
} else {
params.append(key, String(value));
}
}
}
const queryString = params.toString();
if (queryString) {
targetUrl += (url.includes('?') ? '&' : '?') + queryString;
}
}
const response = await fetch(targetUrl, {
method: "GET",
mode: "cors"
});
const resp = await response.json();
if (resp.code !== 0) {
throw new Error(`${resp.message} (${resp.code})`);
}
return resp.data;
}
async function postFetcher(url, body) {
const resp = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(body.arg),
mode: "cors"
}).then((res)=>res.json());
if (resp.code !== 0) {
throw new Error(resp.message + " " + resp.code);
}
return resp.data;
}
}),
"[project]/src/api/apiEndpoints.ts [app-ssr] (ecmascript)", ((__turbopack_context__) => {
"use strict";
// src/api/config.ts
// 环境变量配置(建议将敏感信息放在.env文件中)
__turbopack_context__.s([
"API_ENDPOINTS",
()=>API_ENDPOINTS
]);
const API_BASE_URL = "";
const API_ENDPOINTS = {
// 房间管理
ROOMS: {
LIST: `${API_BASE_URL}/api/room/list`,
ADD: `${API_BASE_URL}/api/room/add`,
DELETE: `${API_BASE_URL}/api/room/delete`
},
// 消息管理
MESSAGES: {
LIST: `${API_BASE_URL}/api/room/message/list`,
ADD: `${API_BASE_URL}/api/message/add`,
UPDATE: `${API_BASE_URL}/api/room/message/getUpdate`
}
};
}),
"[project]/src/components/RoomList/RoomList.tsx [app-ssr] (ecmascript)", ((__turbopack_context__) => {
"use strict";
// components/RoomList/RoomList.tsx
__turbopack_context__.s([
"default",
()=>__TURBOPACK__default__export__
]);
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js [app-ssr] (ecmascript)");
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)");
;
;
;
const getRandomColor = (seed)=>{
const colors = [
'#FF6B6B',
'#4ECDC4',
'#45B7D1',
'#FFA07A',
'#98D8C8',
'#F78FB3',
'#7BED9F',
'#FFD166'
];
return colors[seed % colors.length];
};
const getInitials = (name)=>{
const safeName = name || '';
return safeName.split(' ').map((part)=>part.charAt(0).toUpperCase()).join('').slice(0, 2);
};
const formatTimeAgo = (timestamp)=>{
if (!timestamp) return "";
const now = new Date();
const messageTime = new Date(timestamp);
const diffInSeconds = Math.floor((now.getTime() - messageTime.getTime()) / 1000);
// 规则定义
if (diffInSeconds < 60) {
return "刚刚";
}
const diffInMinutes = Math.floor(diffInSeconds / 60);
if (diffInMinutes < 60) {
return `${diffInMinutes}分钟前`;
}
const diffInHours = Math.floor(diffInMinutes / 60);
if (diffInHours < 24) {
return `${diffInHours}小时前`;
}
const diffInDays = Math.floor(diffInHours / 24);
if (diffInDays === 1) {
return "昨天";
}
if (diffInDays < 7) {
return `${diffInDays}天前`;
}
// 超过一周显示具体日期
return messageTime.toLocaleDateString('zh-CN', {
month: 'numeric',
day: 'numeric'
});
};
const RoomList = ({ rooms, onSelect, selectedRoomId, onAddRoom, onDeleteRoom })=>{
const [slidingRoomId, setSlidingRoomId] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useState"])(null);
const [showAddRoomInput, setShowAddRoomInput] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useState"])(false);
const [newRoomName, setNewRoomName] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useState"])('');
const [error, setError] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useState"])('');
const inputRef = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useRef"])(null);
// 自动聚焦输入框
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useEffect"])(()=>{
if (showAddRoomInput && inputRef.current) {
inputRef.current.focus();
}
}, [
showAddRoomInput
]);
const toggleSlide = (roomId, e)=>{
e.stopPropagation();
setSlidingRoomId(slidingRoomId === roomId ? null : roomId);
};
const handleSelect = (roomId)=>{
setSlidingRoomId(null);
onSelect(roomId);
};
const handleAddRoom = ()=>{
setShowAddRoomInput(true);
setNewRoomName('');
setError('');
};
const handleCreateRoom = async ()=>{
// 修复: 正确使用 trim() 方法(不带参数)
const trimmedName = newRoomName.trim();
if (!trimmedName) {
setError('房间名不能为空');
return;
}
try {
await onAddRoom(trimmedName);
setShowAddRoomInput(false);
setNewRoomName('');
setError('');
} catch (err) {
setError('创建房间失败,请重试');
}
};
const handleCancelAddRoom = ()=>{
setShowAddRoomInput(false);
setNewRoomName('');
setError('');
};
const handleKeyDown = (e)=>{
if (e.key === 'Enter') {
handleCreateRoom();
} else if (e.key === 'Escape') {
handleCancelAddRoom();
}
};
return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "room-list-container",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "room-list-header",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("h2", {
children: "聊天室"
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 132,
columnNumber: 9
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("button", {
className: "add-room-button",
onClick: handleAddRoom,
"aria-label": "添加聊天室",
disabled: showAddRoomInput,
children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
fill: "white",
width: "24px",
height: "24px",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("path", {
d: "M0 0h24v24H0z",
fill: "none"
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 140,
columnNumber: 13
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("path", {
d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 141,
columnNumber: 13
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 139,
columnNumber: 11
}, ("TURBOPACK compile-time value", void 0))
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 133,
columnNumber: 9
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 131,
columnNumber: 7
}, ("TURBOPACK compile-time value", void 0)),
showAddRoomInput && /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "add-room-input-container",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("input", {
ref: inputRef,
type: "text",
value: newRoomName,
onChange: (e)=>setNewRoomName(e.target.value),
onKeyDown: handleKeyDown,
placeholder: "输入房间名称",
className: "add-room-input"
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 149,
columnNumber: 11
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "add-room-buttons",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("button", {
className: "cancel-add-button",
onClick: handleCancelAddRoom,
"aria-label": "取消",
children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
fill: "#868e96",
width: "20px",
height: "20px",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("path", {
d: "M0 0h24v24H0z",
fill: "none"
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 165,
columnNumber: 17
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("path", {
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 166,
columnNumber: 17
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 164,
columnNumber: 15
}, ("TURBOPACK compile-time value", void 0))
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 159,
columnNumber: 13
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("button", {
className: "confirm-add-button",
onClick: handleCreateRoom,
"aria-label": "创建房间",
children: "创建"
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 169,
columnNumber: 13
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 158,
columnNumber: 11
}, ("TURBOPACK compile-time value", void 0)),
error && /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "add-room-error",
children: error
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 177,
columnNumber: 21
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 148,
columnNumber: 9
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "room-list-scrollable",
children: rooms.map((room)=>/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: `room-item-container ${selectedRoomId === room.roomId ? 'selected' : ''}`,
onClick: ()=>handleSelect(room.roomId),
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: `room-item ${slidingRoomId === room.roomId ? 'sliding' : ''}`,
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "room-avatar",
style: {
backgroundColor: getRandomColor(room.roomId)
},
children: getInitials(room.roomName)
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 191,
columnNumber: 15
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "room-info",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "room-header",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("p", {
className: "room-name",
children: room.roomName
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 200,
columnNumber: 19
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("span", {
className: "room-time",
children: formatTimeAgo(room.lastMessage?.time)
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 201,
columnNumber: 19
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 199,
columnNumber: 17
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("p", {
className: "room-preview",
children: room.lastMessage?.content
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 203,
columnNumber: 17
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 198,
columnNumber: 15
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("button", {
className: "slide-button",
onClick: (e)=>toggleSlide(room.roomId, e),
"aria-label": "滑动选项",
children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
fill: "#868e96",
width: "16px",
height: "16px",
children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("path", {
d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 213,
columnNumber: 19
}, ("TURBOPACK compile-time value", void 0))
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 212,
columnNumber: 17
}, ("TURBOPACK compile-time value", void 0))
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 207,
columnNumber: 15
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 188,
columnNumber: 13
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "delete-container",
children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("button", {
className: "delete-button",
onClick: (e)=>{
e.stopPropagation();
onDeleteRoom(room.roomId);
},
"aria-label": "删除聊天室",
children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
fill: "white",
width: "20px",
height: "20px",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("path", {
d: "M0 0h24v24H0z",
fill: "none"
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 229,
columnNumber: 19
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("path", {
d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 230,
columnNumber: 19
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 228,
columnNumber: 17
}, ("TURBOPACK compile-time value", void 0))
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 220,
columnNumber: 15
}, ("TURBOPACK compile-time value", void 0))
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 219,
columnNumber: 13
}, ("TURBOPACK compile-time value", void 0))
]
}, room.roomId, true, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 183,
columnNumber: 11
}, ("TURBOPACK compile-time value", void 0)))
}, void 0, false, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 181,
columnNumber: 7
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/RoomList/RoomList.tsx",
lineNumber: 130,
columnNumber: 5
}, ("TURBOPACK compile-time value", void 0));
};
const __TURBOPACK__default__export__ = RoomList;
}),
"[project]/src/components/ChatWindow/ChatWindow.tsx [app-ssr] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"default",
()=>__TURBOPACK__default__export__
]);
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js [app-ssr] (ecmascript)");
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)");
"use client";
;
;
;
// 根据用户名生成随机颜色
const stringToColor = (string)=>{
let hash = 0;
for(let i = 0; i < string.length; i += 1){
hash = string.charCodeAt(i) + ((hash << 5) - hash);
}
let color = '#';
for(let i = 0; i < 3; i += 1){
const value = hash >> i * 8 & 0xff;
color += `00${value.toString(16)}`.slice(-2);
}
return color;
};
// 格式化时间戳
const formatTime = (timestamp)=>{
const date = new Date(timestamp);
return `${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}`;
};
// 用户头像组件
const UserAvatar = ({ name })=>{
const bgColor = stringToColor(name);
const initials = name.charAt(0).toUpperCase();
return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "user-avatar",
style: {
backgroundColor: bgColor
},
children: initials
}, void 0, false, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 33,
columnNumber: 5
}, ("TURBOPACK compile-time value", void 0));
};
const ChatWindow = ({ roomName, messages, onSendNewMessage })=>{
const [newMessage, setNewMessage] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useState"])('');
const messagesEndRef = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useRef"])(null);
// 滚动到底部
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useEffect"])(()=>{
messagesEndRef.current?.scrollIntoView({
behavior: 'smooth'
});
}, [
messages
]);
const handleSendMessage = ()=>{
if (!newMessage.trim()) return;
onSendNewMessage(newMessage.trim());
setNewMessage('');
};
const handleKeyPress = (e)=>{
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
handleSendMessage();
}
};
return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "chat-window",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "chat-header",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "room-name",
children: roomName
}, void 0, false, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 73,
columnNumber: 9
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "message-count",
children: [
"(",
messages.length,
"条消息)"
]
}, void 0, true, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 74,
columnNumber: 9
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 72,
columnNumber: 7
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "messages-container",
children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "messages-list",
children: [
messages.map((message)=>/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "message-row",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "avatar-container",
children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])(UserAvatar, {
name: message.sender
}, void 0, false, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 83,
columnNumber: 17
}, ("TURBOPACK compile-time value", void 0))
}, void 0, false, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 82,
columnNumber: 15
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "message-content-wrapper",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "sender-name",
children: message.sender
}, void 0, false, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 87,
columnNumber: 17
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "bubble-time-container",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "message-bubble",
children: message.content
}, void 0, false, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 90,
columnNumber: 19
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "message-time",
children: formatTime(message.time)
}, void 0, false, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 93,
columnNumber: 19
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 89,
columnNumber: 17
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 86,
columnNumber: 15
}, ("TURBOPACK compile-time value", void 0))
]
}, message.messageId, true, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 81,
columnNumber: 13
}, ("TURBOPACK compile-time value", void 0))),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
ref: messagesEndRef
}, void 0, false, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 100,
columnNumber: 11
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 79,
columnNumber: 9
}, ("TURBOPACK compile-time value", void 0))
}, void 0, false, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 78,
columnNumber: 7
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "input-container",
children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "input-wrapper",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("textarea", {
className: "message-input",
placeholder: "输入消息...",
value: newMessage,
onChange: (e)=>setNewMessage(e.target.value),
onKeyDown: handleKeyPress
}, void 0, false, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 107,
columnNumber: 11
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("button", {
className: `send-button ${newMessage ? 'send-button-active' : 'send-button-disabled'}`,
onClick: handleSendMessage,
disabled: !newMessage,
children: "发送"
}, void 0, false, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 114,
columnNumber: 11
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 106,
columnNumber: 9
}, ("TURBOPACK compile-time value", void 0))
}, void 0, false, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 105,
columnNumber: 7
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/components/ChatWindow/ChatWindow.tsx",
lineNumber: 70,
columnNumber: 5
}, ("TURBOPACK compile-time value", void 0));
};
const __TURBOPACK__default__export__ = ChatWindow;
}),
"[project]/src/app/chatroom/page.tsx [app-ssr] (ecmascript)", ((__turbopack_context__) => {
"use strict";
// page.tsx
__turbopack_context__.s([
"default",
()=>__TURBOPACK__default__export__
]);
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js [app-ssr] (ecmascript)");
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)");
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$navigation$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.pnpm/next@15.5.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/navigation.js [app-ssr] (ecmascript)");
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$swr$40$2$2e$3$2e$6_react$40$19$2e$1$2e$0$2f$node_modules$2f$swr$2f$dist$2f$index$2f$index$2e$mjs__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.pnpm/swr@2.3.6_react@19.1.0/node_modules/swr/dist/index/index.mjs [app-ssr] (ecmascript) <locals>");
// 服务导入
var __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$api$2f$apiService$2e$ts__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/src/api/apiService.ts [app-ssr] (ecmascript)");
var __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$api$2f$apiEndpoints$2e$ts__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/src/api/apiEndpoints.ts [app-ssr] (ecmascript)");
// 组件导入
var __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$components$2f$RoomList$2f$RoomList$2e$tsx__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/src/components/RoomList/RoomList.tsx [app-ssr] (ecmascript)");
var __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$components$2f$ChatWindow$2f$ChatWindow$2e$tsx__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/src/components/ChatWindow/ChatWindow.tsx [app-ssr] (ecmascript)");
"use client";
;
;
;
;
;
;
;
;
;
const Chatroom = ()=>{
const searchParams = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$navigation$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useSearchParams"])();
const username = searchParams.get('username') || '匿名用户';
// 定义状态
const [selectedRoom, setSelectedRoom] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useState"])(null);
const [selectedMessages, setSelectedMessages] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useState"])([]);
// 获取房间列表 - 使用SWR
const { data: roomListRes, isLoading: isRoomLoading, error: roomError, mutate: mutateRoomList } = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$swr$40$2$2e$3$2e$6_react$40$19$2e$1$2e$0$2f$node_modules$2f$swr$2f$dist$2f$index$2f$index$2e$mjs__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__$3c$locals$3e$__["default"])(__TURBOPACK__imported__module__$5b$project$5d2f$src$2f$api$2f$apiEndpoints$2e$ts__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["API_ENDPOINTS"].ROOMS.LIST, __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$api$2f$apiService$2e$ts__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["getFetcher"], {
refreshInterval: 3000,
revalidateOnFocus: true
});
// 更新消息的方式
const { data: updateMessageRes, isLoading: isMessageUpdating, error: updateMessageError, mutate: mutateUpdateMessage } = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$swr$40$2$2e$3$2e$6_react$40$19$2e$1$2e$0$2f$node_modules$2f$swr$2f$dist$2f$index$2f$index$2e$mjs__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__$3c$locals$3e$__["default"])({
url: __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$api$2f$apiEndpoints$2e$ts__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["API_ENDPOINTS"].MESSAGES.UPDATE,
arg: {
roomId: selectedRoom?.roomId,
sinceMessageId: selectedMessages.at(-1)?.messageId || 0
}
}, __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$api$2f$apiService$2e$ts__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["getFetcher"], {
refreshInterval: 1000,
revalidateOnFocus: true
});
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useEffect"])(()=>{
if (updateMessageRes?.messages?.length && selectedRoom) {
setSelectedMessages((prev)=>{
// 过滤掉可能重复的消息(基于消息ID)
const newMessages = updateMessageRes.messages.filter((msg)=>!prev.some((m)=>m.messageId === msg.messageId));
return [
...prev,
...newMessages
];
});
}
}, [
updateMessageRes,
selectedRoom
]);
// 当房间列表更新时设置默认选中房间
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useEffect"])(()=>{
// 使用可选链 + 空值合并运算符提供默认值
const hasRooms = (roomListRes?.rooms?.length ?? 0) > 0;
if (hasRooms && !selectedRoom) {
// 安全访问第一个房间
const firstRoom = roomListRes?.rooms?.[0];
if (firstRoom) {
setSelectedRoom(firstRoom);
}
}
}, [
roomListRes,
selectedRoom
]);
// 获取选中房间的消息
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useEffect"])(()=>{
if (!selectedRoom) return;
const fetchMessages = async ()=>{
try {
const messages = await getInitMessage(selectedRoom.roomId);
setSelectedMessages(messages || []);
} catch (error) {
console.error("Failed to fetch new message:", error);
setSelectedMessages([]);
}
};
fetchMessages();
}, [
selectedRoom
]);
// 获取初始消息的函数
const getInitMessage = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useCallback"])(async (roomId)=>{
try {
const roomMessageListRes = await (0, __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$api$2f$apiService$2e$ts__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["getFetcher"])(__TURBOPACK__imported__module__$5b$project$5d2f$src$2f$api$2f$apiEndpoints$2e$ts__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["API_ENDPOINTS"].MESSAGES.LIST, {
arg: {
roomId
}
});
return roomMessageListRes?.messages || [];
} catch (error) {
console.error("Failed to fetch init message:", error);
return [];
}
}, []);
// 添加房间并自动选中新房间
const handleAddRoom = async (roomName)=>{
try {
const newRoomIdInfo = await (0, __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$api$2f$apiService$2e$ts__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["postFetcher"])(__TURBOPACK__imported__module__$5b$project$5d2f$src$2f$api$2f$apiEndpoints$2e$ts__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["API_ENDPOINTS"].ROOMS.ADD, {
arg: {
user: username,
roomName: roomName
}
});
// 重新验证房间列表
const updatedRoomList = await mutateRoomList();
// 在新房间列表中找到并选中新创建的房间
if (updatedRoomList) {
const newRoom = updatedRoomList.rooms.find((room)=>room.roomId === newRoomIdInfo.roomId);
if (newRoom) {
setSelectedRoom(newRoom);
}
}
return newRoomIdInfo.roomId;
} catch (error) {
console.error("Failed to add room:", error);
throw error;
}
};
// 删除房间并检查当前选中状态
const handleDeleteRoom = async (id)=>{
try {
await (0, __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$api$2f$apiService$2e$ts__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["postFetcher"])(__TURBOPACK__imported__module__$5b$project$5d2f$src$2f$api$2f$apiEndpoints$2e$ts__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["API_ENDPOINTS"].ROOMS.DELETE, {
arg: {
user: username,
roomId: id
}
});
// 重新验证房间列表
const updatedRoomList = await mutateRoomList();
// 检查当前选中的房间是否被删除
if (selectedRoom?.roomId === id) {
// 选择第一个可用房间
if (updatedRoomList?.rooms && updatedRoomList.rooms.length > 0) {
setSelectedRoom(updatedRoomList.rooms[0]);
} else {
setSelectedRoom(null);
}
}
} catch (error) {
console.error("Failed to delete room:", error);
throw error;
}
};
const handleSelectRoom = (roomId)=>{
const room = roomListRes?.rooms.find((room)=>room.roomId === roomId);
if (room) {
setSelectedRoom(room);
} else {
console.error("setSelectedRoom() found no room");
}
};
const handleSendNewMessage = (newMessage)=>{
try {
(0, __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$api$2f$apiService$2e$ts__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["postFetcher"])(__TURBOPACK__imported__module__$5b$project$5d2f$src$2f$api$2f$apiEndpoints$2e$ts__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["API_ENDPOINTS"].MESSAGES.ADD, {
arg: {
roomId: selectedRoom?.roomId,
content: newMessage,
sender: username
}
});
mutateRoomList;
mutateUpdateMessage;
} catch (error) {
console.error("Failed to send new message:", error);
}
};
return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "chatroom-page",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "roomList-container",
children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])(__TURBOPACK__imported__module__$5b$project$5d2f$src$2f$components$2f$RoomList$2f$RoomList$2e$tsx__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"], {
rooms: roomListRes?.rooms || [],
selectedRoomId: selectedRoom?.roomId || null,
onSelect: handleSelectRoom,
onAddRoom: handleAddRoom,
onDeleteRoom: handleDeleteRoom
}, void 0, false, {
fileName: "[project]/src/app/chatroom/page.tsx",
lineNumber: 197,
columnNumber: 9
}, ("TURBOPACK compile-time value", void 0))
}, void 0, false, {
fileName: "[project]/src/app/chatroom/page.tsx",
lineNumber: 196,
columnNumber: 7
}, ("TURBOPACK compile-time value", void 0)),
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "chatwindow-container",
children: selectedRoom ? /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])(__TURBOPACK__imported__module__$5b$project$5d2f$src$2f$components$2f$ChatWindow$2f$ChatWindow$2e$tsx__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"], {
roomName: selectedRoom?.roomName || '',
messages: selectedMessages || [],
onSendNewMessage: handleSendNewMessage
}, void 0, false, {
fileName: "[project]/src/app/chatroom/page.tsx",
lineNumber: 207,
columnNumber: 11
}, ("TURBOPACK compile-time value", void 0)) : /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", {
className: "no-room-selected",
children: [
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("p", {
children: [
'>',
" 请选择一个房间开始聊天"
]
}, void 0, true, {
fileName: "[project]/src/app/chatroom/page.tsx",
lineNumber: 214,
columnNumber: 13
}, ("TURBOPACK compile-time value", void 0)),
roomListRes?.rooms?.length === 0 && /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$5$2e$0_react$2d$dom$40$19$2e$1$2e$0_react$40$19$2e$1$2e$0_$5f$react$40$19$2e$1$2e$0$2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("p", {
children: [
'>',
" 没有可用房间,请创建一个新房间..."
]
}, void 0, true, {
fileName: "[project]/src/app/chatroom/page.tsx",
lineNumber: 216,
columnNumber: 15
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/app/chatroom/page.tsx",
lineNumber: 213,
columnNumber: 11
}, ("TURBOPACK compile-time value", void 0))
}, void 0, false, {
fileName: "[project]/src/app/chatroom/page.tsx",
lineNumber: 205,
columnNumber: 7
}, ("TURBOPACK compile-time value", void 0))
]
}, void 0, true, {
fileName: "[project]/src/app/chatroom/page.tsx",
lineNumber: 195,
columnNumber: 5
}, ("TURBOPACK compile-time value", void 0));
};
const __TURBOPACK__default__export__ = Chatroom;
}),
];
//# sourceMappingURL=src_d4bb05e0._.js.map
\ No newline at end of file
{
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/src/api/apiService.ts"],"sourcesContent":["// api.ts\r\n\r\n\r\n// get method\r\nexport async function getFetcher(\r\n input: string | { url: string; arg?: Record<string, unknown> },\r\n body?: { arg: Record<string, unknown> }\r\n) {\r\n // 处理不同的输入类型\r\n let url: string;\r\n let arg: Record<string, unknown> | undefined;\r\n \r\n if (typeof input === 'string') {\r\n url = input;\r\n arg = body?.arg;\r\n } else {\r\n url = input.url;\r\n arg = input.arg;\r\n }\r\n \r\n let targetUrl = url;\r\n \r\n if (arg) {\r\n const params = new URLSearchParams();\r\n for (const [key, value] of Object.entries(arg)) {\r\n if (value !== undefined && value !== null) {\r\n if (Array.isArray(value)) {\r\n value.forEach(v => params.append(key, String(v)));\r\n } else {\r\n params.append(key, String(value));\r\n }\r\n }\r\n }\r\n const queryString = params.toString();\r\n if (queryString) {\r\n targetUrl += (url.includes('?') ? '&' : '?') + queryString;\r\n }\r\n }\r\n\r\n const response = await fetch(targetUrl, { \r\n method: \"GET\",\r\n mode: \"cors\"\r\n });\r\n\r\n const resp = await response.json();\r\n \r\n if (resp.code !== 0) {\r\n throw new Error(`${resp.message} (${resp.code})`);\r\n }\r\n \r\n return resp.data;\r\n}\r\n\r\n// post method\r\nexport async function postFetcher(\r\n url: string,\r\n body: { arg: Record<string, unknown> | Array<unknown> }\r\n) {\r\n const resp = (await fetch(url, {\r\n method: \"POST\",\r\n headers: { \"Content-Type\": \"application/json\" },\r\n body: JSON.stringify(body.arg),\r\n mode: \"cors\",\r\n }).then((res) => res.json()));\r\n\r\n if (resp.code !== 0) {\r\n throw new Error(resp.message + \" \" + resp.code);\r\n }\r\n return resp.data;\r\n}\r\n"],"names":[],"mappings":"AAAA,SAAS;AAGT,aAAa;;;;;;;AACN,eAAe,WACpB,KAA8D,EAC9D,IAAuC;IAEvC,YAAY;IACZ,IAAI;IACJ,IAAI;IAEJ,IAAI,OAAO,UAAU,UAAU;QAC7B,MAAM;QACN,MAAM,MAAM;IACd,OAAO;QACL,MAAM,MAAM,GAAG;QACf,MAAM,MAAM,GAAG;IACjB;IAEA,IAAI,YAAY;IAEhB,IAAI,KAAK;QACP,MAAM,SAAS,IAAI;QACnB,KAAK,MAAM,CAAC,KAAK,MAAM,IAAI,OAAO,OAAO,CAAC,KAAM;YAC9C,IAAI,UAAU,aAAa,UAAU,MAAM;gBACzC,IAAI,MAAM,OAAO,CAAC,QAAQ;oBACxB,MAAM,OAAO,CAAC,CAAA,IAAK,OAAO,MAAM,CAAC,KAAK,OAAO;gBAC/C,OAAO;oBACL,OAAO,MAAM,CAAC,KAAK,OAAO;gBAC5B;YACF;QACF;QACA,MAAM,cAAc,OAAO,QAAQ;QACnC,IAAI,aAAa;YACf,aAAa,CAAC,IAAI,QAAQ,CAAC,OAAO,MAAM,GAAG,IAAI;QACjD;IACF;IAEA,MAAM,WAAW,MAAM,MAAM,WAAW;QACtC,QAAQ;QACR,MAAM;IACR;IAEA,MAAM,OAAO,MAAM,SAAS,IAAI;IAEhC,IAAI,KAAK,IAAI,KAAK,GAAG;QACnB,MAAM,IAAI,MAAM,GAAG,KAAK,OAAO,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;IAClD;IAEA,OAAO,KAAK,IAAI;AAClB;AAGO,eAAe,YACpB,GAAW,EACX,IAAuD;IAEvD,MAAM,OAAQ,MAAM,MAAM,KAAK;QAC7B,QAAQ;QACR,SAAS;YAAE,gBAAgB;QAAmB;QAC9C,MAAM,KAAK,SAAS,CAAC,KAAK,GAAG;QAC7B,MAAM;IACR,GAAG,IAAI,CAAC,CAAC,MAAQ,IAAI,IAAI;IAEzB,IAAI,KAAK,IAAI,KAAK,GAAG;QACnB,MAAM,IAAI,MAAM,KAAK,OAAO,GAAG,MAAM,KAAK,IAAI;IAChD;IACA,OAAO,KAAK,IAAI;AAClB","debugId":null}},
{"offset": {"line": 68, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/src/api/apiEndpoints.ts"],"sourcesContent":["// src/api/config.ts\r\n\r\n// 环境变量配置(建议将敏感信息放在.env文件中)\r\nconst API_BASE_URL = \"\";\r\n\r\n// 核心API端点配置\r\nexport const API_ENDPOINTS = {\r\n // 房间管理\r\n ROOMS: {\r\n LIST: `${API_BASE_URL}/api/room/list`,\r\n ADD: `${API_BASE_URL}/api/room/add`,\r\n DELETE: `${API_BASE_URL}/api/room/delete`,\r\n },\r\n \r\n // 消息管理\r\n MESSAGES: {\r\n LIST: `${API_BASE_URL}/api/room/message/list`,\r\n ADD: `${API_BASE_URL}/api/message/add`,\r\n UPDATE: `${API_BASE_URL}/api/room/message/getUpdate`,\r\n },\r\n} as const;\r\n\r\n// 类型导出(可选,增强类型安全)\r\nexport type ApiEndpoints = typeof API_ENDPOINTS;"],"names":[],"mappings":"AAAA,oBAAoB;AAEpB,2BAA2B;;;;;AAC3B,MAAM,eAAe;AAGd,MAAM,gBAAgB;IAC3B,OAAO;IACP,OAAO;QACL,MAAM,GAAG,aAAa,cAAc,CAAC;QACrC,KAAK,GAAG,aAAa,aAAa,CAAC;QACnC,QAAQ,GAAG,aAAa,gBAAgB,CAAC;IAC3C;IAEA,OAAO;IACP,UAAU;QACR,MAAM,GAAG,aAAa,sBAAsB,CAAC;QAC7C,KAAK,GAAG,aAAa,gBAAgB,CAAC;QACtC,QAAQ,GAAG,aAAa,2BAA2B,CAAC;IACtD;AACF","debugId":null}},
{"offset": {"line": 93, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/src/components/RoomList/RoomList.tsx"],"sourcesContent":["// components/RoomList/RoomList.tsx\r\nimport React, { useState, useRef, useEffect } from 'react';\r\nimport { RoomListProps } from '../../types';\r\nimport './RoomList.css';\r\n\r\nconst getRandomColor = (seed: number) => {\r\n const colors = [\r\n '#FF6B6B', '#4ECDC4', '#45B7D1', '#FFA07A', \r\n '#98D8C8', '#F78FB3', '#7BED9F', '#FFD166'\r\n ];\r\n return colors[seed % colors.length];\r\n};\r\n\r\nconst getInitials = (name: string) => {\r\n const safeName = name || '';\r\n return safeName\r\n .split(' ')\r\n .map(part => part.charAt(0).toUpperCase())\r\n .join('')\r\n .slice(0, 2);\r\n};\r\n\r\nconst formatTimeAgo = (timestamp: number | undefined): string => {\r\n if (!timestamp) return \"\";\r\n \r\n const now = new Date();\r\n const messageTime = new Date(timestamp);\r\n const diffInSeconds = Math.floor((now.getTime() - messageTime.getTime()) / 1000);\r\n \r\n // 规则定义\r\n if (diffInSeconds < 60) {\r\n return \"刚刚\";\r\n }\r\n \r\n const diffInMinutes = Math.floor(diffInSeconds / 60);\r\n if (diffInMinutes < 60) {\r\n return `${diffInMinutes}分钟前`;\r\n }\r\n \r\n const diffInHours = Math.floor(diffInMinutes / 60);\r\n if (diffInHours < 24) {\r\n return `${diffInHours}小时前`;\r\n }\r\n \r\n const diffInDays = Math.floor(diffInHours / 24);\r\n if (diffInDays === 1) {\r\n return \"昨天\";\r\n }\r\n if (diffInDays < 7) {\r\n return `${diffInDays}天前`;\r\n }\r\n \r\n // 超过一周显示具体日期\r\n return messageTime.toLocaleDateString('zh-CN', {\r\n month: 'numeric',\r\n day: 'numeric'\r\n });\r\n};\r\n\r\nconst RoomList: React.FC<RoomListProps> = ({ \r\n rooms, \r\n onSelect, \r\n selectedRoomId,\r\n onAddRoom,\r\n onDeleteRoom\r\n}) => {\r\n const [slidingRoomId, setSlidingRoomId] = useState<number | null>(null);\r\n const [showAddRoomInput, setShowAddRoomInput] = useState(false);\r\n const [newRoomName, setNewRoomName] = useState('');\r\n const [error, setError] = useState('');\r\n const inputRef = useRef<HTMLInputElement>(null);\r\n\r\n // 自动聚焦输入框\r\n useEffect(() => {\r\n if (showAddRoomInput && inputRef.current) {\r\n inputRef.current.focus();\r\n }\r\n }, [showAddRoomInput]);\r\n\r\n const toggleSlide = (roomId: number, e: React.MouseEvent) => {\r\n e.stopPropagation();\r\n setSlidingRoomId(slidingRoomId === roomId ? null : roomId);\r\n };\r\n\r\n const handleSelect = (roomId: number) => {\r\n setSlidingRoomId(null);\r\n onSelect(roomId);\r\n };\r\n\r\n const handleAddRoom = () => {\r\n setShowAddRoomInput(true);\r\n setNewRoomName('');\r\n setError('');\r\n };\r\n\r\n const handleCreateRoom = async () => {\r\n // 修复: 正确使用 trim() 方法(不带参数)\r\n const trimmedName = newRoomName.trim();\r\n \r\n if (!trimmedName) {\r\n setError('房间名不能为空');\r\n return;\r\n }\r\n \r\n try {\r\n await onAddRoom(trimmedName);\r\n setShowAddRoomInput(false);\r\n setNewRoomName('');\r\n setError('');\r\n } catch (err) {\r\n setError('创建房间失败,请重试');\r\n }\r\n };\r\n\r\n const handleCancelAddRoom = () => {\r\n setShowAddRoomInput(false);\r\n setNewRoomName('');\r\n setError('');\r\n };\r\n\r\n const handleKeyDown = (e: React.KeyboardEvent) => {\r\n if (e.key === 'Enter') {\r\n handleCreateRoom();\r\n } else if (e.key === 'Escape') {\r\n handleCancelAddRoom();\r\n }\r\n };\r\n\r\n return (\r\n <div className=\"room-list-container\">\r\n <div className=\"room-list-header\">\r\n <h2>聊天室</h2>\r\n <button \r\n className=\"add-room-button\"\r\n onClick={handleAddRoom}\r\n aria-label=\"添加聊天室\"\r\n disabled={showAddRoomInput}\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"white\" width=\"24px\" height=\"24px\">\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\r\n <path d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"/>\r\n </svg>\r\n </button>\r\n </div>\r\n \r\n {/* 添加房间输入框 */}\r\n {showAddRoomInput && (\r\n <div className=\"add-room-input-container\">\r\n <input\r\n ref={inputRef}\r\n type=\"text\"\r\n value={newRoomName}\r\n onChange={(e) => setNewRoomName(e.target.value)}\r\n onKeyDown={handleKeyDown}\r\n placeholder=\"输入房间名称\"\r\n className=\"add-room-input\"\r\n />\r\n <div className=\"add-room-buttons\">\r\n <button \r\n className=\"cancel-add-button\"\r\n onClick={handleCancelAddRoom}\r\n aria-label=\"取消\"\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"#868e96\" width=\"20px\" height=\"20px\">\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\r\n <path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/>\r\n </svg>\r\n </button>\r\n <button \r\n className=\"confirm-add-button\"\r\n onClick={handleCreateRoom}\r\n aria-label=\"创建房间\"\r\n >\r\n 创建\r\n </button>\r\n </div>\r\n {error && <div className=\"add-room-error\">{error}</div>}\r\n </div>\r\n )}\r\n \r\n <div className=\"room-list-scrollable\">\r\n {rooms.map(room => (\r\n <div \r\n key={room.roomId}\r\n className={`room-item-container ${selectedRoomId === room.roomId ? 'selected' : ''}`}\r\n onClick={() => handleSelect(room.roomId)}\r\n >\r\n <div \r\n className={`room-item ${slidingRoomId === room.roomId ? 'sliding' : ''}`}\r\n >\r\n <div \r\n className=\"room-avatar\"\r\n style={{ backgroundColor: getRandomColor(room.roomId) }}\r\n >\r\n {getInitials(room.roomName)}\r\n </div>\r\n \r\n <div className=\"room-info\">\r\n <div className=\"room-header\">\r\n <p className=\"room-name\">{room.roomName}</p>\r\n <span className=\"room-time\">{formatTimeAgo(room.lastMessage?.time)}</span>\r\n </div>\r\n <p className=\"room-preview\">{room.lastMessage?.content}</p>\r\n </div>\r\n\r\n {/* 右下角灰色\"<\"按钮 */}\r\n <button \r\n className=\"slide-button\"\r\n onClick={(e) => toggleSlide(room.roomId, e)}\r\n aria-label=\"滑动选项\"\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"#868e96\" width=\"16px\" height=\"16px\">\r\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"/>\r\n </svg>\r\n </button>\r\n </div>\r\n \r\n {/* 苹果风格的删除按钮 */}\r\n <div className=\"delete-container\">\r\n <button \r\n className=\"delete-button\"\r\n onClick={(e) => {\r\n e.stopPropagation();\r\n onDeleteRoom(room.roomId);\r\n }}\r\n aria-label=\"删除聊天室\"\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"white\" width=\"20px\" height=\"20px\">\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\r\n <path d=\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\"/>\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n ))}\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default RoomList;"],"names":[],"mappings":"AAAA,mCAAmC;;;;;;AACnC;;;;AAIA,MAAM,iBAAiB,CAAC;IACtB,MAAM,SAAS;QACb;QAAW;QAAW;QAAW;QACjC;QAAW;QAAW;QAAW;KAClC;IACD,OAAO,MAAM,CAAC,OAAO,OAAO,MAAM,CAAC;AACrC;AAEA,MAAM,cAAc,CAAC;IACnB,MAAM,WAAW,QAAQ;IACzB,OAAO,SACJ,KAAK,CAAC,KACN,GAAG,CAAC,CAAA,OAAQ,KAAK,MAAM,CAAC,GAAG,WAAW,IACtC,IAAI,CAAC,IACL,KAAK,CAAC,GAAG;AACd;AAEA,MAAM,gBAAgB,CAAC;IACrB,IAAI,CAAC,WAAW,OAAO;IAEvB,MAAM,MAAM,IAAI;IAChB,MAAM,cAAc,IAAI,KAAK;IAC7B,MAAM,gBAAgB,KAAK,KAAK,CAAC,CAAC,IAAI,OAAO,KAAK,YAAY,OAAO,EAAE,IAAI;IAE3E,OAAO;IACP,IAAI,gBAAgB,IAAI;QACtB,OAAO;IACT;IAEA,MAAM,gBAAgB,KAAK,KAAK,CAAC,gBAAgB;IACjD,IAAI,gBAAgB,IAAI;QACtB,OAAO,GAAG,cAAc,GAAG,CAAC;IAC9B;IAEA,MAAM,cAAc,KAAK,KAAK,CAAC,gBAAgB;IAC/C,IAAI,cAAc,IAAI;QACpB,OAAO,GAAG,YAAY,GAAG,CAAC;IAC5B;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C,6WAAC;gCACC,WAAW,CAAC,UAAU,EAAE,kBAAkB,KAAK,MAAM,GAAG,YAAY,IAAI;;kDAExE,6WAAC;wCACC,WAAU;wCACV,OAAO;4CAAE,iBAAiB,eAAe,KAAK,MAAM;wCAAE;kDAErD,YAAY,KAAK,QAAQ;;;;;;kDAG5B,6WAAC;wCAAI,WAAU;;0DACb,6WAAC;gDAAI,WAAU;;kEACb,6WAAC;wDAAE,WAAU;kEAAa,KAAK,QAAQ;;;;;;kEACvC,6WAAC;wDAAK,WAAU;kEAAa,cAAc,KAAK,WAAW,EAAE;;;;;;;;;;;;0DAE/D,6WAAC;gDAAE,WAAU;0DAAgB,KAAK,WAAW,EAAE;;;;;;;;;;;;kDAIjD,6WAAC;wCACC,WAAU;wCACV,SAAS,CAAC,IAAM,YAAY,KAAK,MAAM,EAAE;wCACzC,cAAW;kDAEX,cAAA,6WAAC;4CAAI,OAAM;4CAA6B,SAAQ;4CAAY,MAAK;4CAAU,OAAM;4CAAO,QAAO;sDAC7F,cAAA,6WAAC;gDAAK,GAAE;;;;;;;;;;;;;;;;;;;;;;0CAMd,6WAAC;gCAAI,WAAU;0CACb,cAAA,6WAAC;oCACC,WAAU;oCACV,SAAS,CAAC;wCACR,EAAE,eAAe;wCACjB,aAAa,KAAK,MAAM;oCAC1B;oCACA,cAAW;8CAEX,cAAA,6WAAC;wCAAI,OAAM;wCAA6B,SAAQ;wCAAY,MAAK;wCAAQ,OAAM;wCAAO,QAAO;;0DAC3F,6WAAC;gDAAK,GAAE;gDAAgB,MAAK;;;;;;0DAC7B,6WAAC;gDAAK,GAAE;;;;;;;;;;;;;;;;;;;;;;;uBA9CT,KAAK,MAAM;;;;;;;;;;;;;;;;AAuD5B;uCAEe","debugId":null}},
{"offset": {"line": 513, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/src/components/ChatWindow/ChatWindow.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport React, { useState, useEffect, useRef } from 'react';\r\nimport { ChatWindowProps } from '../../types';\r\nimport './ChatWindow.css';\r\n\r\n// 根据用户名生成随机颜色\r\nconst stringToColor = (string: string) => {\r\n let hash = 0;\r\n for (let i = 0; i < string.length; i += 1) {\r\n hash = string.charCodeAt(i) + ((hash << 5) - hash);\r\n }\r\n let color = '#';\r\n for (let i = 0; i < 3; i += 1) {\r\n const value = (hash >> (i * 8)) & 0xff;\r\n color += `00${value.toString(16)}`.slice(-2);\r\n }\r\n return color;\r\n};\r\n\r\n// 格式化时间戳\r\nconst formatTime = (timestamp: number) => {\r\n const date = new Date(timestamp);\r\n return `${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}`;\r\n};\r\n\r\n// 用户头像组件\r\nconst UserAvatar = ({ name }: { name: string }) => {\r\n const bgColor = stringToColor(name);\r\n const initials = name.charAt(0).toUpperCase();\r\n \r\n return (\r\n <div \r\n className=\"user-avatar\"\r\n style={{ backgroundColor: bgColor }}\r\n >\r\n {initials}\r\n </div>\r\n );\r\n};\r\n\r\nconst ChatWindow = ({\r\n roomName,\r\n messages,\r\n onSendNewMessage,\r\n}: ChatWindowProps) => {\r\n const [newMessage, setNewMessage] = useState('');\r\n const messagesEndRef = useRef<HTMLDivElement>(null);\r\n \r\n // 滚动到底部\r\n useEffect(() => {\r\n messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' });\r\n }, [messages]);\r\n \r\n const handleSendMessage = () => {\r\n if (!newMessage.trim()) return;\r\n \r\n onSendNewMessage(newMessage.trim());\r\n setNewMessage('');\r\n };\r\n \r\n const handleKeyPress = (e: React.KeyboardEvent) => {\r\n if (e.key === 'Enter' && !e.shiftKey) {\r\n e.preventDefault();\r\n handleSendMessage();\r\n }\r\n };\r\n \r\n return (\r\n <div className=\"chat-window\">\r\n {/* 顶部标题栏 */}\r\n <div className=\"chat-header\">\r\n <div className=\"room-name\">{roomName}</div>\r\n <div className=\"message-count\">({messages.length}条消息)</div>\r\n </div>\r\n \r\n {/* 消息区域 */}\r\n <div className=\"messages-container\">\r\n <div className=\"messages-list\">\r\n {messages.map((message) => (\r\n <div key={message.messageId} className=\"message-row\">\r\n <div className=\"avatar-container\">\r\n <UserAvatar name={message.sender} />\r\n </div>\r\n \r\n <div className=\"message-content-wrapper\">\r\n <div className=\"sender-name\">{message.sender}</div>\r\n \r\n <div className=\"bubble-time-container\">\r\n <div className=\"message-bubble\">\r\n {message.content}\r\n </div>\r\n <div className=\"message-time\">\r\n {formatTime(message.time)}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n ))}\r\n <div ref={messagesEndRef} />\r\n </div>\r\n </div>\r\n \r\n {/* 输入区域 */}\r\n <div className=\"input-container\">\r\n <div className=\"input-wrapper\">\r\n <textarea\r\n className=\"message-input\"\r\n placeholder=\"输入消息...\"\r\n value={newMessage}\r\n onChange={(e) => setNewMessage(e.target.value)}\r\n onKeyDown={handleKeyPress}\r\n />\r\n <button\r\n className={`send-button ${\r\n newMessage ? 'send-button-active' : 'send-button-disabled'\r\n }`}\r\n onClick={handleSendMessage}\r\n disabled={!newMessage}\r\n >\r\n 发送\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default ChatWindow;"],"names":[],"mappings":";;;;;AAEA;AAFA;;;;AAMA,cAAc;AACd,MAAM,gBAAgB,CAAC;IACrB,IAAI,OAAO;IACX,IAAK,IAAI,IAAI,GAAG,IAAI,OAAO,MAAM,EAAE,KAAK,EAAG;QACzC,OAAO,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,IAAI;IACnD;IACA,IAAI,QAAQ;IACZ,IAAK,IAAI,IAAI,GAAG,IAAI,GAAG,KAAK,EAAG;QAC7B,MAAM,QAAQ,AAAC,QAAS,IAAI,IAAM;QAClC,SAAS,CAAC,EAAE,EAAE,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5C;IACA,OAAO;AACT;AAEA,SAAS;AACT,MAAM,aAAa,CAA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cAAA,6WAAC;4CAAW,MAAM,QAAQ,MAAM;;;;;;;;;;;kDAGlC,6WAAC;wCAAI,WAAU;;0DACb,6WAAC;gDAAI,WAAU;0DAAe,QAAQ,MAAM;;;;;;0DAE5C,6WAAC;gDAAI,WAAU;;kEACb,6WAAC;wDAAI,WAAU;kEACZ,QAAQ,OAAO;;;;;;kEAElB,6WAAC;wDAAI,WAAU;kEACZ,WAAW,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;+BAbtB,QAAQ,SAAS;;;;;sCAmB7B,6WAAC;4BAAI,KAAK;;;;;;;;;;;;;;;;;0BAKd,6WAAC;gBAAI,WAAU;0BACb,cAAA,6WAAC;oBAAI,WAAU;;sCACb,6WAAC;4BACC,WAAU;4BACV,aAAY;4BACZ,OAAO;4BACP,UAAU,CAAC,IAAM,cAAc,EAAE,MAAM,CAAC,KAAK;4BAC7C,WAAW;;;;;;sCAEb,6WAAC;4BACC,WAAW,CAAC,YAAY,EACtB,aAAa,uBAAuB,wBACpC;4BACF,SAAS;4BACT,UAAU,CAAC;sCACZ;;;;;;;;;;;;;;;;;;;;;;;AAOX;uCAEe","debugId":null}},
{"offset": {"line": 748, "column": 0}, "map": {"version":3,"sources":["file:///D:/myco/X-Lab/proj2_chat/src/app/chatroom/page.tsx"],"sourcesContent":["// page.tsx\r\n\"use client\";\r\nimport React, { useState, useEffect, useCallback } from 'react';\r\nimport { useSearchParams } from 'next/navigation';\r\nimport useSWR from 'swr';\r\n\r\n// 服务导入\r\nimport { getFetcher, postFetcher} from'@/api/apiService';\r\nimport { API_ENDPOINTS } from '@/api/apiEndpoints';\r\nimport {Message, RoomListRes, UpdateMessageRes, RoomPreviewInfo} from '@/types/index';\r\n\r\n// 组件导入\r\nimport RoomList from '@/components/RoomList/RoomList';\r\nimport ChatWindow from '@/components/ChatWindow/ChatWindow';\r\n\r\n// 本地样式\r\nimport './chatroom.css';\r\n\r\nconst Chatroom = () => {\r\n const searchParams = useSearchParams();\r\n const username = searchParams.get('username') || '匿名用户';\r\n\r\n // 定义状态\r\n const [selectedRoom, setSelectedRoom] = useState<RoomPreviewInfo | null>(null);\r\n const [selectedMessages, setSelectedMessages] = useState<Message[]>([]);\r\n \r\n // 获取房间列表 - 使用SWR\r\n const { \r\n data: roomListRes,\r\n isLoading: isRoomLoading,\r\n error: roomError,\r\n mutate: mutateRoomList\r\n } = useSWR<RoomListRes>(API_ENDPOINTS.ROOMS.LIST, getFetcher, {\r\n refreshInterval: 3000,\r\n revalidateOnFocus: true,\r\n });\r\n\r\n // 更新消息的方式\r\n const {\r\n data: updateMessageRes,\r\n isLoading: isMessageUpdating,\r\n error: updateMessageError,\r\n mutate: mutateUpdateMessage\r\n } = useSWR<UpdateMessageRes>({\r\n url: API_ENDPOINTS.MESSAGES.UPDATE,\r\n arg: {\r\n roomId: selectedRoom?.roomId,\r\n sinceMessageId: selectedMessages.at(-1)?.messageId || 0\r\n }\r\n }, getFetcher, {\r\n refreshInterval: 1000,\r\n revalidateOnFocus: true,\r\n });\r\n\r\n useEffect(() => {\r\n if (updateMessageRes?.messages?.length && selectedRoom) {\r\n setSelectedMessages(prev => {\r\n // 过滤掉可能重复的消息(基于消息ID)\r\n const newMessages = updateMessageRes.messages.filter(\r\n msg => !prev.some(m => m.messageId === msg.messageId)\r\n );\r\n \r\n return [...prev, ...newMessages];\r\n });\r\n }\r\n }, [updateMessageRes, selectedRoom]);\r\n\r\n // 当房间列表更新时设置默认选中房间\r\n useEffect(() => {\r\n // 使用可选链 + 空值合并运算符提供默认值\r\n const hasRooms = (roomListRes?.rooms?.length ?? 0) > 0;\r\n \r\n if (hasRooms && !selectedRoom) {\r\n // 安全访问第一个房间\r\n const firstRoom = roomListRes?.rooms?.[0];\r\n if (firstRoom) {\r\n setSelectedRoom(firstRoom);\r\n }\r\n }\r\n }, [roomListRes, selectedRoom]);\r\n\r\n // 获取选中房间的消息\r\n useEffect(() => {\r\n if (!selectedRoom) return;\r\n \r\n const fetchMessages = async () => {\r\n try {\r\n const messages = await getInitMessage(selectedRoom.roomId);\r\n setSelectedMessages(messages || []);\r\n } catch (error) {\r\n console.error(\"Failed to fetch new message:\", error);\r\n setSelectedMessages([]);\r\n }\r\n };\r\n\r\n fetchMessages();\r\n }, [selectedRoom]);\r\n\r\n // 获取初始消息的函数\r\n const getInitMessage = useCallback(async (roomId: number): Promise<Message[]> => {\r\n try {\r\n const roomMessageListRes = await getFetcher(\r\n API_ENDPOINTS.MESSAGES.LIST,\r\n { arg: { roomId } }\r\n );\r\n return roomMessageListRes?.messages || [];\r\n } catch (error) {\r\n console.error(\"Failed to fetch init message:\", error);\r\n return [];\r\n }\r\n }, []);\r\n\r\n // 添加房间并自动选中新房间\r\n const handleAddRoom = async (roomName: string): Promise<number> => {\r\n try {\r\n const newRoomIdInfo = await postFetcher(API_ENDPOINTS.ROOMS.ADD, {\r\n arg: {\r\n user: username,\r\n roomName: roomName\r\n }\r\n });\r\n\r\n // 重新验证房间列表\r\n const updatedRoomList = await mutateRoomList();\r\n\r\n // 在新房间列表中找到并选中新创建的房间\r\n if (updatedRoomList) {\r\n const newRoom = updatedRoomList.rooms.find(room => room.roomId === newRoomIdInfo.roomId);\r\n if (newRoom) {\r\n setSelectedRoom(newRoom);\r\n }\r\n }\r\n \r\n return newRoomIdInfo.roomId;\r\n } catch (error) {\r\n console.error(\"Failed to add room:\", error);\r\n throw error;\r\n }\r\n }\r\n\r\n // 删除房间并检查当前选中状态\r\n const handleDeleteRoom = async (id: number) => {\r\n try {\r\n await postFetcher(API_ENDPOINTS.ROOMS.DELETE, {\r\n arg: {\r\n user: username,\r\n roomId: id\r\n }\r\n });\r\n \r\n // 重新验证房间列表\r\n const updatedRoomList = await mutateRoomList();\r\n \r\n // 检查当前选中的房间是否被删除\r\n if (selectedRoom?.roomId === id) {\r\n // 选择第一个可用房间\r\n if (updatedRoomList?.rooms && updatedRoomList.rooms.length > 0) {\r\n setSelectedRoom(updatedRoomList.rooms[0]);\r\n } else {\r\n setSelectedRoom(null);\r\n }\r\n }\r\n } catch (error) {\r\n console.error(\"Failed to delete room:\",error);\r\n throw error;\r\n }\r\n }\r\n\r\n const handleSelectRoom = (roomId: number) => {\r\n const room = roomListRes?.rooms.find(room => room.roomId === roomId);\r\n if (room) {\r\n setSelectedRoom(room);\r\n } else {\r\n console.error(\"setSelectedRoom() found no room\");\r\n }\r\n }\r\n\r\n const handleSendNewMessage = (newMessage: string) => {\r\n try {\r\n postFetcher(API_ENDPOINTS.MESSAGES.ADD, {\r\n arg: {\r\n roomId: selectedRoom?.roomId,\r\n content: newMessage,\r\n sender: username\r\n }\r\n })\r\n mutateRoomList\r\n mutateUpdateMessage\r\n } catch(error) {\r\n console.error(\"Failed to send new message:\", error);\r\n }\r\n }\r\n\r\n return (\r\n <div className='chatroom-page'>\r\n <div className=\"roomList-container\">\r\n <RoomList \r\n rooms={roomListRes?.rooms||[]} \r\n selectedRoomId={selectedRoom?.roomId||null}\r\n onSelect={handleSelectRoom} \r\n onAddRoom={handleAddRoom}\r\n onDeleteRoom={handleDeleteRoom}\r\n />\r\n </div>\r\n <div className='chatwindow-container'>\r\n {selectedRoom ? (\r\n <ChatWindow \r\n roomName={selectedRoom?.roomName||''}\r\n messages={selectedMessages||[]}\r\n onSendNewMessage={handleSendNewMessage}\r\n />\r\n ) : (\r\n <div className=\"no-room-selected\">\r\n <p>{'>'} 请选择一个房间开始聊天</p>\r\n {roomListRes?.rooms?.length === 0 && (\r\n <p>{'>'} 没有可用房间,请创建一个新房间...</p>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default Chatroom;"],"names":[],"mappings":"AAAA,WAAW;;;;;;AAEX;AACA;AACA;AAEA,OAAO;AACP;AACA;AAGA,OAAO;AACP;AACA;AAZA;;;;;;;;;;AAiBA,MAAM,WAAW;IACf,MAAM,eAAe,IAAA,oRAAe;IACpC,MAAM,WAAW,aAAa,GAAG,CAAC,eAAe;IAEjD,OAAO;IACP,MAAM,CAAC,cAAc,gBAA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;;;;;;;;;;;;;;;;;;;;;;;;AAOtB;uCAEe","debugId":null}}]
}
\ No newline at end of file
self.__INTERCEPTION_ROUTE_REWRITE_MANIFEST="[]";
\ No newline at end of file
globalThis.__BUILD_MANIFEST = {
"pages": {
"/_app": []
},
"devFiles": [],
"ampDevFiles": [],
"polyfillFiles": [
"static/chunks/3d567_next_dist_build_polyfills_polyfill-nomodule.js"
],
"lowPriorityFiles": [],
"rootMainFiles": [
"static/chunks/[turbopack]_browser_dev_hmr-client_hmr-client_ts_26d32743._.js",
"static/chunks/3d567_next_dist_compiled_react-dom_6983aa28._.js",
"static/chunks/3d567_next_dist_compiled_next-devtools_index_602eb279.js",
"static/chunks/3d567_next_dist_compiled_64f77f07._.js",
"static/chunks/3d567_next_dist_client_8fc53f0d._.js",
"static/chunks/3d567_next_dist_1c3aa617._.js",
"static/chunks/69652_@swc_helpers_cjs_77b72907._.js",
"static/chunks/_a0ff3932._.js",
"static/chunks/turbopack-_58f542e6._.js"
],
"ampFirstPages": []
};
globalThis.__BUILD_MANIFEST.lowPriorityFiles = [
"/static/" + process.env.__NEXT_BUILD_ID + "/_buildManifest.js",
,"/static/" + process.env.__NEXT_BUILD_ID + "/_ssgManifest.js",
];
\ No newline at end of file
{
"version": 3,
"middleware": {},
"sortedMiddleware": [],
"functions": {}
}
\ No newline at end of file
self.__NEXT_FONT_MANIFEST="{\n \"app\": {\n \"[project]/src/app/_not-found/page\": [\n \"static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2\"\n ],\n \"[project]/src/app/chatroom/page\": [\n \"static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2\"\n ],\n \"[project]/src/app/page\": [\n \"static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2\"\n ]\n },\n \"appUsingSizeAdjust\": true,\n \"pages\": {},\n \"pagesUsingSizeAdjust\": false\n}"
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment