no message

This commit is contained in:
小陌 2024-02-24 10:36:48 +08:00
parent f6ba744fd8
commit a1e683d0c5
2850 changed files with 0 additions and 1152450 deletions

View File

@ -1 +0,0 @@
xrnGfsvDCFuS5sZ7lyypS

View File

@ -1,21 +0,0 @@
{
"pages": {
"/page": [
"static/chunks/webpack-cf07382cb45c750f.js",
"static/chunks/bce60fc1-cf62b3a619189c74.js",
"static/chunks/7698-536b11fd1017f3bc.js",
"static/chunks/main-app-25209d0ad43c2805.js",
"static/chunks/2875-818bc20c26c006c8.js",
"static/css/8058851d67630c89.css",
"static/chunks/app/page-aed35c9551cee380.js"
],
"/layout": [
"static/chunks/webpack-cf07382cb45c750f.js",
"static/chunks/bce60fc1-cf62b3a619189c74.js",
"static/chunks/7698-536b11fd1017f3bc.js",
"static/chunks/main-app-25209d0ad43c2805.js",
"static/css/245912a63bb861f4.css",
"static/chunks/app/layout-8c4306761a432ef0.js"
]
}
}

View File

@ -1,7 +0,0 @@
{
"/api/config/route": "/api/config",
"/api/cors/[...path]/route": "/api/cors/[...path]",
"/api/openai/[...path]/route": "/api/openai/[...path]",
"/api/google/[...path]/route": "/api/google/[...path]",
"/page": "/"
}

View File

