hosted/ifttt/manifest_8TxLPx6M.mjs

157 lines
15 KiB
JavaScript

import '@astrojs/internal-helpers/path';
import '@astrojs/internal-helpers/remote';
import 'piccolore';
import { p as NOOP_MIDDLEWARE_HEADER, q as decodeKey } from './chunks/astro/server_C2IO8wDL.mjs';
import 'clsx';
import 'es-module-lexer';
import 'html-escaper';
const NOOP_MIDDLEWARE_FN = async (_ctx, next) => {
const response = await next();
response.headers.set(NOOP_MIDDLEWARE_HEADER, "true");
return response;
};
const codeToStatusMap = {
// Implemented from IANA HTTP Status Code Registry
// https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
BAD_REQUEST: 400,
UNAUTHORIZED: 401,
PAYMENT_REQUIRED: 402,
FORBIDDEN: 403,
NOT_FOUND: 404,
METHOD_NOT_ALLOWED: 405,
NOT_ACCEPTABLE: 406,
PROXY_AUTHENTICATION_REQUIRED: 407,
REQUEST_TIMEOUT: 408,
CONFLICT: 409,
GONE: 410,
LENGTH_REQUIRED: 411,
PRECONDITION_FAILED: 412,
CONTENT_TOO_LARGE: 413,
URI_TOO_LONG: 414,
UNSUPPORTED_MEDIA_TYPE: 415,
RANGE_NOT_SATISFIABLE: 416,
EXPECTATION_FAILED: 417,
MISDIRECTED_REQUEST: 421,
UNPROCESSABLE_CONTENT: 422,
LOCKED: 423,
FAILED_DEPENDENCY: 424,
TOO_EARLY: 425,
UPGRADE_REQUIRED: 426,
PRECONDITION_REQUIRED: 428,
TOO_MANY_REQUESTS: 429,
REQUEST_HEADER_FIELDS_TOO_LARGE: 431,
UNAVAILABLE_FOR_LEGAL_REASONS: 451,
INTERNAL_SERVER_ERROR: 500,
NOT_IMPLEMENTED: 501,
BAD_GATEWAY: 502,
SERVICE_UNAVAILABLE: 503,
GATEWAY_TIMEOUT: 504,
HTTP_VERSION_NOT_SUPPORTED: 505,
VARIANT_ALSO_NEGOTIATES: 506,
INSUFFICIENT_STORAGE: 507,
LOOP_DETECTED: 508,
NETWORK_AUTHENTICATION_REQUIRED: 511
};
Object.entries(codeToStatusMap).reduce(
// reverse the key-value pairs
(acc, [key, value]) => ({ ...acc, [value]: key }),
{}
);
function sanitizeParams(params) {
return Object.fromEntries(
Object.entries(params).map(([key, value]) => {
if (typeof value === "string") {
return [key, value.normalize().replace(/#/g, "%23").replace(/\?/g, "%3F")];
}
return [key, value];
})
);
}
function getParameter(part, params) {
if (part.spread) {
return params[part.content.slice(3)] || "";
}
if (part.dynamic) {
if (!params[part.content]) {
throw new TypeError(`Missing parameter: ${part.content}`);
}
return params[part.content];
}
return part.content.normalize().replace(/\?/g, "%3F").replace(/#/g, "%23").replace(/%5B/g, "[").replace(/%5D/g, "]");
}
function getSegment(segment, params) {
const segmentPath = segment.map((part) => getParameter(part, params)).join("");
return segmentPath ? "/" + segmentPath : "";
}
function getRouteGenerator(segments, addTrailingSlash) {
return (params) => {
const sanitizedParams = sanitizeParams(params);
let trailing = "";
if (addTrailingSlash === "always" && segments.length) {
trailing = "/";
}
const path = segments.map((segment) => getSegment(segment, sanitizedParams)).join("") + trailing;
return path || "/";
};
}
function deserializeRouteData(rawRouteData) {
return {
route: rawRouteData.route,
type: rawRouteData.type,
pattern: new RegExp(rawRouteData.pattern),
params: rawRouteData.params,
component: rawRouteData.component,
generate: getRouteGenerator(rawRouteData.segments, rawRouteData._meta.trailingSlash),
pathname: rawRouteData.pathname || void 0,
segments: rawRouteData.segments,
prerender: rawRouteData.prerender,
redirect: rawRouteData.redirect,
redirectRoute: rawRouteData.redirectRoute ? deserializeRouteData(rawRouteData.redirectRoute) : void 0,
fallbackRoutes: rawRouteData.fallbackRoutes.map((fallback) => {
return deserializeRouteData(fallback);
}),
isIndex: rawRouteData.isIndex,
origin: rawRouteData.origin
};
}
function deserializeManifest(serializedManifest) {
const routes = [];
for (const serializedRoute of serializedManifest.routes) {
routes.push({
...serializedRoute,
routeData: deserializeRouteData(serializedRoute.routeData)
});
const route = serializedRoute;
route.routeData = deserializeRouteData(serializedRoute.routeData);
}
const assets = new Set(serializedManifest.assets);
const componentMetadata = new Map(serializedManifest.componentMetadata);
const inlinedScripts = new Map(serializedManifest.inlinedScripts);
const clientDirectives = new Map(serializedManifest.clientDirectives);
const serverIslandNameMap = new Map(serializedManifest.serverIslandNameMap);
const key = decodeKey(serializedManifest.key);
return {
// in case user middleware exists, this no-op middleware will be reassigned (see plugin-ssr.ts)
middleware() {
return { onRequest: NOOP_MIDDLEWARE_FN };
},
...serializedManifest,
assets,
componentMetadata,
inlinedScripts,
clientDirectives,
routes,
serverIslandNameMap,
key
};
}
const manifest = deserializeManifest({"hrefRoot":"file:///root/tmp/hosted/ifttt-src/","cacheDir":"file:///root/tmp/hosted/ifttt-src/node_modules/.astro/","outDir":"file:///root/tmp/hosted/ifttt/","srcDir":"file:///root/tmp/hosted/ifttt-src/src/","publicDir":"file:///root/tmp/hosted/ifttt-src/public/","buildClientDir":"file:///root/tmp/hosted/ifttt/client/","buildServerDir":"file:///root/tmp/hosted/ifttt/server/","adapterName":"","routes":[{"file":"file:///root/tmp/hosted/ifttt/about/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/about","isIndex":true,"type":"page","pattern":"^\\/about\\/?$","segments":[[{"content":"about","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/about/index.astro","pathname":"/about","prerender":true,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"file:///root/tmp/hosted/ifttt/api/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/api","isIndex":true,"type":"page","pattern":"^\\/api\\/?$","segments":[[{"content":"api","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/api/index.astro","pathname":"/api","prerender":true,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"file:///root/tmp/hosted/ifttt/fr/governance/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/fr/governance","isIndex":true,"type":"page","pattern":"^\\/fr\\/governance\\/?$","segments":[[{"content":"fr","dynamic":false,"spread":false}],[{"content":"governance","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/fr/governance/index.astro","pathname":"/fr/governance","prerender":true,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"file:///root/tmp/hosted/ifttt/fr/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/fr","isIndex":true,"type":"page","pattern":"^\\/fr\\/?$","segments":[[{"content":"fr","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/fr/index.astro","pathname":"/fr","prerender":true,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"file:///root/tmp/hosted/ifttt/governance/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/governance","isIndex":true,"type":"page","pattern":"^\\/governance\\/?$","segments":[[{"content":"governance","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/governance/index.astro","pathname":"/governance","prerender":true,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"file:///root/tmp/hosted/ifttt/pricing/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/pricing","isIndex":true,"type":"page","pattern":"^\\/pricing\\/?$","segments":[[{"content":"pricing","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/pricing/index.astro","pathname":"/pricing","prerender":true,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"file:///root/tmp/hosted/ifttt/review/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/review","isIndex":true,"type":"page","pattern":"^\\/review\\/?$","segments":[[{"content":"review","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/review/index.astro","pathname":"/review","prerender":true,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"file:///root/tmp/hosted/ifttt/verticals/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/verticals","isIndex":true,"type":"page","pattern":"^\\/verticals\\/?$","segments":[[{"content":"verticals","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/verticals/index.astro","pathname":"/verticals","prerender":true,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"file:///root/tmp/hosted/ifttt/whitepaper/thanks/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/whitepaper/thanks","isIndex":true,"type":"page","pattern":"^\\/whitepaper\\/thanks\\/?$","segments":[[{"content":"whitepaper","dynamic":false,"spread":false}],[{"content":"thanks","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/whitepaper/thanks/index.astro","pathname":"/whitepaper/thanks","prerender":true,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"file:///root/tmp/hosted/ifttt/whitepaper/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/whitepaper","isIndex":true,"type":"page","pattern":"^\\/whitepaper\\/?$","segments":[[{"content":"whitepaper","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/whitepaper/index.astro","pathname":"/whitepaper","prerender":true,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"file:///root/tmp/hosted/ifttt/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/","isIndex":true,"type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":true,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}}],"site":"https://infrafabric.io","base":"/","trailingSlash":"ignore","compressHTML":true,"componentMetadata":[["/root/tmp/hosted/ifttt-src/src/pages/about/index.astro",{"propagation":"none","containsHead":true}],["/root/tmp/hosted/ifttt-src/src/pages/api/index.astro",{"propagation":"none","containsHead":true}],["/root/tmp/hosted/ifttt-src/src/pages/fr/governance/index.astro",{"propagation":"none","containsHead":true}],["/root/tmp/hosted/ifttt-src/src/pages/fr/index.astro",{"propagation":"none","containsHead":true}],["/root/tmp/hosted/ifttt-src/src/pages/governance/index.astro",{"propagation":"none","containsHead":true}],["/root/tmp/hosted/ifttt-src/src/pages/index.astro",{"propagation":"none","containsHead":true}],["/root/tmp/hosted/ifttt-src/src/pages/pricing/index.astro",{"propagation":"none","containsHead":true}],["/root/tmp/hosted/ifttt-src/src/pages/review/index.astro",{"propagation":"none","containsHead":true}],["/root/tmp/hosted/ifttt-src/src/pages/verticals/[slug].astro",{"propagation":"none","containsHead":true}],["/root/tmp/hosted/ifttt-src/src/pages/verticals/index.astro",{"propagation":"none","containsHead":true}],["/root/tmp/hosted/ifttt-src/src/pages/whitepaper/index.astro",{"propagation":"none","containsHead":true}],["/root/tmp/hosted/ifttt-src/src/pages/whitepaper/thanks/index.astro",{"propagation":"none","containsHead":true}]],"renderers":[],"clientDirectives":[["idle","(()=>{var l=(n,t)=>{let i=async()=>{await(await n())()},e=typeof t.value==\"object\"?t.value:void 0,s={timeout:e==null?void 0:e.timeout};\"requestIdleCallback\"in window?window.requestIdleCallback(i,s):setTimeout(i,s.timeout||200)};(self.Astro||(self.Astro={})).idle=l;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var n=(a,t)=>{let i=async()=>{await(await a())()};if(t.value){let e=matchMedia(t.value);e.matches?i():e.addEventListener(\"change\",i,{once:!0})}};(self.Astro||(self.Astro={})).media=n;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var a=(s,i,o)=>{let r=async()=>{await(await s())()},t=typeof i.value==\"object\"?i.value:void 0,c={rootMargin:t==null?void 0:t.rootMargin},n=new IntersectionObserver(e=>{for(let l of e)if(l.isIntersecting){n.disconnect(),r();break}},c);for(let e of o.children)n.observe(e)};(self.Astro||(self.Astro={})).visible=a;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000noop-middleware":"_noop-middleware.mjs","\u0000virtual:astro:actions/noop-entrypoint":"noop-entrypoint.mjs","\u0000@astro-page:src/pages/about/index@_@astro":"pages/about.astro.mjs","\u0000@astro-page:src/pages/api/index@_@astro":"pages/api.astro.mjs","\u0000@astro-page:src/pages/fr/governance/index@_@astro":"pages/fr/governance.astro.mjs","\u0000@astro-page:src/pages/fr/index@_@astro":"pages/fr.astro.mjs","\u0000@astro-page:src/pages/governance/index@_@astro":"pages/governance.astro.mjs","\u0000@astro-page:src/pages/pricing/index@_@astro":"pages/pricing.astro.mjs","\u0000@astro-page:src/pages/review/index@_@astro":"pages/review.astro.mjs","\u0000@astro-page:src/pages/verticals/[slug]@_@astro":"pages/verticals/_slug_.astro.mjs","\u0000@astro-page:src/pages/verticals/index@_@astro":"pages/verticals.astro.mjs","\u0000@astro-page:src/pages/whitepaper/thanks/index@_@astro":"pages/whitepaper/thanks.astro.mjs","\u0000@astro-page:src/pages/whitepaper/index@_@astro":"pages/whitepaper.astro.mjs","\u0000@astro-page:src/pages/index@_@astro":"pages/index.astro.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000@astrojs-manifest":"manifest_8TxLPx6M.mjs","/root/tmp/hosted/ifttt-src/node_modules/astro/dist/assets/services/sharp.js":"chunks/sharp_FDRi4Dya.mjs","astro:scripts/before-hydration.js":""},"inlinedScripts":[],"assets":["/file:///root/tmp/hosted/ifttt/about/index.html","/file:///root/tmp/hosted/ifttt/api/index.html","/file:///root/tmp/hosted/ifttt/fr/governance/index.html","/file:///root/tmp/hosted/ifttt/fr/index.html","/file:///root/tmp/hosted/ifttt/governance/index.html","/file:///root/tmp/hosted/ifttt/pricing/index.html","/file:///root/tmp/hosted/ifttt/review/index.html","/file:///root/tmp/hosted/ifttt/verticals/index.html","/file:///root/tmp/hosted/ifttt/whitepaper/thanks/index.html","/file:///root/tmp/hosted/ifttt/whitepaper/index.html","/file:///root/tmp/hosted/ifttt/index.html"],"buildFormat":"directory","checkOrigin":false,"allowedDomains":[],"serverIslandNameMap":[],"key":"9mvQ4IUn7fj1IgurndO2pJ9u5bmTvN/A6ryi83YVEfI="});
if (manifest.sessionConfig) manifest.sessionConfig.driverModule = null;
export { manifest };