kjelsrud.dev/node_modules/@astrojs/webapi/mod.js.map

1 line
195 KiB
Text
Raw Normal View History

2023-07-19 21:31:30 +02:00
{"version":3,"file":"mod.js","sources":["src/lib/utils.ts","src/lib/DOMException.ts","node_modules/event-target-shim/index.mjs","../../node_modules/.pnpm/urlpattern-polyfill@1.0.0-rc5/node_modules/urlpattern-polyfill/dist/index.js","src/lib/AnimationFrame.ts","src/lib/Node.ts","src/lib/CharacterData.ts","src/lib/CustomEvent.ts","src/lib/IdleCallback.ts","../../node_modules/.pnpm/@ungap+structured-clone@0.3.4/node_modules/@ungap/structured-clone/esm/types.js","../../node_modules/.pnpm/@ungap+structured-clone@0.3.4/node_modules/@ungap/structured-clone/esm/deserialize.js","../../node_modules/.pnpm/@ungap+structured-clone@0.3.4/node_modules/@ungap/structured-clone/esm/serialize.js","src/lib/structuredClone.ts","src/lib/Timeout.ts","src/lib/TreeWalker.ts","src/lib/ImageData.ts","src/lib/CanvasRenderingContext2D.ts","src/lib/CustomElementRegistry.ts","src/lib/Element.ts","src/lib/Document.ts","src/lib/HTMLCanvasElement.ts","src/lib/HTMLImageElement.ts","src/lib/Image.ts","src/lib/MediaQueryList.ts","src/lib/Observer.ts","src/lib/OffscreenCanvas.ts","src/lib/Storage.ts","src/lib/StyleSheet.ts","src/lib/Window.ts","src/lib/Alert.ts","src/exclusions.ts","src/inheritance.ts","src/polyfill.ts"],"sourcesContent":[null,null,"/**\n * Assert a condition.\n * @param condition The condition that it should satisfy.\n * @param message The error message.\n * @param args The arguments for replacing placeholders in the message.\n */\nfunction assertType(condition, message, ...args) {\n if (!condition) {\n throw new TypeError(format(message, args));\n }\n}\n/**\n * Convert a text and arguments to one string.\n * @param message The formating text\n * @param args The arguments.\n */\nfunction format(message, args) {\n let i = 0;\n return message.replace(/%[os]/gu, () => anyToString(args[i++]));\n}\n/**\n * Convert a value to a string representation.\n * @param x The value to get the string representation.\n */\nfunction anyToString(x) {\n if (typeof x !== \"object\" || x === null) {\n return String(x);\n }\n return Object.prototype.toString.call(x);\n}\n\nlet currentErrorHandler;\n/**\n * Set the error handler.\n * @param value The error handler to set.\n */\nfunction setErrorHandler(value) {\n assertType(typeof value === \"function\" || value === undefined, \"The error handler must be a function or undefined, but got %o.\", value);\n currentErrorHandler = value;\n}\n/**\n * Print a error message.\n * @param maybeError The error object.\n */\nfunction reportError(maybeError) {\n try {\n const error = maybeError instanceof Error\n ? maybeError\n : new Error(anyToString(maybeError));\n // Call the user-defined error handler if exists.\n if (currentErrorHandler) {\n currentErrorHandler(error);\n return;\n }\n // Dispatch an `error` event if this is on a browser.\n if (typeof dispatchEvent === \"function\" &&\n typeof ErrorEvent === \"function\") {\n dispatchEvent(new ErrorEvent(\"error\", { error, message: error.message }));\n }\n // Emit an `uncaughtException` event if this is on Node.js.\n //istanbul ignore else\n else if (typeof process !== \"undefined\" &&\n typeof process.emit === \"function\") {\n process.emit(\"uncaughtException\", error);\n return;\n }\n // Otherwise, print the error.\n console.error(error);\n }\n catch (_a) {\n // ignore.\n }\n}\n\n/**\n * The global object.\n */\n//istanbul ignore next\nconst Global = typeof window !== \"undefined\"\n ? window\n : typeof self !== \"undefined\"\n ? self\n : typeof global !== \"undefined\"\n ? global\n : typeof globalThis !== \"undefined\"\n ? globalThis\n : undefined;\n\nlet currentWarnHandler;\n/**\n * Set the warning handler.\n * @param value The warning handler to set.\n */\nfunction setWarningHandler(value) {\n assertType(typeof value === \"function\" || value === u