@ -1,32 +0,0 @@
{
"polyfillFiles": [
"static/chunks/polyfills-78c92fac7aa8fdd8.js"
],
"devFiles": [],
"ampDevFiles": [],
"lowPriorityFiles": [
"static/xrnGfsvDCFuS5sZ7lyypS/_buildManifest.js",
"static/xrnGfsvDCFuS5sZ7lyypS/_ssgManifest.js"
],
"rootMainFiles": [
"static/chunks/webpack-cf07382cb45c750f.js",
"static/chunks/bce60fc1-cf62b3a619189c74.js",
"static/chunks/7698-536b11fd1017f3bc.js",
"static/chunks/main-app-25209d0ad43c2805.js"
],
"pages": {
"/_app": [
"static/chunks/webpack-cf07382cb45c750f.js",
"static/chunks/framework-964c2d6016b0d731.js",
"static/chunks/main-fa1248afff6848bc.js",
"static/chunks/pages/_app-c4dd4288cf6c1321.js"
],
"/_error": [
"static/chunks/webpack-cf07382cb45c750f.js",
"static/chunks/framework-964c2d6016b0d731.js",
"static/chunks/main-fa1248afff6848bc.js",
"static/chunks/pages/_error-c4f1d7e8888c6b95.js"
]
},
"ampFirstPages": []
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1 +0,0 @@
{"version":1,"hasExportPathMap":false,"exportTrailingSlash":false,"isNextImageImported":false}

View File

@ -1 +0,0 @@
{"version":1,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[16,32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":60,"formats":["image/webp"],"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"inline","remotePatterns":[],"unoptimized":false,"sizes":[640,750,828,1080,1200,1920,2048,3840,16,32,48,64,96,128,256,384]}}

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{"type": "commonjs"}

View File

@ -1 +0,0 @@
self.__PRERENDER_MANIFEST="{\"version\":4,\"routes\":{\"/\":{\"initialRevalidateSeconds\":false,\"srcRoute\":\"/\",\"dataRoute\":\"/index.rsc\"}},\"dynamicRoutes\":{},\"notFoundRoutes\":[],\"preview\":{\"previewModeId\":\"8c67141dbb5d4c61bd9f9b0be2d6acda\",\"previewModeSigningKey\":\"96cf2e3a07ff0fe1058bcdafb414827cf51fd2b183f4e15caaa1611560b00ea4\",\"previewModeEncryptionKey\":\"47b0a451489fd0e995b4dfa796d327068fa4b7c22d0333f478f5c727830e69da\"}}"

View File

@ -1 +0,0 @@
{"version":4,"routes":{"/":{"initialRevalidateSeconds":false,"srcRoute":"/","dataRoute":"/index.rsc"}},"dynamicRoutes":{},"notFoundRoutes":[],"preview":{"previewModeId":"8c67141dbb5d4c61bd9f9b0be2d6acda","previewModeSigningKey":"96cf2e3a07ff0fe1058bcdafb414827cf51fd2b183f4e15caaa1611560b00ea4","previewModeEncryptionKey":"47b0a451489fd0e995b4dfa796d327068fa4b7c22d0333f478f5c727830e69da"}}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{"version":1,"config":{"env":{},"eslint":{"ignoreDuringBuilds":false},"typescript":{"ignoreBuildErrors":false,"tsconfigPath":"tsconfig.json"},"distDir":".next","cleanDistDir":true,"assetPrefix":"","configOrigin":"next.config.mjs","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"analyticsId":"","images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[16,32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":60,"formats":["image/webp"],"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"inline","remotePatterns":[],"unoptimized":false},"devIndicators":{"buildActivity":true,"buildActivityPosition":"bottom-right"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"amp":{"canonicalBase":""},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"optimizeFonts":true,"excludeDefaultMomentLocales":true,"serverRuntimeConfig":{},"publicRuntimeConfig":{},"reactProductionProfiling":false,"reactStrictMode":false,"httpAgentOptions":{"keepAlive":true},"outputFileTracing":true,"staticPageGenerationTimeout":60,"swcMinify":true,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"date-fns":{"transform":"date-fns/{{member}}"},"lodash":{"transform":"lodash/{{member}}"},"lodash-es":{"transform":"lodash-es/{{member}}"},"ramda":{"transform":"ramda/es/{{member}}"},"react-bootstrap":{"transform":"react-bootstrap/{{member}}"},"antd":{"transform":"antd/lib/{{kebabCase member}}"},"ahooks":{"transform":"ahooks/es/{{member}}"},"@ant-design/icons":{"transform":"@ant-design/icons/lib/icons/{{member}}"}},"experimental":{"serverMinification":false,"serverSourceMaps":false,"caseSensitiveRoutes":false,"useDeploymentId":false,"useDeploymentIdServerActions":false,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","middlewarePrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"legacyBrowsers":false,"newNextLinkBehavior":true,"cpus":7,"memoryBasedWorkersCount":false,"sharedPool":true,"isrFlushToDisk":true,"workerThreads":false,"pageEnv":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"swcFileReading":true,"craCompat":false,"esmExternals":true,"appDir":true,"isrMemoryCacheSize":52428800,"fullySpecified":false,"outputFileTracingRoot":"/Users/xiaomo/Project/ChatGPT-Next-Web","swcTraceProfiling":false,"forceSwcTransforms":true,"largePageDataBytes":128000,"adjustFontFallbacks":false,"adjustFontFallbacksWithSizeAdjust":false,"typedRoutes":false,"instrumentationHook":false,"trustHostHeader":false},"configFileName":"next.config.mjs","_originalRewrites":{"beforeFiles":[{"source":"/api/proxy/v1/:path*","destination":"https://api.openai.com/v1/:path*"},{"source":"/api/proxy/google/:path*","destination":"https://generativelanguage.googleapis.com/:path*"},{"source":"/api/proxy/openai/:path*","destination":"https://api.openai.com/:path*"},{"source":"/google-fonts/:path*","destination":"https://fonts.googleapis.com/:path*"},{"source":"/sharegpt","destination":"https://sharegpt.com/api/conversations"}],"afterFiles":[],"fallback":[]}},"appDir":"/Users/xiaomo/Project/ChatGPT-Next-Web","relativeAppDir":"","files":[".next/routes-manifest.json",".next/server/pages-manifest.json",".next/build-manifest.json",".next/prerender-manifest.json",".next/server/middleware-manifest.json",".next/server/middleware-build-manifest.js",".next/server/middleware-react-loadable-manifest.js",".next/server/app-paths-manifest.json",".next/app-build-manifest.json",".next/server/client-reference-manifest.js",".next/server/client-reference-manifest.json",".next/server/server-reference-manifest.js",".next/server/server-reference-manifest.json",".next/react-loadable-manifest.json",".next/server/font-manifest.json",".next/BUILD_ID",".next/server/app-paths-manifest.json",".next/server/next-font-manifest.js",".next/server/next-font-manifest.json"],"ignore":["node_modules/next/dist/compiled/@ampproject/toolbox-optimizer/**/*"]}

View File

@ -1 +0,0 @@
{"version":3,"pages404":true,"caseSensitive":false,"basePath":"","redirects":[{"source":"/:path+/","destination":"/:path+","internal":true,"statusCode":308,"regex":"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$"}],"headers":[{"source":"/api/:path*","headers":[{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"*"},{"key":"Access-Control-Max-Age","value":"86400"}],"regex":"^/api(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))?(?:/)?$"}],"dynamicRoutes":[{"page":"/api/cors/[...path]","regex":"^/api/cors/(.+?)(?:/)?$","routeKeys":{"nxtPpath":"nxtPpath"},"namedRegex":"^/api/cors/(?<nxtPpath>.+?)(?:/)?$"},{"page":"/api/google/[...path]","regex":"^/api/google/(.+?)(?:/)?$","routeKeys":{"nxtPpath":"nxtPpath"},"namedRegex":"^/api/google/(?<nxtPpath>.+?)(?:/)?$"},{"page":"/api/openai/[...path]","regex":"^/api/openai/(.+?)(?:/)?$","routeKeys":{"nxtPpath":"nxtPpath"},"namedRegex":"^/api/openai/(?<nxtPpath>.+?)(?:/)?$"}],"staticRoutes":[{"page":"/","regex":"^/(?:/)?$","routeKeys":{},"namedRegex":"^/(?:/)?$"}],"dataRoutes":[],"rsc":{"header":"RSC","varyHeader":"RSC, Next-Router-State-Tree, Next-Router-Prefetch","contentTypeHeader":"text/x-component"},"rewrites":{"beforeFiles":[{"source":"/api/proxy/v1/:path*","destination":"https://api.openai.com/v1/:path*","regex":"^/api/proxy/v1(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))?(?:/)?$"},{"source":"/api/proxy/google/:path*","destination":"https://generativelanguage.googleapis.com/:path*","regex":"^/api/proxy/google(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))?(?:/)?$"},{"source":"/api/proxy/openai/:path*","destination":"https://api.openai.com/:path*","regex":"^/api/proxy/openai(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))?(?:/)?$"},{"source":"/google-fonts/:path*","destination":"https://fonts.googleapis.com/:path*","regex":"^/google-fonts(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))?(?:/)?$"},{"source":"/sharegpt","destination":"https://sharegpt.com/api/conversations","regex":"^/sharegpt(?:/)?$"}],"afterFiles":[],"fallback":[]}}

View File

@ -1,7 +0,0 @@
{
"/api/config/route": "app/api/config/route.js",
"/api/cors/[...path]/route": "app/api/cors/[...path]/route.js",
"/api/openai/[...path]/route": "app/api/openai/[...path]/route.js",
"/api/google/[...path]/route": "app/api/google/[...path]/route.js",
"/page": "app/page.js"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{"headers":{"x-next-cache-tags":"/page"}}

View File

@ -1,9 +0,0 @@
1:HL["/_next/static/css/245912a63bb861f4.css",{"as":"style"}]
0:["xrnGfsvDCFuS5sZ7lyypS",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/245912a63bb861f4.css","precedence":"next"}]],["$L3",null]]]]]
4:HL["/_next/static/css/8058851d67630c89.css",{"as":"style"}]
5:I{"id":9180,"chunks":["2272:static/chunks/webpack-cf07382cb45c750f.js","9253:static/chunks/bce60fc1-cf62b3a619189c74.js","7698:static/chunks/7698-536b11fd1017f3bc.js"],"name":"default","async":false}
6:I{"id":2306,"chunks":["2272:static/chunks/webpack-cf07382cb45c750f.js","9253:static/chunks/bce60fc1-cf62b3a619189c74.js","7698:static/chunks/7698-536b11fd1017f3bc.js"],"name":"default","async":false}
2:[["$","html",null,{"lang":"en","children":[["$","head",null,{"children":[["$","meta",null,{"name":"config","content":"{\"version\":\"v2.10.3\",\"commitDate\":\"1708699879000\",\"commitHash\":\"7f859e3a7837dbc8a7488da5bae2228ba59f192c\",\"buildMode\":\"standalone\",\"isApp\":false}"}],["$","link",null,{"rel":"manifest","href":"/site.webmanifest"}],["$","script",null,{"src":"/serviceWorkerRegister.js","defer":true}]]}],["$","body",null,{"children":[["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$L7",null],"segment":"__PAGE__"},"styles":[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/8058851d67630c89.css","precedence":"next"}]]}],false,"$undefined"]}]]}],null]
3:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"NextChat"}],["$","meta","2",{"name":"description","content":"Your personal ChatGPT Chat Bot."}],["$","meta","3",{"name":"theme-color","media":"(prefers-color-scheme: light)","content":"#fafafa"}],["$","meta","4",{"name":"theme-color","media":"(prefers-color-scheme: dark)","content":"#151515"}],["$","meta","5",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1"}],["$","meta","6",{"name":"apple-mobile-web-app-capable","content":"yes"}],["$","meta","7",{"name":"apple-mobile-web-app-title","content":"NextChat"}],["$","meta","8",{"name":"apple-mobile-web-app-status-bar-style","content":"default"}]]
8:I{"id":5766,"chunks":["2875:static/chunks/2875-818bc20c26c006c8.js","1931:static/chunks/app/page-aed35c9551cee380.js"],"name":"Home","async":false}
7:[["$","$L8",null,{}],false]

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{"version":1,"files":["../webpack-runtime.js","../chunks/9128.js","../chunks/480.js","../chunks/2676.js","../chunks/9449.js","../chunks/2296.js","../chunks/1423.js","../chunks/5436.js","../chunks/4417.js","../chunks/8286.js","../chunks/7797.js","../chunks/2000.js","../chunks/2544.js","../chunks/3578.js","../chunks/8914.js","../chunks/2806.js","../chunks/1308.js","../chunks/2085.js","../chunks/4443.js","../chunks/6359.js","../chunks/8408.js","../chunks/7980.js","../chunks/445.js","../chunks/6175.js","../chunks/463.js","../chunks/4980.js","../chunks/4716.js","../chunks/8702.js","../chunks/5870.js","../chunks/6213.js","../chunks/8209.js","../chunks/2273.js","../chunks/8412.js","../chunks/4412.js","../chunks/2891.js","../chunks/9279.js","../chunks/600.js","../chunks/4614.js","../chunks/441.js","../chunks/6665.js","../chunks/8849.js","../chunks/3424.js","../chunks/1110.js","../chunks/4994.js","../chunks/8392.js","../../package.json","../../../node_modules/next/dist/compiled/react-dom/server-rendering-stub.js","../../../node_modules/react/package.json","../../../node_modules/react/index.js","../../../node_modules/next/dist/shared/lib/head-manager-context.js","../../../node_modules/next/dist/shared/lib/side-effect.js","../../../node_modules/next/dist/shared/lib/amp-context.js","../../../node_modules/next/dist/shared/lib/amp-mode.js","../../../node_modules/next/package.json","../../../node_modules/next/dist/shared/lib/utils/warn-once.js","../../../node_modules/next/dist/compiled/react-dom/package.json","../../../node_modules/next/dist/compiled/react-server-dom-webpack/client.js","../../../node_modules/next/dist/compiled/react/jsx-runtime.js","../../../node_modules/next/dist/shared/lib/hash.js","../../../node_modules/next/dist/shared/lib/head.js","../../../node_modules/next/dist/server/app-render/get-segment-param.js","../../../node_modules/next/dist/shared/lib/get-img-props.js","../../../node_modules/next/dist/shared/lib/app-router-context.js","../../../node_modules/next/dist/shared/lib/image-config.js","../../../node_modules/next/dist/shared/lib/hooks-client-context.js","../../../node_modules/next/dist/shared/lib/image-config-context.js","../../../node_modules/next/dist/compiled/react-dom/client.js","../../../node_modules/next/dist/shared/lib/server-inserted-html.js","../../../node_modules/next/dist/server/future/helpers/interception-routes.js","../../../node_modules/next/dist/compiled/react/package.json","../../../node_modules/next/dist/compiled/react-server-dom-webpack/package.json","../../../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js","../../../node_modules/next/dist/shared/lib/router/utils/parse-path.js","../../../node_modules/next/dist/shared/lib/router/utils/handle-smooth-scroll.js","../../../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js","../../../node_modules/next/dist/shared/lib/router/utils/is-bot.js","../../../node_modules/next/dist/compiled/react/index.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/next/dist/compiled/react-dom/cjs/react-dom-server-rendering-stub.production.min.js","../../../node_modules/next/dist/compiled/react-dom/cjs/react-dom-server-rendering-stub.development.js","../../../node_modules/next/dist/shared/lib/image-blur-svg.js","../../../node_modules/next/dist/compiled/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/next/dist/compiled/react/cjs/react.production.min.js","../../../node_modules/next/dist/compiled/react/cjs/react-jsx-runtime.development.js","../../../node_modules/next/dist/compiled/react/cjs/react.development.js","../../../node_modules/next/dist/compiled/react-server-dom-webpack/client.browser.js","../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../node_modules/@swc/helpers/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js","../../../node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/scheduler/package.json","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../package.json"]}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,322 +0,0 @@
exports.id = 2000;
exports.ids = [2000];
exports.modules = {
/***/ 42000:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
NewChat: () => (/* binding */ NewChat)
});
// EXTERNAL MODULE: external "next/dist/compiled/react/jsx-runtime"
var jsx_runtime_ = __webpack_require__(56786);
// EXTERNAL MODULE: external "next/dist/compiled/react"
var react_ = __webpack_require__(18038);
// EXTERNAL MODULE: ./app/constant.ts
var constant = __webpack_require__(43684);
// EXTERNAL MODULE: ./app/components/button.tsx
var components_button = __webpack_require__(39378);
// EXTERNAL MODULE: ./app/components/emoji.tsx + 1 modules
var emoji = __webpack_require__(85563);
// EXTERNAL MODULE: ./app/components/new-chat.module.scss
var new_chat_module = __webpack_require__(98273);
var new_chat_module_default = /*#__PURE__*/__webpack_require__.n(new_chat_module);
;// CONCATENATED MODULE: ./app/icons/left.svg
var _defs, _mask;
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var SvgLeft = function SvgLeft(props) {
return /*#__PURE__*/react_.createElement("svg", _extends({
xmlns: "http://www.w3.org/2000/svg",
xmlnsXlink: "http://www.w3.org/1999/xlink",
width: 16,
height: 16,
fill: "none"
}, props), _defs || (_defs = /*#__PURE__*/react_.createElement("defs", null, /*#__PURE__*/react_.createElement("path", {
id: "left_svg__a",
d: "M0 0h16v16H0z"
}))), /*#__PURE__*/react_.createElement("g", null, _mask || (_mask = /*#__PURE__*/react_.createElement("mask", {
id: "left_svg__b",
fill: "#fff"
}, /*#__PURE__*/react_.createElement("use", {
xlinkHref: "#left_svg__a"
}))), /*#__PURE__*/react_.createElement("g", {
mask: "url(#left_svg__b)"
}, /*#__PURE__*/react_.createElement("path", {
style: {
stroke: "#333",
strokeWidth: 1.3333333333333333,
strokeOpacity: 1,
strokeDasharray: "0 0"
},
d: "M4 8 0 4l4-4",
transform: "translate(6.333 4)"
}))));
};
/* harmony default export */ const left = (SvgLeft);
;// CONCATENATED MODULE: ./app/icons/lightning.svg
var lightning_mask, lightning_defs;
function lightning_extends() { lightning_extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return lightning_extends.apply(this, arguments); }
var SvgLightning = function SvgLightning(props) {
return /*#__PURE__*/react_.createElement("svg", lightning_extends({
xmlns: "http://www.w3.org/2000/svg",
xmlnsXlink: "http://www.w3.org/1999/xlink",
width: 16,
height: 16,
fill: "none"
}, props), /*#__PURE__*/react_.createElement("g", null, lightning_mask || (lightning_mask = /*#__PURE__*/react_.createElement("mask", {
id: "lightning_svg__b",
fill: "#fff"
}, /*#__PURE__*/react_.createElement("use", {
xlinkHref: "#lightning_svg__a"
}))), /*#__PURE__*/react_.createElement("g", {
mask: "url(#lightning_svg__b)"
}, /*#__PURE__*/react_.createElement("path", {
style: {
fill: "#333",
opacity: 1
},
d: "M2.248 8.852a.665.665 0 0 1-.172-.828l3.67-7a.664.664 0 0 1 .59-.357h6a.662.662 0 0 1 .634.46.669.669 0 0 1-.11.618l-2.822 3.592h3.629a.661.661 0 0 1 .605.387.663.663 0 0 1-.116.732l-8 8.66a.664.664 0 0 1-.893.078.66.66 0 0 1-.257-.441.66.66 0 0 1 .016-.26L6.472 9H2.666a.657.657 0 0 1-.42-.148zm1.52-1.185h3.569a.665.665 0 0 1 .644.836l-.986 3.74 5.148-5.573H8.667a.665.665 0 0 1-.63-.885.662.662 0 0 1 .105-.194L10.965 2H6.74z"
}))), lightning_defs || (lightning_defs = /*#__PURE__*/react_.createElement("defs", null, /*#__PURE__*/react_.createElement("path", {
id: "lightning_svg__a",
d: "M0 0h16v16H0z"
}))));
};
/* harmony default export */ const lightning = (SvgLightning);
// EXTERNAL MODULE: ./app/icons/eye.svg
var eye = __webpack_require__(61221);
// EXTERNAL MODULE: ./node_modules/react-router-dom/dist/umd/react-router-dom.production.min.js
var react_router_dom_production_min = __webpack_require__(99742);
// EXTERNAL MODULE: ./app/store/mask.ts
var mask = __webpack_require__(73706);
// EXTERNAL MODULE: ./app/locales/index.ts + 19 modules
var locales = __webpack_require__(57254);
// EXTERNAL MODULE: ./app/store/index.ts + 2 modules
var store = __webpack_require__(1075);
// EXTERNAL MODULE: ./app/components/mask.tsx
var components_mask = __webpack_require__(94417);
// EXTERNAL MODULE: ./app/command.ts
var command = __webpack_require__(88286);
// EXTERNAL MODULE: ./app/components/ui-lib.tsx + 3 modules
var ui_lib = __webpack_require__(24552);
// EXTERNAL MODULE: ./app/masks/index.ts + 2 modules
var app_masks = __webpack_require__(8586);
;// CONCATENATED MODULE: ./app/components/new-chat.tsx
function MaskItem(props) {
return /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
className: (new_chat_module_default()).mask,
onClick: props.onClick,
children: [
/*#__PURE__*/ jsx_runtime_.jsx(components_mask.MaskAvatar, {
avatar: props.mask.avatar,
model: props.mask.modelConfig.model
}),
/*#__PURE__*/ jsx_runtime_.jsx("div", {
className: (new_chat_module_default())["mask-name"] + " one-line",
children: props.mask.name
})
]
});
}
function useMaskGroup(masks) {
const [groups, setGroups] = (0,react_.useState)([]);
(0,react_.useEffect)(()=>{
const computeGroup = ()=>{
const appBody = document.getElementById(constant/* SlotID */.ym.AppBody);
if (!appBody || masks.length === 0) return;
const rect = appBody.getBoundingClientRect();
const maxWidth = rect.width;
const maxHeight = rect.height * 0.6;
const maskItemWidth = 120;
const maskItemHeight = 50;
const randomMask = ()=>masks[Math.floor(Math.random() * masks.length)];
let maskIndex = 0;
const nextMask = ()=>masks[maskIndex++ % masks.length];
const rows = Math.ceil(maxHeight / maskItemHeight);
const cols = Math.ceil(maxWidth / maskItemWidth);
const newGroups = new Array(rows).fill(0).map((_, _i)=>new Array(cols).fill(0).map((_, j)=>j < 1 || j > cols - 2 ? randomMask() : nextMask()));
setGroups(newGroups);
};
computeGroup();
window.addEventListener("resize", computeGroup);
return ()=>window.removeEventListener("resize", computeGroup);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return groups;
}
function NewChat() {
const chatStore = (0,store/* useChatStore */.aK)();
const maskStore = (0,mask/* useMaskStore */.Zy)();
const masks = maskStore.getAll();
const groups = useMaskGroup(masks);
const navigate = (0,react_router_dom_production_min.useNavigate)();
const config = (0,store/* useAppConfig */.MG)();
const maskRef = (0,react_.useRef)(null);
const { state } = (0,react_router_dom_production_min.useLocation)();
const startChat = (mask)=>{
setTimeout(()=>{
chatStore.newSession(mask);
navigate(constant/* Path */.y$.Chat);
}, 10);
};
(0,command/* useCommand */.YZ)({
mask: (id)=>{
try {
const mask = maskStore.get(id) ?? app_masks/* BUILTIN_MASK_STORE */.$n.get(id);
startChat(mask ?? undefined);
} catch {
console.error("[New Chat] failed to create chat from mask id=", id);
}
}
});
(0,react_.useEffect)(()=>{
if (maskRef.current) {
maskRef.current.scrollLeft = (maskRef.current.scrollWidth - maskRef.current.clientWidth) / 2;
}
}, [
groups
]);
return /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
className: (new_chat_module_default())["new-chat"],
children: [
/*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
className: (new_chat_module_default())["mask-header"],
children: [
/*#__PURE__*/ jsx_runtime_.jsx(components_button/* IconButton */.h, {
icon: /*#__PURE__*/ jsx_runtime_.jsx(left, {}),
text: locales/* default */.ZP.NewChat.Return,
onClick: ()=>navigate(constant/* Path */.y$.Home)
}),
!state?.fromHome && /*#__PURE__*/ jsx_runtime_.jsx(components_button/* IconButton */.h, {
text: locales/* default */.ZP.NewChat.NotShow,
onClick: async ()=>{
if (await (0,ui_lib/* showConfirm */.i0)(locales/* default */.ZP.NewChat.ConfirmNoShow)) {
startChat();
config.update((config)=>config.dontShowMaskSplashScreen = true);
}
}
})
]
}),
/*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
className: (new_chat_module_default())["mask-cards"],
children: [
/*#__PURE__*/ jsx_runtime_.jsx("div", {
className: (new_chat_module_default())["mask-card"],
children: /*#__PURE__*/ jsx_runtime_.jsx(emoji/* EmojiAvatar */.eL, {
avatar: "1f606",
size: 24
})
}),
/*#__PURE__*/ jsx_runtime_.jsx("div", {
className: (new_chat_module_default())["mask-card"],
children: /*#__PURE__*/ jsx_runtime_.jsx(emoji/* EmojiAvatar */.eL, {
avatar: "1f916",
size: 24
})
}),
/*#__PURE__*/ jsx_runtime_.jsx("div", {
className: (new_chat_module_default())["mask-card"],
children: /*#__PURE__*/ jsx_runtime_.jsx(emoji/* EmojiAvatar */.eL, {
avatar: "1f479",
size: 24
})
})
]
}),
/*#__PURE__*/ jsx_runtime_.jsx("div", {
className: (new_chat_module_default()).title,
children: locales/* default */.ZP.NewChat.Title
}),
/*#__PURE__*/ jsx_runtime_.jsx("div", {
className: (new_chat_module_default())["sub-title"],
children: locales/* default */.ZP.NewChat.SubTitle
}),
/*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
className: (new_chat_module_default()).actions,
children: [
/*#__PURE__*/ jsx_runtime_.jsx(components_button/* IconButton */.h, {
text: locales/* default */.ZP.NewChat.More,
onClick: ()=>navigate(constant/* Path */.y$.Masks),
icon: /*#__PURE__*/ jsx_runtime_.jsx(eye/* default */.Z, {}),
bordered: true,
shadow: true
}),
/*#__PURE__*/ jsx_runtime_.jsx(components_button/* IconButton */.h, {
text: locales/* default */.ZP.NewChat.Skip,
onClick: ()=>startChat(),
icon: /*#__PURE__*/ jsx_runtime_.jsx(lightning, {}),
type: "primary",
shadow: true,
className: (new_chat_module_default()).skip
})
]
}),
/*#__PURE__*/ jsx_runtime_.jsx("div", {
className: (new_chat_module_default()).masks,
ref: maskRef,
children: groups.map((masks, i)=>/*#__PURE__*/ jsx_runtime_.jsx("div", {
className: (new_chat_module_default())["mask-row"],
children: masks.map((mask, index)=>/*#__PURE__*/ jsx_runtime_.jsx(MaskItem, {
mask: mask,
onClick: ()=>startChat(mask)
}, index))
}, i))
})
]
});
}
/***/ }),
/***/ 98273:
/***/ ((module) => {
// Exports
module.exports = {
"new-chat": "new-chat_new-chat__63RF3",
"mask-header": "new-chat_mask-header__nBwht",
"slide-in-from-top": "new-chat_slide-in-from-top__kKaCc",
"mask-cards": "new-chat_mask-cards__W1FzL",
"slide-in": "new-chat_slide-in__VIaHY",
"mask-card": "new-chat_mask-card__EXvr1",
"title": "new-chat_title__lfHL6",
"sub-title": "new-chat_sub-title__qYtID",
"actions": "new-chat_actions__ntcag",
"skip": "new-chat_skip__js1_N",
"masks": "new-chat_masks__ArNS9",
"mask-row": "new-chat_mask-row__ZRTfV",
"mask": "new-chat_mask__P5aBk",
"mask-name": "new-chat_mask-name__AytPM"
};
/***/ })
};
;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,175 +0,0 @@
"use strict";
exports.id = 2544;
exports.ids = [2544];
exports.modules = {
/***/ 52544:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ ChatItem: () => (/* binding */ ChatItem),
/* harmony export */ ChatList: () => (/* binding */ ChatList)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56786);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _icons_delete_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(77360);
/* harmony import */ var _home_module_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(83465);
/* harmony import */ var _home_module_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_home_module_scss__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(41423);
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1075);
/* harmony import */ var _locales__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57254);
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(99742);
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_router_dom__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43684);
/* harmony import */ var _mask__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(94417);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18038);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _ui_lib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(24552);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(92842);
function ChatItem(props) {
const draggableRef = (0,react__WEBPACK_IMPORTED_MODULE_6__.useRef)(null);
(0,react__WEBPACK_IMPORTED_MODULE_6__.useEffect)(()=>{
if (props.selected && draggableRef.current) {
draggableRef.current?.scrollIntoView({
block: "center"
});
}
}, [
props.selected
]);
return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_9__/* .Draggable */ ._l, {
draggableId: `${props.id}`,
index: props.index,
children: (provided)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
className: `${(_home_module_scss__WEBPACK_IMPORTED_MODULE_10___default()["chat-item"])} ${props.selected && (_home_module_scss__WEBPACK_IMPORTED_MODULE_10___default()["chat-item-selected"])}`,
onClick: props.onClick,
ref: (ele)=>{
draggableRef.current = ele;
provided.innerRef(ele);
},
...provided.draggableProps,
...provided.dragHandleProps,
title: `${props.title}\n${_locales__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP.ChatItem.ChatItemCount(props.count)}`,
children: [
props.narrow ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
className: (_home_module_scss__WEBPACK_IMPORTED_MODULE_10___default()["chat-item-narrow"]),
children: [
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
className: (_home_module_scss__WEBPACK_IMPORTED_MODULE_10___default()["chat-item-avatar"]) + " no-dark",
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_mask__WEBPACK_IMPORTED_MODULE_5__.MaskAvatar, {
avatar: props.mask.avatar,
model: props.mask.modelConfig.model
})
}),
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
className: (_home_module_scss__WEBPACK_IMPORTED_MODULE_10___default()["chat-item-narrow-count"]),
children: props.count
})
]
}) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
children: [
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
className: (_home_module_scss__WEBPACK_IMPORTED_MODULE_10___default()["chat-item-title"]),
children: props.title
}),
/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
className: (_home_module_scss__WEBPACK_IMPORTED_MODULE_10___default()["chat-item-info"]),
children: [
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
className: (_home_module_scss__WEBPACK_IMPORTED_MODULE_10___default()["chat-item-count"]),
children: _locales__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP.ChatItem.ChatItemCount(props.count)
}),
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
className: (_home_module_scss__WEBPACK_IMPORTED_MODULE_10___default()["chat-item-date"]),
children: props.time
})
]
})
]
}),
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
className: (_home_module_scss__WEBPACK_IMPORTED_MODULE_10___default()["chat-item-delete"]),
onClickCapture: (e)=>{
props.onDelete?.();
e.preventDefault();
e.stopPropagation();
},
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_icons_delete_svg__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, {})
})
]
})
});
}
function ChatList(props) {
const [sessions, selectedIndex, selectSession, moveSession] = (0,_store__WEBPACK_IMPORTED_MODULE_2__/* .useChatStore */ .aK)((state)=>[
state.sessions,
state.currentSessionIndex,
state.selectSession,
state.moveSession
]);
const chatStore = (0,_store__WEBPACK_IMPORTED_MODULE_2__/* .useChatStore */ .aK)();
const navigate = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_11__.useNavigate)();
const isMobileScreen = (0,_utils__WEBPACK_IMPORTED_MODULE_8__/* .useMobileScreen */ .S0)();
const onDragEnd = (result)=>{
const { destination, source } = result;
if (!destination) {
return;
}
if (destination.droppableId === source.droppableId && destination.index === source.index) {
return;
}
moveSession(source.index, destination.index);
};
return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_9__/* .DragDropContext */ .Z5, {
onDragEnd: onDragEnd,
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_9__/* .Droppable */ .bK, {
droppableId: "chat-list",
children: (provided)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
className: (_home_module_scss__WEBPACK_IMPORTED_MODULE_10___default()["chat-list"]),
ref: provided.innerRef,
...provided.droppableProps,
children: [
sessions.map((item, i)=>/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(ChatItem, {
title: item.topic,
time: new Date(item.lastUpdate).toLocaleString(),
count: item.messages.length,
id: item.id,
index: i,
selected: i === selectedIndex,
onClick: ()=>{
navigate(_constant__WEBPACK_IMPORTED_MODULE_4__/* .Path */ .y$.Chat);
selectSession(i);
},
onDelete: async ()=>{
if (!props.narrow && !isMobileScreen || await (0,_ui_lib__WEBPACK_IMPORTED_MODULE_7__/* .showConfirm */ .i0)(_locales__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP.Home.DeleteChat)) {
chatStore.deleteSession(i);
}
},
narrow: props.narrow,
mask: item.mask
}, item.id)),
provided.placeholder
]
})
})
});
}
/***/ })
};
;

