UNPKG

create-jaydee-app

Version:

This is a project created with Create Jaydee App.

991 lines (981 loc) 44.5 kB
(globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["static/chunks/_b22dc9._.js", { "[project]/src/app/page.tsx [app-rsc] (ecmascript, Next.js server component, client modules)": ((__turbopack_context__) => { var { r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, b: __turbopack_worker_blob_url__, g: global, __dirname, t: __turbopack_require_real__ } = __turbopack_context__; { }}), "[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/shared/lib/router/utils/querystring.js [app-client] (ecmascript)": (function(__turbopack_context__) { var { r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, b: __turbopack_worker_blob_url__, g: global, __dirname, m: module, e: exports, t: __turbopack_require_real__ } = __turbopack_context__; { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { assign: null, searchParamsToUrlQuery: null, urlQueryToSearchParams: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { assign: function() { return assign; }, searchParamsToUrlQuery: function() { return searchParamsToUrlQuery; }, urlQueryToSearchParams: function() { return urlQueryToSearchParams; } }); function searchParamsToUrlQuery(searchParams) { const query = {}; searchParams.forEach((value, key)=>{ if (typeof query[key] === 'undefined') { query[key] = value; } else if (Array.isArray(query[key])) { ; query[key].push(value); } else { query[key] = [ query[key], value ]; } }); return query; } function stringifyUrlQueryParam(param) { if (typeof param === 'string' || typeof param === 'number' && !isNaN(param) || typeof param === 'boolean') { return String(param); } else { return ''; } } function urlQueryToSearchParams(urlQuery) { const result = new URLSearchParams(); Object.entries(urlQuery).forEach((param)=>{ let [key, value] = param; if (Array.isArray(value)) { value.forEach((item)=>result.append(key, stringifyUrlQueryParam(item))); } else { result.set(key, stringifyUrlQueryParam(value)); } }); return result; } function assign(target) { for(var _len = arguments.length, searchParamsList = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){ searchParamsList[_key - 1] = arguments[_key]; } searchParamsList.forEach((searchParams)=>{ Array.from(searchParams.keys()).forEach((key)=>target.delete(key)); searchParams.forEach((value, key)=>target.append(key, value)); }); return target; } //# sourceMappingURL=querystring.js.map }}), "[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/shared/lib/router/utils/format-url.js [app-client] (ecmascript)": (function(__turbopack_context__) { var { r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, b: __turbopack_worker_blob_url__, g: global, __dirname, m: module, e: exports, t: __turbopack_require_real__ } = __turbopack_context__; { // Format function modified from nodejs // Copyright Joyent, Inc. and other Node contributors. // // 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. var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$1$2e$6_react$2d$dom$40$18$2e$3$2e$1_react$40$18$2e$3$2e$1_$5f$react$40$18$2e$3$2e$1$2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)"); "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { formatUrl: null, formatWithValidation: null, urlObjectKeys: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { formatUrl: function() { return formatUrl; }, formatWithValidation: function() { return formatWithValidation; }, urlObjectKeys: function() { return urlObjectKeys; } }); const _interop_require_wildcard = __turbopack_require__("[project]/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)"); const _querystring = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_require__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/shared/lib/router/utils/querystring.js [app-client] (ecmascript)")); const slashedProtocols = /https?|ftp|gopher|file/; function formatUrl(urlObj) { let { auth, hostname } = urlObj; let protocol = urlObj.protocol || ''; let pathname = urlObj.pathname || ''; let hash = urlObj.hash || ''; let query = urlObj.query || ''; let host = false; auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : ''; if (urlObj.host) { host = auth + urlObj.host; } else if (hostname) { host = auth + (~hostname.indexOf(':') ? "[" + hostname + "]" : hostname); if (urlObj.port) { host += ':' + urlObj.port; } } if (query && typeof query === 'object') { query = String(_querystring.urlQueryToSearchParams(query)); } let search = urlObj.search || query && "?" + query || ''; if (protocol && !protocol.endsWith(':')) protocol += ':'; if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) { host = '//' + (host || ''); if (pathname && pathname[0] !== '/') pathname = '/' + pathname; } else if (!host) { host = ''; } if (hash && hash[0] !== '#') hash = '#' + hash; if (search && search[0] !== '?') search = '?' + search; pathname = pathname.replace(/[?#]/g, encodeURIComponent); search = search.replace('#', '%23'); return "" + protocol + host + pathname + search + hash; } const urlObjectKeys = [ 'auth', 'hash', 'host', 'hostname', 'href', 'path', 'pathname', 'port', 'protocol', 'query', 'search', 'slashes' ]; function formatWithValidation(url) { if ("TURBOPACK compile-time truthy", 1) { if (url !== null && typeof url === 'object') { Object.keys(url).forEach((key)=>{ if (!urlObjectKeys.includes(key)) { console.warn("Unknown key passed via urlObject into url.format: " + key); } }); } } return formatUrl(url); } //# sourceMappingURL=format-url.js.map }}), "[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/request-idle-callback.js [app-client] (ecmascript)": (function(__turbopack_context__) { var { r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, b: __turbopack_worker_blob_url__, g: global, __dirname, m: module, e: exports, t: __turbopack_require_real__ } = __turbopack_context__; { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { cancelIdleCallback: null, requestIdleCallback: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { cancelIdleCallback: function() { return cancelIdleCallback; }, requestIdleCallback: function() { return requestIdleCallback; } }); const requestIdleCallback = typeof self !== 'undefined' && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) { let start = Date.now(); return self.setTimeout(function() { cb({ didTimeout: false, timeRemaining: function() { return Math.max(0, 50 - (Date.now() - start)); } }); }, 1); }; const cancelIdleCallback = typeof self !== 'undefined' && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) { return clearTimeout(id); }; if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=request-idle-callback.js.map }}), "[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/use-intersection.js [app-client] (ecmascript)": (function(__turbopack_context__) { var { r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, b: __turbopack_worker_blob_url__, g: global, __dirname, m: module, e: exports, t: __turbopack_require_real__ } = __turbopack_context__; { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "useIntersection", { enumerable: true, get: function() { return useIntersection; } }); const _react = __turbopack_require__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"); const _requestidlecallback = __turbopack_require__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/request-idle-callback.js [app-client] (ecmascript)"); const hasIntersectionObserver = typeof IntersectionObserver === 'function'; const observers = new Map(); const idList = []; function createObserver(options) { const id = { root: options.root || null, margin: options.rootMargin || '' }; const existing = idList.find((obj)=>obj.root === id.root && obj.margin === id.margin); let instance; if (existing) { instance = observers.get(existing); if (instance) { return instance; } } const elements = new Map(); const observer = new IntersectionObserver((entries)=>{ entries.forEach((entry)=>{ const callback = elements.get(entry.target); const isVisible = entry.isIntersecting || entry.intersectionRatio > 0; if (callback && isVisible) { callback(isVisible); } }); }, options); instance = { id, observer, elements }; idList.push(id); observers.set(id, instance); return instance; } function observe(element, callback, options) { const { id, observer, elements } = createObserver(options); elements.set(element, callback); observer.observe(element); return function unobserve() { elements.delete(element); observer.unobserve(element); // Destroy observer when there's nothing left to watch: if (elements.size === 0) { observer.disconnect(); observers.delete(id); const index = idList.findIndex((obj)=>obj.root === id.root && obj.margin === id.margin); if (index > -1) { idList.splice(index, 1); } } }; } function useIntersection(param) { let { rootRef, rootMargin, disabled } = param; const isDisabled = disabled || !hasIntersectionObserver; const [visible, setVisible] = (0, _react.useState)(false); const elementRef = (0, _react.useRef)(null); const setElement = (0, _react.useCallback)((element)=>{ elementRef.current = element; }, []); (0, _react.useEffect)(()=>{ if (hasIntersectionObserver) { if (isDisabled || visible) return; const element = elementRef.current; if (element && element.tagName) { const unobserve = observe(element, (isVisible)=>isVisible && setVisible(isVisible), { root: rootRef == null ? void 0 : rootRef.current, rootMargin }); return unobserve; } } else { if (!visible) { const idleCallback = (0, _requestidlecallback.requestIdleCallback)(()=>setVisible(true)); return ()=>(0, _requestidlecallback.cancelIdleCallback)(idleCallback); } } // eslint-disable-next-line react-hooks/exhaustive-deps }, [ isDisabled, rootMargin, rootRef, visible, elementRef.current ]); const resetVisible = (0, _react.useCallback)(()=>{ setVisible(false); }, []); return [ setElement, visible, resetVisible ]; } if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=use-intersection.js.map }}), "[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/use-merged-ref.js [app-client] (ecmascript)": (function(__turbopack_context__) { var { r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, b: __turbopack_worker_blob_url__, g: global, __dirname, m: module, e: exports, t: __turbopack_require_real__ } = __turbopack_context__; { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "useMergedRef", { enumerable: true, get: function() { return useMergedRef; } }); const _react = __turbopack_require__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"); function useMergedRef(refA, refB) { const cleanupA = (0, _react.useRef)(()=>{}); const cleanupB = (0, _react.useRef)(()=>{}); return (0, _react.useMemo)(()=>{ if (!refA || !refB) { return refA || refB; } return (current)=>{ if (current === null) { cleanupA.current(); cleanupB.current(); } else { cleanupA.current = applyRef(refA, current); cleanupB.current = applyRef(refB, current); } }; }, [ refA, refB ]); } function applyRef(refA, current) { if (typeof refA === 'function') { const cleanup = refA(current); if (typeof cleanup === 'function') { return cleanup; } else { return ()=>refA(null); } } else { refA.current = current; return ()=>{ refA.current = null; }; } } if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=use-merged-ref.js.map }}), "[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/shared/lib/utils.js [app-client] (ecmascript)": (function(__turbopack_context__) { var { r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, b: __turbopack_worker_blob_url__, g: global, __dirname, m: module, e: exports, t: __turbopack_require_real__ } = __turbopack_context__; { var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$1$2e$6_react$2d$dom$40$18$2e$3$2e$1_react$40$18$2e$3$2e$1_$5f$react$40$18$2e$3$2e$1$2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)"); "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { DecodeError: null, MiddlewareNotFoundError: null, MissingStaticPage: null, NormalizeError: null, PageNotFoundError: null, SP: null, ST: null, WEB_VITALS: null, execOnce: null, getDisplayName: null, getLocationOrigin: null, getURL: null, isAbsoluteUrl: null, isResSent: null, loadGetInitialProps: null, normalizeRepeatedSlashes: null, stringifyError: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { DecodeError: function() { return DecodeError; }, MiddlewareNotFoundError: function() { return MiddlewareNotFoundError; }, MissingStaticPage: function() { return MissingStaticPage; }, NormalizeError: function() { return NormalizeError; }, PageNotFoundError: function() { return PageNotFoundError; }, SP: function() { return SP; }, ST: function() { return ST; }, WEB_VITALS: function() { return WEB_VITALS; }, execOnce: function() { return execOnce; }, getDisplayName: function() { return getDisplayName; }, getLocationOrigin: function() { return getLocationOrigin; }, getURL: function() { return getURL; }, isAbsoluteUrl: function() { return isAbsoluteUrl; }, isResSent: function() { return isResSent; }, loadGetInitialProps: function() { return loadGetInitialProps; }, normalizeRepeatedSlashes: function() { return normalizeRepeatedSlashes; }, stringifyError: function() { return stringifyError; } }); const WEB_VITALS = [ 'CLS', 'FCP', 'FID', 'INP', 'LCP', 'TTFB' ]; function execOnce(fn) { let used = false; let result; return function() { for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ args[_key] = arguments[_key]; } if (!used) { used = true; result = fn(...args); } return result; }; } // Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 // Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 const ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/; const isAbsoluteUrl = (url)=>ABSOLUTE_URL_REGEX.test(url); function getLocationOrigin() { const { protocol, hostname, port } = window.location; return protocol + "//" + hostname + (port ? ':' + port : ''); } function getURL() { const { href } = window.location; const origin = getLocationOrigin(); return href.substring(origin.length); } function getDisplayName(Component) { return typeof Component === 'string' ? Component : Component.displayName || Component.name || 'Unknown'; } function isResSent(res) { return res.finished || res.headersSent; } function normalizeRepeatedSlashes(url) { const urlParts = url.split('?'); const urlNoQuery = urlParts[0]; return urlNoQuery // first we replace any non-encoded backslashes with forward // then normalize repeated forward slashes .replace(/\\/g, '/').replace(/\/\/+/g, '/') + (urlParts[1] ? "?" + urlParts.slice(1).join('?') : ''); } async function loadGetInitialProps(App, ctx) { if ("TURBOPACK compile-time truthy", 1) { var _App_prototype; if ((_App_prototype = App.prototype) == null ? void 0 : _App_prototype.getInitialProps) { const message = '"' + getDisplayName(App) + '.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.'; throw new Error(message); } } // when called from _app `ctx` is nested in `ctx` const res = ctx.res || ctx.ctx && ctx.ctx.res; if (!App.getInitialProps) { if (ctx.ctx && ctx.Component) { // @ts-ignore pageProps default return { pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx) }; } return {}; } const props = await App.getInitialProps(ctx); if (res && isResSent(res)) { return props; } if (!props) { const message = '"' + getDisplayName(App) + '.getInitialProps()" should resolve to an object. But found "' + props + '" instead.'; throw new Error(message); } if ("TURBOPACK compile-time truthy", 1) { if (Object.keys(props).length === 0 && !ctx.ctx) { console.warn("" + getDisplayName(App) + " returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"); } } return props; } const SP = typeof performance !== 'undefined'; const ST = SP && [ 'mark', 'measure', 'getEntriesByName' ].every((method)=>typeof performance[method] === 'function'); class DecodeError extends Error { } class NormalizeError extends Error { } class PageNotFoundError extends Error { constructor(page){ super(); this.code = 'ENOENT'; this.name = 'PageNotFoundError'; this.message = "Cannot find module for page: " + page; } } class MissingStaticPage extends Error { constructor(page, message){ super(); this.message = "Failed to load static file for page: " + page + " " + message; } } class MiddlewareNotFoundError extends Error { constructor(){ super(); this.code = 'ENOENT'; this.message = "Cannot find the middleware module"; } } function stringifyError(error) { return JSON.stringify({ message: error.message, stack: error.stack }); } //# sourceMappingURL=utils.js.map }}), "[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/app-dir/link.js [app-client] (ecmascript)": (function(__turbopack_context__) { var { r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, b: __turbopack_worker_blob_url__, g: global, __dirname, m: module, e: exports, t: __turbopack_require_real__ } = __turbopack_context__; { var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$next$40$15$2e$1$2e$6_react$2d$dom$40$18$2e$3$2e$1_react$40$18$2e$3$2e$1_$5f$react$40$18$2e$3$2e$1$2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)"); 'use client'; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function() { return _default; } }); const _interop_require_default = __turbopack_require__("[project]/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)"); const _jsxruntime = __turbopack_require__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)"); const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_require__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)")); const _formaturl = __turbopack_require__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/shared/lib/router/utils/format-url.js [app-client] (ecmascript)"); const _approutercontextsharedruntime = __turbopack_require__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js [app-client] (ecmascript)"); const _useintersection = __turbopack_require__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/use-intersection.js [app-client] (ecmascript)"); const _routerreducertypes = __turbopack_require__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-client] (ecmascript)"); const _usemergedref = __turbopack_require__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/use-merged-ref.js [app-client] (ecmascript)"); const _utils = __turbopack_require__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/shared/lib/utils.js [app-client] (ecmascript)"); const _addbasepath = __turbopack_require__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/add-base-path.js [app-client] (ecmascript)"); const _warnonce = __turbopack_require__("[project]/node_modules/.pnpm/next@15.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/shared/lib/utils/warn-once.js [app-client] (ecmascript)"); function prefetch(router, href, options) { if (typeof window === 'undefined') { return; } const doPrefetch = async ()=>{ // note that `appRouter.prefetch()` is currently sync, // so we have to wrap this call in an async function to be able to catch() errors below. return router.prefetch(href, options); }; // Prefetch the page if asked (only in the client) // We need to handle a prefetch error here since we may be // loading with priority which can reject but we don't // want to force navigation since this is only a prefetch doPrefetch().catch((err)=>{ if (("TURBOPACK compile-time value", "development") !== 'production') { // rethrow to show invalid URL errors throw err; } }); } function isModifiedEvent(event) { const eventTarget = event.currentTarget; const target = eventTarget.getAttribute('target'); return target && target !== '_self' || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || // triggers resource download event.nativeEvent && event.nativeEvent.which === 2; } function linkClicked(e, router, href, as, replace, shallow, scroll) { const { nodeName } = e.currentTarget; // anchors inside an svg have a lowercase nodeName const isAnchorNodeName = nodeName.toUpperCase() === 'A'; if (isAnchorNodeName && isModifiedEvent(e)) { // ignore click for browser’s default behavior return; } e.preventDefault(); const navigate = ()=>{ // If the router is an NextRouter instance it will have `beforePopState` const routerScroll = scroll != null ? scroll : true; if ('beforePopState' in router) { router[replace ? 'replace' : 'push'](href, as, { shallow, scroll: routerScroll }); } else { router[replace ? 'replace' : 'push'](as || href, { scroll: routerScroll }); } }; _react.default.startTransition(navigate); } function formatStringOrUrl(urlObjOrString) { if (typeof urlObjOrString === 'string') { return urlObjOrString; } return (0, _formaturl.formatUrl)(urlObjOrString); } /** * A React component that extends the HTML `<a>` element to provide [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching) * and client-side navigation between routes. * * It is the primary way to navigate between routes in Next.js. * * Read more: [Next.js docs: `<Link>`](https://nextjs.org/docs/app/api-reference/components/link) */ const Link = /*#__PURE__*/ _react.default.forwardRef(function LinkComponent(props, forwardedRef) { let children; const { href: hrefProp, as: asProp, children: childrenProp, prefetch: prefetchProp = null, passHref, replace, shallow, scroll, onClick, onMouseEnter: onMouseEnterProp, onTouchStart: onTouchStartProp, legacyBehavior = false, ...restProps } = props; children = childrenProp; if (legacyBehavior && (typeof children === 'string' || typeof children === 'number')) { children = /*#__PURE__*/ (0, _jsxruntime.jsx)("a", { children: children }); } const router = _react.default.useContext(_approutercontextsharedruntime.AppRouterContext); const prefetchEnabled = prefetchProp !== false; /** * The possible states for prefetch are: * - null: this is the default "auto" mode, where we will prefetch partially if the link is in the viewport * - true: we will prefetch if the link is visible and prefetch the full page, not just partially * - false: we will not prefetch if in the viewport at all */ const appPrefetchKind = prefetchProp === null ? _routerreducertypes.PrefetchKind.AUTO : _routerreducertypes.PrefetchKind.FULL; if ("TURBOPACK compile-time truthy", 1) { function createPropError(args) { return new Error("Failed prop type: The prop `" + args.key + "` expects a " + args.expected + " in `<Link>`, but got `" + args.actual + "` instead." + (typeof window !== 'undefined' ? "\nOpen your browser's console to view the Component stack trace." : '')); } // TypeScript trick for type-guarding: const requiredPropsGuard = { href: true }; const requiredProps = Object.keys(requiredPropsGuard); requiredProps.forEach((key)=>{ if (key === 'href') { if (props[key] == null || typeof props[key] !== 'string' && typeof props[key] !== 'object') { throw createPropError({ key, expected: '`string` or `object`', actual: props[key] === null ? 'null' : typeof props[key] }); } } else { // TypeScript trick for type-guarding: // eslint-disable-next-line @typescript-eslint/no-unused-vars const _ = key; } }); // TypeScript trick for type-guarding: const optionalPropsGuard = { as: true, replace: true, scroll: true, shallow: true, passHref: true, prefetch: true, onClick: true, onMouseEnter: true, onTouchStart: true, legacyBehavior: true }; const optionalProps = Object.keys(optionalPropsGuard); optionalProps.forEach((key)=>{ const valType = typeof props[key]; if (key === 'as') { if (props[key] && valType !== 'string' && valType !== 'object') { throw createPropError({ key, expected: '`string` or `object`', actual: valType }); } } else if (key === 'onClick' || key === 'onMouseEnter' || key === 'onTouchStart') { if (props[key] && valType !== 'function') { throw createPropError({ key, expected: '`function`', actual: valType }); } } else if (key === 'replace' || key === 'scroll' || key === 'shallow' || key === 'passHref' || key === 'prefetch' || key === 'legacyBehavior') { if (props[key] != null && valType !== 'boolean') { throw createPropError({ key, expected: '`boolean`', actual: valType }); } } else { // TypeScript trick for type-guarding: // eslint-disable-next-line @typescript-eslint/no-unused-vars const _ = key; } }); } if ("TURBOPACK compile-time truthy", 1) { if (props.locale) { (0, _warnonce.warnOnce)('The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'); } if (!asProp) { let href; if (typeof hrefProp === 'string') { href = hrefProp; } else if (typeof hrefProp === 'object' && typeof hrefProp.pathname === 'string') { href = hrefProp.pathname; } if (href) { const hasDynamicSegment = href.split('/').some((segment)=>segment.startsWith('[') && segment.endsWith(']')); if (hasDynamicSegment) { throw new Error("Dynamic href `" + href + "` found in <Link> while using the `/app` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href"); } } } } const { href, as } = _react.default.useMemo({ "Link.LinkComponent.useMemo": ()=>{ const resolvedHref = formatStringOrUrl(hrefProp); return { href: resolvedHref, as: asProp ? formatStringOrUrl(asProp) : resolvedHref }; } }["Link.LinkComponent.useMemo"], [ hrefProp, asProp ]); const previousHref = _react.default.useRef(href); const previousAs = _react.default.useRef(as); // This will return the first child, if multiple are provided it will throw an error let child; if (legacyBehavior) { if ("TURBOPACK compile-time truthy", 1) { if (onClick) { console.warn('"onClick" was passed to <Link> with `href` of `' + hrefProp + '` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'); } if (onMouseEnterProp) { console.warn('"onMouseEnter" was passed to <Link> with `href` of `' + hrefProp + '` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link'); } try { child = _react.default.Children.only(children); } catch (err) { if (!children) { throw new Error("No children were passed to <Link> with `href` of `" + hrefProp + "` but one child is required https://nextjs.org/docs/messages/link-no-children"); } throw new Error("Multiple children were passed to <Link> with `href` of `" + hrefProp + "` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children" + (typeof window !== 'undefined' ? " \nOpen your browser's console to view the Component stack trace." : '')); } } else { "TURBOPACK unreachable"; } } else { if ("TURBOPACK compile-time truthy", 1) { if ((children == null ? void 0 : children.type) === 'a') { throw new Error('Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'); } } } const childRef = legacyBehavior ? child && typeof child === 'object' && child.ref : forwardedRef; const [setIntersectionRef, isVisible, resetVisible] = (0, _useintersection.useIntersection)({ rootMargin: '200px' }); const setIntersectionWithResetRef = _react.default.useCallback({ "Link.LinkComponent.useCallback[setIntersectionWithResetRef]": (el)=>{ // Before the link getting observed, check if visible state need to be reset if (previousAs.current !== as || previousHref.current !== href) { resetVisible(); previousAs.current = as; previousHref.current = href; } setIntersectionRef(el); } }["Link.LinkComponent.useCallback[setIntersectionWithResetRef]"], [ as, href, resetVisible, setIntersectionRef ]); const setRef = (0, _usemergedref.useMergedRef)(setIntersectionWithResetRef, childRef); // Prefetch the URL if we haven't already and it's visible. _react.default.useEffect({ "Link.LinkComponent.useEffect": ()=>{ // in dev, we only prefetch on hover to avoid wasting resources as the prefetch will trigger compiling the page. if ("TURBOPACK compile-time truthy", 1) { return; } "TURBOPACK unreachable"; } }["Link.LinkComponent.useEffect"], [ as, href, isVisible, prefetchEnabled, router, appPrefetchKind ]); const childProps = { ref: setRef, onClick (e) { if ("TURBOPACK compile-time truthy", 1) { if (!e) { throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.'); } } if (!legacyBehavior && typeof onClick === 'function') { onClick(e); } if (legacyBehavior && child.props && typeof child.props.onClick === 'function') { child.props.onClick(e); } if (!router) { return; } if (e.defaultPrevented) { return; } linkClicked(e, router, href, as, replace, shallow, scroll); }, onMouseEnter (e) { if (!legacyBehavior && typeof onMouseEnterProp === 'function') { onMouseEnterProp(e); } if (legacyBehavior && child.props && typeof child.props.onMouseEnter === 'function') { child.props.onMouseEnter(e); } if (!router) { return; } if ("TURBOPACK compile-time truthy", 1) { return; } "TURBOPACK unreachable"; }, onTouchStart: ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : function onTouchStart(e) { if (!legacyBehavior && typeof onTouchStartProp === 'function') { onTouchStartProp(e); } if (legacyBehavior && child.props && typeof child.props.onTouchStart === 'function') { child.props.onTouchStart(e); } if (!router) { return; } if (!prefetchEnabled) { return; } prefetch(router, href, { kind: appPrefetchKind }); } }; // If child is an <a> tag and doesn't have a href attribute, or if the 'passHref' property is // defined, we specify the current 'href', so that repetition is not needed by the user. // If the url is absolute, we can bypass the logic to prepend the basePath. if ((0, _utils.isAbsoluteUrl)(as)) { childProps.href = as; } else if (!legacyBehavior || passHref || child.type === 'a' && !('href' in child.props)) { childProps.href = (0, _addbasepath.addBasePath)(as); } return legacyBehavior ? /*#__PURE__*/ _react.default.cloneElement(child, childProps) : /*#__PURE__*/ (0, _jsxruntime.jsx)("a", { ...restProps, ...childProps, children: children }); }); const _default = Link; if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=link.js.map }}), }]); //# sourceMappingURL=_b22dc9._.js.map