diff --git a/.wrangler/tmp/bundle-Gfko8A/checked-fetch.js b/.wrangler/tmp/bundle-Gfko8A/checked-fetch.js new file mode 100644 index 0000000..cf630c0 --- /dev/null +++ b/.wrangler/tmp/bundle-Gfko8A/checked-fetch.js @@ -0,0 +1,30 @@ +const urls = new Set(); + +function checkURL(request, init) { + const url = + request instanceof URL + ? request + : new URL( + (typeof request === "string" + ? new Request(request, init) + : request + ).url + ); + if (url.port && url.port !== "443" && url.protocol === "https:") { + if (!urls.has(url.toString())) { + urls.add(url.toString()); + console.warn( + `WARNING: known issue with \`fetch()\` requests to custom HTTPS ports in published Workers:\n` + + ` - ${url.toString()} - the custom port will be ignored when the Worker is published using the \`wrangler deploy\` command.\n` + ); + } + } +} + +globalThis.fetch = new Proxy(globalThis.fetch, { + apply(target, thisArg, argArray) { + const [request, init] = argArray; + checkURL(request, init); + return Reflect.apply(target, thisArg, argArray); + }, +}); diff --git a/.wrangler/tmp/bundle-Gfko8A/middleware-insertion-facade.js b/.wrangler/tmp/bundle-Gfko8A/middleware-insertion-facade.js new file mode 100644 index 0000000..643b546 --- /dev/null +++ b/.wrangler/tmp/bundle-Gfko8A/middleware-insertion-facade.js @@ -0,0 +1,11 @@ + import worker, * as OTHER_EXPORTS from "/Users/michael/Lab/tractor-store-blueprint/src/server.cloudflare.js"; + import * as __MIDDLEWARE_0__ from "/Users/michael/Lab/tractor-store-blueprint/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts"; +import * as __MIDDLEWARE_1__ from "/Users/michael/Lab/tractor-store-blueprint/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts"; + + worker.middleware = [ + __MIDDLEWARE_0__.default,__MIDDLEWARE_1__.default, + ...(worker.middleware ?? []), + ].filter(Boolean); + + export * from "/Users/michael/Lab/tractor-store-blueprint/src/server.cloudflare.js"; + export default worker; \ No newline at end of file diff --git a/.wrangler/tmp/bundle-Gfko8A/middleware-loader.entry.ts b/.wrangler/tmp/bundle-Gfko8A/middleware-loader.entry.ts new file mode 100644 index 0000000..b8e85f3 --- /dev/null +++ b/.wrangler/tmp/bundle-Gfko8A/middleware-loader.entry.ts @@ -0,0 +1,133 @@ +// This loads all middlewares exposed on the middleware object and then starts +// the invocation chain. The big idea is that we can add these to the middleware +// export dynamically through wrangler, or we can potentially let users directly +// add them as a sort of "plugin" system. + +import ENTRY from "/Users/michael/Lab/tractor-store-blueprint/.wrangler/tmp/bundle-Gfko8A/middleware-insertion-facade.js"; +import { __facade_invoke__, __facade_register__, Dispatcher } from "/Users/michael/Lab/tractor-store-blueprint/node_modules/wrangler/templates/middleware/common.ts"; +import type { + WithMiddleware, + WorkerEntrypointConstructor, +} from "/Users/michael/Lab/tractor-store-blueprint/.wrangler/tmp/bundle-Gfko8A/middleware-insertion-facade.js"; + +// Preserve all the exports from the worker +export * from "/Users/michael/Lab/tractor-store-blueprint/.wrangler/tmp/bundle-Gfko8A/middleware-insertion-facade.js"; + +class __Facade_ScheduledController__ implements ScheduledController { + readonly #noRetry: ScheduledController["noRetry"]; + + constructor( + readonly scheduledTime: number, + readonly cron: string, + noRetry: ScheduledController["noRetry"] + ) { + this.#noRetry = noRetry; + } + + noRetry() { + if (!(this instanceof __Facade_ScheduledController__)) { + throw new TypeError("Illegal invocation"); + } + // Need to call native method immediately in case uncaught error thrown + this.#noRetry(); + } +} + +function wrapExportedHandler( + worker: WithMiddleware +): ExportedHandler { + // If we don't have any middleware defined, just return the handler as is + if (worker.middleware === undefined || worker.middleware.length === 0) { + return worker; + } + // Otherwise, register all middleware once + for (const middleware of worker.middleware) { + __facade_register__(middleware); + } + + const fetchDispatcher: ExportedHandlerFetchHandler = function ( + request, + env, + ctx + ) { + if (worker.fetch === undefined) { + throw new Error("Handler does not export a fetch() function."); + } + return worker.fetch(request, env, ctx); + }; + + return { + ...worker, + fetch(request, env, ctx) { + const dispatcher: Dispatcher = function (type, init) { + if (type === "scheduled" && worker.scheduled !== undefined) { + const controller = new __Facade_ScheduledController__( + Date.now(), + init.cron ?? "", + () => {} + ); + return worker.scheduled(controller, env, ctx); + } + }; + return __facade_invoke__(request, env, ctx, dispatcher, fetchDispatcher); + }, + }; +} + +function wrapWorkerEntrypoint( + klass: WithMiddleware +): WorkerEntrypointConstructor { + // If we don't have any middleware defined, just return the handler as is + if (klass.middleware === undefined || klass.middleware.length === 0) { + return klass; + } + // Otherwise, register all middleware once + for (const middleware of klass.middleware) { + __facade_register__(middleware); + } + + // `extend`ing `klass` here so other RPC methods remain callable + return class extends klass { + #fetchDispatcher: ExportedHandlerFetchHandler> = ( + request, + env, + ctx + ) => { + this.env = env; + this.ctx = ctx; + if (super.fetch === undefined) { + throw new Error("Entrypoint class does not define a fetch() function."); + } + return super.fetch(request); + }; + + #dispatcher: Dispatcher = (type, init) => { + if (type === "scheduled" && super.scheduled !== undefined) { + const controller = new __Facade_ScheduledController__( + Date.now(), + init.cron ?? "", + () => {} + ); + return super.scheduled(controller); + } + }; + + fetch(request: Request) { + return __facade_invoke__( + request, + this.env, + this.ctx, + this.#dispatcher, + this.#fetchDispatcher + ); + } + }; +} + +let WRAPPED_ENTRY: ExportedHandler | WorkerEntrypointConstructor | undefined; +if (typeof ENTRY === "object") { + WRAPPED_ENTRY = wrapExportedHandler(ENTRY); +} else if (typeof ENTRY === "function") { + WRAPPED_ENTRY = wrapWorkerEntrypoint(ENTRY); +} +export default WRAPPED_ENTRY; diff --git a/.wrangler/tmp/dev-a8NxoR/server.cloudflare.js b/.wrangler/tmp/dev-a8NxoR/server.cloudflare.js new file mode 100644 index 0000000..0b629ba --- /dev/null +++ b/.wrangler/tmp/dev-a8NxoR/server.cloudflare.js @@ -0,0 +1,4684 @@ +var __freeze = Object.freeze; +var __defProp = Object.defineProperty; +var __template = (cooked, raw2) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw2 || cooked.slice()) })); + +// .wrangler/tmp/bundle-Gfko8A/checked-fetch.js +var urls = /* @__PURE__ */ new Set(); +function checkURL(request, init) { + const url = request instanceof URL ? request : new URL( + (typeof request === "string" ? new Request(request, init) : request).url + ); + if (url.port && url.port !== "443" && url.protocol === "https:") { + if (!urls.has(url.toString())) { + urls.add(url.toString()); + console.warn( + `WARNING: known issue with \`fetch()\` requests to custom HTTPS ports in published Workers: + - ${url.toString()} - the custom port will be ignored when the Worker is published using the \`wrangler deploy\` command. +` + ); + } + } +} +globalThis.fetch = new Proxy(globalThis.fetch, { + apply(target, thisArg, argArray) { + const [request, init] = argArray; + checkURL(request, init); + return Reflect.apply(target, thisArg, argArray); + } +}); + +// node_modules/hono/dist/utils/html.js +var HtmlEscapedCallbackPhase = { + Stringify: 1, + BeforeStream: 2, + Stream: 3 +}; +var raw = (value, callbacks) => { + const escapedString = new String(value); + escapedString.isEscaped = true; + escapedString.callbacks = callbacks; + return escapedString; +}; +var resolveCallback = async (str, phase, preserveCallbacks, context, buffer) => { + const callbacks = str.callbacks; + if (!callbacks?.length) { + return Promise.resolve(str); + } + if (buffer) { + buffer[0] += str; + } else { + buffer = [str]; + } + const resStr = Promise.all(callbacks.map((c) => c({ phase, buffer, context }))).then( + (res) => Promise.all( + res.filter(Boolean).map((str2) => resolveCallback(str2, phase, false, context, buffer)) + ).then(() => buffer[0]) + ); + if (preserveCallbacks) { + return raw(await resStr, callbacks); + } else { + return resStr; + } +}; + +// node_modules/hono/dist/context.js +var TEXT_PLAIN = "text/plain; charset=UTF-8"; +var setHeaders = (headers, map = {}) => { + Object.entries(map).forEach(([key, value]) => headers.set(key, value)); + return headers; +}; +var Context = class { + req; + env = {}; + _var = {}; + finalized = false; + error = void 0; + #status = 200; + #executionCtx; + #headers = void 0; + #preparedHeaders = void 0; + #res; + #isFresh = true; + layout = void 0; + renderer = (content) => this.html(content); + notFoundHandler = () => new Response(); + constructor(req, options) { + this.req = req; + if (options) { + this.#executionCtx = options.executionCtx; + this.env = options.env; + if (options.notFoundHandler) { + this.notFoundHandler = options.notFoundHandler; + } + } + } + get event() { + if (this.#executionCtx && "respondWith" in this.#executionCtx) { + return this.#executionCtx; + } else { + throw Error("This context has no FetchEvent"); + } + } + get executionCtx() { + if (this.#executionCtx) { + return this.#executionCtx; + } else { + throw Error("This context has no ExecutionContext"); + } + } + get res() { + this.#isFresh = false; + return this.#res ||= new Response("404 Not Found", { status: 404 }); + } + set res(_res) { + this.#isFresh = false; + if (this.#res && _res) { + this.#res.headers.delete("content-type"); + for (const [k, v] of this.#res.headers.entries()) { + if (k === "set-cookie") { + const cookies = this.#res.headers.getSetCookie(); + _res.headers.delete("set-cookie"); + for (const cookie of cookies) { + _res.headers.append("set-cookie", cookie); + } + } else { + _res.headers.set(k, v); + } + } + } + this.#res = _res; + this.finalized = true; + } + render = (...args) => this.renderer(...args); + setLayout = (layout) => this.layout = layout; + getLayout = () => this.layout; + setRenderer = (renderer) => { + this.renderer = renderer; + }; + header = (name, value, options) => { + if (value === void 0) { + if (this.#headers) { + this.#headers.delete(name); + } else if (this.#preparedHeaders) { + delete this.#preparedHeaders[name.toLocaleLowerCase()]; + } + if (this.finalized) { + this.res.headers.delete(name); + } + return; + } + if (options?.append) { + if (!this.#headers) { + this.#isFresh = false; + this.#headers = new Headers(this.#preparedHeaders); + this.#preparedHeaders = {}; + } + this.#headers.append(name, value); + } else { + if (this.#headers) { + this.#headers.set(name, value); + } else { + this.#preparedHeaders ??= {}; + this.#preparedHeaders[name.toLowerCase()] = value; + } + } + if (this.finalized) { + if (options?.append) { + this.res.headers.append(name, value); + } else { + this.res.headers.set(name, value); + } + } + }; + status = (status) => { + this.#isFresh = false; + this.#status = status; + }; + set = (key, value) => { + this._var ??= {}; + this._var[key] = value; + }; + get = (key) => { + return this._var ? this._var[key] : void 0; + }; + get var() { + return { ...this._var }; + } + newResponse = (data, arg, headers) => { + if (this.#isFresh && !headers && !arg && this.#status === 200) { + return new Response(data, { + headers: this.#preparedHeaders + }); + } + if (arg && typeof arg !== "number") { + const header = new Headers(arg.headers); + if (this.#headers) { + this.#headers.forEach((v, k) => { + header.set(k, v); + }); + } + const headers2 = setHeaders(header, this.#preparedHeaders); + return new Response(data, { + headers: headers2, + status: arg.status ?? this.#status + }); + } + const status = typeof arg === "number" ? arg : this.#status; + this.#preparedHeaders ??= {}; + this.#headers ??= new Headers(); + setHeaders(this.#headers, this.#preparedHeaders); + if (this.#res) { + this.#res.headers.forEach((v, k) => { + this.#headers?.set(k, v); + }); + setHeaders(this.#headers, this.#preparedHeaders); + } + headers ??= {}; + for (const [k, v] of Object.entries(headers)) { + if (typeof v === "string") { + this.#headers.set(k, v); + } else { + this.#headers.delete(k); + for (const v2 of v) { + this.#headers.append(k, v2); + } + } + } + return new Response(data, { + status, + headers: this.#headers + }); + }; + body = (data, arg, headers) => { + return typeof arg === "number" ? this.newResponse(data, arg, headers) : this.newResponse(data, arg); + }; + text = (text, arg, headers) => { + if (!this.#preparedHeaders) { + if (this.#isFresh && !headers && !arg) { + return new Response(text); + } + this.#preparedHeaders = {}; + } + this.#preparedHeaders["content-type"] = TEXT_PLAIN; + return typeof arg === "number" ? this.newResponse(text, arg, headers) : this.newResponse(text, arg); + }; + json = (object, arg, headers) => { + const body = JSON.stringify(object); + this.#preparedHeaders ??= {}; + this.#preparedHeaders["content-type"] = "application/json; charset=UTF-8"; + return typeof arg === "number" ? this.newResponse(body, arg, headers) : this.newResponse(body, arg); + }; + html = (html4, arg, headers) => { + this.#preparedHeaders ??= {}; + this.#preparedHeaders["content-type"] = "text/html; charset=UTF-8"; + if (typeof html4 === "object") { + if (!(html4 instanceof Promise)) { + html4 = html4.toString(); + } + if (html4 instanceof Promise) { + return html4.then((html22) => resolveCallback(html22, HtmlEscapedCallbackPhase.Stringify, false, {})).then((html22) => { + return typeof arg === "number" ? this.newResponse(html22, arg, headers) : this.newResponse(html22, arg); + }); + } + } + return typeof arg === "number" ? this.newResponse(html4, arg, headers) : this.newResponse(html4, arg); + }; + redirect = (location, status = 302) => { + this.#headers ??= new Headers(); + this.#headers.set("Location", location); + return this.newResponse(null, status); + }; + notFound = () => { + return this.notFoundHandler(this); + }; +}; + +// node_modules/hono/dist/compose.js +var compose = (middleware, onError, onNotFound) => { + return (context, next) => { + let index = -1; + return dispatch(0); + async function dispatch(i) { + if (i <= index) { + throw new Error("next() called multiple times"); + } + index = i; + let res; + let isError = false; + let handler; + if (middleware[i]) { + handler = middleware[i][0][0]; + if (context instanceof Context) { + context.req.routeIndex = i; + } + } else { + handler = i === middleware.length && next || void 0; + } + if (!handler) { + if (context instanceof Context && context.finalized === false && onNotFound) { + res = await onNotFound(context); + } + } else { + try { + res = await handler(context, () => { + return dispatch(i + 1); + }); + } catch (err) { + if (err instanceof Error && context instanceof Context && onError) { + context.error = err; + res = await onError(err, context); + isError = true; + } else { + throw err; + } + } + } + if (res && (context.finalized === false || isError)) { + context.res = res; + } + return context; + } + }; +}; + +// node_modules/hono/dist/http-exception.js +var HTTPException = class extends Error { + res; + status; + constructor(status = 500, options) { + super(options?.message, { cause: options?.cause }); + this.res = options?.res; + this.status = status; + } + getResponse() { + if (this.res) { + return this.res; + } + return new Response(this.message, { + status: this.status + }); + } +}; + +// node_modules/hono/dist/utils/body.js +var parseBody = async (request, options = { all: false }) => { + const headers = request instanceof HonoRequest ? request.raw.headers : request.headers; + const contentType = headers.get("Content-Type"); + if (isFormDataContent(contentType)) { + return parseFormData(request, options); + } + return {}; +}; +function isFormDataContent(contentType) { + if (contentType === null) { + return false; + } + return contentType.startsWith("multipart/form-data") || contentType.startsWith("application/x-www-form-urlencoded"); +} +async function parseFormData(request, options) { + const formData = await request.formData(); + if (formData) { + return convertFormDataToBodyData(formData, options); + } + return {}; +} +function convertFormDataToBodyData(formData, options) { + const form = {}; + formData.forEach((value, key) => { + const shouldParseAllValues = options.all || key.endsWith("[]"); + if (!shouldParseAllValues) { + form[key] = value; + } else { + handleParsingAllValues(form, key, value); + } + }); + return form; +} +var handleParsingAllValues = (form, key, value) => { + if (form[key] && isArrayField(form[key])) { + appendToExistingArray(form[key], value); + } else if (form[key]) { + convertToNewArray(form, key, value); + } else { + form[key] = value; + } +}; +function isArrayField(field) { + return Array.isArray(field); +} +var appendToExistingArray = (arr, value) => { + arr.push(value); +}; +var convertToNewArray = (form, key, value) => { + form[key] = [form[key], value]; +}; + +// node_modules/hono/dist/utils/url.js +var splitPath = (path) => { + const paths = path.split("/"); + if (paths[0] === "") { + paths.shift(); + } + return paths; +}; +var splitRoutingPath = (routePath) => { + const { groups, path } = extractGroupsFromPath(routePath); + const paths = splitPath(path); + return replaceGroupMarks(paths, groups); +}; +var extractGroupsFromPath = (path) => { + const groups = []; + path = path.replace(/\{[^}]+\}/g, (match, index) => { + const mark = `@${index}`; + groups.push([mark, match]); + return mark; + }); + return { groups, path }; +}; +var replaceGroupMarks = (paths, groups) => { + for (let i = groups.length - 1; i >= 0; i--) { + const [mark] = groups[i]; + for (let j = paths.length - 1; j >= 0; j--) { + if (paths[j].includes(mark)) { + paths[j] = paths[j].replace(mark, groups[i][1]); + break; + } + } + } + return paths; +}; +var patternCache = {}; +var getPattern = (label) => { + if (label === "*") { + return "*"; + } + const match = label.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/); + if (match) { + if (!patternCache[label]) { + if (match[2]) { + patternCache[label] = [label, match[1], new RegExp("^" + match[2] + "$")]; + } else { + patternCache[label] = [label, match[1], true]; + } + } + return patternCache[label]; + } + return null; +}; +var getPath = (request) => { + const url = request.url; + const queryIndex = url.indexOf("?", 8); + return url.slice(url.indexOf("/", 8), queryIndex === -1 ? void 0 : queryIndex); +}; +var getQueryStrings = (url) => { + const queryIndex = url.indexOf("?", 8); + return queryIndex === -1 ? "" : "?" + url.slice(queryIndex + 1); +}; +var getPathNoStrict = (request) => { + const result = getPath(request); + return result.length > 1 && result[result.length - 1] === "/" ? result.slice(0, -1) : result; +}; +var mergePath = (...paths) => { + let p = ""; + let endsWithSlash = false; + for (let path of paths) { + if (p[p.length - 1] === "/") { + p = p.slice(0, -1); + endsWithSlash = true; + } + if (path[0] !== "/") { + path = `/${path}`; + } + if (path === "/" && endsWithSlash) { + p = `${p}/`; + } else if (path !== "/") { + p = `${p}${path}`; + } + if (path === "/" && p === "") { + p = "/"; + } + } + return p; +}; +var checkOptionalParameter = (path) => { + if (!path.match(/\:.+\?$/)) { + return null; + } + const segments = path.split("/"); + const results = []; + let basePath = ""; + segments.forEach((segment) => { + if (segment !== "" && !/\:/.test(segment)) { + basePath += "/" + segment; + } else if (/\:/.test(segment)) { + if (/\?/.test(segment)) { + if (results.length === 0 && basePath === "") { + results.push("/"); + } else { + results.push(basePath); + } + const optionalSegment = segment.replace("?", ""); + basePath += "/" + optionalSegment; + results.push(basePath); + } else { + basePath += "/" + segment; + } + } + }); + return results.filter((v, i, a) => a.indexOf(v) === i); +}; +var _decodeURI = (value) => { + if (!/[%+]/.test(value)) { + return value; + } + if (value.indexOf("+") !== -1) { + value = value.replace(/\+/g, " "); + } + return /%/.test(value) ? decodeURIComponent_(value) : value; +}; +var _getQueryParam = (url, key, multiple) => { + let encoded; + if (!multiple && key && !/[%+]/.test(key)) { + let keyIndex2 = url.indexOf(`?${key}`, 8); + if (keyIndex2 === -1) { + keyIndex2 = url.indexOf(`&${key}`, 8); + } + while (keyIndex2 !== -1) { + const trailingKeyCode = url.charCodeAt(keyIndex2 + key.length + 1); + if (trailingKeyCode === 61) { + const valueIndex = keyIndex2 + key.length + 2; + const endIndex = url.indexOf("&", valueIndex); + return _decodeURI(url.slice(valueIndex, endIndex === -1 ? void 0 : endIndex)); + } else if (trailingKeyCode == 38 || isNaN(trailingKeyCode)) { + return ""; + } + keyIndex2 = url.indexOf(`&${key}`, keyIndex2 + 1); + } + encoded = /[%+]/.test(url); + if (!encoded) { + return void 0; + } + } + const results = {}; + encoded ??= /[%+]/.test(url); + let keyIndex = url.indexOf("?", 8); + while (keyIndex !== -1) { + const nextKeyIndex = url.indexOf("&", keyIndex + 1); + let valueIndex = url.indexOf("=", keyIndex); + if (valueIndex > nextKeyIndex && nextKeyIndex !== -1) { + valueIndex = -1; + } + let name = url.slice( + keyIndex + 1, + valueIndex === -1 ? nextKeyIndex === -1 ? void 0 : nextKeyIndex : valueIndex + ); + if (encoded) { + name = _decodeURI(name); + } + keyIndex = nextKeyIndex; + if (name === "") { + continue; + } + let value; + if (valueIndex === -1) { + value = ""; + } else { + value = url.slice(valueIndex + 1, nextKeyIndex === -1 ? void 0 : nextKeyIndex); + if (encoded) { + value = _decodeURI(value); + } + } + if (multiple) { + if (!(results[name] && Array.isArray(results[name]))) { + results[name] = []; + } + ; + results[name].push(value); + } else { + results[name] ??= value; + } + } + return key ? results[key] : results; +}; +var getQueryParam = _getQueryParam; +var getQueryParams = (url, key) => { + return _getQueryParam(url, key, true); +}; +var decodeURIComponent_ = decodeURIComponent; + +// node_modules/hono/dist/request.js +var HonoRequest = class { + raw; + #validatedData; + #matchResult; + routeIndex = 0; + path; + bodyCache = {}; + constructor(request, path = "/", matchResult = [[]]) { + this.raw = request; + this.path = path; + this.#matchResult = matchResult; + this.#validatedData = {}; + } + param(key) { + return key ? this.getDecodedParam(key) : this.getAllDecodedParams(); + } + getDecodedParam(key) { + const paramKey = this.#matchResult[0][this.routeIndex][1][key]; + const param = this.getParamValue(paramKey); + return param ? /\%/.test(param) ? decodeURIComponent_(param) : param : void 0; + } + getAllDecodedParams() { + const decoded = {}; + const keys = Object.keys(this.#matchResult[0][this.routeIndex][1]); + for (const key of keys) { + const value = this.getParamValue(this.#matchResult[0][this.routeIndex][1][key]); + if (value && typeof value === "string") { + decoded[key] = /\%/.test(value) ? decodeURIComponent_(value) : value; + } + } + return decoded; + } + getParamValue(paramKey) { + return this.#matchResult[1] ? this.#matchResult[1][paramKey] : paramKey; + } + query(key) { + return getQueryParam(this.url, key); + } + queries(key) { + return getQueryParams(this.url, key); + } + header(name) { + if (name) { + return this.raw.headers.get(name.toLowerCase()) ?? void 0; + } + const headerData = {}; + this.raw.headers.forEach((value, key) => { + headerData[key] = value; + }); + return headerData; + } + async parseBody(options) { + if (this.bodyCache.parsedBody) { + return this.bodyCache.parsedBody; + } + const parsedBody = await parseBody(this, options); + this.bodyCache.parsedBody = parsedBody; + return parsedBody; + } + cachedBody = (key) => { + const { bodyCache, raw: raw2 } = this; + const cachedBody = bodyCache[key]; + if (cachedBody) { + return cachedBody; + } + if (!bodyCache[key]) { + for (const keyOfBodyCache of Object.keys(bodyCache)) { + if (keyOfBodyCache === "parsedBody") { + continue; + } + return (async () => { + let body = await bodyCache[keyOfBodyCache]; + if (keyOfBodyCache === "json") { + body = JSON.stringify(body); + } + return await new Response(body)[key](); + })(); + } + } + return bodyCache[key] = raw2[key](); + }; + json() { + return this.cachedBody("json"); + } + text() { + return this.cachedBody("text"); + } + arrayBuffer() { + return this.cachedBody("arrayBuffer"); + } + blob() { + return this.cachedBody("blob"); + } + formData() { + return this.cachedBody("formData"); + } + addValidatedData(target, data) { + this.#validatedData[target] = data; + } + valid(target) { + return this.#validatedData[target]; + } + get url() { + return this.raw.url; + } + get method() { + return this.raw.method; + } + get matchedRoutes() { + return this.#matchResult[0].map(([[, route]]) => route); + } + get routePath() { + return this.#matchResult[0].map(([[, route]]) => route)[this.routeIndex].path; + } +}; + +// node_modules/hono/dist/router.js +var METHOD_NAME_ALL = "ALL"; +var METHOD_NAME_ALL_LOWERCASE = "all"; +var METHODS = ["get", "post", "put", "delete", "options", "patch"]; +var MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is already built."; +var UnsupportedPathError = class extends Error { +}; + +// node_modules/hono/dist/hono-base.js +var COMPOSED_HANDLER = Symbol("composedHandler"); +function defineDynamicClass() { + return class { + }; +} +var notFoundHandler = (c) => { + return c.text("404 Not Found", 404); +}; +var errorHandler = (err, c) => { + if (err instanceof HTTPException) { + return err.getResponse(); + } + console.error(err); + return c.text("Internal Server Error", 500); +}; +var Hono = class extends defineDynamicClass() { + router; + getPath; + _basePath = "/"; + #path = "/"; + routes = []; + constructor(options = {}) { + super(); + const allMethods = [...METHODS, METHOD_NAME_ALL_LOWERCASE]; + allMethods.forEach((method) => { + this[method] = (args1, ...args) => { + if (typeof args1 === "string") { + this.#path = args1; + } else { + this.addRoute(method, this.#path, args1); + } + args.forEach((handler) => { + if (typeof handler !== "string") { + this.addRoute(method, this.#path, handler); + } + }); + return this; + }; + }); + this.on = (method, path, ...handlers) => { + if (!method) { + return this; + } + for (const p of [path].flat()) { + this.#path = p; + for (const m of [method].flat()) { + handlers.map((handler) => { + this.addRoute(m.toUpperCase(), this.#path, handler); + }); + } + } + return this; + }; + this.use = (arg1, ...handlers) => { + if (typeof arg1 === "string") { + this.#path = arg1; + } else { + this.#path = "*"; + handlers.unshift(arg1); + } + handlers.forEach((handler) => { + this.addRoute(METHOD_NAME_ALL, this.#path, handler); + }); + return this; + }; + const strict = options.strict ?? true; + delete options.strict; + Object.assign(this, options); + this.getPath = strict ? options.getPath ?? getPath : getPathNoStrict; + } + clone() { + const clone = new Hono({ + router: this.router, + getPath: this.getPath + }); + clone.routes = this.routes; + return clone; + } + notFoundHandler = notFoundHandler; + errorHandler = errorHandler; + route(path, app2) { + const subApp = this.basePath(path); + if (!app2) { + return subApp; + } + app2.routes.map((r2) => { + let handler; + if (app2.errorHandler === errorHandler) { + handler = r2.handler; + } else { + handler = async (c, next) => (await compose([], app2.errorHandler)(c, () => r2.handler(c, next))).res; + handler[COMPOSED_HANDLER] = r2.handler; + } + subApp.addRoute(r2.method, r2.path, handler); + }); + return this; + } + basePath(path) { + const subApp = this.clone(); + subApp._basePath = mergePath(this._basePath, path); + return subApp; + } + onError = (handler) => { + this.errorHandler = handler; + return this; + }; + notFound = (handler) => { + this.notFoundHandler = handler; + return this; + }; + mount(path, applicationHandler, optionHandler) { + const mergedPath = mergePath(this._basePath, path); + const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length; + const handler = async (c, next) => { + let executionContext = void 0; + try { + executionContext = c.executionCtx; + } catch { + } + const options = optionHandler ? optionHandler(c) : [c.env, executionContext]; + const optionsArray = Array.isArray(options) ? options : [options]; + const queryStrings = getQueryStrings(c.req.url); + const res = await applicationHandler( + new Request( + new URL((c.req.path.slice(pathPrefixLength) || "/") + queryStrings, c.req.url), + c.req.raw + ), + ...optionsArray + ); + if (res) { + return res; + } + await next(); + }; + this.addRoute(METHOD_NAME_ALL, mergePath(path, "*"), handler); + return this; + } + addRoute(method, path, handler) { + method = method.toUpperCase(); + path = mergePath(this._basePath, path); + const r2 = { path, method, handler }; + this.router.add(method, path, [handler, r2]); + this.routes.push(r2); + } + matchRoute(method, path) { + return this.router.match(method, path); + } + handleError(err, c) { + if (err instanceof Error) { + return this.errorHandler(err, c); + } + throw err; + } + dispatch(request, executionCtx, env, method) { + if (method === "HEAD") { + return (async () => new Response(null, await this.dispatch(request, executionCtx, env, "GET")))(); + } + const path = this.getPath(request, { env }); + const matchResult = this.matchRoute(method, path); + const c = new Context(new HonoRequest(request, path, matchResult), { + env, + executionCtx, + notFoundHandler: this.notFoundHandler + }); + if (matchResult[0].length === 1) { + let res; + try { + res = matchResult[0][0][0][0](c, async () => { + c.res = await this.notFoundHandler(c); + }); + } catch (err) { + return this.handleError(err, c); + } + return res instanceof Promise ? res.then( + (resolved) => resolved || (c.finalized ? c.res : this.notFoundHandler(c)) + ).catch((err) => this.handleError(err, c)) : res; + } + const composed = compose(matchResult[0], this.errorHandler, this.notFoundHandler); + return (async () => { + try { + const context = await composed(c); + if (!context.finalized) { + throw new Error( + "Context is not finalized. You may forget returning Response object or `await next()`" + ); + } + return context.res; + } catch (err) { + return this.handleError(err, c); + } + })(); + } + fetch = (request, Env, executionCtx) => { + return this.dispatch(request, executionCtx, Env, request.method); + }; + request = (input, requestInit, Env, executionCtx) => { + if (input instanceof Request) { + if (requestInit !== void 0) { + input = new Request(input, requestInit); + } + return this.fetch(input, Env, executionCtx); + } + input = input.toString(); + const path = /^https?:\/\//.test(input) ? input : `http://localhost${mergePath("/", input)}`; + const req = new Request(path, requestInit); + return this.fetch(req, Env, executionCtx); + }; + fire = () => { + addEventListener("fetch", (event) => { + event.respondWith(this.dispatch(event.request, event, void 0, event.request.method)); + }); + }; +}; + +// node_modules/hono/dist/router/reg-exp-router/node.js +var LABEL_REG_EXP_STR = "[^/]+"; +var ONLY_WILDCARD_REG_EXP_STR = ".*"; +var TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)"; +var PATH_ERROR = Symbol(); +var regExpMetaChars = new Set(".\\+*[^]$()"); +function compareKey(a, b) { + if (a.length === 1) { + return b.length === 1 ? a < b ? -1 : 1 : -1; + } + if (b.length === 1) { + return 1; + } + if (a === ONLY_WILDCARD_REG_EXP_STR || a === TAIL_WILDCARD_REG_EXP_STR) { + return 1; + } else if (b === ONLY_WILDCARD_REG_EXP_STR || b === TAIL_WILDCARD_REG_EXP_STR) { + return -1; + } + if (a === LABEL_REG_EXP_STR) { + return 1; + } else if (b === LABEL_REG_EXP_STR) { + return -1; + } + return a.length === b.length ? a < b ? -1 : 1 : b.length - a.length; +} +var Node = class { + index; + varIndex; + children = /* @__PURE__ */ Object.create(null); + insert(tokens, index, paramMap, context, pathErrorCheckOnly) { + if (tokens.length === 0) { + if (this.index !== void 0) { + throw PATH_ERROR; + } + if (pathErrorCheckOnly) { + return; + } + this.index = index; + return; + } + const [token, ...restTokens] = tokens; + const pattern = token === "*" ? restTokens.length === 0 ? ["", "", ONLY_WILDCARD_REG_EXP_STR] : ["", "", LABEL_REG_EXP_STR] : token === "/*" ? ["", "", TAIL_WILDCARD_REG_EXP_STR] : token.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/); + let node; + if (pattern) { + const name = pattern[1]; + let regexpStr = pattern[2] || LABEL_REG_EXP_STR; + if (name && pattern[2]) { + regexpStr = regexpStr.replace(/^\((?!\?:)(?=[^)]+\)$)/, "(?:"); + if (/\((?!\?:)/.test(regexpStr)) { + throw PATH_ERROR; + } + } + node = this.children[regexpStr]; + if (!node) { + if (Object.keys(this.children).some( + (k) => k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR + )) { + throw PATH_ERROR; + } + if (pathErrorCheckOnly) { + return; + } + node = this.children[regexpStr] = new Node(); + if (name !== "") { + node.varIndex = context.varIndex++; + } + } + if (!pathErrorCheckOnly && name !== "") { + paramMap.push([name, node.varIndex]); + } + } else { + node = this.children[token]; + if (!node) { + if (Object.keys(this.children).some( + (k) => k.length > 1 && k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR + )) { + throw PATH_ERROR; + } + if (pathErrorCheckOnly) { + return; + } + node = this.children[token] = new Node(); + } + } + node.insert(restTokens, index, paramMap, context, pathErrorCheckOnly); + } + buildRegExpStr() { + const childKeys = Object.keys(this.children).sort(compareKey); + const strList = childKeys.map((k) => { + const c = this.children[k]; + return (typeof c.varIndex === "number" ? `(${k})@${c.varIndex}` : regExpMetaChars.has(k) ? `\\${k}` : k) + c.buildRegExpStr(); + }); + if (typeof this.index === "number") { + strList.unshift(`#${this.index}`); + } + if (strList.length === 0) { + return ""; + } + if (strList.length === 1) { + return strList[0]; + } + return "(?:" + strList.join("|") + ")"; + } +}; + +// node_modules/hono/dist/router/reg-exp-router/trie.js +var Trie = class { + context = { varIndex: 0 }; + root = new Node(); + insert(path, index, pathErrorCheckOnly) { + const paramAssoc = []; + const groups = []; + for (let i = 0; ; ) { + let replaced = false; + path = path.replace(/\{[^}]+\}/g, (m) => { + const mark = `@\\${i}`; + groups[i] = [mark, m]; + i++; + replaced = true; + return mark; + }); + if (!replaced) { + break; + } + } + const tokens = path.match(/(?::[^\/]+)|(?:\/\*$)|./g) || []; + for (let i = groups.length - 1; i >= 0; i--) { + const [mark] = groups[i]; + for (let j = tokens.length - 1; j >= 0; j--) { + if (tokens[j].indexOf(mark) !== -1) { + tokens[j] = tokens[j].replace(mark, groups[i][1]); + break; + } + } + } + this.root.insert(tokens, index, paramAssoc, this.context, pathErrorCheckOnly); + return paramAssoc; + } + buildRegExp() { + let regexp = this.root.buildRegExpStr(); + if (regexp === "") { + return [/^$/, [], []]; + } + let captureIndex = 0; + const indexReplacementMap = []; + const paramReplacementMap = []; + regexp = regexp.replace(/#(\d+)|@(\d+)|\.\*\$/g, (_, handlerIndex, paramIndex) => { + if (typeof handlerIndex !== "undefined") { + indexReplacementMap[++captureIndex] = Number(handlerIndex); + return "$()"; + } + if (typeof paramIndex !== "undefined") { + paramReplacementMap[Number(paramIndex)] = ++captureIndex; + return ""; + } + return ""; + }); + return [new RegExp(`^${regexp}`), indexReplacementMap, paramReplacementMap]; + } +}; + +// node_modules/hono/dist/router/reg-exp-router/router.js +var emptyParam = []; +var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)]; +var wildcardRegExpCache = /* @__PURE__ */ Object.create(null); +function buildWildcardRegExp(path) { + return wildcardRegExpCache[path] ??= new RegExp( + path === "*" ? "" : `^${path.replace( + /\/\*$|([.\\+*[^\]$()])/g, + (_, metaChar) => metaChar ? `\\${metaChar}` : "(?:|/.*)" + )}$` + ); +} +function clearWildcardRegExpCache() { + wildcardRegExpCache = /* @__PURE__ */ Object.create(null); +} +function buildMatcherFromPreprocessedRoutes(routes) { + const trie = new Trie(); + const handlerData = []; + if (routes.length === 0) { + return nullMatcher; + } + const routesWithStaticPathFlag = routes.map( + (route) => [!/\*|\/:/.test(route[0]), ...route] + ).sort( + ([isStaticA, pathA], [isStaticB, pathB]) => isStaticA ? 1 : isStaticB ? -1 : pathA.length - pathB.length + ); + const staticMap = /* @__PURE__ */ Object.create(null); + for (let i = 0, j = -1, len = routesWithStaticPathFlag.length; i < len; i++) { + const [pathErrorCheckOnly, path, handlers] = routesWithStaticPathFlag[i]; + if (pathErrorCheckOnly) { + staticMap[path] = [handlers.map(([h]) => [h, /* @__PURE__ */ Object.create(null)]), emptyParam]; + } else { + j++; + } + let paramAssoc; + try { + paramAssoc = trie.insert(path, j, pathErrorCheckOnly); + } catch (e) { + throw e === PATH_ERROR ? new UnsupportedPathError(path) : e; + } + if (pathErrorCheckOnly) { + continue; + } + handlerData[j] = handlers.map(([h, paramCount]) => { + const paramIndexMap = /* @__PURE__ */ Object.create(null); + paramCount -= 1; + for (; paramCount >= 0; paramCount--) { + const [key, value] = paramAssoc[paramCount]; + paramIndexMap[key] = value; + } + return [h, paramIndexMap]; + }); + } + const [regexp, indexReplacementMap, paramReplacementMap] = trie.buildRegExp(); + for (let i = 0, len = handlerData.length; i < len; i++) { + for (let j = 0, len2 = handlerData[i].length; j < len2; j++) { + const map = handlerData[i][j]?.[1]; + if (!map) { + continue; + } + const keys = Object.keys(map); + for (let k = 0, len3 = keys.length; k < len3; k++) { + map[keys[k]] = paramReplacementMap[map[keys[k]]]; + } + } + } + const handlerMap = []; + for (const i in indexReplacementMap) { + handlerMap[i] = handlerData[indexReplacementMap[i]]; + } + return [regexp, handlerMap, staticMap]; +} +function findMiddleware(middleware, path) { + if (!middleware) { + return void 0; + } + for (const k of Object.keys(middleware).sort((a, b) => b.length - a.length)) { + if (buildWildcardRegExp(k).test(path)) { + return [...middleware[k]]; + } + } + return void 0; +} +var RegExpRouter = class { + name = "RegExpRouter"; + middleware; + routes; + constructor() { + this.middleware = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) }; + this.routes = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) }; + } + add(method, path, handler) { + const { middleware, routes } = this; + if (!middleware || !routes) { + throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT); + } + if (!middleware[method]) { + ; + [middleware, routes].forEach((handlerMap) => { + handlerMap[method] = /* @__PURE__ */ Object.create(null); + Object.keys(handlerMap[METHOD_NAME_ALL]).forEach((p) => { + handlerMap[method][p] = [...handlerMap[METHOD_NAME_ALL][p]]; + }); + }); + } + if (path === "/*") { + path = "*"; + } + const paramCount = (path.match(/\/:/g) || []).length; + if (/\*$/.test(path)) { + const re = buildWildcardRegExp(path); + if (method === METHOD_NAME_ALL) { + Object.keys(middleware).forEach((m) => { + middleware[m][path] ||= findMiddleware(middleware[m], path) || findMiddleware(middleware[METHOD_NAME_ALL], path) || []; + }); + } else { + middleware[method][path] ||= findMiddleware(middleware[method], path) || findMiddleware(middleware[METHOD_NAME_ALL], path) || []; + } + Object.keys(middleware).forEach((m) => { + if (method === METHOD_NAME_ALL || method === m) { + Object.keys(middleware[m]).forEach((p) => { + re.test(p) && middleware[m][p].push([handler, paramCount]); + }); + } + }); + Object.keys(routes).forEach((m) => { + if (method === METHOD_NAME_ALL || method === m) { + Object.keys(routes[m]).forEach( + (p) => re.test(p) && routes[m][p].push([handler, paramCount]) + ); + } + }); + return; + } + const paths = checkOptionalParameter(path) || [path]; + for (let i = 0, len = paths.length; i < len; i++) { + const path2 = paths[i]; + Object.keys(routes).forEach((m) => { + if (method === METHOD_NAME_ALL || method === m) { + routes[m][path2] ||= [ + ...findMiddleware(middleware[m], path2) || findMiddleware(middleware[METHOD_NAME_ALL], path2) || [] + ]; + routes[m][path2].push([handler, paramCount - len + i + 1]); + } + }); + } + } + match(method, path) { + clearWildcardRegExpCache(); + const matchers = this.buildAllMatchers(); + this.match = (method2, path2) => { + const matcher = matchers[method2] || matchers[METHOD_NAME_ALL]; + const staticMatch = matcher[2][path2]; + if (staticMatch) { + return staticMatch; + } + const match = path2.match(matcher[0]); + if (!match) { + return [[], emptyParam]; + } + const index = match.indexOf("", 1); + return [matcher[1][index], match]; + }; + return this.match(method, path); + } + buildAllMatchers() { + const matchers = /* @__PURE__ */ Object.create(null); + [...Object.keys(this.routes), ...Object.keys(this.middleware)].forEach((method) => { + matchers[method] ||= this.buildMatcher(method); + }); + this.middleware = this.routes = void 0; + return matchers; + } + buildMatcher(method) { + const routes = []; + let hasOwnRoute = method === METHOD_NAME_ALL; + [this.middleware, this.routes].forEach((r2) => { + const ownRoute = r2[method] ? Object.keys(r2[method]).map((path) => [path, r2[method][path]]) : []; + if (ownRoute.length !== 0) { + hasOwnRoute ||= true; + routes.push(...ownRoute); + } else if (method !== METHOD_NAME_ALL) { + routes.push( + ...Object.keys(r2[METHOD_NAME_ALL]).map((path) => [path, r2[METHOD_NAME_ALL][path]]) + ); + } + }); + if (!hasOwnRoute) { + return null; + } else { + return buildMatcherFromPreprocessedRoutes(routes); + } + } +}; + +// node_modules/hono/dist/router/smart-router/router.js +var SmartRouter = class { + name = "SmartRouter"; + routers = []; + routes = []; + constructor(init) { + Object.assign(this, init); + } + add(method, path, handler) { + if (!this.routes) { + throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT); + } + this.routes.push([method, path, handler]); + } + match(method, path) { + if (!this.routes) { + throw new Error("Fatal error"); + } + const { routers, routes } = this; + const len = routers.length; + let i = 0; + let res; + for (; i < len; i++) { + const router = routers[i]; + try { + routes.forEach((args) => { + router.add(...args); + }); + res = router.match(method, path); + } catch (e) { + if (e instanceof UnsupportedPathError) { + continue; + } + throw e; + } + this.match = router.match.bind(router); + this.routers = [router]; + this.routes = void 0; + break; + } + if (i === len) { + throw new Error("Fatal error"); + } + this.name = `SmartRouter + ${this.activeRouter.name}`; + return res; + } + get activeRouter() { + if (this.routes || this.routers.length !== 1) { + throw new Error("No active router has been determined yet."); + } + return this.routers[0]; + } +}; + +// node_modules/hono/dist/router/trie-router/node.js +var Node2 = class { + methods; + children; + patterns; + order = 0; + name; + params = /* @__PURE__ */ Object.create(null); + constructor(method, handler, children) { + this.children = children || /* @__PURE__ */ Object.create(null); + this.methods = []; + this.name = ""; + if (method && handler) { + const m = /* @__PURE__ */ Object.create(null); + m[method] = { handler, possibleKeys: [], score: 0, name: this.name }; + this.methods = [m]; + } + this.patterns = []; + } + insert(method, path, handler) { + this.name = `${method} ${path}`; + this.order = ++this.order; + let curNode = this; + const parts = splitRoutingPath(path); + const possibleKeys = []; + for (let i = 0, len = parts.length; i < len; i++) { + const p = parts[i]; + if (Object.keys(curNode.children).includes(p)) { + curNode = curNode.children[p]; + const pattern2 = getPattern(p); + if (pattern2) { + possibleKeys.push(pattern2[1]); + } + continue; + } + curNode.children[p] = new Node2(); + const pattern = getPattern(p); + if (pattern) { + curNode.patterns.push(pattern); + possibleKeys.push(pattern[1]); + } + curNode = curNode.children[p]; + } + if (!curNode.methods.length) { + curNode.methods = []; + } + const m = /* @__PURE__ */ Object.create(null); + const handlerSet = { + handler, + possibleKeys: possibleKeys.filter((v, i, a) => a.indexOf(v) === i), + name: this.name, + score: this.order + }; + m[method] = handlerSet; + curNode.methods.push(m); + return curNode; + } + gHSets(node, method, nodeParams, params) { + const handlerSets = []; + for (let i = 0, len = node.methods.length; i < len; i++) { + const m = node.methods[i]; + const handlerSet = m[method] || m[METHOD_NAME_ALL]; + const processedSet = /* @__PURE__ */ Object.create(null); + if (handlerSet !== void 0) { + handlerSet.params = /* @__PURE__ */ Object.create(null); + handlerSet.possibleKeys.forEach((key) => { + const processed = processedSet[handlerSet.name]; + handlerSet.params[key] = params[key] && !processed ? params[key] : nodeParams[key] ?? params[key]; + processedSet[handlerSet.name] = true; + }); + handlerSets.push(handlerSet); + } + } + return handlerSets; + } + search(method, path) { + const handlerSets = []; + this.params = /* @__PURE__ */ Object.create(null); + const curNode = this; + let curNodes = [curNode]; + const parts = splitPath(path); + for (let i = 0, len = parts.length; i < len; i++) { + const part = parts[i]; + const isLast = i === len - 1; + const tempNodes = []; + for (let j = 0, len2 = curNodes.length; j < len2; j++) { + const node = curNodes[j]; + const nextNode = node.children[part]; + if (nextNode) { + nextNode.params = node.params; + if (isLast === true) { + if (nextNode.children["*"]) { + handlerSets.push( + ...this.gHSets(nextNode.children["*"], method, node.params, /* @__PURE__ */ Object.create(null)) + ); + } + handlerSets.push(...this.gHSets(nextNode, method, node.params, /* @__PURE__ */ Object.create(null))); + } else { + tempNodes.push(nextNode); + } + } + for (let k = 0, len3 = node.patterns.length; k < len3; k++) { + const pattern = node.patterns[k]; + const params = { ...node.params }; + if (pattern === "*") { + const astNode = node.children["*"]; + if (astNode) { + handlerSets.push(...this.gHSets(astNode, method, node.params, /* @__PURE__ */ Object.create(null))); + tempNodes.push(astNode); + } + continue; + } + if (part === "") { + continue; + } + const [key, name, matcher] = pattern; + const child = node.children[key]; + const restPathString = parts.slice(i).join("/"); + if (matcher instanceof RegExp && matcher.test(restPathString)) { + params[name] = restPathString; + handlerSets.push(...this.gHSets(child, method, node.params, params)); + continue; + } + if (matcher === true || matcher instanceof RegExp && matcher.test(part)) { + if (typeof key === "string") { + params[name] = part; + if (isLast === true) { + handlerSets.push(...this.gHSets(child, method, params, node.params)); + if (child.children["*"]) { + handlerSets.push(...this.gHSets(child.children["*"], method, params, node.params)); + } + } else { + child.params = params; + tempNodes.push(child); + } + } + } + } + } + curNodes = tempNodes; + } + const results = handlerSets.sort((a, b) => { + return a.score - b.score; + }); + return [results.map(({ handler, params }) => [handler, params])]; + } +}; + +// node_modules/hono/dist/router/trie-router/router.js +var TrieRouter = class { + name = "TrieRouter"; + node; + constructor() { + this.node = new Node2(); + } + add(method, path, handler) { + const results = checkOptionalParameter(path); + if (results) { + for (const p of results) { + this.node.insert(method, p, handler); + } + return; + } + this.node.insert(method, path, handler); + } + match(method, path) { + return this.node.search(method, path); + } +}; + +// node_modules/hono/dist/hono.js +var Hono2 = class extends Hono { + constructor(options = {}) { + super(options); + this.router = options.router ?? new SmartRouter({ + routers: [new RegExpRouter(), new TrieRouter()] + }); + } +}; + +// node_modules/hono/dist/utils/color.js +function getColorEnabled() { + const { process: process2, Deno } = globalThis; + const isNoColor = typeof process2 !== "undefined" ? "NO_COLOR" in process2?.env : typeof Deno?.noColor === "boolean" ? Deno.noColor : false; + return !isNoColor; +} + +// node_modules/hono/dist/middleware/logger/index.js +var humanize = (times) => { + const [delimiter, separator] = [",", "."]; + const orderTimes = times.map((v) => v.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1" + delimiter)); + return orderTimes.join(separator); +}; +var time = (start) => { + const delta = Date.now() - start; + return humanize([delta < 1e3 ? delta + "ms" : Math.round(delta / 1e3) + "s"]); +}; +var colorStatus = (status) => { + const colorEnabled = getColorEnabled(); + const out = { + 7: colorEnabled ? `\x1B[35m${status}\x1B[0m` : `${status}`, + 5: colorEnabled ? `\x1B[31m${status}\x1B[0m` : `${status}`, + 4: colorEnabled ? `\x1B[33m${status}\x1B[0m` : `${status}`, + 3: colorEnabled ? `\x1B[36m${status}\x1B[0m` : `${status}`, + 2: colorEnabled ? `\x1B[32m${status}\x1B[0m` : `${status}`, + 1: colorEnabled ? `\x1B[32m${status}\x1B[0m` : `${status}`, + 0: colorEnabled ? `\x1B[33m${status}\x1B[0m` : `${status}` + }; + const calculateStatus = status / 100 | 0; + return out[calculateStatus]; +}; +function log(fn, prefix, method, path, status = 0, elapsed) { + const out = prefix === "<--" ? ` ${prefix} ${method} ${path}` : ` ${prefix} ${method} ${path} ${colorStatus(status)} ${elapsed}`; + fn(out); +} +var logger = (fn = console.log) => { + return async function logger2(c, next) { + const { method } = c.req; + const path = getPath(c.req.raw); + log(fn, "<--", method, path); + const start = Date.now(); + await next(); + log(fn, "-->", method, path, c.res.status, time(start)); + }; +}; + +// src/explore/database/database.json +var database_default = { + teaser: [ + { + title: "Classic Tractors", + image: "/cdn/img/scene/[size]/classics.webp", + url: "/products/classic" + }, + { + title: "Autonomous Tractors", + image: "/cdn/img/scene/[size]/autonomous.webp", + url: "/products/autonomous" + } + ], + categories: [ + { + key: "classic", + name: "Classics", + products: [ + { + name: "Heritage Workhorse", + id: "CL-01", + image: "/cdn/img/product/[size]/CL-01-GR.webp", + startPrice: 5700, + url: "/product/CL-01" + }, + { + name: "Falcon Crest Farm", + id: "CL-02", + image: "/cdn/img/product/[size]/CL-02-BL.webp", + startPrice: 2600, + url: "/product/CL-02" + }, + { + name: "Falcon Crest Work", + id: "CL-03", + image: "/cdn/img/product/[size]/CL-03-GR.webp", + startPrice: 2300, + url: "/product/CL-03" + }, + { + name: "Broadfield Majestic", + id: "CL-04", + image: "/cdn/img/product/[size]/CL-04-BL.webp", + startPrice: 2200, + url: "/product/CL-04" + }, + { + name: "Countryside Commander", + id: "CL-05", + image: "/cdn/img/product/[size]/CL-05-PT.webp", + startPrice: 2700, + url: "/product/CL-05" + }, + { + name: "Danamark Steadfast", + id: "CL-06", + image: "/cdn/img/product/[size]/CL-06-MT.webp", + startPrice: 2800, + url: "/product/CL-06" + }, + { + name: "Greenland Rover", + id: "CL-07", + image: "/cdn/img/product/[size]/CL-07-GR.webp", + startPrice: 2900, + url: "/product/CL-07" + }, + { + name: "Holland Hamster", + id: "CL-08", + image: "/cdn/img/product/[size]/CL-08-GR.webp", + startPrice: 7750, + url: "/product/CL-08" + }, + { + name: "TerraFirma Veneto", + id: "CL-09", + image: "/cdn/img/product/[size]/CL-09-BL.webp", + startPrice: 2950, + url: "/product/CL-09" + }, + { + name: "Global Gallant", + id: "CL-10", + image: "/cdn/img/product/[size]/CL-10-SD.webp", + startPrice: 2600, + url: "/product/CL-10" + }, + { + name: "Scandinavia Sower", + id: "CL-11", + image: "/cdn/img/product/[size]/CL-11-SK.webp", + startPrice: 3100, + url: "/product/CL-11" + }, + { + name: "Celerity Cruiser", + id: "CL-12", + image: "/cdn/img/product/[size]/CL-12-BL.webp", + startPrice: 3200, + url: "/product/CL-12" + }, + { + name: "Rapid Racer", + id: "CL-13", + image: "/cdn/img/product/[size]/CL-13-BL.webp", + startPrice: 7500, + url: "/product/CL-13" + }, + { + name: "Caribbean Cruiser", + id: "CL-14", + image: "/cdn/img/product/[size]/CL-14-GR.webp", + startPrice: 2300, + url: "/product/CL-14" + }, + { + name: "Fieldmaster Classic", + id: "CL-15", + image: "/cdn/img/product/[size]/CL-15-PI.webp", + startPrice: 6200, + url: "/product/CL-15" + } + ] + }, + { + key: "autonomous", + name: "Autonomous", + products: [ + { + name: "TerraFirma AutoCultivator T-300", + id: "AU-01", + image: "/cdn/img/product/[size]/AU-01-SI.webp", + startPrice: 1e3, + url: "/product/AU-01" + }, + { + name: "SmartFarm Titan", + id: "AU-02", + image: "/cdn/img/product/[size]/AU-02-OG.webp", + startPrice: 4e3, + url: "/product/AU-02" + }, + { + name: "FutureHarvest Navigator", + id: "AU-03", + image: "/cdn/img/product/[size]/AU-03-TQ.webp", + startPrice: 1600, + url: "/product/AU-03" + }, + { + name: "Sapphire Sunworker 460R", + id: "AU-04", + image: "/cdn/img/product/[size]/AU-04-RD.webp", + startPrice: 8500, + url: "/product/AU-04" + }, + { + name: "EcoGrow Crop Commander", + id: "AU-05", + image: "/cdn/img/product/[size]/AU-05-ZH.webp", + startPrice: 3400, + url: "/product/AU-05" + }, + { + name: "FarmFleet Sovereign", + id: "AU-06", + image: "/cdn/img/product/[size]/AU-06-CZ.webp", + startPrice: 2100, + url: "/product/AU-06" + }, + { + name: "Verde Voyager", + id: "AU-07", + image: "/cdn/img/product/[size]/AU-07-MT.webp", + startPrice: 4e3, + url: "/product/AU-07" + }, + { + name: "Field Pioneer", + id: "AU-08", + image: "/cdn/img/product/[size]/AU-08-WH.webp", + startPrice: 4500, + url: "/product/AU-08" + } + ] + } + ], + recommendations: { + "AU-01-SI": { + name: "TerraFirma AutoCultivator T-300 Silver", + sku: "AU-01-SI", + image: "/cdn/img/product/[size]/AU-01-SI.webp", + url: "/product/AU-01?sku=AU-01-SI", + rgb: [ + 192, + 192, + 192 + ] + }, + "AU-02-OG": { + name: "SmartFarm Titan Sunset Copper", + sku: "AU-02-OG", + image: "/cdn/img/product/[size]/AU-02-OG.webp", + url: "/product/AU-02?sku=AU-02-OG", + rgb: [ + 221, + 82, + 25 + ] + }, + "AU-02-BL": { + name: "SmartFarm Titan Cosmic Sapphire", + sku: "AU-02-BL", + image: "/cdn/img/product/[size]/AU-02-BL.webp", + url: "/product/AU-02?sku=AU-02-BL", + rgb: [ + 42, + 82, + 190 + ] + }, + "AU-02-GG": { + name: "SmartFarm Titan Verdant Shadow", + sku: "AU-02-GG", + image: "/cdn/img/product/[size]/AU-02-GG.webp", + url: "/product/AU-02?sku=AU-02-GG", + rgb: [ + 0, + 90, + 4 + ] + }, + "AU-03-TQ": { + name: "FutureHarvest Navigator Turquoise Titan", + sku: "AU-03-TQ", + image: "/cdn/img/product/[size]/AU-03-TQ.webp", + url: "/product/AU-03?sku=AU-03-TQ", + rgb: [ + 22, + 159, + 184 + ] + }, + "AU-03-PL": { + name: "FutureHarvest Navigator Majestic Violet", + sku: "AU-03-PL", + image: "/cdn/img/product/[size]/AU-03-PL.webp", + url: "/product/AU-03?sku=AU-03-PL", + rgb: [ + 155, + 95, + 192 + ] + }, + "AU-03-RD": { + name: "FutureHarvest Navigator Scarlet Dynamo", + sku: "AU-03-RD", + image: "/cdn/img/product/[size]/AU-03-RD.webp", + url: "/product/AU-03?sku=AU-03-RD", + rgb: [ + 255, + 36, + 0 + ] + }, + "AU-03-YE": { + name: "FutureHarvest Navigator Sunbeam Yellow", + sku: "AU-03-YE", + image: "/cdn/img/product/[size]/AU-03-YE.webp", + url: "/product/AU-03?sku=AU-03-YE", + rgb: [ + 250, + 173, + 0 + ] + }, + "AU-04-RD": { + name: "Sapphire Sunworker 460R Ruby Red", + sku: "AU-04-RD", + image: "/cdn/img/product/[size]/AU-04-RD.webp", + url: "/product/AU-04?sku=AU-04-RD", + rgb: [ + 155, + 17, + 30 + ] + }, + "AU-04-BK": { + name: "Sapphire Sunworker 460R Midnight Onyx", + sku: "AU-04-BK", + image: "/cdn/img/product/[size]/AU-04-BK.webp", + url: "/product/AU-04?sku=AU-04-BK", + rgb: [ + 53, + 56, + 57 + ] + }, + "AU-05-ZH": { + name: "EcoGrow Crop Commander Zestful Horizon", + sku: "AU-05-ZH", + image: "/cdn/img/product/[size]/AU-05-ZH.webp", + url: "/product/AU-05?sku=AU-05-ZH", + rgb: [ + 255, + 160, + 122 + ] + }, + "AU-06-CZ": { + name: "FarmFleet Sovereign Canary Zenith", + sku: "AU-06-CZ", + image: "/cdn/img/product/[size]/AU-06-CZ.webp", + url: "/product/AU-06?sku=AU-06-CZ", + rgb: [ + 255, + 215, + 0 + ] + }, + "AU-06-MT": { + name: "FarmFleet Sovereign Minted Jade", + sku: "AU-06-MT", + image: "/cdn/img/product/[size]/AU-06-MT.webp", + url: "/product/AU-06?sku=AU-06-MT", + rgb: [ + 98, + 136, + 130 + ] + }, + "AU-07-MT": { + name: "Verde Voyager Glacial Mint", + sku: "AU-07-MT", + image: "/cdn/img/product/[size]/AU-07-MT.webp", + url: "/product/AU-07?sku=AU-07-MT", + rgb: [ + 175, + 219, + 210 + ] + }, + "AU-07-YE": { + name: "Verde Voyager Sunbeam Yellow", + sku: "AU-07-YE", + image: "/cdn/img/product/[size]/AU-07-YE.webp", + url: "/product/AU-07?sku=AU-07-YE", + rgb: [ + 255, + 218, + 3 + ] + }, + "AU-08-WH": { + name: "Field Pioneer Polar White", + sku: "AU-08-WH", + image: "/cdn/img/product/[size]/AU-08-WH.webp", + url: "/product/AU-08?sku=AU-08-WH", + rgb: [ + 232, + 232, + 232 + ] + }, + "CL-01-GR": { + name: "Heritage Workhorse Verdant Field", + sku: "CL-01-GR", + image: "/cdn/img/product/[size]/CL-01-GR.webp", + url: "/product/CL-01?sku=CL-01-GR", + rgb: [ + 107, + 142, + 35 + ] + }, + "CL-01-GY": { + name: "Heritage Workhorse Stormy Sky", + sku: "CL-01-GY", + image: "/cdn/img/product/[size]/CL-01-GY.webp", + url: "/product/CL-01?sku=CL-01-GY", + rgb: [ + 112, + 128, + 144 + ] + }, + "CL-02-BL": { + name: "Falcon Crest Farm Cerulean Classic", + sku: "CL-02-BL", + image: "/cdn/img/product/[size]/CL-02-BL.webp", + url: "/product/CL-02?sku=CL-02-BL", + rgb: [ + 0, + 123, + 167 + ] + }, + "CL-03-GR": { + name: "Falcon Crest Work Meadow Green", + sku: "CL-03-GR", + image: "/cdn/img/product/[size]/CL-03-GR.webp", + url: "/product/CL-03?sku=CL-03-GR", + rgb: [ + 124, + 252, + 0 + ] + }, + "CL-03-PI": { + name: "Falcon Crest Work Rustic Rose", + sku: "CL-03-PI", + image: "/cdn/img/product/[size]/CL-03-PI.webp", + url: "/product/CL-03?sku=CL-03-PI", + rgb: [ + 181, + 0, + 24 + ] + }, + "CL-03-YE": { + name: "Falcon Crest Work Harvest Gold", + sku: "CL-03-YE", + image: "/cdn/img/product/[size]/CL-03-YE.webp", + url: "/product/CL-03?sku=CL-03-YE", + rgb: [ + 218, + 145, + 0 + ] + }, + "CL-04-BL": { + name: "Broadfield Majestic Oceanic Blue", + sku: "CL-04-BL", + image: "/cdn/img/product/[size]/CL-04-BL.webp", + url: "/product/CL-04?sku=CL-04-BL", + rgb: [ + 0, + 64, + 166 + ] + }, + "CL-04-RD": { + name: "Broadfield Majestic Rustic Crimson", + sku: "CL-04-RD", + image: "/cdn/img/product/[size]/CL-04-RD.webp", + url: "/product/CL-04?sku=CL-04-RD", + rgb: [ + 123, + 63, + 0 + ] + }, + "CL-04-TQ": { + name: "Broadfield Majestic Aqua Green", + sku: "CL-04-TQ", + image: "/cdn/img/product/[size]/CL-04-TQ.webp", + url: "/product/CL-04?sku=CL-04-TQ", + rgb: [ + 0, + 178, + 152 + ] + }, + "CL-05-PT": { + name: "Countryside Commander Pacific Teal", + sku: "CL-05-PT", + image: "/cdn/img/product/[size]/CL-05-PT.webp", + url: "/product/CL-05?sku=CL-05-PT", + rgb: [ + 71, + 157, + 168 + ] + }, + "CL-05-RD": { + name: "Countryside Commander Barn Red", + sku: "CL-05-RD", + image: "/cdn/img/product/[size]/CL-05-RD.webp", + url: "/product/CL-05?sku=CL-05-RD", + rgb: [ + 124, + 10, + 2 + ] + }, + "CL-06-MT": { + name: "Danamark Steadfast Emerald Forest", + sku: "CL-06-MT", + image: "/cdn/img/product/[size]/CL-06-MT.webp", + url: "/product/CL-06?sku=CL-06-MT", + rgb: [ + 70, + 245, + 187 + ] + }, + "CL-06-YE": { + name: "Danamark Steadfast Golden Wheat", + sku: "CL-06-YE", + image: "/cdn/img/product/[size]/CL-06-YE.webp", + url: "/product/CL-06?sku=CL-06-YE", + rgb: [ + 250, + 175, + 63 + ] + }, + "CL-07-GR": { + name: "Greenland Rover Forest Fern", + sku: "CL-07-GR", + image: "/cdn/img/product/[size]/CL-07-GR.webp", + url: "/product/CL-07?sku=CL-07-GR", + rgb: [ + 46, + 162, + 80 + ] + }, + "CL-07-YE": { + name: "Greenland Rover Autumn Amber", + sku: "CL-07-YE", + image: "/cdn/img/product/[size]/CL-07-YE.webp", + url: "/product/CL-07?sku=CL-07-YE", + rgb: [ + 255, + 191, + 0 + ] + }, + "CL-08-GR": { + name: "Holland Hamster Polder Green", + sku: "CL-08-GR", + image: "/cdn/img/product/[size]/CL-08-GR.webp", + url: "/product/CL-08?sku=CL-08-GR", + rgb: [ + 194, + 178, + 128 + ] + }, + "CL-08-PI": { + name: "Holland Hamster Tulip Magenta", + sku: "CL-08-PI", + image: "/cdn/img/product/[size]/CL-08-PI.webp", + url: "/product/CL-08?sku=CL-08-PI", + rgb: [ + 214, + 82, + 130 + ] + }, + "CL-09-BL": { + name: "TerraFirma Veneto Adriatic Blue", + sku: "CL-09-BL", + image: "/cdn/img/product/[size]/CL-09-BL.webp", + url: "/product/CL-09?sku=CL-09-BL", + rgb: [ + 47, + 110, + 163 + ] + }, + "CL-09-GR": { + name: "TerraFirma Veneto Tuscan Green", + sku: "CL-09-GR", + image: "/cdn/img/product/[size]/CL-09-GR.webp", + url: "/product/CL-09?sku=CL-09-GR", + rgb: [ + 81, + 139, + 43 + ] + }, + "CL-10-SD": { + name: "Global Gallant Sahara Dawn", + sku: "CL-10-SD", + image: "/cdn/img/product/[size]/CL-10-SD.webp", + url: "/product/CL-10?sku=CL-10-SD", + rgb: [ + 184, + 168, + 117 + ] + }, + "CL-10-VI": { + name: "Global Gallant Violet Vintage", + sku: "CL-10-VI", + image: "/cdn/img/product/[size]/CL-10-VI.webp", + url: "/product/CL-10?sku=CL-10-VI", + rgb: [ + 138, + 43, + 226 + ] + }, + "CL-11-SK": { + name: "Scandinavia Sower Baltic Blue", + sku: "CL-11-SK", + image: "/cdn/img/product/[size]/CL-11-SK.webp", + url: "/product/CL-11?sku=CL-11-SK", + rgb: [ + 149, + 193, + 244 + ] + }, + "CL-11-YE": { + name: "Scandinavia Sower Nordic Gold", + sku: "CL-11-YE", + image: "/cdn/img/product/[size]/CL-11-YE.webp", + url: "/product/CL-11?sku=CL-11-YE", + rgb: [ + 255, + 215, + 0 + ] + }, + "CL-12-BL": { + name: "Celerity Cruiser Velocity Blue", + sku: "CL-12-BL", + image: "/cdn/img/product/[size]/CL-12-BL.webp", + url: "/product/CL-12?sku=CL-12-BL", + rgb: [ + 30, + 144, + 255 + ] + }, + "CL-12-RD": { + name: "Celerity Cruiser Rally Red", + sku: "CL-12-RD", + image: "/cdn/img/product/[size]/CL-12-RD.webp", + url: "/product/CL-12?sku=CL-12-RD", + rgb: [ + 237, + 41, + 57 + ] + }, + "CL-13-BL": { + name: "Rapid Racer Speedway Blue", + sku: "CL-13-BL", + image: "/cdn/img/product/[size]/CL-13-BL.webp", + url: "/product/CL-13?sku=CL-13-BL", + rgb: [ + 38, + 121, + 166 + ] + }, + "CL-13-RD": { + name: "Rapid Racer Raceway Red", + sku: "CL-13-RD", + image: "/cdn/img/product/[size]/CL-13-RD.webp", + url: "/product/CL-13?sku=CL-13-RD", + rgb: [ + 207, + 16, + 32 + ] + }, + "CL-14-GR": { + name: "Caribbean Cruiser Emerald Grove", + sku: "CL-14-GR", + image: "/cdn/img/product/[size]/CL-14-GR.webp", + url: "/product/CL-14?sku=CL-14-GR", + rgb: [ + 87, + 174, + 19 + ] + }, + "CL-14-RD": { + name: "Caribbean Cruiser Ruby Fields", + sku: "CL-14-RD", + image: "/cdn/img/product/[size]/CL-14-RD.webp", + url: "/product/CL-14?sku=CL-14-RD", + rgb: [ + 205, + 43, + 30 + ] + }, + "CL-15-PI": { + name: "Fieldmaster Classic Vintage Pink", + sku: "CL-15-PI", + image: "/cdn/img/product/[size]/CL-15-PI.webp", + url: "/product/CL-15?sku=CL-15-PI", + rgb: [ + 225, + 148, + 158 + ] + }, + "CL-15-SD": { + name: "Fieldmaster Classic Sahara Dust", + sku: "CL-15-SD", + image: "/cdn/img/product/[size]/CL-15-SD.webp", + url: "/product/CL-15?sku=CL-15-SD", + rgb: [ + 222, + 199, + 140 + ] + } + }, + stores: [ + { + id: "store-a", + name: "Aurora Flagship Store", + street: "Astronaut Way 1", + city: "Arlington", + image: "/cdn/img/store/[size]/store-1.webp" + }, + { + id: "store-b", + name: "Big Micro Machines", + street: "Broadway 2", + city: "Burlington", + image: "/cdn/img/store/[size]/store-2.webp" + }, + { + id: "store-c", + name: "Central Mall", + street: "Clown Street 3", + city: "Cryo", + image: "/cdn/img/store/[size]/store-3.webp" + }, + { + id: "store-d", + name: "Downtown Model Store", + street: "Duck Street 4", + city: "Davenport", + image: "/cdn/img/store/[size]/store-4.webp" + } + ] +}; + +// src/explore/database/index.js +var database_default2 = database_default; + +// node_modules/hono/dist/utils/cookie.js +var validCookieNameRegEx = /^[\w!#$%&'*.^`|~+-]+$/; +var validCookieValueRegEx = /^[ !#-:<-[\]-~]*$/; +var parse = (cookie, name) => { + const pairs = cookie.trim().split(";"); + return pairs.reduce((parsedCookie, pairStr) => { + pairStr = pairStr.trim(); + const valueStartPos = pairStr.indexOf("="); + if (valueStartPos === -1) { + return parsedCookie; + } + const cookieName = pairStr.substring(0, valueStartPos).trim(); + if (name && name !== cookieName || !validCookieNameRegEx.test(cookieName)) { + return parsedCookie; + } + let cookieValue = pairStr.substring(valueStartPos + 1).trim(); + if (cookieValue.startsWith('"') && cookieValue.endsWith('"')) { + cookieValue = cookieValue.slice(1, -1); + } + if (validCookieValueRegEx.test(cookieValue)) { + parsedCookie[cookieName] = decodeURIComponent_(cookieValue); + } + return parsedCookie; + }, {}); +}; +var _serialize = (name, value, opt = {}) => { + let cookie = `${name}=${value}`; + if (name.startsWith("__Secure-") && !opt.secure) { + throw new Error("__Secure- Cookie must have Secure attributes"); + } + if (name.startsWith("__Host-")) { + if (!opt.secure) { + throw new Error("__Host- Cookie must have Secure attributes"); + } + if (opt.path !== "/") { + throw new Error('__Host- Cookie must have Path attributes with "/"'); + } + if (opt.domain) { + throw new Error("__Host- Cookie must not have Domain attributes"); + } + } + if (opt && typeof opt.maxAge === "number" && opt.maxAge >= 0) { + if (opt.maxAge > 3456e4) { + throw new Error( + "Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration." + ); + } + cookie += `; Max-Age=${Math.floor(opt.maxAge)}`; + } + if (opt.domain && opt.prefix !== "host") { + cookie += `; Domain=${opt.domain}`; + } + if (opt.path) { + cookie += `; Path=${opt.path}`; + } + if (opt.expires) { + if (opt.expires.getTime() - Date.now() > 3456e7) { + throw new Error( + "Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future." + ); + } + cookie += `; Expires=${opt.expires.toUTCString()}`; + } + if (opt.httpOnly) { + cookie += "; HttpOnly"; + } + if (opt.secure) { + cookie += "; Secure"; + } + if (opt.sameSite) { + cookie += `; SameSite=${opt.sameSite}`; + } + if (opt.partitioned) { + if (!opt.secure) { + throw new Error("Partitioned Cookie must have Secure attributes"); + } + cookie += "; Partitioned"; + } + return cookie; +}; +var serialize = (name, value, opt) => { + value = encodeURIComponent(value); + return _serialize(name, value, opt); +}; + +// node_modules/hono/dist/helper/cookie/index.js +var getCookie = (c, key, prefix) => { + const cookie = c.req.raw.headers.get("Cookie"); + if (typeof key === "string") { + if (!cookie) { + return void 0; + } + let finalKey = key; + if (prefix === "secure") { + finalKey = "__Secure-" + key; + } else if (prefix === "host") { + finalKey = "__Host-" + key; + } + const obj2 = parse(cookie, finalKey); + return obj2[finalKey]; + } + if (!cookie) { + return {}; + } + const obj = parse(cookie); + return obj; +}; +var setCookie = (c, name, value, opt) => { + let cookie; + if (opt?.prefix === "secure") { + cookie = serialize("__Secure-" + name, value, { path: "/", ...opt, secure: true }); + } else if (opt?.prefix === "host") { + cookie = serialize("__Host-" + name, value, { + ...opt, + path: "/", + secure: true, + domain: void 0 + }); + } else { + cookie = serialize(name, value, { path: "/", ...opt }); + } + c.header("set-cookie", cookie, { append: true }); +}; + +// src/checkout/state.js +var ITEM_SEP = "|"; +var QTY_SEP = "_"; +var COOKIE = "c_cart"; +function readFromCookie(c) { + const cookieStr = getCookie(c, COOKIE); + if (!cookieStr) + return []; + return cookieStr.split(ITEM_SEP).map((item) => { + const [sku, quantity] = item.split(QTY_SEP); + return { sku, quantity: parseInt(quantity, 10) }; + }); +} +function writeToCookie(items, c) { + const cookieStr = items.map((item) => `${item.sku}${QTY_SEP}${item.quantity}`).join(ITEM_SEP); + console.log("writeToCookie", cookieStr); + setCookie(c, COOKIE, cookieStr, { httpOnly: true }); +} + +// src/checkout/utils.js +var html = String.raw; +var IMAGE_SERVER = typeof process === "undefined" || process.env.USE_LOCAL_IMAGES !== "true" ? "https://blueprint.the-tractor.store" : ""; +function src(image, size) { + return IMAGE_SERVER + image.replace("[size]", `${size}`); +} +function srcset(image, sizes = []) { + return sizes.map((size) => `${src(image, size)} ${size}w`).join(", "); +} + +// src/checkout/components/Button.js +var Button_default = ({ + href, + type, + value, + disabled, + rounded, + className = "", + children, + dataId, + size = "normal", + variant = "secondary", + title +}) => { + const tag = href ? "a" : "button"; + return html` <${tag} + ${disabled ? "disabled" : ""} + ${href ? `href="${href}"` : ""} + ${type ? `type="${type}"` : ""} + ${value ? `value="${value}"` : ""} + ${dataId ? `data-id="${dataId}"` : ""} + ${title ? `title="${title}"` : ""} + class="c_Button c_Button--${variant} ${className} ${rounded ? "c_Button--rounded" : ""} c_Button--size-${size}" + > +
${children}
+ `; +}; + +// src/checkout/components/MiniCart.js +var MiniCart_default = ({ c }) => { + const lineItems = readFromCookie(c); + const quantity = lineItems.reduce((t, { quantity: quantity2 }) => t + quantity2, 0); + return html`
+ ${Button_default({ + variant: "secondary", + rounded: true, + href: "/checkout/cart", + className: "c_MiniCart__button", + title: "View Cart", + children: html` + + + + + + + + +
${quantity || ""}
+ ` + })} +
`; +}; + +// src/explore/utils.js +var html2 = String.raw; +var IMAGE_SERVER2 = typeof process === "undefined" || process.env.USE_LOCAL_IMAGES !== "true" ? "https://blueprint.the-tractor.store" : ""; +function src2(image, size) { + return IMAGE_SERVER2 + image.replace("[size]", `${size}`); +} +function srcset2(image, sizes = []) { + return sizes.map((size) => `${src2(image, size)} ${size}w`).join(", "); +} +function fmtprice(price) { + return `${price},00 \xD8`; +} + +// src/explore/components/Navigation.js +var Navigation_default = () => { + return html2``; +}; + +// src/explore/components/Header.js +var Header_default = ({ c }) => { + return html2`
+
+
+ + + +
${Navigation_default()}
+
${MiniCart_default({ c })}
+
+
+
`; +}; + +// src/explore/components/Footer.js +var Footer_default = () => { + return html2``; +}; + +// src/explore/components/Recommendation.js +var Recommendation_default = ({ image, url, name }) => { + return html2`
  • + + + ${name} + +
  • `; +}; + +// src/explore/components/Recommendations.js +var r = database_default2.recommendations; +function averageColor(colors) { + const total = colors.reduce( + (acc, [r2, g, b]) => [acc[0] + r2, acc[1] + g, acc[2] + b], + [0, 0, 0] + ); + return total.map((c) => Math.round(c / colors.length)); +} +function skusToColors(skus) { + return skus.filter((sku) => r[sku]).map((sku) => r[sku].rgb); +} +function colorDistance(rgb1, rgb2) { + const [r1, g1, b1] = rgb1; + const [r2, g2, b2] = rgb2; + return Math.sqrt( + Math.pow(r1 - r2, 2) + Math.pow(g1 - g2, 2) + Math.pow(b1 - b2, 2) + ); +} +function recosForSkus(skus, length = 4) { + const targetRgb = averageColor(skusToColors(skus)); + let distances = []; + for (let sku in r) { + if (!skus.includes(sku)) { + const distance = colorDistance(targetRgb, r[sku].rgb); + distances.push({ sku, distance }); + } + } + distances.sort((a, b) => a.distance - b.distance); + return distances.slice(0, length).map((d) => r[d.sku]); +} +var Recommendations_default = ({ skus }) => { + const recos = recosForSkus(skus); + return recos.length ? html2`
    +

    Recommendations

    +
      + ${recos.map(Recommendation_default).join("")} +
    +
    ` : ""; +}; + +// src/explore/components/Meta.js +var Meta_default = () => { + return html2` + + + + + + + + + + + `; +}; + +// src/explore/pages/HomePage.js +var _a; +var HomePage_default = ({ c }) => { + return html2(_a || (_a = __template(['\n \n \n \n Tractor Store\n \n \n \n \n ', '\n \n \n ', '\n
    \n ', '\n
    \n ', "\n
    \n
    \n ", '\n \n \n \n \n \n `;\n};\n", "import { html, src, srcset } from \"../utils.js\";\n\n/**\n * Store component.\n * @param {Store} props - The properties of the Store component.\n * @returns {string} The Product component markup.\n */\nexport default ({ name, image, street, city }) => {\n return html`
  • \n
    \n \n

    \n ${name}
    \n ${street}
    \n ${city}\n

    \n
    \n
  • `;\n};\n", "import data from \"../database/index.js\";\nimport Header from \"../components/Header.js\";\nimport Footer from \"../components/Footer.js\";\nimport Store from \"../components/Store.js\";\nimport { html } from \"../utils.js\";\nimport Meta from \"../components/Meta.js\";\n\n/**\n * StoresPage component.\n * @param {object} props - The properties of the StoresPage component.\n * @param {string} props.category - The category key.\n * @param {HonoContext} props.c - The hone context.\n * @returns {string} The StoresPage component markup.\n */\nexport default ({ c }) => {\n return html`\n \n \n \n Tractor Store\n \n \n \n \n ${Meta()}\n \n \n ${Header({ c })}\n
    \n

    Our Stores

    \n

    \n Want to see our products in person? Visit one of our stores to see\n our products up close and talk to our experts. We have stores in the\n following locations:\n

    \n
      \n ${data.stores.map(Store).join(\"\")}\n
    \n
    \n ${Footer()}\n \n \n \n \n \n `;\n};\n", "import { html, src, srcset, fmtprice } from \"../utils.js\";\n\n/**\n * Product component.\n * @param {Product} props - The properties of the Product component.\n * @returns {string} The Product component markup.\n */\nexport default ({ name, url, image, startPrice }) => {\n return html`
  • \n \n \n ${name}\n ${fmtprice(startPrice)}\n \n
  • `;\n};\n", "import { html } from \"../utils.js\";\n\nexport default ({ filters }) => {\n return html`
    \n Filter:\n
      \n ${filters\n .map((f) =>\n f.active\n ? `
    • ${f.name}
    • `\n : `
    • ${f.name}
    • `,\n )\n .join(\"\")}\n
    \n
    `;\n};\n", "import data from \"../database/index.js\";\nimport Header from \"../components/Header.js\";\nimport Footer from \"../components/Footer.js\";\nimport Product from \"../components/Product.js\";\nimport Filter from \"../components/Filter.js\";\nimport { html } from \"../utils.js\";\nimport Meta from \"../components/Meta.js\";\n\n/**\n * CategoryPage component.\n * @param {object} props - The properties of the CategoryPage component.\n * @param {string} props.category - The category key.\n * @param {HonoContext} props.c - The hone context.\n * @returns {string} The CategoryPage component markup.\n */\nexport default ({ category, c }) => {\n const cat = category && data.categories.find((c) => c.key === category);\n\n const title = cat ? cat.name : \"All Machines\";\n const products = cat\n ? cat.products\n : data.categories.flatMap((c) => c.products);\n // sort products by price descending\n products.sort((a, b) => b.startPrice - a.startPrice);\n const filters = [\n { url: \"/products\", name: \"All\", active: !cat },\n ...data.categories.map((c) => ({\n url: `/products/${c.key}`,\n name: c.name,\n active: c.key === category,\n })),\n ];\n\n return html`\n \n \n \n Tractor Store\n \n \n \n \n ${Meta()}\n \n \n ${Header({ c })}\n
    \n

    ${title}

    \n
    \n

    ${products.length} products

    \n ${Filter({ filters })}\n
    \n
      \n ${products.map(Product).join(\"\")}\n
    \n
    \n ${Footer()}\n \n \n \n \n \n `;\n};\n", "// for prettier formatting\n// see https://prettier.io/docs/en/options.html#embedded-language-formatting\nexport const html = String.raw;\n\n// use the image server if not using local images\nexport const IMAGE_SERVER =\n typeof process === \"undefined\" || process.env.USE_LOCAL_IMAGES !== \"true\"\n ? \"https://blueprint.the-tractor.store\"\n : \"\";\n\n/**\n * Replaces the placeholder \"[size]\" in the image URL with the specified size.\n * @param {string} image - The original image URL.\n * @param {number} size - The desired size for the image.\n * @returns {string} - The modified image URL with the size placeholder replaced.\n */\nexport function src(image, size) {\n return IMAGE_SERVER + image.replace(\"[size]\", `${size}`);\n}\n\n/**\n * Generates the srcset attribute value for an image with different sizes.\n * @param {string} image - The original image URL.\n * @param {number[]} sizes - The array of sizes for the image.\n * @returns {string} - The srcset attribute value.\n */\nexport function srcset(image, sizes = []) {\n return sizes.map((size) => `${src(image, size)} ${size}w`).join(\", \");\n}\n", "import { html } from \"../utils.js\";\n\n/**\n * VariantOption component.\n * @param {object} props - The properties of the VariantOption component.\n * @param {string} props.sku - The SKU of the product variant.\n * @param {string} props.name - The name of the product variant.\n * @param {boolean} props.selected - Whether the variant is selected.\n * @param {string} props.color - The color of the product variant.\n * @returns {string} The VariantOption component markup.\n */\nexport default ({ sku, name, selected, color }) => {\n return html`
  • \n \n ${selected\n ? html`${name}`\n : html`${name}`}\n
  • `;\n};\n", "{\n \"variants\": [\n {\n \"id\": \"AU-01\",\n \"name\": \"TerraFirma AutoCultivator T-300 Silver\",\n \"sku\": \"AU-01-SI\",\n \"price\": 1000,\n \"image\": \"/cdn/img/product/[size]/AU-01-SI.webp\",\n \"inventory\": 8\n },\n {\n \"id\": \"AU-02\",\n \"name\": \"SmartFarm Titan Sunset Copper\",\n \"sku\": \"AU-02-OG\",\n \"price\": 4100,\n \"image\": \"/cdn/img/product/[size]/AU-02-OG.webp\",\n \"inventory\": 4\n },\n {\n \"id\": \"AU-02\",\n \"name\": \"SmartFarm Titan Cosmic Sapphire\",\n \"sku\": \"AU-02-BL\",\n \"price\": 4000,\n \"image\": \"/cdn/img/product/[size]/AU-02-BL.webp\",\n \"inventory\": 3\n },\n {\n \"id\": \"AU-02\",\n \"name\": \"SmartFarm Titan Verdant Shadow\",\n \"sku\": \"AU-02-GG\",\n \"price\": 4000,\n \"image\": \"/cdn/img/product/[size]/AU-02-GG.webp\",\n \"inventory\": 6\n },\n {\n \"id\": \"AU-03\",\n \"name\": \"FutureHarvest Navigator Turquoise Titan\",\n \"sku\": \"AU-03-TQ\",\n \"price\": 1600,\n \"image\": \"/cdn/img/product/[size]/AU-03-TQ.webp\",\n \"inventory\": 9\n },\n {\n \"id\": \"AU-03\",\n \"name\": \"FutureHarvest Navigator Majestic Violet\",\n \"sku\": \"AU-03-PL\",\n \"price\": 1700,\n \"image\": \"/cdn/img/product/[size]/AU-03-PL.webp\",\n \"inventory\": 7\n },\n {\n \"id\": \"AU-03\",\n \"name\": \"FutureHarvest Navigator Scarlet Dynamo\",\n \"sku\": \"AU-03-RD\",\n \"price\": 1900,\n \"image\": \"/cdn/img/product/[size]/AU-03-RD.webp\",\n \"inventory\": 8\n },\n {\n \"id\": \"AU-03\",\n \"name\": \"FutureHarvest Navigator Sunbeam Yellow\",\n \"sku\": \"AU-03-YE\",\n \"price\": 1800,\n \"image\": \"/cdn/img/product/[size]/AU-03-YE.webp\",\n \"inventory\": 3\n },\n {\n \"id\": \"AU-04\",\n \"name\": \"Sapphire Sunworker 460R Ruby Red\",\n \"sku\": \"AU-04-RD\",\n \"price\": 8700,\n \"image\": \"/cdn/img/product/[size]/AU-04-RD.webp\",\n \"inventory\": 9\n },\n {\n \"id\": \"AU-04\",\n \"name\": \"Sapphire Sunworker 460R Midnight Onyx\",\n \"sku\": \"AU-04-BK\",\n \"price\": 8500,\n \"image\": \"/cdn/img/product/[size]/AU-04-BK.webp\",\n \"inventory\": 8\n },\n {\n \"id\": \"AU-05\",\n \"name\": \"EcoGrow Crop Commander Zestful Horizon\",\n \"sku\": \"AU-05-ZH\",\n \"price\": 3400,\n \"image\": \"/cdn/img/product/[size]/AU-05-ZH.webp\",\n \"inventory\": 8\n },\n {\n \"id\": \"AU-06\",\n \"name\": \"FarmFleet Sovereign Canary Zenith\",\n \"sku\": \"AU-06-CZ\",\n \"price\": 2200,\n \"image\": \"/cdn/img/product/[size]/AU-06-CZ.webp\",\n \"inventory\": 3\n },\n {\n \"id\": \"AU-06\",\n \"name\": \"FarmFleet Sovereign Minted Jade\",\n \"sku\": \"AU-06-MT\",\n \"price\": 2100,\n \"image\": \"/cdn/img/product/[size]/AU-06-MT.webp\",\n \"inventory\": 5\n },\n {\n \"id\": \"AU-07\",\n \"name\": \"Verde Voyager Glacial Mint\",\n \"sku\": \"AU-07-MT\",\n \"price\": 4000,\n \"image\": \"/cdn/img/product/[size]/AU-07-MT.webp\",\n \"inventory\": 4\n },\n {\n \"id\": \"AU-07\",\n \"name\": \"Verde Voyager Sunbeam Yellow\",\n \"sku\": \"AU-07-YE\",\n \"price\": 5000,\n \"image\": \"/cdn/img/product/[size]/AU-07-YE.webp\",\n \"inventory\": 9\n },\n {\n \"id\": \"AU-08\",\n \"name\": \"Field Pioneer Polar White\",\n \"sku\": \"AU-08-WH\",\n \"price\": 4500,\n \"image\": \"/cdn/img/product/[size]/AU-08-WH.webp\",\n \"inventory\": 4\n },\n {\n \"id\": \"CL-01\",\n \"name\": \"Heritage Workhorse Verdant Field\",\n \"sku\": \"CL-01-GR\",\n \"price\": 5700,\n \"image\": \"/cdn/img/product/[size]/CL-01-GR.webp\",\n \"inventory\": 8\n },\n {\n \"id\": \"CL-01\",\n \"name\": \"Heritage Workhorse Stormy Sky\",\n \"sku\": \"CL-01-GY\",\n \"price\": 6200,\n \"image\": \"/cdn/img/product/[size]/CL-01-GY.webp\",\n \"inventory\": 7\n },\n {\n \"id\": \"CL-02\",\n \"name\": \"Falcon Crest Farm Cerulean Classic\",\n \"sku\": \"CL-02-BL\",\n \"price\": 2600,\n \"image\": \"/cdn/img/product/[size]/CL-02-BL.webp\",\n \"inventory\": 1\n },\n {\n \"id\": \"CL-03\",\n \"name\": \"Falcon Crest Work Meadow Green\",\n \"sku\": \"CL-03-GR\",\n \"price\": 2300,\n \"image\": \"/cdn/img/product/[size]/CL-03-GR.webp\",\n \"inventory\": 7\n },\n {\n \"id\": \"CL-03\",\n \"name\": \"Falcon Crest Work Rustic Rose\",\n \"sku\": \"CL-03-PI\",\n \"price\": 2300,\n \"image\": \"/cdn/img/product/[size]/CL-03-PI.webp\",\n \"inventory\": 3\n },\n {\n \"id\": \"CL-03\",\n \"name\": \"Falcon Crest Work Harvest Gold\",\n \"sku\": \"CL-03-YE\",\n \"price\": 2300,\n \"image\": \"/cdn/img/product/[size]/CL-03-YE.webp\",\n \"inventory\": 6\n },\n {\n \"id\": \"CL-04\",\n \"name\": \"Broadfield Majestic Oceanic Blue\",\n \"sku\": \"CL-04-BL\",\n \"price\": 2200,\n \"image\": \"/cdn/img/product/[size]/CL-04-BL.webp\",\n \"inventory\": 6\n },\n {\n \"id\": \"CL-04\",\n \"name\": \"Broadfield Majestic Rustic Crimson\",\n \"sku\": \"CL-04-RD\",\n \"price\": 2200,\n \"image\": \"/cdn/img/product/[size]/CL-04-RD.webp\",\n \"inventory\": 3\n },\n {\n \"id\": \"CL-04\",\n \"name\": \"Broadfield Majestic Aqua Green\",\n \"sku\": \"CL-04-TQ\",\n \"price\": 2200,\n \"image\": \"/cdn/img/product/[size]/CL-04-TQ.webp\",\n \"inventory\": 0\n },\n {\n \"id\": \"CL-05\",\n \"name\": \"Countryside Commander Pacific Teal\",\n \"sku\": \"CL-05-PT\",\n \"price\": 2700,\n \"image\": \"/cdn/img/product/[size]/CL-05-PT.webp\",\n \"inventory\": 1\n },\n {\n \"id\": \"CL-05\",\n \"name\": \"Countryside Commander Barn Red\",\n \"sku\": \"CL-05-RD\",\n \"price\": 2700,\n \"image\": \"/cdn/img/product/[size]/CL-05-RD.webp\",\n \"inventory\": 1\n },\n {\n \"id\": \"CL-06\",\n \"name\": \"Danamark Steadfast Emerald Forest\",\n \"sku\": \"CL-06-MT\",\n \"price\": 2800,\n \"image\": \"/cdn/img/product/[size]/CL-06-MT.webp\",\n \"inventory\": 1\n },\n {\n \"id\": \"CL-06\",\n \"name\": \"Danamark Steadfast Golden Wheat\",\n \"sku\": \"CL-06-YE\",\n \"price\": 2800,\n \"image\": \"/cdn/img/product/[size]/CL-06-YE.webp\",\n \"inventory\": 2\n },\n {\n \"id\": \"CL-07\",\n \"name\": \"Greenland Rover Forest Fern\",\n \"sku\": \"CL-07-GR\",\n \"price\": 2900,\n \"image\": \"/cdn/img/product/[size]/CL-07-GR.webp\",\n \"inventory\": 4\n },\n {\n \"id\": \"CL-07\",\n \"name\": \"Greenland Rover Autumn Amber\",\n \"sku\": \"CL-07-YE\",\n \"price\": 2900,\n \"image\": \"/cdn/img/product/[size]/CL-07-YE.webp\",\n \"inventory\": 4\n },\n {\n \"id\": \"CL-08\",\n \"name\": \"Holland Hamster Polder Green\",\n \"sku\": \"CL-08-GR\",\n \"price\": 7750,\n \"image\": \"/cdn/img/product/[size]/CL-08-GR.webp\",\n \"inventory\": 8\n },\n {\n \"id\": \"CL-08\",\n \"name\": \"Holland Hamster Tulip Magenta\",\n \"sku\": \"CL-08-PI\",\n \"price\": 7900,\n \"image\": \"/cdn/img/product/[size]/CL-08-PI.webp\",\n \"inventory\": 3\n },\n {\n \"id\": \"CL-09\",\n \"name\": \"TerraFirma Veneto Adriatic Blue\",\n \"sku\": \"CL-09-BL\",\n \"price\": 2950,\n \"image\": \"/cdn/img/product/[size]/CL-09-BL.webp\",\n \"inventory\": 4\n },\n {\n \"id\": \"CL-09\",\n \"name\": \"TerraFirma Veneto Tuscan Green\",\n \"sku\": \"CL-09-GR\",\n \"price\": 2950,\n \"image\": \"/cdn/img/product/[size]/CL-09-GR.webp\",\n \"inventory\": 7\n },\n {\n \"id\": \"CL-10\",\n \"name\": \"Global Gallant Sahara Dawn\",\n \"sku\": \"CL-10-SD\",\n \"price\": 2600,\n \"image\": \"/cdn/img/product/[size]/CL-10-SD.webp\",\n \"inventory\": 6\n },\n {\n \"id\": \"CL-10\",\n \"name\": \"Global Gallant Violet Vintage\",\n \"sku\": \"CL-10-VI\",\n \"price\": 2600,\n \"image\": \"/cdn/img/product/[size]/CL-10-VI.webp\",\n \"inventory\": 2\n },\n {\n \"id\": \"CL-11\",\n \"name\": \"Scandinavia Sower Baltic Blue\",\n \"sku\": \"CL-11-SK\",\n \"price\": 3100,\n \"image\": \"/cdn/img/product/[size]/CL-11-SK.webp\",\n \"inventory\": 0\n },\n {\n \"id\": \"CL-11\",\n \"name\": \"Scandinavia Sower Nordic Gold\",\n \"sku\": \"CL-11-YE\",\n \"price\": 3100,\n \"image\": \"/cdn/img/product/[size]/CL-11-YE.webp\",\n \"inventory\": 3\n },\n {\n \"id\": \"CL-12\",\n \"name\": \"Celerity Cruiser Velocity Blue\",\n \"sku\": \"CL-12-BL\",\n \"price\": 3200,\n \"image\": \"/cdn/img/product/[size]/CL-12-BL.webp\",\n \"inventory\": 8\n },\n {\n \"id\": \"CL-12\",\n \"name\": \"Celerity Cruiser Rally Red\",\n \"sku\": \"CL-12-RD\",\n \"price\": 3200,\n \"image\": \"/cdn/img/product/[size]/CL-12-RD.webp\",\n \"inventory\": 8\n },\n {\n \"id\": \"CL-13\",\n \"name\": \"Rapid Racer Speedway Blue\",\n \"sku\": \"CL-13-BL\",\n \"price\": 7500,\n \"image\": \"/cdn/img/product/[size]/CL-13-BL.webp\",\n \"inventory\": 1\n },\n {\n \"id\": \"CL-13\",\n \"name\": \"Rapid Racer Raceway Red\",\n \"sku\": \"CL-13-RD\",\n \"price\": 7500,\n \"image\": \"/cdn/img/product/[size]/CL-13-RD.webp\",\n \"inventory\": 5\n },\n {\n \"id\": \"CL-14\",\n \"name\": \"Caribbean Cruiser Emerald Grove\",\n \"sku\": \"CL-14-GR\",\n \"price\": 2300,\n \"image\": \"/cdn/img/product/[size]/CL-14-GR.webp\",\n \"inventory\": 3\n },\n {\n \"id\": \"CL-14\",\n \"name\": \"Caribbean Cruiser Ruby Fields\",\n \"sku\": \"CL-14-RD\",\n \"price\": 2300,\n \"image\": \"/cdn/img/product/[size]/CL-14-RD.webp\",\n \"inventory\": 5\n },\n {\n \"id\": \"CL-15\",\n \"name\": \"Fieldmaster Classic Vintage Pink\",\n \"sku\": \"CL-15-PI\",\n \"price\": 6200,\n \"image\": \"/cdn/img/product/[size]/CL-15-PI.webp\",\n \"inventory\": 0\n },\n {\n \"id\": \"CL-15\",\n \"name\": \"Fieldmaster Classic Sahara Dust\",\n \"sku\": \"CL-15-SD\",\n \"price\": 6200,\n \"image\": \"/cdn/img/product/[size]/CL-15-SD.webp\",\n \"inventory\": 9\n }\n ]\n}", "/**\n * @type {Database}\n */\nimport data from \"./database.json\" assert { type: \"json\" };\nexport default data;\n", "import data from \"../database/index.js\";\nimport { html } from \"../utils.js\";\nimport Button from \"./Button.js\";\n\n/**\n * AddToCart component.\n * @param {object} props - The properties of the AddToCart component.\n * @param {string} props.sku - The SKU of the variant to add to the cart.\n * @returns {string} The AddToCart component markup.\n */\nexport default ({ sku }) => {\n const variant = data.variants.find((p) => p.sku === sku);\n const outOfStock = variant.inventory === 0;\n return html`\n \n
    \n

    ${variant.price} \u00D8

    \n ${variant.inventory > 0\n ? html`

    \n ${variant.inventory} in stock, free shipping\n

    `\n : html`

    \n out of stock\n

    `}\n
    \n ${Button({\n disabled: outOfStock,\n className: \"c_AddToCart__button\",\n children: html`add to basket`,\n variant: \"primary\",\n })}\n
    \n

    Tractor was added.

    \n View in basket.\n
    \n `;\n};\n", "{\n \"products\": [\n {\n \"name\": \"TerraFirma AutoCultivator T-300\",\n \"id\": \"AU-01\",\n \"category\": \"autonomous\",\n \"highlightsa\": [\n \"Precision GPS mapping optimizes field coverage.\",\n \"Hybrid engine ensures eco-friendly extended operation.\",\n \"Fully autonomous with smart obstacle detection and terrain adaptation.\"\n ],\n \"variants\": [\n {\n \"name\": \"Silver\",\n \"image\": \"/cdn/img/product/[size]/AU-01-SI.webp\",\n \"sku\": \"AU-01-SI\",\n \"color\": \"#C0C0C0\",\n \"price\": 1000\n }\n ]\n },\n {\n \"name\": \"SmartFarm Titan\",\n \"id\": \"AU-02\",\n \"category\": \"autonomous\",\n \"highlights\": [\n \"Advanced autopilot technology for precise farming operations.\",\n \"Eco-friendly solar-assisted power system for sustainable use.\",\n \"Intelligent AI for real-time field analysis and automated adjustments.\"\n ],\n \"variants\": [\n {\n \"name\": \"Sunset Copper\",\n \"image\": \"/cdn/img/product/[size]/AU-02-OG.webp\",\n \"sku\": \"AU-02-OG\",\n \"color\": \"#dd5219\",\n \"price\": 4100\n },\n {\n \"name\": \"Cosmic Sapphire\",\n \"image\": \"/cdn/img/product/[size]/AU-02-BL.webp\",\n \"sku\": \"AU-02-BL\",\n \"color\": \"#2A52BE\",\n \"price\": 4000\n },\n {\n \"name\": \"Verdant Shadow\",\n \"image\": \"/cdn/img/product/[size]/AU-02-GG.webp\",\n \"sku\": \"AU-02-GG\",\n \"color\": \"#005A04\",\n \"price\": 4000\n }\n ]\n },\n {\n \"name\": \"FutureHarvest Navigator\",\n \"id\": \"AU-03\",\n \"category\": \"autonomous\",\n \"highlights\": [\n \"Autonomous navigation with sub-inch accuracy\",\n \"Solar-enhanced hybrid powertrain for extended operation\",\n \"Real-time crop and soil health analytics\"\n ],\n \"variants\": [\n {\n \"name\": \"Turquoise Titan\",\n \"image\": \"/cdn/img/product/[size]/AU-03-TQ.webp\",\n \"sku\": \"AU-03-TQ\",\n \"color\": \"#169fb8\",\n \"price\": 1600\n },\n {\n \"name\": \"Majestic Violet\",\n \"image\": \"/cdn/img/product/[size]/AU-03-PL.webp\",\n \"sku\": \"AU-03-PL\",\n \"color\": \"#9B5FC0\",\n \"price\": 1700\n },\n {\n \"name\": \"Scarlet Dynamo\",\n \"image\": \"/cdn/img/product/[size]/AU-03-RD.webp\",\n \"sku\": \"AU-03-RD\",\n \"color\": \"#FF2400\",\n \"price\": 1900\n },\n {\n \"name\": \"Sunbeam Yellow\",\n \"image\": \"/cdn/img/product/[size]/AU-03-YE.webp\",\n \"sku\": \"AU-03-YE\",\n \"color\": \"#faad00\",\n \"price\": 1800\n }\n ]\n },\n {\n \"name\": \"Sapphire Sunworker 460R\",\n \"id\": \"AU-04\",\n \"category\": \"autonomous\",\n \"highlights\": [\n \"Next-generation autonomous guidance system for seamless operation\",\n \"High-capacity energy storage for all-day work without recharge\",\n \"Advanced analytics suite for precision soil and plant health management\"\n ],\n \"variants\": [\n {\n \"name\": \"Ruby Red\",\n \"image\": \"/cdn/img/product/[size]/AU-04-RD.webp\",\n \"sku\": \"AU-04-RD\",\n \"color\": \"#9B111E\",\n \"price\": 8700\n },\n {\n \"name\": \"Midnight Onyx\",\n \"image\": \"/cdn/img/product/[size]/AU-04-BK.webp\",\n \"sku\": \"AU-04-BK\",\n \"color\": \"#353839\",\n \"price\": 8500\n }\n ]\n },\n {\n \"name\": \"EcoGrow Crop Commander\",\n \"id\": \"AU-05\",\n \"category\": \"autonomous\",\n \"highlights\": [\n \"Ultra-precise field navigation technology\",\n \"Dual-mode power system for maximum uptime\",\n \"On-the-go field data analysis for smart farming decisions\"\n ],\n \"variants\": [\n {\n \"name\": \"Zestful Horizon\",\n \"image\": \"/cdn/img/product/[size]/AU-05-ZH.webp\",\n \"sku\": \"AU-05-ZH\",\n \"color\": \"#FFA07A\",\n \"price\": 3400\n }\n ]\n },\n {\n \"name\": \"FarmFleet Sovereign\",\n \"id\": \"AU-06\",\n \"category\": \"autonomous\",\n \"highlights\": [\n \"Robust all-terrain adaptability for diverse farm landscapes\",\n \"High-efficiency energy matrix for longer field endurance\",\n \"Integrated crop management system with advanced diagnostics\"\n ],\n \"variants\": [\n {\n \"name\": \"Canary Zenith\",\n \"image\": \"/cdn/img/product/[size]/AU-06-CZ.webp\",\n \"sku\": \"AU-06-CZ\",\n \"color\": \"#FFD700\",\n \"price\": 2200\n },\n {\n \"name\": \"Minted Jade\",\n \"color\": \"#628882\",\n \"image\": \"/cdn/img/product/[size]/AU-06-MT.webp\",\n \"sku\": \"AU-06-MT\",\n \"price\": 2100\n }\n ]\n },\n {\n \"name\": \"Verde Voyager\",\n \"id\": \"AU-07\",\n \"category\": \"autonomous\",\n \"highlights\": [\n \"Adaptive drive system intelligently navigates through diverse field conditions\",\n \"Clean energy operation with advanced solar battery technology\",\n \"High-resolution field scanners for precise agronomy insights\"\n ],\n \"variants\": [\n {\n \"name\": \"Glacial Mint\",\n \"image\": \"/cdn/img/product/[size]/AU-07-MT.webp\",\n \"sku\": \"AU-07-MT\",\n \"color\": \"#AFDBD2\",\n \"price\": 4000\n },\n {\n \"name\": \"Sunbeam Yellow\",\n \"image\": \"/cdn/img/product/[size]/AU-07-YE.webp\",\n \"sku\": \"AU-07-YE\",\n \"color\": \"#FFDA03\",\n \"price\": 5000\n }\n ]\n },\n {\n \"name\": \"Field Pioneer\",\n \"id\": \"AU-08\",\n \"category\": \"autonomous\",\n \"highlights\": [\n \"Automated field traversal with intelligent pathfinding algorithms\",\n \"Eco-friendly electric motors paired with high-capacity batteries\",\n \"Real-time environmental monitoring for optimal crop growth\"\n ],\n \"variants\": [\n {\n \"name\": \"Polar White\",\n \"image\": \"/cdn/img/product/[size]/AU-08-WH.webp\",\n \"sku\": \"AU-08-WH\",\n \"color\": \"#E8E8E8\",\n \"price\": 4500\n }\n ]\n },\n {\n \"name\": \"Heritage Workhorse\",\n \"id\": \"CL-01\",\n \"category\": \"classic\",\n \"highlights\": [\n \"Proven reliability with a touch of modern reliability enhancements\",\n \"Robust construction equipped to withstand decades of labor\",\n \"User-friendly operation with traditional manual controls\"\n ],\n \"variants\": [\n {\n \"name\": \"Verdant Field\",\n \"image\": \"/cdn/img/product/[size]/CL-01-GR.webp\",\n \"sku\": \"CL-01-GR\",\n \"color\": \"#6B8E23\",\n \"price\": 5700\n },\n {\n \"name\": \"Stormy Sky\",\n \"image\": \"/cdn/img/product/[size]/CL-01-GY.webp\",\n \"sku\": \"CL-01-GY\",\n \"color\": \"#708090\",\n \"price\": 6200\n }\n ]\n },\n {\n \"name\": \"Falcon Crest Farm\",\n \"id\": \"CL-02\",\n \"category\": \"classic\",\n \"highlights\": [\n \"Rugged simplicity meets classic design\",\n \"Built-to-last machinery for reliable fieldwork\",\n \"Ease of control with straightforward mechanical systems\"\n ],\n \"variants\": [\n {\n \"name\": \"Cerulean Classic\",\n \"image\": \"/cdn/img/product/[size]/CL-02-BL.webp\",\n \"sku\": \"CL-02-BL\",\n \"color\": \"#007BA7\",\n \"price\": 2600\n }\n ]\n },\n {\n \"name\": \"Falcon Crest Work\",\n \"id\": \"CL-03\",\n \"category\": \"classic\",\n \"highlights\": [\n \"Vintage engineering with a legacy of durability\",\n \"Powerful yet simple mechanics for easy operation and repair\",\n \"Classic aesthetics with a robust body, built to last\"\n ],\n \"variants\": [\n {\n \"name\": \"Meadow Green\",\n \"image\": \"/cdn/img/product/[size]/CL-03-GR.webp\",\n \"sku\": \"CL-03-GR\",\n \"color\": \"#7CFC00\",\n \"price\": 2300\n },\n {\n \"name\": \"Rustic Rose\",\n \"image\": \"/cdn/img/product/[size]/CL-03-PI.webp\",\n \"sku\": \"CL-03-PI\",\n \"color\": \"#b50018\",\n \"price\": 2300\n },\n {\n \"name\": \"Harvest Gold\",\n \"image\": \"/cdn/img/product/[size]/CL-03-YE.webp\",\n \"sku\": \"CL-03-YE\",\n \"color\": \"#DA9100\",\n \"price\": 2300\n }\n ]\n },\n {\n \"name\": \"Broadfield Majestic\",\n \"id\": \"CL-04\",\n \"category\": \"classic\",\n \"highlights\": [\n \"Built with the robust heart of early industrial workhorses\",\n \"Simplified mechanics for unparalleled ease of use and maintenance\",\n \"A testament to early agricultural machinery with a dependable engine\"\n ],\n \"variants\": [\n {\n \"name\": \"Oceanic Blue\",\n \"image\": \"/cdn/img/product/[size]/CL-04-BL.webp\",\n \"sku\": \"CL-04-BL\",\n \"color\": \"#0040a6\",\n \"price\": 2200\n },\n {\n \"name\": \"Rustic Crimson\",\n \"image\": \"/cdn/img/product/[size]/CL-04-RD.webp\",\n \"sku\": \"CL-04-RD\",\n \"color\": \"#7B3F00\",\n \"price\": 2200\n },\n {\n \"name\": \"Aqua Green\",\n \"image\": \"/cdn/img/product/[size]/CL-04-TQ.webp\",\n \"sku\": \"CL-04-TQ\",\n \"color\": \"#00b298\",\n \"price\": 2200\n }\n ]\n },\n {\n \"name\": \"Countryside Commander\",\n \"id\": \"CL-05\",\n \"category\": \"classic\",\n \"highlights\": [\n \"Reliable performance with time-tested engineering\",\n \"Rugged design for efficient operation across all types of terrain\",\n \"Classic operator comfort with modern ergonomic enhancements\"\n ],\n \"variants\": [\n {\n \"name\": \"Pacific Teal\",\n \"image\": \"/cdn/img/product/[size]/CL-05-PT.webp\",\n \"sku\": \"CL-05-PT\",\n \"color\": \"#479da8\",\n \"price\": 2700\n },\n {\n \"name\": \"Barn Red\",\n \"image\": \"/cdn/img/product/[size]/CL-05-RD.webp\",\n \"sku\": \"CL-05-RD\",\n \"color\": \"#7C0A02\",\n \"price\": 2700\n }\n ]\n },\n {\n \"name\": \"Danamark Steadfast\",\n \"id\": \"CL-06\",\n \"category\": \"classic\",\n \"highlights\": [\n \"Engineered for the meticulous demands of Danish agriculture\",\n \"Sturdy chassis and reliable mechanics for longevity\",\n \"Utilitarian design with practical functionality and comfort\"\n ],\n \"variants\": [\n {\n \"name\": \"Emerald Forest\",\n \"image\": \"/cdn/img/product/[size]/CL-06-MT.webp\",\n \"sku\": \"CL-06-MT\",\n \"color\": \"#46f5bb\",\n \"price\": 2800\n },\n {\n \"name\": \"Golden Wheat\",\n \"image\": \"/cdn/img/product/[size]/CL-06-YE.webp\",\n \"sku\": \"CL-06-YE\",\n \"color\": \"#faaf3f\",\n \"price\": 2800\n }\n ]\n },\n {\n \"name\": \"Greenland Rover\",\n \"id\": \"CL-07\",\n \"category\": \"classic\",\n \"highlights\": [\n \"Engineered to tackle the diverse European terrain with ease\",\n \"Sturdy and reliable mechanics known for their longevity\",\n \"Ergonomically designed for comfort during long working hours\"\n ],\n \"variants\": [\n {\n \"name\": \"Forest Fern\",\n \"image\": \"/cdn/img/product/[size]/CL-07-GR.webp\",\n \"sku\": \"CL-07-GR\",\n \"color\": \"#2ea250\",\n \"price\": 2900\n },\n {\n \"name\": \"Autumn Amber\",\n \"image\": \"/cdn/img/product/[size]/CL-07-YE.webp\",\n \"sku\": \"CL-07-YE\",\n \"color\": \"#FFBF00\",\n \"price\": 2900\n }\n ]\n },\n {\n \"name\": \"Holland Hamster\",\n \"id\": \"CL-08\",\n \"category\": \"classic\",\n \"highlights\": [\n \"Dutch craftsmanship for precision and quality\",\n \"Optimized for tulip fields and versatile European landscapes\",\n \"Ergonomic design with a focus on operator comfort and efficiency\"\n ],\n \"variants\": [\n {\n \"name\": \"Polder Green\",\n \"image\": \"/cdn/img/product/[size]/CL-08-GR.webp\",\n \"sku\": \"CL-08-GR\",\n \"color\": \"#C2B280\",\n \"price\": 7750\n },\n {\n \"name\": \"Tulip Magenta\",\n \"image\": \"/cdn/img/product/[size]/CL-08-PI.webp\",\n \"sku\": \"CL-08-PI\",\n \"color\": \"#D65282\",\n \"price\": 7900\n }\n ]\n },\n {\n \"name\": \"TerraFirma Veneto\",\n \"id\": \"CL-09\",\n \"category\": \"classic\",\n \"highlights\": [\n \"Elegant Italian design with sleek lines and a vibrant aesthetic\",\n \"Precision mechanics for vineyard and orchard maneuverability\",\n \"Comfort-focused design with a flair for the dramatic\"\n ],\n \"variants\": [\n {\n \"name\": \"Adriatic Blue\",\n \"image\": \"/cdn/img/product/[size]/CL-09-BL.webp\",\n \"sku\": \"CL-09-BL\",\n \"color\": \"#2f6ea3\",\n \"price\": 2950\n },\n {\n \"name\": \"Tuscan Green\",\n \"image\": \"/cdn/img/product/[size]/CL-09-GR.webp\",\n \"sku\": \"CL-09-GR\",\n \"color\": \"#518b2b\",\n \"price\": 2950\n }\n ]\n },\n {\n \"name\": \"Global Gallant\",\n \"id\": \"CL-10\",\n \"category\": \"classic\",\n \"highlights\": [\n \"Retro design with a nod to the golden era of farming\",\n \"Engine robustness that stands the test of time\",\n \"Functional simplicity for ease of operation in any region\"\n ],\n \"variants\": [\n {\n \"name\": \"Sahara Dawn\",\n \"image\": \"/cdn/img/product/[size]/CL-10-SD.webp\",\n \"sku\": \"CL-10-SD\",\n \"color\": \"#b8a875\",\n \"price\": 2600\n },\n {\n \"name\": \"Violet Vintage\",\n \"image\": \"/cdn/img/product/[size]/CL-10-VI.webp\",\n \"sku\": \"CL-10-VI\",\n \"color\": \"#8A2BE2\",\n \"price\": 2600\n }\n ]\n },\n {\n \"name\": \"Scandinavia Sower\",\n \"id\": \"CL-11\",\n \"category\": \"classic\",\n \"highlights\": [\n \"Authentic Swedish engineering for optimal cold-climate performance\",\n \"Sturdy build and mechanics for lifelong reliability\",\n \"Iconic design reflecting the simplicity and efficiency of Scandinavian style\"\n ],\n \"variants\": [\n {\n \"name\": \"Baltic Blue\",\n \"image\": \"/cdn/img/product/[size]/CL-11-SK.webp\",\n \"sku\": \"CL-11-SK\",\n \"color\": \"#95c1f4\",\n \"price\": 3100\n },\n {\n \"name\": \"Nordic Gold\",\n \"image\": \"/cdn/img/product/[size]/CL-11-YE.webp\",\n \"sku\": \"CL-11-YE\",\n \"color\": \"#FFD700\",\n \"price\": 3100\n }\n ]\n },\n {\n \"name\": \"Celerity Cruiser\",\n \"id\": \"CL-12\",\n \"category\": \"classic\",\n \"highlights\": [\n \"A speedster in the classic tractor segment, unparalleled in quick task completion\",\n \"Sleek design with aerodynamic contours for reduced drag\",\n \"Enhanced gearbox for smooth acceleration and nimble handling\"\n ],\n \"variants\": [\n {\n \"name\": \"Velocity Blue\",\n \"image\": \"/cdn/img/product/[size]/CL-12-BL.webp\",\n \"sku\": \"CL-12-BL\",\n \"color\": \"#1E90FF\",\n \"price\": 3200\n },\n {\n \"name\": \"Rally Red\",\n \"image\": \"/cdn/img/product/[size]/CL-12-RD.webp\",\n \"sku\": \"CL-12-RD\",\n \"color\": \"#ED2939\",\n \"price\": 3200\n }\n ]\n },\n {\n \"name\": \"Rapid Racer\",\n \"id\": \"CL-13\",\n \"category\": \"classic\",\n \"highlights\": [\n \"Streamlined design for faster field operations\",\n \"Optimized gear ratios for efficient power transmission\",\n \"Advanced air flow system for superior engine cooling\"\n ],\n \"variants\": [\n {\n \"name\": \"Speedway Blue\",\n \"image\": \"/cdn/img/product/[size]/CL-13-BL.webp\",\n \"sku\": \"CL-13-BL\",\n \"color\": \"#2679a6\",\n \"price\": 7500\n },\n {\n \"name\": \"Raceway Red\",\n \"image\": \"/cdn/img/product/[size]/CL-13-RD.webp\",\n \"sku\": \"CL-13-RD\",\n \"color\": \"#CF1020\",\n \"price\": 7500\n }\n ]\n },\n {\n \"name\": \"Caribbean Cruiser\",\n \"id\": \"CL-14\",\n \"category\": \"classic\",\n \"highlights\": [\n \"Robust construction for enduring performance\",\n \"Time-tested design with a proven track record\",\n \"Easy-to-service mechanics for long-term reliability\"\n ],\n \"variants\": [\n {\n \"name\": \"Emerald Grove\",\n \"image\": \"/cdn/img/product/[size]/CL-14-GR.webp\",\n \"sku\": \"CL-14-GR\",\n \"color\": \"#57ae13\",\n \"price\": 2300\n },\n {\n \"name\": \"Ruby Fields\",\n \"image\": \"/cdn/img/product/[size]/CL-14-RD.webp\",\n \"sku\": \"CL-14-RD\",\n \"color\": \"#cd2b1e\",\n \"price\": 2300\n }\n ]\n },\n {\n \"name\": \"Fieldmaster Classic\",\n \"id\": \"CL-15\",\n \"category\": \"classic\",\n \"highlights\": [\n \"Timeless design with a focus on comfort and control\",\n \"Efficient fuel consumption with a powerful engine\",\n \"Versatile functionality for all types of agricultural work\"\n ],\n \"variants\": [\n {\n \"name\": \"Vintage Pink\",\n \"image\": \"/cdn/img/product/[size]/CL-15-PI.webp\",\n \"sku\": \"CL-15-PI\",\n \"color\": \"#e1949e\",\n \"price\": 6200\n },\n {\n \"name\": \"Sahara Dust\",\n \"image\": \"/cdn/img/product/[size]/CL-15-SD.webp\",\n \"sku\": \"CL-15-SD\",\n \"color\": \"#dec78c\",\n \"price\": 6200\n }\n ]\n }\n ]\n}", "/**\n * @type {Database}\n */\nimport data from \"./database.json\" assert { type: \"json\" };\nexport default data;\n", "import { html } from \"../utils.js\";\n\nexport default () => {\n return html`\n \n \n \n \n \n \n \n \n \n \n `;\n};\n", "import VariantOption from \"../components/VariantOption.js\";\nimport Header from \"../../explore/components/Header.js\";\nimport Footer from \"../../explore/components/Footer.js\";\nimport AddToCart from \"../../checkout/components/AddToCart.js\";\nimport Recommendations from \"../../explore/components/Recommendations.js\";\nimport { html, src, srcset } from \"../utils.js\";\nimport data from \"../database/index.js\";\nimport Meta from \"../components/Meta.js\";\n\n/**\n * ProductPage component.\n * @param {object} props - The properties of the ProductPage component.\n * @param {string} props.id - The ID of the product.\n * @param {string} props.sku - The SKU of the selected variant.\n * @param {HonoContext} props.c - The hone object.\n * @returns {string} The ProductPage component markup.\n */\nexport default ({ id, sku, c }) => {\n const {\n name,\n variants,\n highlights = [],\n } = data.products.find((p) => p.id === id);\n const variant = variants.find((v) => v.sku === sku) || variants[0];\n\n return html`\n \n \n \n Tractor Store\n \n \n \n \n ${Meta()}\n \n \n ${Header({ c })}\n
    \n
    \n \n
    \n

    ${name}

    \n
      \n ${highlights\n .map((highlight) => html`
    • ${highlight}
    • `)\n .join(\"\")}\n
    \n
      \n ${variants\n .map((v) =>\n VariantOption({ ...v, selected: v.sku === variant.sku }),\n )\n .join(\"\")}\n
    \n ${AddToCart({ sku: variant.sku })}\n
    \n
    \n ${Recommendations({ skus: [variant.sku] })}\n
    \n ${Footer()}\n \n \n \n \n \n `;\n};\n", "import { html } from \"../utils.js\";\n\nexport default () => {\n return html`\n \n \n \n \n \n \n \n \n \n \n `;\n};\n", "import { html } from \"../utils.js\";\nimport Meta from \"./Meta.js\";\n\nexport default ({ content }) => {\n return html`\n \n \n \n Tractor Store\n \n \n \n \n ${Meta()}\n \n \n ${content}\n \n \n \n \n \n `;\n};\n", "import { html, src, srcset } from \"../utils.js\";\nimport Button from \"./Button.js\";\n\n/**\n * LineItem component.\n * @param {LineItem} props - The line item.\n * @returns {string} The LineItem component markup.\n */\nexport default ({ sku, id, name, quantity, total, image }) => {\n const url = `/product/${id}?sku=${sku}`;\n return html`
  • \n \n \n \n
    \n \n ${name}
    ${sku}\n
    \n\n
    \n ${quantity}\n\n
    \n \n ${Button({\n variant: \"secondary\",\n rounded: true,\n type: \"submit\",\n value: \"remove\",\n size: \"small\",\n title: `Remove ${name} from cart`,\n children: html`\n \n `,\n })}\n \n
    \n
    ${total} \u00D8
    \n
    \n
  • `;\n};\n", "import Page from \"../components/Page.js\";\nimport LineItem from \"../components/LineItem.js\";\nimport data from \"../database/index.js\";\nimport { readFromCookie } from \"../state.js\";\nimport { html } from \"../utils.js\";\nimport Header from \"../../explore/components/Header.js\";\nimport Footer from \"../../explore/components/Footer.js\";\nimport Recommendations from \"../../explore/components/Recommendations.js\";\nimport Button from \"../components/Button.js\";\n\n/**\n * Converts cookie line items to cart line items.\n * @param {CookieLineItem[]} items - List of cookie line items.\n * @returns {LineItem[]} - Cart line items.\n */\nfunction convertToLineItems(items) {\n return items.reduce((res, { sku, quantity }) => {\n const variant = data.variants.find((p) => p.sku === sku);\n if (variant) {\n res.push({ ...variant, quantity, total: variant.price * quantity });\n }\n return res;\n }, []);\n}\n\nexport default ({ c }) => {\n const cookieLineItems = readFromCookie(c);\n const lineItems = convertToLineItems(cookieLineItems);\n const total = lineItems.reduce((res, { total }) => res + total, 0);\n const skus = lineItems.map(({ sku }) => sku);\n const content = html`\n ${Header({ c })}\n
    \n

    Basket

    \n
      \n ${lineItems.map(LineItem).join(\"\")}\n
    \n
    \n

    Total: ${total} \u00D8

    \n\n
    \n ${Button({\n href: \"/checkout/checkout\",\n children: \"Checkout\",\n variant: \"primary\",\n })}\n ${Button({\n href: \"/\",\n children: \"Continue Shopping\",\n variant: \"secondary\",\n })}\n
    \n\n ${Recommendations({ skus })}\n
    \n ${Footer()}\n `;\n return Page({ content });\n};\n", "import { html, IMAGE_SERVER } from \"../utils.js\";\n\nexport default () => {\n return html`
    \n
    \n \n \n \n
    \n
    `;\n};\n", "import { html } from \"../utils.js\";\n\nexport default ({\n href,\n type,\n value,\n disabled,\n rounded,\n className,\n children,\n dataId,\n variant = \"secondary\",\n}) => {\n const tag = href ? \"a\" : \"button\";\n return html` <${tag}\n ${disabled ? \"disabled\" : \"\"}\n ${href ? `href=\"${href}\"` : \"\"}\n ${type ? `type=\"${type}\"` : \"\"}\n ${value ? `value=\"${value}\"` : \"\"}\n ${dataId ? `data-id=\"${dataId}\"` : \"\"}\n class=\"e_Button e_Button--${variant} ${className} ${rounded ? \"e_Button--rounded\" : \"\"}\"\n >\n
    ${children}
    \n `;\n};\n", "import data from \"../database/index.js\";\nimport { html, src, srcset } from \"../utils.js\";\nimport Button from \"./Button.js\";\n\nexport default () => {\n return html`
    \n
    \n
    \n ${Button({\n className: \"e_StorePicker_choose\",\n type: \"button\",\n children: \"choose a store\",\n })}\n
    \n \n
    \n

    Stores

    \n
      \n ${data.stores\n .map(\n (s) =>\n html`
    • \n
      \n \n

      \n ${s.name}
      \n ${s.street}
      \n ${s.city}\n

      \n
      \n ${Button({\n className: \"e_StorePicker_select\",\n type: \"button\",\n children: \"select\",\n dataId: s.id,\n })}\n
    • `,\n )\n .join(\"\")}\n
    \n
    \n
    \n
    `;\n};\n", "import Page from \"../components/Page.js\";\nimport CompactHeader from \"../components/CompactHeader.js\";\nimport { html } from \"../utils.js\";\nimport StorePicker from \"../../explore/components/StorePicker.js\";\n\n// imports from other teams -> fragments\nimport Footer from \"../../explore/components/Footer.js\";\nimport Button from \"../components/Button.js\";\n\nexport default () => {\n const content = html`\n ${CompactHeader()}\n
    \n

    Checkout

    \n \n

    Personal Data

    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n\n

    Store Pickup

    \n
    \n
    ${StorePicker()}
    \n \n \n
    \n\n
    \n ${Button({\n children: \"place order\",\n type: \"submit\",\n variant: \"primary\",\n disabled: true,\n })}\n ${Button({\n href: \"/checkout/cart\",\n children: \"back to cart\",\n variant: \"secondary\",\n })}\n
    \n \n
    \n ${Footer()}\n `;\n return Page({ content });\n};\n", "import Page from \"../components/Page.js\";\nimport Header from \"../../explore/components/Header.js\";\nimport { html } from \"../utils.js\";\nimport Footer from \"../../explore/components/Footer.js\";\nimport Button from \"../components/Button.js\";\n\n/**\n * Thanks component.\n * @param {object} props - The properties of the Thanks component.\n * @param {HonoContext} props.c - The hono context.\n * @returns {string} The Thanks component markup.\n */\nexport default ({ c }) => {\n const content = html`\n ${Header({ c })}\n
    \n

    Thanks for your order!

    \n

    We'll notify you, when its ready for pickup.

    \n\n ${Button({\n href: \"/\",\n children: \"Continue Shopping\",\n variant: \"secondary\",\n })}\n
    \n ${Footer()}\n `;\n return Page({ content });\n};\n", "import { readFromCookie, writeToCookie } from \"./state.js\";\n\n/**\n * Handles adding an item to the cart.\n * @param {HonoContext} c - The hono context.\n */\nexport async function handleAddToCart(c) {\n const body = await c.req.parseBody();\n const sku = body.sku;\n\n const items = readFromCookie(c);\n\n const lineItem = items.find((i) => i.sku === sku);\n if (lineItem) {\n lineItem.quantity++;\n } else {\n items.push({ sku, quantity: 1 });\n }\n writeToCookie(items, c);\n}\n\n/**\n * Handles removing an item from the cart.\n * @param {HonoContext} c - The hono context.\n */\nexport async function handleRemoveFromCart(c) {\n const body = await c.req.parseBody();\n const sku = body.sku;\n\n const items = readFromCookie(c);\n\n const lineItem = items.find((i) => i.sku === sku);\n if (lineItem) {\n const index = items.indexOf(lineItem);\n items.splice(index, 1);\n }\n\n writeToCookie(items, c);\n}\n\n/**\n * Handles placing an order.\n * @param {HonoContext} c - The hono context.\n */\nexport async function handlePlaceOrder(c) {\n writeToCookie([], c);\n}\n", "import { Hono } from \"hono\";\nimport { logger } from \"hono/logger\";\nimport { HomePage, StoresPage, CategoryPage } from \"./explore/index.js\";\nimport { ProductPage } from \"./decide/index.js\";\nimport {\n MiniCart,\n CartPage,\n Checkout,\n Thanks,\n handleAddToCart,\n handleRemoveFromCart,\n handlePlaceOrder,\n} from \"./checkout/index.js\";\n\n/**\n * Creates a server instance.\n * @returns {Hono} The server instance.\n */\nexport default function createServer() {\n const app = new Hono();\n app.use(logger());\n\n /**\n * Team Explore\n */\n app.get(\"/\", async (c) => {\n return c.html(HomePage({ c }));\n });\n app.get(\"/stores\", async (c) => {\n return c.html(StoresPage({ c }));\n });\n app.get(\"/products/:category?\", async (c) => {\n console.log(\"category\", c.req.param(\"category\"));\n const category = c.req.param(\"category\");\n return c.html(CategoryPage({ category, c }));\n });\n\n /**\n * Team Decide\n */\n app.get(\"/product/:id\", async (c) => {\n const { id } = c.req.param();\n const sku = c.req.query(\"sku\");\n return c.html(ProductPage({ id, sku, c }));\n });\n\n /**\n * Team Buy\n */\n app.get(\"/checkout/cart\", (c) => c.html(CartPage({ c })));\n app.get(\"/checkout/checkout\", (c) => c.html(Checkout()));\n app.get(\"/checkout/mini-cart\", (c) => c.html(MiniCart({ c })));\n app.post(\"/checkout/cart/add\", async (c) => {\n await handleAddToCart(c);\n return c.redirect(\"/checkout/cart\");\n });\n app.post(\"/checkout/cart/remove\", async (c) => {\n await handleRemoveFromCart(c);\n return c.redirect(\"/checkout/cart\");\n });\n app.post(\"/checkout/place-order\", async (c) => {\n await handlePlaceOrder(c);\n return c.redirect(\"/checkout/thanks\");\n });\n app.get(\"/checkout/thanks\", (c) => c.html(Thanks({ c })));\n\n return app;\n}\n", "// src/utils/filepath.ts\nvar getFilePath = (options) => {\n let filename = options.filename;\n const defaultDocument = options.defaultDocument || \"index.html\";\n if (filename.endsWith(\"/\")) {\n filename = filename.concat(defaultDocument);\n } else if (!filename.match(/\\.[a-zA-Z0-9]+$/)) {\n filename = filename.concat(\"/\" + defaultDocument);\n }\n const path = getFilePathWithoutDefaultDocument({\n root: options.root,\n filename\n });\n return path;\n};\nvar getFilePathWithoutDefaultDocument = (options) => {\n let root = options.root || \"\";\n let filename = options.filename;\n if (/(?:^|[\\/\\\\])\\.\\.(?:$|[\\/\\\\])/.test(filename)) {\n return;\n }\n filename = filename.replace(/^\\.?[\\/\\\\]/, \"\");\n filename = filename.replace(/\\\\/, \"/\");\n root = root.replace(/\\/$/, \"\");\n let path = root ? root + \"/\" + filename : filename;\n path = path.replace(/^\\.?\\//, \"\");\n return path;\n};\nexport {\n getFilePath,\n getFilePathWithoutDefaultDocument\n};\n", "// src/utils/mime.ts\nvar getMimeType = (filename, mimes = baseMimes) => {\n const regexp = /\\.([a-zA-Z0-9]+?)$/;\n const match = filename.match(regexp);\n if (!match) {\n return;\n }\n let mimeType = mimes[match[1]];\n if (mimeType && mimeType.startsWith(\"text\") || mimeType === \"application/json\") {\n mimeType += \"; charset=utf-8\";\n }\n return mimeType;\n};\nvar getExtension = (mimeType) => {\n for (const ext in baseMimes) {\n if (baseMimes[ext] === mimeType) {\n return ext;\n }\n }\n};\nvar baseMimes = {\n aac: \"audio/aac\",\n avi: \"video/x-msvideo\",\n avif: \"image/avif\",\n av1: \"video/av1\",\n bin: \"application/octet-stream\",\n bmp: \"image/bmp\",\n css: \"text/css\",\n csv: \"text/csv\",\n eot: \"application/vnd.ms-fontobject\",\n epub: \"application/epub+zip\",\n gif: \"image/gif\",\n gz: \"application/gzip\",\n htm: \"text/html\",\n html: \"text/html\",\n ico: \"image/x-icon\",\n ics: \"text/calendar\",\n jpeg: \"image/jpeg\",\n jpg: \"image/jpeg\",\n js: \"text/javascript\",\n json: \"application/json\",\n jsonld: \"application/ld+json\",\n map: \"application/json\",\n mid: \"audio/x-midi\",\n midi: \"audio/x-midi\",\n mjs: \"text/javascript\",\n mp3: \"audio/mpeg\",\n mp4: \"video/mp4\",\n mpeg: \"video/mpeg\",\n oga: \"audio/ogg\",\n ogv: \"video/ogg\",\n ogx: \"application/ogg\",\n opus: \"audio/opus\",\n otf: \"font/otf\",\n pdf: \"application/pdf\",\n png: \"image/png\",\n rtf: \"application/rtf\",\n svg: \"image/svg+xml\",\n tif: \"image/tiff\",\n tiff: \"image/tiff\",\n ts: \"video/mp2t\",\n ttf: \"font/ttf\",\n txt: \"text/plain\",\n wasm: \"application/wasm\",\n webm: \"video/webm\",\n weba: \"audio/webm\",\n webp: \"image/webp\",\n woff: \"font/woff\",\n woff2: \"font/woff2\",\n xhtml: \"application/xhtml+xml\",\n xml: \"application/xml\",\n zip: \"application/zip\",\n \"3gp\": \"video/3gpp\",\n \"3g2\": \"video/3gpp2\",\n gltf: \"model/gltf+json\",\n glb: \"model/gltf-binary\"\n};\nexport {\n getExtension,\n getMimeType\n};\n", "// src/middleware/serve-static/index.ts\nimport { getFilePath, getFilePathWithoutDefaultDocument } from \"../../utils/filepath.js\";\nimport { getMimeType } from \"../../utils/mime.js\";\nvar DEFAULT_DOCUMENT = \"index.html\";\nvar defaultPathResolve = (path) => path;\nvar serveStatic = (options) => {\n return async (c, next) => {\n if (c.finalized) {\n await next();\n return;\n }\n const url = new URL(c.req.url);\n let filename = options.path ?? decodeURI(url.pathname);\n filename = options.rewriteRequestPath ? options.rewriteRequestPath(filename) : filename;\n const root = options.root;\n let path = getFilePath({\n filename,\n root,\n defaultDocument: DEFAULT_DOCUMENT\n });\n if (!path) {\n return await next();\n }\n const getContent = options.getContent;\n const pathResolve = options.pathResolve ?? defaultPathResolve;\n path = pathResolve(path);\n let content = await getContent(path);\n if (!content) {\n let pathWithOutDefaultDocument = getFilePathWithoutDefaultDocument({\n filename,\n root\n });\n if (!pathWithOutDefaultDocument) {\n return await next();\n }\n pathWithOutDefaultDocument = pathResolve(pathWithOutDefaultDocument);\n content = await getContent(pathWithOutDefaultDocument);\n if (content) {\n path = pathWithOutDefaultDocument;\n }\n }\n if (content) {\n let mimeType;\n if (options.mimes) {\n mimeType = getMimeType(path, options.mimes) ?? getMimeType(path);\n } else {\n mimeType = getMimeType(path);\n }\n if (mimeType) {\n c.header(\"Content-Type\", mimeType);\n }\n return c.body(content);\n }\n await options.onNotFound?.(path, c);\n await next();\n return;\n };\n};\nexport {\n serveStatic\n};\n", "// src/adapter/cloudflare-workers/utils.ts\nvar getContentFromKVAsset = async (path, options) => {\n let ASSET_MANIFEST;\n if (options && options.manifest) {\n if (typeof options.manifest === \"string\") {\n ASSET_MANIFEST = JSON.parse(options.manifest);\n } else {\n ASSET_MANIFEST = options.manifest;\n }\n } else {\n if (typeof __STATIC_CONTENT_MANIFEST === \"string\") {\n ASSET_MANIFEST = JSON.parse(__STATIC_CONTENT_MANIFEST);\n } else {\n ASSET_MANIFEST = __STATIC_CONTENT_MANIFEST;\n }\n }\n let ASSET_NAMESPACE;\n if (options && options.namespace) {\n ASSET_NAMESPACE = options.namespace;\n } else {\n ASSET_NAMESPACE = __STATIC_CONTENT;\n }\n const key = ASSET_MANIFEST[path] || path;\n if (!key) {\n return null;\n }\n const content = await ASSET_NAMESPACE.get(key, { type: \"arrayBuffer\" });\n if (!content) {\n return null;\n }\n return content;\n};\nexport {\n getContentFromKVAsset\n};\n", "// src/adapter/cloudflare-workers/serve-static.ts\nimport { serveStatic as baseServeStatic } from \"../../middleware/serve-static/index.js\";\nimport { getContentFromKVAsset } from \"./utils.js\";\nvar serveStatic = (options) => {\n return async function serveStatic2(c, next) {\n const getContent = async (path) => {\n return getContentFromKVAsset(path, {\n manifest: options.manifest,\n namespace: options.namespace ? options.namespace : c.env ? c.env.__STATIC_CONTENT : void 0\n });\n };\n return baseServeStatic({\n ...options,\n getContent\n })(c, next);\n };\n};\nexport {\n serveStatic\n};\n", "// src/adapter/cloudflare-workers/serve-static-module.ts\nimport { serveStatic } from \"./serve-static.js\";\nvar module = (options) => {\n return serveStatic(options);\n};\nexport {\n module as serveStatic\n};\n", "import createServer from \"./server.js\";\nimport { serveStatic } from \"hono/cloudflare-workers\";\nimport manifest from \"__STATIC_CONTENT_MANIFEST\";\n\nconst app = createServer();\n\nconst setCacheAndCors = async (c, next) => {\n await next();\n c.res.headers.append(\"Cache-Control\", \"public, max-age=3600\"); // 1 hour cache\n c.res.headers.append(\"Access-Control-Allow-Origin\", \"*\");\n c.res.headers.append(\"Access-Control-Allow-Methods\", \"GET,OPTIONS\");\n};\n\napp.use(\"/cdn/*\", setCacheAndCors);\napp.use(\"/cdn/*\", serveStatic({ root: \"./\", manifest }));\n[\"explore\", \"decide\", \"checkout\"].forEach((team) => {\n app.use(`/${team}/static/*`, setCacheAndCors);\n app.use(`/${team}/static/*`, serveStatic({ root: `./`, manifest }));\n});\n\nexport default app;\n", "import type { Middleware } from \"./common\";\n\nconst drainBody: Middleware = async (request, env, _ctx, middlewareCtx) => {\n\ttry {\n\t\treturn await middlewareCtx.next(request, env);\n\t} finally {\n\t\ttry {\n\t\t\tif (request.body !== null && !request.bodyUsed) {\n\t\t\t\tconst reader = request.body.getReader();\n\t\t\t\twhile (!(await reader.read()).done) {}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(\"Failed to drain the unused request body.\", e);\n\t\t}\n\t}\n};\n\nexport default drainBody;\n", "import type { Middleware } from \"./common\";\n\ninterface JsonError {\n\tmessage?: string;\n\tname?: string;\n\tstack?: string;\n\tcause?: JsonError;\n}\n\nfunction reduceError(e: any): JsonError {\n\treturn {\n\t\tname: e?.name,\n\t\tmessage: e?.message ?? String(e),\n\t\tstack: e?.stack,\n\t\tcause: e?.cause === undefined ? undefined : reduceError(e.cause),\n\t};\n}\n\n// See comment in `bundle.ts` for details on why this is needed\nconst jsonError: Middleware = async (request, env, _ctx, middlewareCtx) => {\n\ttry {\n\t\treturn await middlewareCtx.next(request, env);\n\t} catch (e: any) {\n\t\tconst error = reduceError(e);\n\t\treturn Response.json(error, {\n\t\t\tstatus: 500,\n\t\t\theaders: { \"MF-Experimental-Error-Stack\": \"true\" },\n\t\t});\n\t}\n};\n\nexport default jsonError;\n", "\t\t\t\timport worker, * as OTHER_EXPORTS from \"/Users/michael/Lab/tractor-store-blueprint/src/server.cloudflare.js\";\n\t\t\t\timport * as __MIDDLEWARE_0__ from \"/Users/michael/Lab/tractor-store-blueprint/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts\";\nimport * as __MIDDLEWARE_1__ from \"/Users/michael/Lab/tractor-store-blueprint/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts\";\n\t\t\t\t\n\t\t\t\tworker.middleware = [\n\t\t\t\t\t__MIDDLEWARE_0__.default,__MIDDLEWARE_1__.default,\n\t\t\t\t\t...(worker.middleware ?? []),\n\t\t\t\t].filter(Boolean);\n\t\t\t\t\n\t\t\t\texport * from \"/Users/michael/Lab/tractor-store-blueprint/src/server.cloudflare.js\";\n\t\t\t\texport default worker;", "export type Awaitable = T | Promise;\n// TODO: allow dispatching more events?\nexport type Dispatcher = (\n\ttype: \"scheduled\",\n\tinit: { cron?: string }\n) => Awaitable;\n\nexport type IncomingRequest = Request<\n\tunknown,\n\tIncomingRequestCfProperties\n>;\n\nexport interface MiddlewareContext {\n\tdispatch: Dispatcher;\n\tnext(request: IncomingRequest, env: any): Awaitable;\n}\n\nexport type Middleware = (\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tmiddlewareCtx: MiddlewareContext\n) => Awaitable;\n\nconst __facade_middleware__: Middleware[] = [];\n\n// The register functions allow for the insertion of one or many middleware,\n// We register internal middleware first in the stack, but have no way of controlling\n// the order that addMiddleware is run in service workers so need an internal function.\nexport function __facade_register__(...args: (Middleware | Middleware[])[]) {\n\t__facade_middleware__.push(...args.flat());\n}\nexport function __facade_registerInternal__(\n\t...args: (Middleware | Middleware[])[]\n) {\n\t__facade_middleware__.unshift(...args.flat());\n}\n\nfunction __facade_invokeChain__(\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tdispatch: Dispatcher,\n\tmiddlewareChain: Middleware[]\n): Awaitable {\n\tconst [head, ...tail] = middlewareChain;\n\tconst middlewareCtx: MiddlewareContext = {\n\t\tdispatch,\n\t\tnext(newRequest, newEnv) {\n\t\t\treturn __facade_invokeChain__(newRequest, newEnv, ctx, dispatch, tail);\n\t\t},\n\t};\n\treturn head(request, env, ctx, middlewareCtx);\n}\n\nexport function __facade_invoke__(\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tdispatch: Dispatcher,\n\tfinalMiddleware: Middleware\n): Awaitable {\n\treturn __facade_invokeChain__(request, env, ctx, dispatch, [\n\t\t...__facade_middleware__,\n\t\tfinalMiddleware,\n\t]);\n}\n", "// This loads all middlewares exposed on the middleware object and then starts\n// the invocation chain. The big idea is that we can add these to the middleware\n// export dynamically through wrangler, or we can potentially let users directly\n// add them as a sort of \"plugin\" system.\n\nimport ENTRY from \"/Users/michael/Lab/tractor-store-blueprint/.wrangler/tmp/bundle-Gfko8A/middleware-insertion-facade.js\";\nimport { __facade_invoke__, __facade_register__, Dispatcher } from \"/Users/michael/Lab/tractor-store-blueprint/node_modules/wrangler/templates/middleware/common.ts\";\nimport type {\n\tWithMiddleware,\n\tWorkerEntrypointConstructor,\n} from \"/Users/michael/Lab/tractor-store-blueprint/.wrangler/tmp/bundle-Gfko8A/middleware-insertion-facade.js\";\n\n// Preserve all the exports from the worker\nexport * from \"/Users/michael/Lab/tractor-store-blueprint/.wrangler/tmp/bundle-Gfko8A/middleware-insertion-facade.js\";\n\nclass __Facade_ScheduledController__ implements ScheduledController {\n\treadonly #noRetry: ScheduledController[\"noRetry\"];\n\n\tconstructor(\n\t\treadonly scheduledTime: number,\n\t\treadonly cron: string,\n\t\tnoRetry: ScheduledController[\"noRetry\"]\n\t) {\n\t\tthis.#noRetry = noRetry;\n\t}\n\n\tnoRetry() {\n\t\tif (!(this instanceof __Facade_ScheduledController__)) {\n\t\t\tthrow new TypeError(\"Illegal invocation\");\n\t\t}\n\t\t// Need to call native method immediately in case uncaught error thrown\n\t\tthis.#noRetry();\n\t}\n}\n\nfunction wrapExportedHandler(\n\tworker: WithMiddleware\n): ExportedHandler {\n\t// If we don't have any middleware defined, just return the handler as is\n\tif (worker.middleware === undefined || worker.middleware.length === 0) {\n\t\treturn worker;\n\t}\n\t// Otherwise, register all middleware once\n\tfor (const middleware of worker.middleware) {\n\t\t__facade_register__(middleware);\n\t}\n\n\tconst fetchDispatcher: ExportedHandlerFetchHandler = function (\n\t\trequest,\n\t\tenv,\n\t\tctx\n\t) {\n\t\tif (worker.fetch === undefined) {\n\t\t\tthrow new Error(\"Handler does not export a fetch() function.\");\n\t\t}\n\t\treturn worker.fetch(request, env, ctx);\n\t};\n\n\treturn {\n\t\t...worker,\n\t\tfetch(request, env, ctx) {\n\t\t\tconst dispatcher: Dispatcher = function (type, init) {\n\t\t\t\tif (type === \"scheduled\" && worker.scheduled !== undefined) {\n\t\t\t\t\tconst controller = new __Facade_ScheduledController__(\n\t\t\t\t\t\tDate.now(),\n\t\t\t\t\t\tinit.cron ?? \"\",\n\t\t\t\t\t\t() => {}\n\t\t\t\t\t);\n\t\t\t\t\treturn worker.scheduled(controller, env, ctx);\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn __facade_invoke__(request, env, ctx, dispatcher, fetchDispatcher);\n\t\t},\n\t};\n}\n\nfunction wrapWorkerEntrypoint(\n\tklass: WithMiddleware\n): WorkerEntrypointConstructor {\n\t// If we don't have any middleware defined, just return the handler as is\n\tif (klass.middleware === undefined || klass.middleware.length === 0) {\n\t\treturn klass;\n\t}\n\t// Otherwise, register all middleware once\n\tfor (const middleware of klass.middleware) {\n\t\t__facade_register__(middleware);\n\t}\n\n\t// `extend`ing `klass` here so other RPC methods remain callable\n\treturn class extends klass {\n\t\t#fetchDispatcher: ExportedHandlerFetchHandler> = (\n\t\t\trequest,\n\t\t\tenv,\n\t\t\tctx\n\t\t) => {\n\t\t\tthis.env = env;\n\t\t\tthis.ctx = ctx;\n\t\t\tif (super.fetch === undefined) {\n\t\t\t\tthrow new Error(\"Entrypoint class does not define a fetch() function.\");\n\t\t\t}\n\t\t\treturn super.fetch(request);\n\t\t};\n\n\t\t#dispatcher: Dispatcher = (type, init) => {\n\t\t\tif (type === \"scheduled\" && super.scheduled !== undefined) {\n\t\t\t\tconst controller = new __Facade_ScheduledController__(\n\t\t\t\t\tDate.now(),\n\t\t\t\t\tinit.cron ?? \"\",\n\t\t\t\t\t() => {}\n\t\t\t\t);\n\t\t\t\treturn super.scheduled(controller);\n\t\t\t}\n\t\t};\n\n\t\tfetch(request: Request) {\n\t\t\treturn __facade_invoke__(\n\t\t\t\trequest,\n\t\t\t\tthis.env,\n\t\t\t\tthis.ctx,\n\t\t\t\tthis.#dispatcher,\n\t\t\t\tthis.#fetchDispatcher\n\t\t\t);\n\t\t}\n\t};\n}\n\nlet WRAPPED_ENTRY: ExportedHandler | WorkerEntrypointConstructor | undefined;\nif (typeof ENTRY === \"object\") {\n\tWRAPPED_ENTRY = wrapExportedHandler(ENTRY);\n} else if (typeof ENTRY === \"function\") {\n\tWRAPPED_ENTRY = wrapWorkerEntrypoint(ENTRY);\n}\nexport default WRAPPED_ENTRY;\n"], + "mappings": ";;;;;AAAA,IAAM,OAAO,oBAAI,IAAI;AAErB,SAAS,SAAS,SAAS,MAAM;AAChC,QAAM,MACL,mBAAmB,MAChB,UACA,IAAI;AAAA,KACH,OAAO,YAAY,WACjB,IAAI,QAAQ,SAAS,IAAI,IACzB,SACD;AAAA,EACF;AACJ,MAAI,IAAI,QAAQ,IAAI,SAAS,SAAS,IAAI,aAAa,UAAU;AAChE,QAAI,CAAC,KAAK,IAAI,IAAI,SAAS,CAA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C;AAAA,UACR;AACA,iBAAO,OAAO,UAAU,YAAY,KAAK,GAAG;AAAA,QAC7C;AAAA,MACD;AACA,aAAO,kBAAkB,SAAS,KAAK,KAAK,YAAY,eAAe;AAAA,IACxE;AAAA,EACD;AACD;AAEA,SAAS,qBACR,OAC8B;AAE9B,MAAI,MAAM,eAAe,UAAa,MAAM,WAAW,WAAW,GAAG;AACpE,WAAO;AAAA,EACR;AAEA,aAAW,cAAc,MAAM,YAAY;AAC1C,wBAAoB,UAAU;AAAA,EAC/B;AAGA,SAAO,cAAc,MAAM;AAAA,IAC1B,mBAAyE,CACxE,SACA,KACA,QACI;AACJ,WAAK,MAAM;AACX,WAAK,MAAM;AACX,UAAI,MAAM,UAAU,QAAW;AAC9B,cAAM,IAAI,MAAM,sDAAsD;AAAA,MACvE;AACA,aAAO,MAAM,MAAM,OAAO;AAAA,IAC3B;AAAA,IAEA,cAA0B,CAAC,MAAM,SAAS;AACzC,UAAI,SAAS,eAAe,MAAM,cAAc,QAAW;AAC1D,cAAM,aAAa,IAAI;AAAA,UACtB,KAAK,IAAI;AAAA,UACT,KAAK,QAAQ;AAAA,UACb,MAAM;AAAA,UAAC;AAAA,QACR;AACA,eAAO,MAAM,UAAU,UAAU;AAAA,MAClC;AAAA,IACD;AAAA,IAEA,MAAM,SAAwD;AAC7D,aAAO;AAAA,QACN;AAAA,QACA,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,MACN;AAAA,IACD;AAAA,EACD;AACD;AAEA,IAAI;AACJ,IAAI,OAAO,wCAAU,UAAU;AAC9B,kBAAgB,oBAAoB,mCAAK;AAC1C,WAAW,OAAO,wCAAU,YAAY;AACvC,kBAAgB,qBAAqB,mCAAK;AAC3C;AACA,IAAO,kCAAQ;", + "names": ["html", "html2", "raw", "app", "r", "r", "Node", "Node", "Hono", "process", "database_default", "quantity", "html", "IMAGE_SERVER", "src", "srcset", "html", "html", "IMAGE_SERVER", "html", "IMAGE_SERVER", "html", "src", "srcset", "database_default", "r", "html", "html", "html", "database_default", "src", "srcset", "html", "src", "srcset", "_a", "html", "database_default", "html", "src", "srcset", "html", "_a", "database_default", "c", "html", "html", "IMAGE_SERVER", "src", "srcset", "html", "database_default", "database_default", "database_default", "database_default", "database_default", "Meta_default", "html", "_a", "database_default", "html", "Meta_default", "src", "srcset", "Meta_default", "_a", "Meta_default", "database_default", "total", "Button_default", "html", "html", "Button_default", "database_default", "src", "srcset", "app", "Hono", "serveStatic", "serveStatic2", "serveStatic"] +} diff --git a/src/server.cloudflare.js b/src/server.cloudflare.js index 78faa55..a3a63fe 100644 --- a/src/server.cloudflare.js +++ b/src/server.cloudflare.js @@ -4,12 +4,11 @@ import manifest from "__STATIC_CONTENT_MANIFEST"; const app = createServer(); -const setCacheAndCors = (req, res, next) => { - res.setHeader("Cache-Control", "public, max-age=3600"); // 1 hour cache - res.setHeader("Access-Control-Allow-Origin", "*"); - res.setHeader("Access-Control-Allow-Methods", "GET,POST,PUT,DELETE,OPTIONS"); - res.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization"); - next(); +const setCacheAndCors = async (c, next) => { + await next(); + c.res.headers.append("Cache-Control", "public, max-age=3600"); // 1 hour cache + c.res.headers.append("Access-Control-Allow-Origin", "*"); + c.res.headers.append("Access-Control-Allow-Methods", "GET,OPTIONS"); }; app.use("/cdn/*", setCacheAndCors); diff --git a/wrangler.toml b/wrangler.toml deleted file mode 100644 index bd69b53..0000000 --- a/wrangler.toml +++ /dev/null @@ -1,6 +0,0 @@ -name = "tractor-store-blueprint" -main = "src/server.cloudflare.js" -compatibility_date = "2024-03-12" - -[site] -bucket = "./public" \ No newline at end of file