View File

@ -1,695 +0,0 @@
exports.id = 2676;
exports.ids = [2676];
exports.modules = {
/***/ 53231:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18038);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
var _defs, _mask;
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var SvgCopy = function SvgCopy(props) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
xmlns: "http://www.w3.org/2000/svg",
xmlnsXlink: "http://www.w3.org/1999/xlink",
width: 16,
height: 16,
fill: "none"
}, props), _defs || (_defs = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
id: "copy_svg__a",
d: "M0 0h16v16H0z"
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("g", null, _mask || (_mask = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("mask", {
id: "copy_svg__b",
fill: "#fff"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("use", {
xlinkHref: "#copy_svg__a"
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("g", {
mask: "url(#copy_svg__b)"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
stroke: "#333",
strokeWidth: 1.3333333333333333,
strokeOpacity: 1,
strokeDasharray: "0 0"
},
d: "M0 2.48V.94C0 .42.42 0 .94 0h8.12c.52 0 .94.42.94.94v8.12c0 .52-.42.94-.94.94H7.51",
transform: "translate(4.333 1.667)"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
stroke: "#333",
strokeWidth: 1.3333333333333333,
strokeOpacity: 1,
strokeDasharray: "0 0"
},
d: "M.94 0C.42 0 0 .42 0 .94v8.12c0 .52.42.94.94.94h8.12c.52 0 .94-.42.94-.94V.94C10 .42 9.58 0 9.06 0H.94Z",
transform: "translate(1.667 4.333)"
}))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SvgCopy);
/***/ }),
/***/ 24624:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18038);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
var _defs, _mask;
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var SvgDownload = function SvgDownload(props) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
xmlns: "http://www.w3.org/2000/svg",
xmlnsXlink: "http://www.w3.org/1999/xlink",
width: 16,
height: 16,
fill: "none"
}, props), _defs || (_defs = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
id: "download_svg__a",
d: "M0 0h16v16H0z"
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("g", null, _mask || (_mask = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("mask", {
id: "download_svg__b",
fill: "#fff"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("use", {
xlinkHref: "#download_svg__a"
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("g", {
mask: "url(#download_svg__b)"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
stroke: "#333",
strokeWidth: 1.3333333333333333,
strokeOpacity: 1,
strokeDasharray: "0 0"
},
d: "M1 12h10c.55 0 1-.45 1-1V1c0-.55-.45-1-1-1H1C.45 0 0 .45 0 1v10c0 .55.45 1 1 1Z",
transform: "translate(2 2)"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
stroke: "#333",
strokeWidth: 1.3333333333333333,
strokeOpacity: 1,
strokeDasharray: "0 0"
},
d: "M0 0h3.67l.66 1.33H9L9.67 0h3.66",
transform: "translate(1.333 10.333)"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
stroke: "#333",
strokeWidth: 1.3333333333333333,
strokeOpacity: 1,
strokeDasharray: "0 0"
},
d: "M0 3.33V0",
transform: "translate(14 8.667)"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
stroke: "#333",
strokeWidth: 1.3333333333333333,
strokeOpacity: 1,
strokeDasharray: "0 0"
},
d: "m0 0 2 2 2-2",
transform: "translate(6 7.333)"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
stroke: "#333",
strokeWidth: 1.3333333333333333,
strokeOpacity: 1,
strokeDasharray: "0 0"
},
d: "M0 5.33V0",
transform: "translate(8 4)"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
stroke: "#333",
strokeWidth: 1.3333333333333333,
strokeOpacity: 1,
strokeDasharray: "0 0"
},
d: "M0 3.33V0",
transform: "translate(2 8.667)"
}))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SvgDownload);
/***/ }),
/***/ 54095:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18038);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
var _defs, _mask;
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var SvgEdit = function SvgEdit(props) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
xmlns: "http://www.w3.org/2000/svg",
xmlnsXlink: "http://www.w3.org/1999/xlink",
width: 16,
height: 16,
fill: "none"
}, props), _defs || (_defs = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
id: "edit_svg__a",
d: "M0 0h16v16H0z"
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("g", null, _mask || (_mask = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("mask", {
id: "edit_svg__b",
fill: "#fff"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("use", {
xlinkHref: "#edit_svg__a"
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("g", {
mask: "url(#edit_svg__b)"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
stroke: "#333",
strokeWidth: 1.3333333333333333,
strokeOpacity: 1,
strokeDasharray: "0 0"
},
d: "M2.83 0v3c0 .37-.3.67-.66.67H0",
transform: "translate(10.5 11)"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
stroke: "#333",
strokeWidth: 1.3333333333333333,
strokeOpacity: 1,
strokeDasharray: "0 0"
},
d: "M10.67 4V.67c0-.37-.3-.67-.67-.67H.67C.3 0 0 .3 0 .67v12c0 .36.3.66.67.66h2",
transform: "translate(2.667 1.333)"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
stroke: "#333",
strokeWidth: 1.3333333333333333,
strokeOpacity: 1,
strokeDasharray: "0 0"
},
d: "M0 0h4.67",
transform: "translate(5.333 5.333)"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
stroke: "#333",
strokeWidth: 1.3333333333333333,
strokeOpacity: 1,
strokeDasharray: "0 0"
},
d: "m0 7 5.67-7",
transform: "translate(7.667 7.667)"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
stroke: "#333",
strokeWidth: 1.3333333333333333,
strokeOpacity: 1,
strokeDasharray: "0 0"
},
d: "M0 0h2.67",
transform: "translate(5.333 8)"
}))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SvgEdit);
/***/ }),
/***/ 62030:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18038);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
var _mask, _defs;
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var SvgUpload = function SvgUpload(props) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
xmlns: "http://www.w3.org/2000/svg",
xmlnsXlink: "http://www.w3.org/1999/xlink",
width: 16,
height: 16,
fill: "none"
}, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("g", null, _mask || (_mask = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("mask", {
id: "upload_svg__b",
fill: "#fff"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("use", {
xlinkHref: "#upload_svg__a"
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("g", {
mask: "url(#upload_svg__b)"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
fill: "#333",
opacity: 1
},
d: "M1.822 14.178A1.659 1.659 0 0 1 1.333 13V3a1.658 1.658 0 0 1 .489-1.178A1.658 1.658 0 0 1 3 1.333h10a1.659 1.659 0 0 1 1.178.489A1.658 1.658 0 0 1 14.667 3v10a1.659 1.659 0 0 1-1.018 1.535 1.643 1.643 0 0 1-.649.132H3a1.658 1.658 0 0 1-1.178-.489zm11.413-.943a.32.32 0 0 0 .098-.235V3a.32.32 0 0 0-.098-.235.32.32 0 0 0-.235-.098H3a.32.32 0 0 0-.235.098.32.32 0 0 0-.098.235v10c0 .09.033.17.098.235a.32.32 0 0 0 .235.098h10a.32.32 0 0 0 .235-.098z"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
fill: "#333",
opacity: 1
},
d: "M5.186 9.692a.664.664 0 0 1 .415.345l.476.96h3.846l.485-.964a.66.66 0 0 1 .414-.341.664.664 0 0 1 .181-.025h3.66a.665.665 0 0 1 .654.796.667.667 0 0 1-.654.537h-3.249l-.485.963a.665.665 0 0 1-.596.367h-4.67a.664.664 0 0 1-.597-.37L4.59 11H1.333a.666.666 0 1 1 0-1.333h3.67c.062 0 .123.008.183.025z"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
fill: "#333",
opacity: 1
},
d: "M13.333 12V8.667a.666.666 0 1 1 1.334 0V12a.666.666 0 1 1-1.334 0zM7.63 3.446a.664.664 0 0 1 .841.083l2 2a.667.667 0 0 1-.942.942L8 4.943 6.471 6.47A.66.66 0 0 1 6 6.667a.66.66 0 0 1-.554-.297.665.665 0 0 1 .083-.841l2-2a.665.665 0 0 1 .1-.083z"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
style: {
fill: "#333",
opacity: 1
},
d: "M8.667 4v5.333a.665.665 0 0 1-1.037.554.665.665 0 0 1-.297-.554V4a.665.665 0 0 1 1.037-.554.665.665 0 0 1 .297.554zM1.333 12V8.667a.665.665 0 0 1 1.037-.555.665.665 0 0 1 .297.555V12a.665.665 0 0 1-1.138.471.664.664 0 0 1-.196-.471z"
}))), _defs || (_defs = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
id: "upload_svg__a",
d: "M0 0h16v16H0z"
}))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SvgUpload);
/***/ }),
/***/ 85563:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
qE: () => (/* binding */ Avatar),
aR: () => (/* binding */ AvatarPicker),
eL: () => (/* binding */ EmojiAvatar)
});
// UNUSED EXPORTS: getEmojiUrl
// EXTERNAL MODULE: external "next/dist/compiled/react/jsx-runtime"
var jsx_runtime_ = __webpack_require__(56786);
// EXTERNAL MODULE: ./node_modules/emoji-picker-react/dist/index.js
var dist = __webpack_require__(10480);
// EXTERNAL MODULE: ./app/icons/bot.svg
var bot = __webpack_require__(73106);
// EXTERNAL MODULE: external "next/dist/compiled/react"
var react_ = __webpack_require__(18038);
;// CONCATENATED MODULE: ./app/icons/black-bot.svg
var _defs, _rect, _mask, _mask2;
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var SvgBlackBot = function SvgBlackBot(props) {
return /*#__PURE__*/react_.createElement("svg", _extends({
xmlns: "http://www.w3.org/2000/svg",
xmlnsXlink: "http://www.w3.org/1999/xlink",
width: 30,
height: 30,
fill: "none"
}, props), _defs || (_defs = /*#__PURE__*/react_.createElement("defs", null, /*#__PURE__*/react_.createElement("path", {
id: "black-bot_svg__a",
d: "M0 0h30v30H0z"
}), /*#__PURE__*/react_.createElement("path", {
id: "black-bot_svg__c",
d: "M0 0h20.455v20.455H0z"
}))), /*#__PURE__*/react_.createElement("g", null, _rect || (_rect = /*#__PURE__*/react_.createElement("rect", {
width: 30,
height: 30,
fill: "#E7F8FF",
rx: 10
})), _mask || (_mask = /*#__PURE__*/react_.createElement("mask", {
id: "black-bot_svg__b",
fill: "#fff"
}, /*#__PURE__*/react_.createElement("use", {
xlinkHref: "#black-bot_svg__a"
}))), /*#__PURE__*/react_.createElement("g", {
mask: "url(#black-bot_svg__b)"
}, /*#__PURE__*/react_.createElement("g", {
transform: "translate(4.773 4.773)"
}, _mask2 || (_mask2 = /*#__PURE__*/react_.createElement("mask", {
id: "black-bot_svg__d",
fill: "#fff"
}, /*#__PURE__*/react_.createElement("use", {
xlinkHref: "#black-bot_svg__c"
}))), /*#__PURE__*/react_.createElement("g", {
mask: "url(#black-bot_svg__d)"
}, /*#__PURE__*/react_.createElement("path", {
fillRule: "evenodd",
style: {
fill: "#333"
},
d: "M19.11 8.37c.17-.52.26-1.06.26-1.61 0-.9-.24-1.79-.71-2.57a5.24 5.24 0 0 0-4.53-2.59c-.37 0-.73.04-1.09.11A5.201 5.201 0 0 0 9.17 0h-.04C6.86 0 4.86 1.44 4.16 3.57A5.11 5.11 0 0 0 .71 6.04C.24 6.83 0 7.72 0 8.63c0 1.27.48 2.51 1.35 3.45-.18.52-.27 1.07-.27 1.61 0 .91.25 1.8.71 2.58 1.13 1.94 3.41 2.94 5.63 2.47a5.18 5.18 0 0 0 3.86 1.71h.05c2.26 0 4.27-1.44 4.97-3.57a5.132 5.132 0 0 0 3.45-2.47c.46-.78.7-1.67.7-2.58 0-1.28-.48-2.51-1.34-3.46ZM8.947 18.158c-.04.03-.08.05-.12.07.7.58 1.57.89 2.48.89h.01c2.14 0 3.88-1.72 3.88-3.83v-4.76c0-.02-.02-.04-.04-.05l-1.74-.99v5.75c0 .23-.13.45-.34.57l-4.13 2.35Zm-.67-1.153 4.17-2.38c.02-.01.03-.03.03-.05v-1.99l-5.04 2.87c-.21.12-.47.12-.68 0l-4.13-2.35c-.04-.02-.09-.06-.12-.07-.04.21-.06.43-.06.65 0 .67.18 1.33.52 1.92v-.01c.7 1.19 1.98 1.92 3.37 1.92.68 0 1.35-.18 1.94-.51ZM3.903 5.168v-.14c-.85.31-1.57.9-2.02 1.68a3.78 3.78 0 0 0-.52 1.91c0 1.37.74 2.64 1.94 3.33l4.17 2.37c.02.01.04.01.06 0l1.75-1-5.04-2.87a.64.64 0 0 1-.34-.57v-4.71Zm13.253 3.337-4.18-2.38c-.02 0-.04 0-.06.01l-1.74.99 5.04 2.87c.21.12.34.34.34.58v4.85c1.52-.56 2.54-1.99 2.54-3.6 0-1.37-.74-2.63-1.94-3.32ZM8.014 5.83c-.02.01-.03.03-.03.05v1.99L13.024 5a.692.692 0 0 1 .68 0l4.13 2.35c.04.02.08.05.12.07.03-.21.05-.43.05-.65 0-2.11-1.74-3.83-3.88-3.83-.68 0-1.35.18-1.94.51l-4.17 2.38Zm1.133-4.492c-2.15 0-3.89 1.72-3.89 3.83v4.76c0 .02.02.03.03.04l1.75 1v-5.75c0-.23.13-.45.34-.57l4.13-2.35c.04-.03.09-.06.12-.07-.7-.58-1.58-.89-2.48-.89ZM7.983 11.51l2.24 1.27 2.25-1.27V8.95l-2.25-1.28-2.24 1.28v2.56Z"
}))))));
};
/* harmony default export */ const black_bot = (SvgBlackBot);
;// CONCATENATED MODULE: ./app/components/emoji.tsx
function getEmojiUrl(unified, style) {
// Whoever owns this Content Delivery Network (CDN), I am using your CDN to serve emojis
// Old CDN broken, so I had to switch to this one
// Author: https://github.com/H0llyW00dzZ
return `https://fastly.jsdelivr.net/npm/emoji-datasource-apple/img/${style}/64/${unified}.png`;
}
function AvatarPicker(props) {
return /*#__PURE__*/ jsx_runtime_.jsx(dist["default"], {
lazyLoadEmojis: true,
theme: dist.Theme.AUTO,
getEmojiUrl: getEmojiUrl,
onEmojiClick: (e)=>{
props.onEmojiClick(e.unified);
}
});
}
function Avatar(props) {
if (props.model) {
return /*#__PURE__*/ jsx_runtime_.jsx("div", {
className: "no-dark",
children: props.model?.startsWith("gpt-4") ? /*#__PURE__*/ jsx_runtime_.jsx(black_bot, {
className: "user-avatar"
}) : /*#__PURE__*/ jsx_runtime_.jsx(bot/* default */.Z, {
className: "user-avatar"
})
});
}
return /*#__PURE__*/ jsx_runtime_.jsx("div", {
className: "user-avatar",
children: props.avatar && /*#__PURE__*/ jsx_runtime_.jsx(EmojiAvatar, {
avatar: props.avatar
})
});
}
function EmojiAvatar(props) {
return /*#__PURE__*/ jsx_runtime_.jsx(dist.Emoji, {
unified: props.avatar,
size: props.size ?? 18,
getEmojiUrl: getEmojiUrl
});
}
/***/ }),
/***/ 26033:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ O: () => (/* binding */ InputRange)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56786);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18038);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _input_range_module_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12338);
/* harmony import */ var _input_range_module_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_input_range_module_scss__WEBPACK_IMPORTED_MODULE_2__);
function InputRange({ onChange, title, value, className, min, max, step }) {
return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
className: (_input_range_module_scss__WEBPACK_IMPORTED_MODULE_2___default()["input-range"]) + ` ${className ?? ""}`,
children: [
title || value,
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("input", {
type: "range",
title: title,
value: value,
min: min,
max: max,
step: step,
onChange: onChange
})
]
});
}
/***/ }),
/***/ 80663:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ j: () => (/* binding */ ModelConfigList)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56786);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1075);
/* harmony import */ var _locales__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57254);
/* harmony import */ var _input_range__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26033);
/* harmony import */ var _ui_lib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24552);
/* harmony import */ var _utils_hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75804);
function ModelConfigList(props) {
const allModels = (0,_utils_hooks__WEBPACK_IMPORTED_MODULE_5__/* .useAllModels */ .l)();
return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
children: [
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_ui_lib__WEBPACK_IMPORTED_MODULE_4__/* .ListItem */ .HC, {
title: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.Model,
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_ui_lib__WEBPACK_IMPORTED_MODULE_4__/* .Select */ .Ph, {
value: props.modelConfig.model,
onChange: (e)=>{
props.updateConfig((config)=>config.model = _store__WEBPACK_IMPORTED_MODULE_1__/* .ModalConfigValidator */ .Xm.model(e.currentTarget.value));
},
children: allModels.filter((v)=>v.available).map((v, i)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("option", {
value: v.name,
children: [
v.displayName,
"(",
v.provider?.providerName,
")"
]
}, i))
})
}),
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_ui_lib__WEBPACK_IMPORTED_MODULE_4__/* .ListItem */ .HC, {
title: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.Temperature.Title,
subTitle: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.Temperature.SubTitle,
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_input_range__WEBPACK_IMPORTED_MODULE_3__/* .InputRange */ .O, {
value: props.modelConfig.temperature?.toFixed(1),
min: "0",
max: "1" // lets limit it to 0-1
,
step: "0.1",
onChange: (e)=>{
props.updateConfig((config)=>config.temperature = _store__WEBPACK_IMPORTED_MODULE_1__/* .ModalConfigValidator */ .Xm.temperature(e.currentTarget.valueAsNumber));
}
})
}),
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_ui_lib__WEBPACK_IMPORTED_MODULE_4__/* .ListItem */ .HC, {
title: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.TopP.Title,
subTitle: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.TopP.SubTitle,
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_input_range__WEBPACK_IMPORTED_MODULE_3__/* .InputRange */ .O, {
value: (props.modelConfig.top_p ?? 1).toFixed(1),
min: "0",
max: "1",
step: "0.1",
onChange: (e)=>{
props.updateConfig((config)=>config.top_p = _store__WEBPACK_IMPORTED_MODULE_1__/* .ModalConfigValidator */ .Xm.top_p(e.currentTarget.valueAsNumber));
}
})
}),
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_ui_lib__WEBPACK_IMPORTED_MODULE_4__/* .ListItem */ .HC, {
title: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.MaxTokens.Title,
subTitle: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.MaxTokens.SubTitle,
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("input", {
type: "number",
min: 1024,
max: 512000,
value: props.modelConfig.max_tokens,
onChange: (e)=>props.updateConfig((config)=>config.max_tokens = _store__WEBPACK_IMPORTED_MODULE_1__/* .ModalConfigValidator */ .Xm.max_tokens(e.currentTarget.valueAsNumber))
})
}),
props.modelConfig.model.startsWith("gemini") ? null : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
children: [
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_ui_lib__WEBPACK_IMPORTED_MODULE_4__/* .ListItem */ .HC, {
title: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.PresencePenalty.Title,
subTitle: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.PresencePenalty.SubTitle,
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_input_range__WEBPACK_IMPORTED_MODULE_3__/* .InputRange */ .O, {
value: props.modelConfig.presence_penalty?.toFixed(1),
min: "-2",
max: "2",
step: "0.1",
onChange: (e)=>{
props.updateConfig((config)=>config.presence_penalty = _store__WEBPACK_IMPORTED_MODULE_1__/* .ModalConfigValidator */ .Xm.presence_penalty(e.currentTarget.valueAsNumber));
}
})
}),
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_ui_lib__WEBPACK_IMPORTED_MODULE_4__/* .ListItem */ .HC, {
title: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.FrequencyPenalty.Title,
subTitle: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.FrequencyPenalty.SubTitle,
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_input_range__WEBPACK_IMPORTED_MODULE_3__/* .InputRange */ .O, {
value: props.modelConfig.frequency_penalty?.toFixed(1),
min: "-2",
max: "2",
step: "0.1",
onChange: (e)=>{
props.updateConfig((config)=>config.frequency_penalty = _store__WEBPACK_IMPORTED_MODULE_1__/* .ModalConfigValidator */ .Xm.frequency_penalty(e.currentTarget.valueAsNumber));
}
})
}),
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_ui_lib__WEBPACK_IMPORTED_MODULE_4__/* .ListItem */ .HC, {
title: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.InjectSystemPrompts.Title,
subTitle: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.InjectSystemPrompts.SubTitle,
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("input", {
type: "checkbox",
checked: props.modelConfig.enableInjectSystemPrompts,
onChange: (e)=>props.updateConfig((config)=>config.enableInjectSystemPrompts = e.currentTarget.checked)
})
}),
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_ui_lib__WEBPACK_IMPORTED_MODULE_4__/* .ListItem */ .HC, {
title: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.InputTemplate.Title,
subTitle: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.InputTemplate.SubTitle,
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("input", {
type: "text",
value: props.modelConfig.template,
onChange: (e)=>props.updateConfig((config)=>config.template = e.currentTarget.value)
})
})
]
}),
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_ui_lib__WEBPACK_IMPORTED_MODULE_4__/* .ListItem */ .HC, {
title: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.HistoryCount.Title,
subTitle: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.HistoryCount.SubTitle,
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_input_range__WEBPACK_IMPORTED_MODULE_3__/* .InputRange */ .O, {
title: props.modelConfig.historyMessageCount.toString(),
value: props.modelConfig.historyMessageCount,
min: "0",
max: "64",
step: "1",
onChange: (e)=>props.updateConfig((config)=>config.historyMessageCount = e.target.valueAsNumber)
})
}),
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_ui_lib__WEBPACK_IMPORTED_MODULE_4__/* .ListItem */ .HC, {
title: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.CompressThreshold.Title,
subTitle: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Settings.CompressThreshold.SubTitle,
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("input", {
type: "number",
min: 500,
max: 4000,
value: props.modelConfig.compressMessageLengthThreshold,
onChange: (e)=>props.updateConfig((config)=>config.compressMessageLengthThreshold = e.currentTarget.valueAsNumber)
})
}),
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_ui_lib__WEBPACK_IMPORTED_MODULE_4__/* .ListItem */ .HC, {
title: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Memory.Title,
subTitle: _locales__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.Memory.Send,
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("input", {
type: "checkbox",
checked: props.modelConfig.sendMemory,
onChange: (e)=>props.updateConfig((config)=>config.sendMemory = e.currentTarget.checked)
})
})
]
});
}
/***/ }),
/***/ 75804:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
l: () => (/* binding */ useAllModels)
});
// EXTERNAL MODULE: external "next/dist/compiled/react"
var react_ = __webpack_require__(18038);
// EXTERNAL MODULE: ./app/store/index.ts + 2 modules
var store = __webpack_require__(1075);
;// CONCATENATED MODULE: ./app/utils/model.ts
function collectModelTable(models, customModels) {
const modelTable = {};
// default models
models.forEach((m)=>{
modelTable[m.name] = {
...m,
displayName: m.name
};
});
// server custom models
customModels.split(",").filter((v)=>!!v && v.length > 0).forEach((m)=>{
const available = !m.startsWith("-");
const nameConfig = m.startsWith("+") || m.startsWith("-") ? m.slice(1) : m;
const [name, displayName] = nameConfig.split("=");
// enable or disable all models
if (name === "all") {
Object.values(modelTable).forEach((model)=>model.available = available);
} else {
modelTable[name] = {
name,
displayName: displayName || name,
available,
provider: modelTable[name]?.provider
};
}
});
return modelTable;
}
/**
* Generate full model table.
*/ function collectModels(models, customModels) {
const modelTable = collectModelTable(models, customModels);
const allModels = Object.values(modelTable);
return allModels;
}
;// CONCATENATED MODULE: ./app/utils/hooks.ts
function useAllModels() {
const accessStore = (0,store/* useAccessStore */._X)();
const configStore = (0,store/* useAppConfig */.MG)();
const models = (0,react_.useMemo)(()=>{
return collectModels(configStore.models, [
configStore.customModels,
accessStore.customModels
].join(","));
}, [
accessStore.customModels,
configStore.customModels,
configStore.models
]);
return models;
}
/***/ }),
/***/ 12338:
/***/ ((module) => {
// Exports
module.exports = {
"input-range": "input-range_input-range__SuxRd"
};
/***/ })
};
;

