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A,KAA2F,IAAA0D,KAA5E,SAAAD,GAAAE,CAAAA,EAAA,GAAAF,CAAAA,EAAqB,SAAAD,EAAAN,GAAA,EAAAS,CAAAA,EAAA,GAAAH,EAAAN,GAAA,EAA6B,SAAAM,EAAAL,GAAA,EAAAnD,CAAAA,EAAAwD,EAAAL,GAAA,EAA0BK,EAAAzB,EAAA6B,IAAA,CAAAJ,EAAAE,IAAA,CAAAT,EAAAH,cAAA,CAAAY,IAAA3D,CAAAA,CAAA,CAAA2D,EAAA,CAAAF,CAAA,CAAAE,EAAA,EAA0D,GAAAH,GAAAA,EAAAM,YAAA,KAAAH,KAAAF,EAAAD,EAAAM,YAAA,UAAA9D,CAAA,CAAA2D,EAAA,EAAA3D,CAAAA,CAAA,CAAA2D,EAAA,CAAAF,CAAA,CAAAE,EAAA,EAA4E,OAAOI,SAAArB,EAAA7B,KAAA2C,EAAAL,IAAAS,EAAAR,IAAAnD,EAAA+D,MAAAhE,EAAAiE,OAAAtD,EAAAuD,OAAA,EAA2E1B,EAAAjD,GAAW,CAAAgE,EAAGf,EAAAxD,IAAY,CAAAuE,oCCPvWhB,CAAAA,EAAAC,OAAA,CAAAtE,EAAA","sources":["webpack://_N_E/?76bf","webpack://_N_E/./components/comment.js","webpack://_N_E/./node_modules/.pnpm/ms@3.0.0-canary.1/node_modules/ms/dist/index.mjs","webpack://_N_E/./lib/time-ago.js","webpack://_N_E/./app/item/[id]/(comments)/page.module.css","webpack://_N_E/./components/comment.module.css","webpack://_N_E/./node_modules/.pnpm/next@14.0.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react/cjs/react-jsx-runtime.production.min.js","webpack://_N_E/./node_modules/.pnpm/next@14.0.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react/jsx-runtime.js","webpack://_N_E/"],"sourcesContent":["import(/* webpackMode: \"eager\" */ \"/home/runner/work/wasmer-nextjs-rsc/wasmer-nextjs-rsc/app/item/[id]/(comments)/page.module.css\");\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/wasmer-nextjs-rsc/wasmer-nextjs-rsc/components/comment.js\")","'use client';\n\nimport { useState } from 'react';\n\nimport timeAgo from '../lib/time-ago';\n\nimport styles from './comment.module.css';\n\nexport default function Comment({ user, text, date, comments, commentsCount }) {\n const [toggled, setToggled] = useState(false);\n\n const toggle = () => setToggled(!toggled);\n\n return (\n
\n
\n {user} {timeAgo(new Date(date))} ago{' '}\n \n {toggled ? `[+${(commentsCount || 0) + 1}]` : '[-]'}\n \n
\n\n {toggled\n ? null\n : [\n ,\n
\n {comments.map((comment) => (\n \n ))}\n
,\n ]}\n
\n );\n}\n","// Helpers.\nconst s = 1000;\nconst m = s * 60;\nconst h = m * 60;\nconst d = h * 24;\nconst w = d * 7;\nconst y = d * 365.25;\nfunction ms(value, options) {\n try {\n if (typeof value === 'string' && value.length > 0) {\n return parse(value);\n }\n else if (typeof value === 'number' && isFinite(value)) {\n return options?.long ? fmtLong(value) : fmtShort(value);\n }\n throw new Error('Value is not a string or number.');\n }\n catch (error) {\n const message = isError(error)\n ? `${error.message}. value=${JSON.stringify(value)}`\n : 'An unknown error has occured.';\n throw new Error(message);\n }\n}\n/**\n * Parse the given `str` and return milliseconds.\n */\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n throw new Error('Value exceeds the maximum length of 100 characters.');\n }\n const match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);\n if (!match) {\n return NaN;\n }\n const n = parseFloat(match[1]);\n const type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n // This should never occur.\n throw new Error(`The unit ${type} was matched, but no matching case exists.`);\n }\n}\nexport default ms;\n/**\n * Short format for `ms`.\n */\nfunction fmtShort(ms) {\n const msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return `${Math.round(ms / d)}d`;\n }\n if (msAbs >= h) {\n return `${Math.round(ms / h)}h`;\n }\n if (msAbs >= m) {\n return `${Math.round(ms / m)}m`;\n }\n if (msAbs >= s) {\n return `${Math.round(ms / s)}s`;\n }\n return `${ms}ms`;\n}\n/**\n * Long format for `ms`.\n */\nfunction fmtLong(ms) {\n const msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return `${ms} ms`;\n}\n/**\n * Pluralization helper.\n */\nfunction plural(ms, msAbs, n, name) {\n const isPlural = msAbs >= n * 1.5;\n return `${Math.round(ms / n)} ${name}${isPlural ? 's' : ''}`;\n}\n/**\n * A type guard for errors.\n */\nfunction isError(error) {\n return typeof error === 'object' && error !== null && 'message' in error;\n}\n","import ms from 'ms'\n\nconst map = {\n s: 'seconds',\n ms: 'milliseconds',\n m: 'minutes',\n h: 'hours',\n d: 'days',\n}\n\nexport default (date) =>\n date ? ms(new Date() - date).replace(/[a-z]+/, (str) => ' ' + map[str]) : ''\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"comments\":\"page_comments__DDOeA\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"comment\":\"comment_comment__K0bin\",\"children\":\"comment_children__tlPfJ\",\"meta\":\"comment_meta__Ulkq1\",\"toggle\":\"comment_toggle__LC3uM\",\"text\":\"comment_text__zoCgd\"};","/**\n * @license React\n * react-jsx-runtime.production.min.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'use strict';var f=require(\"next/dist/compiled/react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n"],"names":["Promise","resolve","then","__webpack_require__","t","bind","Comment","param","user","text","date","comments","commentsCount","toggled","setToggled","useState","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsxs","div","className","styles","suppressHydrationWarning","timeAgo","Date","jsx","span","onClick","concat","dangerouslySetInnerHTML","__html","map","comment","id","d","h","w","y","parse","str","String","length","match","exec","NaN","n","parseFloat","type","toLowerCase","dist","value","options","isFinite","long","fmtLong","fmtShort","error","message","isError","JSON","stringify","ms","msAbs","Math","abs","round","m","s","plural","name","isPlural","time_ago","replace","module","exports","f","k","Symbol","for","Object","prototype","hasOwnProperty","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","e","call","defaultProps","$$typeof","props","_owner","current"],"sourceRoot":""}