View File

@ -1,835 +0,0 @@
"use strict";
exports.id = 2756;
exports.ids = [2756];
exports.modules = {
/***/ 92756:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
0 && (0);
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
Head: function() {
return Head;
},
NextScript: function() {
return NextScript;
},
Html: function() {
return Html;
},
Main: function() {
return Main;
},
/**
* `Document` component handles the initial `document` markup and renders only on the server side.
* Commonly used for implementing server side rendering for `css-in-js` libraries.
*/ default: function() {
return Document;
}
});
const _react = /*#__PURE__*/ _interop_require_default(__webpack_require__(16689));
const _constants = __webpack_require__(56724);
const _getpagefiles = __webpack_require__(94140);
const _htmlescape = __webpack_require__(89716);
const _iserror = /*#__PURE__*/ _interop_require_default(__webpack_require__(80676));
const _htmlcontext = __webpack_require__(18743);
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
/** Set of pages that have triggered a large data warning on production mode. */ const largePageDataWarnings = new Set();
function getDocumentFiles(buildManifest, pathname, inAmpMode) {
const sharedFiles = (0, _getpagefiles.getPageFiles)(buildManifest, "/_app");
const pageFiles = true && inAmpMode ? [] : (0, _getpagefiles.getPageFiles)(buildManifest, pathname);
return {
sharedFiles,
pageFiles,
allFiles: [
...new Set([
...sharedFiles,
...pageFiles
])
]
};
}
function getPolyfillScripts(context, props) {
// polyfills.js has to be rendered as nomodule without async
// It also has to be the first script to load
const { assetPrefix, buildManifest, assetQueryString, disableOptimizedLoading, crossOrigin } = context;
return buildManifest.polyfillFiles.filter((polyfill)=>polyfill.endsWith(".js") && !polyfill.endsWith(".module.js")).map((polyfill)=>/*#__PURE__*/ _react.default.createElement("script", {
key: polyfill,
defer: !disableOptimizedLoading,
nonce: props.nonce,
crossOrigin: props.crossOrigin || crossOrigin,
noModule: true,
src: `${assetPrefix}/_next/${polyfill}${assetQueryString}`
}));
}
function hasComponentProps(child) {
return !!child && !!child.props;
}
function AmpStyles({ styles }) {
if (!styles) return null;
// try to parse styles from fragment for backwards compat
const curStyles = Array.isArray(styles) ? styles : [];
if (styles.props && // @ts-ignore Property 'props' does not exist on type ReactElement
Array.isArray(styles.props.children)) {
const hasStyles = (el)=>{
var _el_props, _el_props_dangerouslySetInnerHTML;
return el == null ? void 0 : (_el_props = el.props) == null ? void 0 : (_el_props_dangerouslySetInnerHTML = _el_props.dangerouslySetInnerHTML) == null ? void 0 : _el_props_dangerouslySetInnerHTML.__html;
};
// @ts-ignore Property 'props' does not exist on type ReactElement
styles.props.children.forEach((child)=>{
if (Array.isArray(child)) {
child.forEach((el)=>hasStyles(el) && curStyles.push(el));
} else if (hasStyles(child)) {
curStyles.push(child);
}
});
}
/* Add custom styles before AMP styles to prevent accidental overrides */ return /*#__PURE__*/ _react.default.createElement("style", {
"amp-custom": "",
dangerouslySetInnerHTML: {
__html: curStyles.map((style)=>style.props.dangerouslySetInnerHTML.__html).join("").replace(/\/\*# sourceMappingURL=.*\*\//g, "").replace(/\/\*@ sourceURL=.*?\*\//g, "")
}
});
}
function getDynamicChunks(context, props, files) {
const { dynamicImports, assetPrefix, isDevelopment, assetQueryString, disableOptimizedLoading, crossOrigin } = context;
return dynamicImports.map((file)=>{
if (!file.endsWith(".js") || files.allFiles.includes(file)) return null;
return /*#__PURE__*/ _react.default.createElement("script", {
async: !isDevelopment && disableOptimizedLoading,
defer: !disableOptimizedLoading,
key: file,
src: `${assetPrefix}/_next/${encodeURI(file)}${assetQueryString}`,
nonce: props.nonce,
crossOrigin: props.crossOrigin || crossOrigin
});
});
}
function getScripts(context, props, files) {
var _buildManifest_lowPriorityFiles;
const { assetPrefix, buildManifest, isDevelopment, assetQueryString, disableOptimizedLoading, crossOrigin } = context;
const normalScripts = files.allFiles.filter((file)=>file.endsWith(".js"));
const lowPriorityScripts = (_buildManifest_lowPriorityFiles = buildManifest.lowPriorityFiles) == null ? void 0 : _buildManifest_lowPriorityFiles.filter((file)=>file.endsWith(".js"));
return [
...normalScripts,
...lowPriorityScripts
].map((file)=>{
return /*#__PURE__*/ _react.default.createElement("script", {
key: file,
src: `${assetPrefix}/_next/${encodeURI(file)}${assetQueryString}`,
nonce: props.nonce,
async: !isDevelopment && disableOptimizedLoading,
defer: !disableOptimizedLoading,
crossOrigin: props.crossOrigin || crossOrigin
});
});
}
function getPreNextWorkerScripts(context, props) {
const { assetPrefix, scriptLoader, crossOrigin, nextScriptWorkers } = context;
// disable `nextScriptWorkers` in edge runtime
if (!nextScriptWorkers || "nodejs" === "edge") return null;
try {
let { partytownSnippet } = require("@builder.io/partytown/integration");
const children = Array.isArray(props.children) ? props.children : [
props.children
];
// Check to see if the user has defined their own Partytown configuration
const userDefinedConfig = children.find((child)=>{
var _child_props, _child_props_dangerouslySetInnerHTML;
return hasComponentProps(child) && (child == null ? void 0 : (_child_props = child.props) == null ? void 0 : (_child_props_dangerouslySetInnerHTML = _child_props.dangerouslySetInnerHTML) == null ? void 0 : _child_props_dangerouslySetInnerHTML.__html.length) && "data-partytown-config" in child.props;
});
return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, !userDefinedConfig && /*#__PURE__*/ _react.default.createElement("script", {
"data-partytown-config": "",
dangerouslySetInnerHTML: {
__html: `
partytown = {
lib: "${assetPrefix}/_next/static/~partytown/"
};
`
}
}), /*#__PURE__*/ _react.default.createElement("script", {
"data-partytown": "",
dangerouslySetInnerHTML: {
__html: partytownSnippet()
}
}), (scriptLoader.worker || []).map((file, index)=>{
const { strategy, src, children: scriptChildren, dangerouslySetInnerHTML, ...scriptProps } = file;
let srcProps = {};
if (src) {
// Use external src if provided
srcProps.src = src;
} else if (dangerouslySetInnerHTML && dangerouslySetInnerHTML.__html) {
// Embed inline script if provided with dangerouslySetInnerHTML
srcProps.dangerouslySetInnerHTML = {
__html: dangerouslySetInnerHTML.__html
};
} else if (scriptChildren) {
// Embed inline script if provided with children
srcProps.dangerouslySetInnerHTML = {
__html: typeof scriptChildren === "string" ? scriptChildren : Array.isArray(scriptChildren) ? scriptChildren.join("") : ""
};
} else {
throw new Error("Invalid usage of next/script. Did you forget to include a src attribute or an inline script? https://nextjs.org/docs/messages/invalid-script");
}
return /*#__PURE__*/ _react.default.createElement("script", {
...srcProps,
...scriptProps,
type: "text/partytown",
key: src || index,
nonce: props.nonce,
"data-nscript": "worker",
crossOrigin: props.crossOrigin || crossOrigin
});
}));
} catch (err) {
if ((0, _iserror.default)(err) && err.code !== "MODULE_NOT_FOUND") {
console.warn(`Warning: ${err.message}`);
}
return null;
}
}
function getPreNextScripts(context, props) {
const { scriptLoader, disableOptimizedLoading, crossOrigin } = context;
const webWorkerScripts = getPreNextWorkerScripts(context, props);
const beforeInteractiveScripts = (scriptLoader.beforeInteractive || []).filter((script)=>script.src).map((file, index)=>{
const { strategy, ...scriptProps } = file;
return /*#__PURE__*/ _react.default.createElement("script", {
...scriptProps,
key: scriptProps.src || index,
defer: scriptProps.defer ?? !disableOptimizedLoading,
nonce: props.nonce,
"data-nscript": "beforeInteractive",
crossOrigin: props.crossOrigin || crossOrigin
});
});
return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, webWorkerScripts, beforeInteractiveScripts);
}
function getHeadHTMLProps(props) {
const { crossOrigin, nonce, ...restProps } = props;
// This assignment is necessary for additional type checking to avoid unsupported attributes in <head>
const headProps = restProps;
return headProps;
}
function getAmpPath(ampPath, asPath) {
return ampPath || `${asPath}${asPath.includes("?") ? "&" : "?"}amp=1`;
}
function getNextFontLinkTags(nextFontManifest, dangerousAsPath, assetPrefix = "", assetQueryString = "") {
if (!nextFontManifest) {
return {
preconnect: null,
preload: null
};
}
const appFontsEntry = nextFontManifest.pages["/_app"];
const pageFontsEntry = nextFontManifest.pages[dangerousAsPath];
const preloadedFontFiles = [
...appFontsEntry ?? [],
...pageFontsEntry ?? []
];
// If no font files should preload but there's an entry for the path, add a preconnect tag.
const preconnectToSelf = !!(preloadedFontFiles.length === 0 && (appFontsEntry || pageFontsEntry));
// we only add if the dpl query is present for fonts
if (!assetQueryString.includes("dpl=")) {
assetQueryString = "";
}
return {
preconnect: preconnectToSelf ? /*#__PURE__*/ _react.default.createElement("link", {
"data-next-font": nextFontManifest.pagesUsingSizeAdjust ? "size-adjust" : "",
rel: "preconnect",
href: "/",
crossOrigin: "anonymous"
}) : null,
preload: preloadedFontFiles ? preloadedFontFiles.map((fontFile)=>{
const ext = /\.(woff|woff2|eot|ttf|otf)$/.exec(fontFile)[1];
return /*#__PURE__*/ _react.default.createElement("link", {
key: fontFile,
rel: "preload",
href: `${assetPrefix}/_next/${encodeURI(fontFile)}${assetQueryString}`,
as: "font",
type: `font/${ext}`,
crossOrigin: "anonymous",
"data-next-font": fontFile.includes("-s") ? "size-adjust" : ""
});
}) : null
};
}
class Head extends _react.default.Component {
static #_ = (()=>{
this.contextType = _htmlcontext.HtmlContext;
})();
getCssLinks(files) {
const { assetPrefix, assetQueryString, dynamicImports, crossOrigin, optimizeCss, optimizeFonts } = this.context;
const cssFiles = files.allFiles.filter((f)=>f.endsWith(".css"));
const sharedFiles = new Set(files.sharedFiles);
// Unmanaged files are CSS files that will be handled directly by the
// webpack runtime (`mini-css-extract-plugin`).
let unmangedFiles = new Set([]);
let dynamicCssFiles = Array.from(new Set(dynamicImports.filter((file)=>file.endsWith(".css"))));
if (dynamicCssFiles.length) {
const existing = new Set(cssFiles);
dynamicCssFiles = dynamicCssFiles.filter((f)=>!(existing.has(f) || sharedFiles.has(f)));
unmangedFiles = new Set(dynamicCssFiles);
cssFiles.push(...dynamicCssFiles);
}
let cssLinkElements = [];
cssFiles.forEach((file)=>{
const isSharedFile = sharedFiles.has(file);
if (!optimizeCss) {
cssLinkElements.push(/*#__PURE__*/ _react.default.createElement("link", {
key: `${file}-preload`,
nonce: this.props.nonce,
rel: "preload",
href: `${assetPrefix}/_next/${encodeURI(file)}${assetQueryString}`,
as: "style",
crossOrigin: this.props.crossOrigin || crossOrigin
}));
}
const isUnmanagedFile = unmangedFiles.has(file);
cssLinkElements.push(/*#__PURE__*/ _react.default.createElement("link", {
key: file,
nonce: this.props.nonce,
rel: "stylesheet",
href: `${assetPrefix}/_next/${encodeURI(file)}${assetQueryString}`,
crossOrigin: this.props.crossOrigin || crossOrigin,
"data-n-g": isUnmanagedFile ? undefined : isSharedFile ? "" : undefined,
"data-n-p": isUnmanagedFile ? undefined : isSharedFile ? undefined : ""
}));
});
if ( true && optimizeFonts) {
cssLinkElements = this.makeStylesheetInert(cssLinkElements);
}
return cssLinkElements.length === 0 ? null : cssLinkElements;
}
getPreloadDynamicChunks() {
const { dynamicImports, assetPrefix, assetQueryString, crossOrigin } = this.context;
return dynamicImports.map((file)=>{
if (!file.endsWith(".js")) {
return null;
}
return /*#__PURE__*/ _react.default.createElement("link", {
rel: "preload",
key: file,
href: `${assetPrefix}/_next/${encodeURI(file)}${assetQueryString}`,
as: "script",
nonce: this.props.nonce,
crossOrigin: this.props.crossOrigin || crossOrigin
});
}) // Filter out nulled scripts
.filter(Boolean);
}
getPreloadMainLinks(files) {
const { assetPrefix, assetQueryString, scriptLoader, crossOrigin } = this.context;
const preloadFiles = files.allFiles.filter((file)=>{
return file.endsWith(".js");
});
return [
...(scriptLoader.beforeInteractive || []).map((file)=>/*#__PURE__*/ _react.default.createElement("link", {
key: file.src,
nonce: this.props.nonce,
rel: "preload",
href: file.src,
as: "script",
crossOrigin: this.props.crossOrigin || crossOrigin
})),
...preloadFiles.map((file)=>/*#__PURE__*/ _react.default.createElement("link", {
key: file,
nonce: this.props.nonce,
rel: "preload",
href: `${assetPrefix}/_next/${encodeURI(file)}${assetQueryString}`,
as: "script",
crossOrigin: this.props.crossOrigin || crossOrigin
}))
];
}
getBeforeInteractiveInlineScripts() {
const { scriptLoader } = this.context;
const { nonce, crossOrigin } = this.props;
return (scriptLoader.beforeInteractive || []).filter((script)=>!script.src && (script.dangerouslySetInnerHTML || script.children)).map((file, index)=>{
const { strategy, children, dangerouslySetInnerHTML, src, ...scriptProps } = file;
let html = "";
if (dangerouslySetInnerHTML && dangerouslySetInnerHTML.__html) {
html = dangerouslySetInnerHTML.__html;
} else if (children) {
html = typeof children === "string" ? children : Array.isArray(children) ? children.join("") : "";
}
return /*#__PURE__*/ _react.default.createElement("script", {
...scriptProps,
dangerouslySetInnerHTML: {
__html: html
},
key: scriptProps.id || index,
nonce: nonce,
"data-nscript": "beforeInteractive",
crossOrigin: crossOrigin || undefined
});
});
}
getDynamicChunks(files) {
return getDynamicChunks(this.context, this.props, files);
}
getPreNextScripts() {
return getPreNextScripts(this.context, this.props);
}
getScripts(files) {
return getScripts(this.context, this.props, files);
}
getPolyfillScripts() {
return getPolyfillScripts(this.context, this.props);
}
makeStylesheetInert(node) {
return _react.default.Children.map(node, (c)=>{
var _c_props, _c_props1;
if ((c == null ? void 0 : c.type) === "link" && (c == null ? void 0 : (_c_props = c.props) == null ? void 0 : _c_props.href) && _constants.OPTIMIZED_FONT_PROVIDERS.some(({ url })=>{
var _c_props, _c_props_href;
return c == null ? void 0 : (_c_props = c.props) == null ? void 0 : (_c_props_href = _c_props.href) == null ? void 0 : _c_props_href.startsWith(url);
})) {
const newProps = {
...c.props || {},
"data-href": c.props.href,
href: undefined
};
return /*#__PURE__*/ _react.default.cloneElement(c, newProps);
} else if (c == null ? void 0 : (_c_props1 = c.props) == null ? void 0 : _c_props1.children) {
const newProps = {
...c.props || {},
children: this.makeStylesheetInert(c.props.children)
};
return /*#__PURE__*/ _react.default.cloneElement(c, newProps);
}
return c;
// @types/react bug. Returned value from .map will not be `null` if you pass in `[null]`
}).filter(Boolean);
}
render() {
const { styles, ampPath, inAmpMode, hybridAmp, canonicalBase, __NEXT_DATA__, dangerousAsPath, headTags, unstable_runtimeJS, unstable_JsPreload, disableOptimizedLoading, optimizeCss, optimizeFonts, assetPrefix, nextFontManifest } = this.context;
const disableRuntimeJS = unstable_runtimeJS === false;
const disableJsPreload = unstable_JsPreload === false || !disableOptimizedLoading;
this.context.docComponentsRendered.Head = true;
let { head } = this.context;
let cssPreloads = [];
let otherHeadElements = [];
if (head) {
head.forEach((c)=>{
let metaTag;
if (this.context.strictNextHead) {
metaTag = /*#__PURE__*/ _react.default.createElement("meta", {
name: "next-head",
content: "1"
});
}
if (c && c.type === "link" && c.props["rel"] === "preload" && c.props["as"] === "style") {
metaTag && cssPreloads.push(metaTag);
cssPreloads.push(c);
} else {
if (c) {
if (metaTag && (c.type !== "meta" || !c.props["charSet"])) {
otherHeadElements.push(metaTag);
}
otherHeadElements.push(c);
}
}
});
head = cssPreloads.concat(otherHeadElements);
}
let children = _react.default.Children.toArray(this.props.children).filter(Boolean);
// show a warning if Head contains <title> (only in development)
if (false) {}
if ( true && optimizeFonts && !( true && inAmpMode)) {
children = this.makeStylesheetInert(children);
}
let hasAmphtmlRel = false;
let hasCanonicalRel = false;
// show warning and remove conflicting amp head tags
head = _react.default.Children.map(head || [], (child)=>{
if (!child) return child;
const { type, props } = child;
if ( true && inAmpMode) {
let badProp = "";
if (type === "meta" && props.name === "viewport") {
badProp = 'name="viewport"';
} else if (type === "link" && props.rel === "canonical") {
hasCanonicalRel = true;
} else if (type === "script") {
// only block if
// 1. it has a src and isn't pointing to ampproject's CDN
// 2. it is using dangerouslySetInnerHTML without a type or
// a type of text/javascript
if (props.src && props.src.indexOf("ampproject") < -1 || props.dangerouslySetInnerHTML && (!props.type || props.type === "text/javascript")) {
badProp = "<script";
Object.keys(props).forEach((prop)=>{
badProp += ` ${prop}="${props[prop]}"`;
});
badProp += "/>";
}
}
if (badProp) {
console.warn(`Found conflicting amp tag "${child.type}" with conflicting prop ${badProp} in ${__NEXT_DATA__.page}. https://nextjs.org/docs/messages/conflicting-amp-tag`);
return null;
}
} else {
// non-amp mode
if (type === "link" && props.rel === "amphtml") {
hasAmphtmlRel = true;
}
}
return child;
// @types/react bug. Returned value from .map will not be `null` if you pass in `[null]`
});
const files = getDocumentFiles(this.context.buildManifest, this.context.__NEXT_DATA__.page, true && inAmpMode);
const nextFontLinkTags = getNextFontLinkTags(nextFontManifest, dangerousAsPath, assetPrefix, this.context.assetQueryString);
return /*#__PURE__*/ _react.default.createElement("head", getHeadHTMLProps(this.props), this.context.isDevelopment && /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/ _react.default.createElement("style", {
"data-next-hide-fouc": true,
"data-ampdevmode": true && inAmpMode ? "true" : undefined,
dangerouslySetInnerHTML: {
__html: `body{display:none}`
}
}), /*#__PURE__*/ _react.default.createElement("noscript", {
"data-next-hide-fouc": true,
"data-ampdevmode": true && inAmpMode ? "true" : undefined
}, /*#__PURE__*/ _react.default.createElement("style", {
dangerouslySetInnerHTML: {
__html: `body{display:block}`
}
}))), head, this.context.strictNextHead ? null : /*#__PURE__*/ _react.default.createElement("meta", {
name: "next-head-count",
content: _react.default.Children.count(head || []).toString()
}), children, optimizeFonts && /*#__PURE__*/ _react.default.createElement("meta", {
name: "next-font-preconnect"
}), nextFontLinkTags.preconnect, nextFontLinkTags.preload, true && inAmpMode && /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/ _react.default.createElement("meta", {
name: "viewport",
content: "width=device-width,minimum-scale=1,initial-scale=1"
}), !hasCanonicalRel && /*#__PURE__*/ _react.default.createElement("link", {
rel: "canonical",
href: canonicalBase + (__webpack_require__(76368).cleanAmpPath)(dangerousAsPath)
}), /*#__PURE__*/ _react.default.createElement("link", {
rel: "preload",
as: "script",
href: "https://cdn.ampproject.org/v0.js"
}), /*#__PURE__*/ _react.default.createElement(AmpStyles, {
styles: styles
}), /*#__PURE__*/ _react.default.createElement("style", {
"amp-boilerplate": "",
dangerouslySetInnerHTML: {
__html: `body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}`
}
}), /*#__PURE__*/ _react.default.createElement("noscript", null, /*#__PURE__*/ _react.default.createElement("style", {
"amp-boilerplate": "",
dangerouslySetInnerHTML: {
__html: `body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}`
}
})), /*#__PURE__*/ _react.default.createElement("script", {
async: true,
src: "https://cdn.ampproject.org/v0.js"
})), !( true && inAmpMode) && /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, !hasAmphtmlRel && hybridAmp && /*#__PURE__*/ _react.default.createElement("link", {
rel: "amphtml",
href: canonicalBase + getAmpPath(ampPath, dangerousAsPath)
}), this.getBeforeInteractiveInlineScripts(), !optimizeCss && this.getCssLinks(files), !optimizeCss && /*#__PURE__*/ _react.default.createElement("noscript", {
"data-n-css": this.props.nonce ?? ""
}), !disableRuntimeJS && !disableJsPreload && this.getPreloadDynamicChunks(), !disableRuntimeJS && !disableJsPreload && this.getPreloadMainLinks(files), !disableOptimizedLoading && !disableRuntimeJS && this.getPolyfillScripts(), !disableOptimizedLoading && !disableRuntimeJS && this.getPreNextScripts(), !disableOptimizedLoading && !disableRuntimeJS && this.getDynamicChunks(files), !disableOptimizedLoading && !disableRuntimeJS && this.getScripts(files), optimizeCss && this.getCssLinks(files), optimizeCss && /*#__PURE__*/ _react.default.createElement("noscript", {
"data-n-css": this.props.nonce ?? ""
}), this.context.isDevelopment && // this element is used to mount development styles so the
// ordering matches production
// (by default, style-loader injects at the bottom of <head />)
/*#__PURE__*/ _react.default.createElement("noscript", {
id: "__next_css__DO_NOT_USE__"
}), styles || null), /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, {}, ...headTags || []));
}
}
function handleDocumentScriptLoaderItems(scriptLoader, __NEXT_DATA__, props) {
var _children_find, _children_find_props, _children_find1, _children_find_props1;
if (!props.children) return;
const scriptLoaderItems = [];
const children = Array.isArray(props.children) ? props.children : [
props.children
];
const headChildren = (_children_find = children.find((child)=>child.type === Head)) == null ? void 0 : (_children_find_props = _children_find.props) == null ? void 0 : _children_find_props.children;
const bodyChildren = (_children_find1 = children.find((child)=>child.type === "body")) == null ? void 0 : (_children_find_props1 = _children_find1.props) == null ? void 0 : _children_find_props1.children;
// Scripts with beforeInteractive can be placed inside Head or <body> so children of both needs to be traversed
const combinedChildren = [
...Array.isArray(headChildren) ? headChildren : [
headChildren
],
...Array.isArray(bodyChildren) ? bodyChildren : [
bodyChildren
]
];
_react.default.Children.forEach(combinedChildren, (child)=>{
var _child_type;
if (!child) return;
// When using the `next/script` component, register it in script loader.
if ((_child_type = child.type) == null ? void 0 : _child_type.__nextScript) {
if (child.props.strategy === "beforeInteractive") {
scriptLoader.beforeInteractive = (scriptLoader.beforeInteractive || []).concat([
{
...child.props
}
]);
return;
} else if ([
"lazyOnload",
"afterInteractive",
"worker"
].includes(child.props.strategy)) {
scriptLoaderItems.push(child.props);
return;
}
}
});
__NEXT_DATA__.scriptLoader = scriptLoaderItems;
}
class NextScript extends _react.default.Component {
static #_ = (()=>{
this.contextType = _htmlcontext.HtmlContext;
})();
getDynamicChunks(files) {
return getDynamicChunks(this.context, this.props, files);
}
getPreNextScripts() {
return getPreNextScripts(this.context, this.props);
}
getScripts(files) {
return getScripts(this.context, this.props, files);
}
getPolyfillScripts() {
return getPolyfillScripts(this.context, this.props);
}
static getInlineScriptSource(context) {
const { __NEXT_DATA__, largePageDataBytes } = context;
try {
const data = JSON.stringify(__NEXT_DATA__);
if (largePageDataWarnings.has(__NEXT_DATA__.page)) {
return (0, _htmlescape.htmlEscapeJsonString)(data);
}
const bytes = false ? 0 : Buffer.from(data).byteLength;
const prettyBytes = (__webpack_require__(95955)/* ["default"] */ .Z);
if (largePageDataBytes && bytes > largePageDataBytes) {
if (true) {
largePageDataWarnings.add(__NEXT_DATA__.page);
}
console.warn(`Warning: data for page "${__NEXT_DATA__.page}"${__NEXT_DATA__.page === context.dangerousAsPath ? "" : ` (path "${context.dangerousAsPath}")`} is ${prettyBytes(bytes)} which exceeds the threshold of ${prettyBytes(largePageDataBytes)}, this amount of data can reduce performance.\nSee more info here: https://nextjs.org/docs/messages/large-page-data`);
}
return (0, _htmlescape.htmlEscapeJsonString)(data);
} catch (err) {
if ((0, _iserror.default)(err) && err.message.indexOf("circular structure") !== -1) {
throw new Error(`Circular structure in "getInitialProps" result of page "${__NEXT_DATA__.page}". https://nextjs.org/docs/messages/circular-structure`);
}
throw err;
}
}
render() {
const { assetPrefix, inAmpMode, buildManifest, unstable_runtimeJS, docComponentsRendered, assetQueryString, disableOptimizedLoading, crossOrigin } = this.context;
const disableRuntimeJS = unstable_runtimeJS === false;
docComponentsRendered.NextScript = true;
if ( true && inAmpMode) {
if (true) {
return null;
}
const ampDevFiles = [
...buildManifest.devFiles,
...buildManifest.polyfillFiles,
...buildManifest.ampDevFiles
];
return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, disableRuntimeJS ? null : /*#__PURE__*/ _react.default.createElement("script", {
id: "__NEXT_DATA__",
type: "application/json",
nonce: this.props.nonce,
crossOrigin: this.props.crossOrigin || crossOrigin,
dangerouslySetInnerHTML: {
__html: NextScript.getInlineScriptSource(this.context)
},
"data-ampdevmode": true
}), ampDevFiles.map((file)=>/*#__PURE__*/ _react.default.createElement("script", {
key: file,
src: `${assetPrefix}/_next/${file}${assetQueryString}`,
nonce: this.props.nonce,
crossOrigin: this.props.crossOrigin || crossOrigin,
"data-ampdevmode": true
})));
}
if (false) {}
const files = getDocumentFiles(this.context.buildManifest, this.context.__NEXT_DATA__.page, true && inAmpMode);
return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, !disableRuntimeJS && buildManifest.devFiles ? buildManifest.devFiles.map((file)=>/*#__PURE__*/ _react.default.createElement("script", {
key: file,
src: `${assetPrefix}/_next/${encodeURI(file)}${assetQueryString}`,
nonce: this.props.nonce,
crossOrigin: this.props.crossOrigin || crossOrigin
})) : null, disableRuntimeJS ? null : /*#__PURE__*/ _react.default.createElement("script", {
id: "__NEXT_DATA__",
type: "application/json",
nonce: this.props.nonce,
crossOrigin: this.props.crossOrigin || crossOrigin,
dangerouslySetInnerHTML: {
__html: NextScript.getInlineScriptSource(this.context)
}
}), disableOptimizedLoading && !disableRuntimeJS && this.getPolyfillScripts(), disableOptimizedLoading && !disableRuntimeJS && this.getPreNextScripts(), disableOptimizedLoading && !disableRuntimeJS && this.getDynamicChunks(files), disableOptimizedLoading && !disableRuntimeJS && this.getScripts(files));
}
}
function Html(props) {
const { inAmpMode, docComponentsRendered, locale, scriptLoader, __NEXT_DATA__ } = (0, _htmlcontext.useHtmlContext)();
docComponentsRendered.Html = true;
handleDocumentScriptLoaderItems(scriptLoader, __NEXT_DATA__, props);
return /*#__PURE__*/ _react.default.createElement("html", {
...props,
lang: props.lang || locale || undefined,
amp: true && inAmpMode ? "" : undefined,
"data-ampdevmode": true && inAmpMode && "production" !== "production" ? 0 : undefined
});
}
function Main() {
const { docComponentsRendered } = (0, _htmlcontext.useHtmlContext)();
docComponentsRendered.Main = true;
// @ts-ignore
return /*#__PURE__*/ _react.default.createElement("next-js-internal-body-render-target", null);
}
class Document extends _react.default.Component {
/**
* `getInitialProps` hook returns the context object with the addition of `renderPage`.
* `renderPage` callback executes `React` rendering logic synchronously to support server-rendering wrappers
*/ static getInitialProps(ctx) {
return ctx.defaultGetInitialProps(ctx);
}
render() {
return /*#__PURE__*/ _react.default.createElement(Html, null, /*#__PURE__*/ _react.default.createElement(Head, null), /*#__PURE__*/ _react.default.createElement("body", null, /*#__PURE__*/ _react.default.createElement(Main, null), /*#__PURE__*/ _react.default.createElement(NextScript, null)));
}
}
// Add a special property to the built-in `Document` component so later we can
// identify if a user customized `Document` is used or not.
const InternalFunctionDocument = function InternalFunctionDocument() {
return /*#__PURE__*/ _react.default.createElement(Html, null, /*#__PURE__*/ _react.default.createElement(Head, null), /*#__PURE__*/ _react.default.createElement("body", null, /*#__PURE__*/ _react.default.createElement(Main, null), /*#__PURE__*/ _react.default.createElement(NextScript, null)));
};
Document[_constants.NEXT_BUILTIN_DOCUMENT] = InternalFunctionDocument; //# sourceMappingURL=_document.js.map
/***/ }),
/***/ 80676:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
0 && (0);
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
default: function() {
return isError;
},
getProperError: function() {
return getProperError;
}
});
const _isplainobject = __webpack_require__(78524);
function isError(err) {
return typeof err === "object" && err !== null && "name" in err && "message" in err;
}
function getProperError(err) {
if (isError(err)) {
return err;
}
if (false) {}
return new Error((0, _isplainobject.isPlainObject)(err) ? JSON.stringify(err) : err + "");
}
//# sourceMappingURL=is-error.js.map
/***/ }),
/***/ 95955:
/***/ ((__unused_webpack_module, exports) => {
var __webpack_unused_export__;
/*
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
__webpack_unused_export__ = ({
value: true
});
Object.defineProperty(exports, "Z", ({
enumerable: true,
get: function() {
return prettyBytes;
}
}));
const UNITS = [
"B",
"kB",
"MB",
"GB",
"TB",
"PB",
"EB",
"ZB",
"YB"
];
/*
Formats the given number using `Number#toLocaleString`.
- If locale is a string, the value is expected to be a locale-key (for example: `de`).
- If locale is true, the system default locale is used for translation.
- If no value for locale is specified, the number is returned unmodified.
*/ const toLocaleString = (number, locale)=>{
let result = number;
if (typeof locale === "string") {
result = number.toLocaleString(locale);
} else if (locale === true) {
result = number.toLocaleString();
}
return result;
};
function prettyBytes(number, options) {
if (!Number.isFinite(number)) {
throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);
}
options = Object.assign({}, options);
if (options.signed && number === 0) {
return " 0 B";
}
const isNegative = number < 0;
const prefix = isNegative ? "-" : options.signed ? "+" : "";
if (isNegative) {
number = -number;
}
if (number < 1) {
const numberString = toLocaleString(number, options.locale);
return prefix + numberString + " B";
}
const exponent = Math.min(Math.floor(Math.log10(number) / 3), UNITS.length - 1);
number = Number((number / Math.pow(1000, exponent)).toPrecision(3));
const numberString = toLocaleString(number, options.locale);
const unit = UNITS[exponent];
return prefix + numberString + " " + unit;
}
//# sourceMappingURL=pretty-bytes.js.map
/***/ })
};
;

View File

@ -1,115 +0,0 @@
"use strict";
exports.id = 2806;
exports.ids = [2806];
exports.modules = {
/***/ 52806:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ a: () => (/* binding */ drawBackgroundRect),
/* harmony export */ b: () => (/* binding */ drawEmbeddedImage),
/* harmony export */ c: () => (/* binding */ drawImage),
/* harmony export */ d: () => (/* binding */ drawRect),
/* harmony export */ e: () => (/* binding */ getTextObj),
/* harmony export */ f: () => (/* binding */ drawText),
/* harmony export */ g: () => (/* binding */ getNoteRect)
/* harmony export */ });
/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5123);
/* harmony import */ var _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58810);
const drawRect = (element, rectData) => {
const rectElement = element.append("rect");
rectElement.attr("x", rectData.x);
rectElement.attr("y", rectData.y);
rectElement.attr("fill", rectData.fill);
rectElement.attr("stroke", rectData.stroke);
rectElement.attr("width", rectData.width);
rectElement.attr("height", rectData.height);
rectData.rx !== void 0 && rectElement.attr("rx", rectData.rx);
rectData.ry !== void 0 && rectElement.attr("ry", rectData.ry);
if (rectData.attrs !== void 0) {
for (const attrKey in rectData.attrs) {
rectElement.attr(attrKey, rectData.attrs[attrKey]);
}
}
rectData.class !== void 0 && rectElement.attr("class", rectData.class);
return rectElement;
};
const drawBackgroundRect = (element, bounds) => {
const rectData = {
x: bounds.startx,
y: bounds.starty,
width: bounds.stopx - bounds.startx,
height: bounds.stopy - bounds.starty,
fill: bounds.fill,
stroke: bounds.stroke,
class: "rect"
};
const rectElement = drawRect(element, rectData);
rectElement.lower();
};
const drawText = (element, textData) => {
const nText = textData.text.replace(_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_1__.H, " ");
const textElem = element.append("text");
textElem.attr("x", textData.x);
textElem.attr("y", textData.y);
textElem.attr("class", "legend");
textElem.style("text-anchor", textData.anchor);
textData.class !== void 0 && textElem.attr("class", textData.class);
const tspan = textElem.append("tspan");
tspan.attr("x", textData.x + textData.textMargin * 2);
tspan.text(nText);
return textElem;
};
const drawImage = (elem, x, y, link) => {
const imageElement = elem.append("image");
imageElement.attr("x", x);
imageElement.attr("y", y);
const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Nm)(link);
imageElement.attr("xlink:href", sanitizedLink);
};
const drawEmbeddedImage = (element, x, y, link) => {
const imageElement = element.append("use");
imageElement.attr("x", x);
imageElement.attr("y", y);
const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Nm)(link);
imageElement.attr("xlink:href", `#${sanitizedLink}`);
};
const getNoteRect = () => {
const noteRectData = {
x: 0,
y: 0,
width: 100,
height: 100,
fill: "#EDF2AE",
stroke: "#666",
anchor: "start",
rx: 0,
ry: 0
};
return noteRectData;
};
const getTextObj = () => {
const testObject = {
x: 0,
y: 0,
width: 100,
height: 100,
"text-anchor": "start",
style: "#666",
textMargin: 0,
rx: 0,
ry: 0,
tspan: true
};
return testObject;
};
/***/ })
};
;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More