@cloudflare/vite-plugin 1.53.0 → 1.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/experimental-config.d.mts +43 -13
- package/dist/experimental-config.d.mts.map +1 -1
- package/dist/experimental-config.mjs +6 -1
- package/dist/experimental-config.mjs.map +1 -1
- package/dist/index.mjs +398 -127
- package/dist/index.mjs.map +1 -1
- package/dist/{open-PBXRGS4R-qOWuyhJy-DF6hl_jp.mjs → open-PBXRGS4R-DmJH7r1k-rXrDiJei.mjs} +5 -5
- package/dist/open-PBXRGS4R-DmJH7r1k-rXrDiJei.mjs.map +1 -0
- package/dist/{open-PBXRGS4R-BtaaKU2N.mjs → open-PBXRGS4R-rCTko7Ic.mjs} +4 -4
- package/dist/open-PBXRGS4R-rCTko7Ic.mjs.map +1 -0
- package/dist/{package-CU4Q20Pq.mjs → package-lfy4Z5C1.mjs} +2 -2
- package/dist/{package-CU4Q20Pq.mjs.map → package-lfy4Z5C1.mjs.map} +1 -1
- package/package.json +12 -12
- package/dist/open-PBXRGS4R-BtaaKU2N.mjs.map +0 -1
- package/dist/open-PBXRGS4R-qOWuyhJy-DF6hl_jp.mjs.map +0 -1
|
@@ -9,7 +9,7 @@ import { fileURLToPath } from "node:url";
|
|
|
9
9
|
import fs, { constants as constants$1 } from "node:fs/promises";
|
|
10
10
|
import process from "node:process";
|
|
11
11
|
|
|
12
|
-
//#region ../runtime-types/dist/open-PBXRGS4R-
|
|
12
|
+
//#region ../runtime-types/dist/open-PBXRGS4R-DmJH7r1k.mjs
|
|
13
13
|
var isDockerCached;
|
|
14
14
|
function hasDockerEnv() {
|
|
15
15
|
try {
|
|
@@ -307,8 +307,8 @@ async function defaultBrowser2() {
|
|
|
307
307
|
__name(defaultBrowser2, "defaultBrowser");
|
|
308
308
|
var is_in_ssh_default = Boolean(process.env.SSH_CONNECTION || process.env.SSH_CLIENT || process.env.SSH_TTY);
|
|
309
309
|
var fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
310
|
-
var __dirname = import.meta.url ? path2__default.dirname(fileURLToPath(import.meta.url)) : "";
|
|
311
|
-
var localXdgOpenPath = path2__default.join(__dirname, "xdg-open");
|
|
310
|
+
var __dirname$1 = import.meta.url ? path2__default.dirname(fileURLToPath(import.meta.url)) : "";
|
|
311
|
+
var localXdgOpenPath = path2__default.join(__dirname$1, "xdg-open");
|
|
312
312
|
var { platform, arch: arch$1 } = process;
|
|
313
313
|
var tryEachApp = /* @__PURE__ */ __name(async (apps2, opener) => {
|
|
314
314
|
if (apps2.length === 0) return;
|
|
@@ -416,7 +416,7 @@ var baseOpen = /* @__PURE__ */ __name(async (options) => {
|
|
|
416
416
|
} else {
|
|
417
417
|
if (app) command = app;
|
|
418
418
|
else {
|
|
419
|
-
const isBundled = !__dirname || __dirname === "/";
|
|
419
|
+
const isBundled = !__dirname$1 || __dirname$1 === "/";
|
|
420
420
|
let exeLocalXdgOpen = false;
|
|
421
421
|
try {
|
|
422
422
|
await fs.access(localXdgOpenPath, constants$1.X_OK);
|
|
@@ -526,4 +526,4 @@ var open_default = open;
|
|
|
526
526
|
|
|
527
527
|
//#endregion
|
|
528
528
|
export { open_default as default };
|
|
529
|
-
//# sourceMappingURL=open-PBXRGS4R-
|
|
529
|
+
//# sourceMappingURL=open-PBXRGS4R-DmJH7r1k-rXrDiJei.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-PBXRGS4R-DmJH7r1k-rXrDiJei.mjs","names":["process5","fs4","constants","stdout"],"sources":["../../runtime-types/dist/open-PBXRGS4R-DmJH7r1k.mjs"],"sourcesContent":["import { r as __name } from \"./chunk-Q72B4Q5Z-CeVNOsQb.mjs\";\nimport fs4, { constants } from \"node:fs/promises\";\nimport fs2 from \"node:fs\";\nimport os from \"node:os\";\nimport path2__default from \"node:path\";\nimport childProcess, { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport { Buffer } from \"node:buffer\";\nimport { fileURLToPath } from \"node:url\";\nimport process5 from \"node:process\";\n\n//#region ../workers-utils/dist/open-PBXRGS4R.mjs\nvar isDockerCached;\nfunction hasDockerEnv() {\n\ttry {\n\t\tfs2.statSync(\"/.dockerenv\");\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n__name(hasDockerEnv, \"hasDockerEnv\");\nfunction hasDockerCGroup() {\n\ttry {\n\t\treturn fs2.readFileSync(\"/proc/self/cgroup\", \"utf8\").includes(\"docker\");\n\t} catch {\n\t\treturn false;\n\t}\n}\n__name(hasDockerCGroup, \"hasDockerCGroup\");\nfunction isDocker() {\n\tif (isDockerCached === void 0) isDockerCached = hasDockerEnv() || hasDockerCGroup();\n\treturn isDockerCached;\n}\n__name(isDocker, \"isDocker\");\nvar cachedResult;\nvar hasContainerEnv = /* @__PURE__ */ __name(() => {\n\ttry {\n\t\tfs2.statSync(\"/run/.containerenv\");\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}, \"hasContainerEnv\");\nfunction isInsideContainer() {\n\tif (cachedResult === void 0) cachedResult = hasContainerEnv() || isDocker();\n\treturn cachedResult;\n}\n__name(isInsideContainer, \"isInsideContainer\");\nvar isWsl = /* @__PURE__ */ __name(() => {\n\tif (process5.platform !== \"linux\") return false;\n\tif (os.release().toLowerCase().includes(\"microsoft\")) {\n\t\tif (isInsideContainer()) return false;\n\t\treturn true;\n\t}\n\ttry {\n\t\treturn fs2.readFileSync(\"/proc/version\", \"utf8\").toLowerCase().includes(\"microsoft\") ? !isInsideContainer() : false;\n\t} catch {\n\t\treturn false;\n\t}\n}, \"isWsl\");\nvar is_wsl_default = process5.env.__IS_WSL_TEST__ ? isWsl : isWsl();\nvar execFile$1 = promisify(childProcess.execFile);\nvar powerShellPath = /* @__PURE__ */ __name(() => `${process5.env.SYSTEMROOT || process5.env.windir || String.raw`C:\\Windows`}\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe`, \"powerShellPath\");\nvar executePowerShell = /* @__PURE__ */ __name(async (command, options = {}) => {\n\tconst { powerShellPath: psPath,...execFileOptions } = options;\n\tconst encodedCommand = executePowerShell.encodeCommand(command);\n\treturn execFile$1(psPath ?? powerShellPath(), [...executePowerShell.argumentsPrefix, encodedCommand], {\n\t\tencoding: \"utf8\",\n\t\t...execFileOptions\n\t});\n}, \"executePowerShell\");\nexecutePowerShell.argumentsPrefix = [\n\t\"-NoProfile\",\n\t\"-NonInteractive\",\n\t\"-ExecutionPolicy\",\n\t\"Bypass\",\n\t\"-EncodedCommand\"\n];\nexecutePowerShell.encodeCommand = (command) => Buffer.from(command, \"utf16le\").toString(\"base64\");\nexecutePowerShell.escapeArgument = (value) => `'${String(value).replaceAll(\"'\", \"''\")}'`;\nfunction parseMountPointFromConfig(content) {\n\tfor (const line of content.split(\"\\n\")) {\n\t\tif (/^\\s*#/.test(line)) continue;\n\t\tconst match = /^\\s*root\\s*=\\s*(?<mountPoint>\"[^\"]*\"|'[^']*'|[^#]*)/.exec(line);\n\t\tif (!match) continue;\n\t\treturn match.groups.mountPoint.trim().replaceAll(/^[\"']|[\"']$/g, \"\");\n\t}\n}\n__name(parseMountPointFromConfig, \"parseMountPointFromConfig\");\nvar execFile2 = promisify(childProcess.execFile);\nvar wslDrivesMountPoint = /* @__PURE__ */ (() => {\n\tconst defaultMountPoint = \"/mnt/\";\n\tlet mountPoint;\n\treturn async function() {\n\t\tif (mountPoint) return mountPoint;\n\t\tconst configFilePath = \"/etc/wsl.conf\";\n\t\tlet isConfigFileExists = false;\n\t\ttry {\n\t\t\tawait fs4.access(configFilePath, constants.F_OK);\n\t\t\tisConfigFileExists = true;\n\t\t} catch {}\n\t\tif (!isConfigFileExists) return defaultMountPoint;\n\t\tconst parsedMountPoint = parseMountPointFromConfig(await fs4.readFile(configFilePath, { encoding: \"utf8\" }));\n\t\tif (parsedMountPoint === void 0) return defaultMountPoint;\n\t\tmountPoint = parsedMountPoint;\n\t\tmountPoint = mountPoint.endsWith(\"/\") ? mountPoint : `${mountPoint}/`;\n\t\treturn mountPoint;\n\t};\n})();\nvar powerShellPath2 = is_wsl_default ? /* @__PURE__ */ __name(async () => {\n\treturn `${await wslDrivesMountPoint()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;\n}, \"powerShellPathFromWsl\") : powerShellPath;\nvar canAccessPowerShellPromise;\nvar canAccessPowerShell = /* @__PURE__ */ __name(async () => {\n\tcanAccessPowerShellPromise ??= (async () => {\n\t\ttry {\n\t\t\tconst psPath = await powerShellPath2();\n\t\t\tawait fs4.access(psPath, constants.X_OK);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t})();\n\treturn canAccessPowerShellPromise;\n}, \"canAccessPowerShell\");\nvar wslDefaultBrowser = /* @__PURE__ */ __name(async () => {\n\tconst psPath = await powerShellPath2();\n\tconst { stdout } = await executePowerShell(String.raw`(Get-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice\").ProgId`, { powerShellPath: psPath });\n\treturn stdout.trim();\n}, \"wslDefaultBrowser\");\nvar convertWslPathToWindows = /* @__PURE__ */ __name(async (path2) => {\n\tif (/^[a-z]+:\\/\\//i.test(path2)) return path2;\n\ttry {\n\t\tconst { stdout } = await execFile2(\"wslpath\", [\"-aw\", path2], { encoding: \"utf8\" });\n\t\treturn stdout.trim();\n\t} catch {\n\t\treturn path2;\n\t}\n}, \"convertWslPathToWindows\");\nfunction defineLazyProperty(object, propertyName, valueGetter) {\n\tconst define = /* @__PURE__ */ __name((value) => Object.defineProperty(object, propertyName, {\n\t\tvalue,\n\t\tenumerable: true,\n\t\twritable: true\n\t}), \"define\");\n\tObject.defineProperty(object, propertyName, {\n\t\tconfigurable: true,\n\t\tenumerable: true,\n\t\tget() {\n\t\t\tconst result = valueGetter();\n\t\t\tdefine(result);\n\t\t\treturn result;\n\t\t},\n\t\tset(value) {\n\t\t\tdefine(value);\n\t\t}\n\t});\n\treturn object;\n}\n__name(defineLazyProperty, \"defineLazyProperty\");\nvar execFileAsync = promisify(execFile);\nasync function defaultBrowserId() {\n\tif (process5.platform !== \"darwin\") throw new Error(\"macOS only\");\n\tconst { stdout } = await execFileAsync(\"defaults\", [\n\t\t\"read\",\n\t\t\"com.apple.LaunchServices/com.apple.launchservices.secure\",\n\t\t\"LSHandlers\"\n\t]);\n\tconst browserId = /LSHandlerRoleAll = \"(?!-)(?<id>[^\"]+?)\";\\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout)?.groups.id ?? \"com.apple.Safari\";\n\tif (browserId === \"com.apple.safari\") return \"com.apple.Safari\";\n\treturn browserId;\n}\n__name(defaultBrowserId, \"defaultBrowserId\");\nvar execFileAsync2 = promisify(execFile);\nasync function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {\n\tif (process5.platform !== \"darwin\") throw new Error(\"macOS only\");\n\tconst outputArguments = humanReadableOutput ? [] : [\"-ss\"];\n\tconst execOptions = {};\n\tif (signal) execOptions.signal = signal;\n\tconst { stdout } = await execFileAsync2(\"osascript\", [\n\t\t\"-e\",\n\t\tscript,\n\t\toutputArguments\n\t], execOptions);\n\treturn stdout.trim();\n}\n__name(runAppleScript, \"runAppleScript\");\nasync function bundleName(bundleId) {\n\treturn runAppleScript(`tell application \"Finder\" to set app_path to application file id \"${bundleId}\" as string\ntell application \"System Events\" to get value of property list item \"CFBundleName\" of property list file (app_path & \":Contents:Info.plist\")`);\n}\n__name(bundleName, \"bundleName\");\nvar execFileAsync3 = promisify(execFile);\nvar windowsBrowserProgIds = {\n\tMSEdgeHTM: {\n\t\tname: \"Edge\",\n\t\tid: \"com.microsoft.edge\"\n\t},\n\tMSEdgeBHTML: {\n\t\tname: \"Edge Beta\",\n\t\tid: \"com.microsoft.edge.beta\"\n\t},\n\tMSEdgeDHTML: {\n\t\tname: \"Edge Dev\",\n\t\tid: \"com.microsoft.edge.dev\"\n\t},\n\tAppXq0fevzme2pys62n3e0fbqa7peapykr8v: {\n\t\tname: \"Edge\",\n\t\tid: \"com.microsoft.edge.old\"\n\t},\n\tChromeHTML: {\n\t\tname: \"Chrome\",\n\t\tid: \"com.google.chrome\"\n\t},\n\tChromeBHTML: {\n\t\tname: \"Chrome Beta\",\n\t\tid: \"com.google.chrome.beta\"\n\t},\n\tChromeDHTML: {\n\t\tname: \"Chrome Dev\",\n\t\tid: \"com.google.chrome.dev\"\n\t},\n\tChromiumHTM: {\n\t\tname: \"Chromium\",\n\t\tid: \"org.chromium.Chromium\"\n\t},\n\tBraveHTML: {\n\t\tname: \"Brave\",\n\t\tid: \"com.brave.Browser\"\n\t},\n\tBraveBHTML: {\n\t\tname: \"Brave Beta\",\n\t\tid: \"com.brave.Browser.beta\"\n\t},\n\tBraveDHTML: {\n\t\tname: \"Brave Dev\",\n\t\tid: \"com.brave.Browser.dev\"\n\t},\n\tBraveSSHTM: {\n\t\tname: \"Brave Nightly\",\n\t\tid: \"com.brave.Browser.nightly\"\n\t},\n\tFirefoxURL: {\n\t\tname: \"Firefox\",\n\t\tid: \"org.mozilla.firefox\"\n\t},\n\tOperaStable: {\n\t\tname: \"Opera\",\n\t\tid: \"com.operasoftware.Opera\"\n\t},\n\tVivaldiHTM: {\n\t\tname: \"Vivaldi\",\n\t\tid: \"com.vivaldi.Vivaldi\"\n\t},\n\t\"IE.HTTP\": {\n\t\tname: \"Internet Explorer\",\n\t\tid: \"com.microsoft.ie\"\n\t}\n};\nvar _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));\nvar UnknownBrowserError = class extends Error {\n\tstatic {\n\t\t__name(this, \"UnknownBrowserError\");\n\t}\n};\nasync function defaultBrowser(_execFileAsync = execFileAsync3) {\n\tconst { stdout } = await _execFileAsync(\"reg\", [\n\t\t\"QUERY\",\n\t\t\" HKEY_CURRENT_USER\\\\Software\\\\Microsoft\\\\Windows\\\\Shell\\\\Associations\\\\UrlAssociations\\\\http\\\\UserChoice\",\n\t\t\"/v\",\n\t\t\"ProgId\"\n\t]);\n\tconst match = /ProgId\\s*REG_SZ\\s*(?<id>\\S+)/.exec(stdout);\n\tif (!match) throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);\n\tconst { id } = match.groups;\n\tconst browser = windowsBrowserProgIds[id];\n\tif (!browser) throw new UnknownBrowserError(`Unknown browser ID: ${id}`);\n\treturn browser;\n}\n__name(defaultBrowser, \"defaultBrowser\");\nvar execFileAsync4 = promisify(execFile);\nvar titleize = /* @__PURE__ */ __name((string) => string.toLowerCase().replaceAll(/(?:^|\\s|-)\\S/g, (x) => x.toUpperCase()), \"titleize\");\nasync function defaultBrowser2() {\n\tif (process5.platform === \"darwin\") {\n\t\tconst id = await defaultBrowserId();\n\t\treturn {\n\t\t\tname: await bundleName(id),\n\t\t\tid\n\t\t};\n\t}\n\tif (process5.platform === \"linux\") {\n\t\tconst { stdout } = await execFileAsync4(\"xdg-mime\", [\n\t\t\t\"query\",\n\t\t\t\"default\",\n\t\t\t\"x-scheme-handler/http\"\n\t\t]);\n\t\tconst id = stdout.trim();\n\t\treturn {\n\t\t\tname: titleize(id.replace(/.desktop$/, \"\").replace(\"-\", \" \")),\n\t\t\tid\n\t\t};\n\t}\n\tif (process5.platform === \"win32\") return defaultBrowser();\n\tthrow new Error(\"Only macOS, Linux, and Windows are supported\");\n}\n__name(defaultBrowser2, \"defaultBrowser\");\nvar is_in_ssh_default = Boolean(process5.env.SSH_CONNECTION || process5.env.SSH_CLIENT || process5.env.SSH_TTY);\nvar fallbackAttemptSymbol = Symbol(\"fallbackAttempt\");\nvar __dirname$1 = import.meta.url ? path2__default.dirname(fileURLToPath(import.meta.url)) : \"\";\nvar localXdgOpenPath = path2__default.join(__dirname$1, \"xdg-open\");\nvar { platform, arch: arch$1 } = process5;\nvar tryEachApp = /* @__PURE__ */ __name(async (apps2, opener) => {\n\tif (apps2.length === 0) return;\n\tconst errors = [];\n\tfor (const app of apps2) try {\n\t\treturn await opener(app);\n\t} catch (error) {\n\t\terrors.push(error);\n\t}\n\tthrow new AggregateError(errors, \"Failed to open in all supported apps\");\n}, \"tryEachApp\");\nvar baseOpen = /* @__PURE__ */ __name(async (options) => {\n\toptions = {\n\t\twait: false,\n\t\tbackground: false,\n\t\tnewInstance: false,\n\t\tallowNonzeroExitCode: false,\n\t\t...options\n\t};\n\tconst isFallbackAttempt = options[fallbackAttemptSymbol] === true;\n\tdelete options[fallbackAttemptSymbol];\n\tif (Array.isArray(options.app)) return tryEachApp(options.app, (singleApp) => baseOpen({\n\t\t...options,\n\t\tapp: singleApp,\n\t\t[fallbackAttemptSymbol]: true\n\t}));\n\tlet { name: app, arguments: appArguments = [] } = options.app ?? {};\n\tappArguments = [...appArguments];\n\tif (Array.isArray(app)) return tryEachApp(app, (appName) => baseOpen({\n\t\t...options,\n\t\tapp: {\n\t\t\tname: appName,\n\t\t\targuments: appArguments\n\t\t},\n\t\t[fallbackAttemptSymbol]: true\n\t}));\n\tif (app === \"browser\" || app === \"browserPrivate\") {\n\t\tconst ids = {\n\t\t\t\"com.google.chrome\": \"chrome\",\n\t\t\t\"google-chrome.desktop\": \"chrome\",\n\t\t\t\"com.brave.browser\": \"brave\",\n\t\t\t\"org.mozilla.firefox\": \"firefox\",\n\t\t\t\"firefox.desktop\": \"firefox\",\n\t\t\t\"com.microsoft.msedge\": \"edge\",\n\t\t\t\"com.microsoft.edge\": \"edge\",\n\t\t\t\"com.microsoft.edgemac\": \"edge\",\n\t\t\t\"microsoft-edge.desktop\": \"edge\",\n\t\t\t\"com.apple.safari\": \"safari\"\n\t\t};\n\t\tconst flags = {\n\t\t\tchrome: \"--incognito\",\n\t\t\tbrave: \"--incognito\",\n\t\t\tfirefox: \"--private-window\",\n\t\t\tedge: \"--inPrivate\"\n\t\t};\n\t\tlet browser;\n\t\tif (is_wsl_default) {\n\t\t\tconst progId = await wslDefaultBrowser();\n\t\t\tbrowser = _windowsBrowserProgIdMap.get(progId) ?? {};\n\t\t} else browser = await defaultBrowser2();\n\t\tif (browser.id in ids) {\n\t\t\tconst browserName = ids[browser.id.toLowerCase()];\n\t\t\tif (app === \"browserPrivate\") {\n\t\t\t\tif (browserName === \"safari\") throw new Error(\"Safari doesn't support opening in private mode via command line\");\n\t\t\t\tappArguments.push(flags[browserName]);\n\t\t\t}\n\t\t\treturn baseOpen({\n\t\t\t\t...options,\n\t\t\t\tapp: {\n\t\t\t\t\tname: apps[browserName],\n\t\t\t\t\targuments: appArguments\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tthrow new Error(`${browser.name} is not supported as a default browser`);\n\t}\n\tlet command;\n\tconst cliArguments = [];\n\tconst childProcessOptions = {};\n\tlet shouldUseWindowsInWsl = false;\n\tif (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) shouldUseWindowsInWsl = await canAccessPowerShell();\n\tif (platform === \"darwin\") {\n\t\tcommand = \"open\";\n\t\tif (options.wait) cliArguments.push(\"--wait-apps\");\n\t\tif (options.background) cliArguments.push(\"--background\");\n\t\tif (options.newInstance) cliArguments.push(\"--new\");\n\t\tif (app) cliArguments.push(\"-a\", app);\n\t} else if (platform === \"win32\" || shouldUseWindowsInWsl) {\n\t\tcommand = await powerShellPath2();\n\t\tcliArguments.push(...executePowerShell.argumentsPrefix);\n\t\tif (!is_wsl_default) childProcessOptions.windowsVerbatimArguments = true;\n\t\tif (is_wsl_default && options.target) options.target = await convertWslPathToWindows(options.target);\n\t\tconst encodedArguments = [\"$ProgressPreference = 'SilentlyContinue';\", \"Start\"];\n\t\tif (options.wait) encodedArguments.push(\"-Wait\");\n\t\tif (app) {\n\t\t\tencodedArguments.push(executePowerShell.escapeArgument(app));\n\t\t\tif (options.target) appArguments.push(options.target);\n\t\t} else if (options.target) encodedArguments.push(executePowerShell.escapeArgument(options.target));\n\t\tif (appArguments.length > 0) {\n\t\t\tappArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));\n\t\t\tencodedArguments.push(\"-ArgumentList\", appArguments.join(\",\"));\n\t\t}\n\t\toptions.target = executePowerShell.encodeCommand(encodedArguments.join(\" \"));\n\t\tif (!options.wait) childProcessOptions.stdio = \"ignore\";\n\t} else {\n\t\tif (app) command = app;\n\t\telse {\n\t\t\tconst isBundled = !__dirname$1 || __dirname$1 === \"/\";\n\t\t\tlet exeLocalXdgOpen = false;\n\t\t\ttry {\n\t\t\t\tawait fs4.access(localXdgOpenPath, constants.X_OK);\n\t\t\t\texeLocalXdgOpen = true;\n\t\t\t} catch {}\n\t\t\tcommand = process5.versions.electron ?? (platform === \"android\" || isBundled || !exeLocalXdgOpen) ? \"xdg-open\" : localXdgOpenPath;\n\t\t}\n\t\tif (appArguments.length > 0) cliArguments.push(...appArguments);\n\t\tif (!options.wait) {\n\t\t\tchildProcessOptions.stdio = \"ignore\";\n\t\t\tchildProcessOptions.detached = true;\n\t\t}\n\t}\n\tif (platform === \"darwin\" && appArguments.length > 0) cliArguments.push(\"--args\", ...appArguments);\n\tif (options.target) cliArguments.push(options.target);\n\tconst subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);\n\tif (options.wait) return new Promise((resolve$1, reject) => {\n\t\tsubprocess.once(\"error\", reject);\n\t\tsubprocess.once(\"close\", (exitCode) => {\n\t\t\tif (!options.allowNonzeroExitCode && exitCode !== 0) {\n\t\t\t\treject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tresolve$1(subprocess);\n\t\t});\n\t});\n\tif (isFallbackAttempt) return new Promise((resolve$1, reject) => {\n\t\tsubprocess.once(\"error\", reject);\n\t\tsubprocess.once(\"spawn\", () => {\n\t\t\tsubprocess.once(\"close\", (exitCode) => {\n\t\t\t\tsubprocess.off(\"error\", reject);\n\t\t\t\tif (exitCode !== 0) {\n\t\t\t\t\treject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsubprocess.unref();\n\t\t\t\tresolve$1(subprocess);\n\t\t\t});\n\t\t});\n\t});\n\tsubprocess.unref();\n\treturn new Promise((resolve$1, reject) => {\n\t\tsubprocess.once(\"error\", reject);\n\t\tsubprocess.once(\"spawn\", () => {\n\t\t\tsubprocess.off(\"error\", reject);\n\t\t\tresolve$1(subprocess);\n\t\t});\n\t});\n}, \"baseOpen\");\nvar open = /* @__PURE__ */ __name((target, options) => {\n\tif (typeof target !== \"string\") throw new TypeError(\"Expected a `target`\");\n\treturn baseOpen({\n\t\t...options,\n\t\ttarget\n\t});\n}, \"open\");\nfunction detectArchBinary(binary) {\n\tif (typeof binary === \"string\" || Array.isArray(binary)) return binary;\n\tconst { [arch$1]: archBinary } = binary;\n\tif (!archBinary) throw new Error(`${arch$1} is not supported`);\n\treturn archBinary;\n}\n__name(detectArchBinary, \"detectArchBinary\");\nfunction detectPlatformBinary({ [platform]: platformBinary }, { wsl } = {}) {\n\tif (wsl && is_wsl_default) return detectArchBinary(wsl);\n\tif (!platformBinary) throw new Error(`${platform} is not supported`);\n\treturn detectArchBinary(platformBinary);\n}\n__name(detectPlatformBinary, \"detectPlatformBinary\");\nvar apps = {\n\tbrowser: \"browser\",\n\tbrowserPrivate: \"browserPrivate\"\n};\ndefineLazyProperty(apps, \"chrome\", () => detectPlatformBinary({\n\tdarwin: \"google chrome\",\n\twin32: \"chrome\",\n\tlinux: [\n\t\t\"google-chrome\",\n\t\t\"google-chrome-stable\",\n\t\t\"chromium\",\n\t\t\"chromium-browser\"\n\t]\n}, { wsl: {\n\tia32: \"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe\",\n\tx64: [\"/mnt/c/Program Files/Google/Chrome/Application/chrome.exe\", \"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe\"]\n} }));\ndefineLazyProperty(apps, \"brave\", () => detectPlatformBinary({\n\tdarwin: \"brave browser\",\n\twin32: \"brave\",\n\tlinux: [\"brave-browser\", \"brave\"]\n}, { wsl: {\n\tia32: \"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe\",\n\tx64: [\"/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe\", \"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe\"]\n} }));\ndefineLazyProperty(apps, \"firefox\", () => detectPlatformBinary({\n\tdarwin: \"firefox\",\n\twin32: String.raw`C:\\Program Files\\Mozilla Firefox\\firefox.exe`,\n\tlinux: \"firefox\"\n}, { wsl: \"/mnt/c/Program Files/Mozilla Firefox/firefox.exe\" }));\ndefineLazyProperty(apps, \"edge\", () => detectPlatformBinary({\n\tdarwin: \"microsoft edge\",\n\twin32: \"msedge\",\n\tlinux: [\"microsoft-edge\", \"microsoft-edge-dev\"]\n}, { wsl: \"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe\" }));\ndefineLazyProperty(apps, \"safari\", () => detectPlatformBinary({ darwin: \"Safari\" }));\nvar open_default = open;\n\n//#endregion\nexport { open_default as default };"],"mappings":";;;;;;;;;;;;AAYA,IAAI;AACJ,SAAS,eAAe;AACvB,KAAI;AACH,MAAI,SAAS,cAAc;AAC3B,SAAO;SACA;AACP,SAAO;;;AAGT,OAAO,cAAc,eAAe;AACpC,SAAS,kBAAkB;AAC1B,KAAI;AACH,SAAO,IAAI,aAAa,qBAAqB,OAAO,CAAC,SAAS,SAAS;SAChE;AACP,SAAO;;;AAGT,OAAO,iBAAiB,kBAAkB;AAC1C,SAAS,WAAW;AACnB,KAAI,mBAAmB,KAAK,EAAG,kBAAiB,cAAc,IAAI,iBAAiB;AACnF,QAAO;;AAER,OAAO,UAAU,WAAW;AAC5B,IAAI;AACJ,IAAI,kBAAkC,6BAAa;AAClD,KAAI;AACH,MAAI,SAAS,qBAAqB;AAClC,SAAO;SACA;AACP,SAAO;;GAEN,kBAAkB;AACrB,SAAS,oBAAoB;AAC5B,KAAI,iBAAiB,KAAK,EAAG,gBAAe,iBAAiB,IAAI,UAAU;AAC3E,QAAO;;AAER,OAAO,mBAAmB,oBAAoB;AAC9C,IAAI,QAAwB,6BAAa;AAC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
|
@@ -307,8 +307,8 @@ async function defaultBrowser2() {
|
|
|
307
307
|
__name(defaultBrowser2, "defaultBrowser");
|
|
308
308
|
var is_in_ssh_default = Boolean(process.env.SSH_CONNECTION || process.env.SSH_CLIENT || process.env.SSH_TTY);
|
|
309
309
|
var fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
310
|
-
var __dirname = import.meta.url ? path2__default.dirname(fileURLToPath(import.meta.url)) : "";
|
|
311
|
-
var localXdgOpenPath = path2__default.join(__dirname, "xdg-open");
|
|
310
|
+
var __dirname$1 = import.meta.url ? path2__default.dirname(fileURLToPath(import.meta.url)) : "";
|
|
311
|
+
var localXdgOpenPath = path2__default.join(__dirname$1, "xdg-open");
|
|
312
312
|
var { platform, arch: arch$1 } = process;
|
|
313
313
|
var tryEachApp = /* @__PURE__ */ __name(async (apps2, opener) => {
|
|
314
314
|
if (apps2.length === 0) return;
|
|
@@ -416,7 +416,7 @@ var baseOpen = /* @__PURE__ */ __name(async (options) => {
|
|
|
416
416
|
} else {
|
|
417
417
|
if (app) command = app;
|
|
418
418
|
else {
|
|
419
|
-
const isBundled = !__dirname || __dirname === "/";
|
|
419
|
+
const isBundled = !__dirname$1 || __dirname$1 === "/";
|
|
420
420
|
let exeLocalXdgOpen = false;
|
|
421
421
|
try {
|
|
422
422
|
await fs.access(localXdgOpenPath, constants$1.X_OK);
|
|
@@ -526,4 +526,4 @@ var open_default = open;
|
|
|
526
526
|
|
|
527
527
|
//#endregion
|
|
528
528
|
export { open_default as default };
|
|
529
|
-
//# sourceMappingURL=open-PBXRGS4R-
|
|
529
|
+
//# sourceMappingURL=open-PBXRGS4R-rCTko7Ic.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-PBXRGS4R-rCTko7Ic.mjs","names":["fs","process5","execFile","fs4","constants","stdout","execFile$1","path","arch"],"sources":["../../workers-utils/dist/open-PBXRGS4R.mjs"],"sourcesContent":["import { __name } from './chunk-Q72B4Q5Z.mjs';\nimport process5 from 'node:process';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport childProcess, { execFile as execFile$1 } from 'node:child_process';\nimport fs4, { constants } from 'node:fs/promises';\nimport { promisify } from 'node:util';\nimport os from 'node:os';\nimport fs from 'node:fs';\nimport { Buffer } from 'node:buffer';\n\nvar isDockerCached;\nfunction hasDockerEnv() {\n try {\n fs.statSync(\"/.dockerenv\");\n return true;\n } catch {\n return false;\n }\n}\n__name(hasDockerEnv, \"hasDockerEnv\");\nfunction hasDockerCGroup() {\n try {\n return fs.readFileSync(\"/proc/self/cgroup\", \"utf8\").includes(\"docker\");\n } catch {\n return false;\n }\n}\n__name(hasDockerCGroup, \"hasDockerCGroup\");\nfunction isDocker() {\n if (isDockerCached === void 0) {\n isDockerCached = hasDockerEnv() || hasDockerCGroup();\n }\n return isDockerCached;\n}\n__name(isDocker, \"isDocker\");\n\n// ../../node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js\nvar cachedResult;\nvar hasContainerEnv = /* @__PURE__ */ __name(() => {\n try {\n fs.statSync(\"/run/.containerenv\");\n return true;\n } catch {\n return false;\n }\n}, \"hasContainerEnv\");\nfunction isInsideContainer() {\n if (cachedResult === void 0) {\n cachedResult = hasContainerEnv() || isDocker();\n }\n return cachedResult;\n}\n__name(isInsideContainer, \"isInsideContainer\");\n\n// ../../node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js\nvar isWsl = /* @__PURE__ */ __name(() => {\n if (process5.platform !== \"linux\") {\n return false;\n }\n if (os.release().toLowerCase().includes(\"microsoft\")) {\n if (isInsideContainer()) {\n return false;\n }\n return true;\n }\n try {\n return fs.readFileSync(\"/proc/version\", \"utf8\").toLowerCase().includes(\"microsoft\") ? !isInsideContainer() : false;\n } catch {\n return false;\n }\n}, \"isWsl\");\nvar is_wsl_default = process5.env.__IS_WSL_TEST__ ? isWsl : isWsl();\nvar execFile = promisify(childProcess.execFile);\nvar powerShellPath = /* @__PURE__ */ __name(() => `${process5.env.SYSTEMROOT || process5.env.windir || String.raw`C:\\Windows`}\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe`, \"powerShellPath\");\nvar executePowerShell = /* @__PURE__ */ __name(async (command, options = {}) => {\n const {\n powerShellPath: psPath,\n ...execFileOptions\n } = options;\n const encodedCommand = executePowerShell.encodeCommand(command);\n return execFile(\n psPath ?? powerShellPath(),\n [\n ...executePowerShell.argumentsPrefix,\n encodedCommand\n ],\n {\n encoding: \"utf8\",\n ...execFileOptions\n }\n );\n}, \"executePowerShell\");\nexecutePowerShell.argumentsPrefix = [\n \"-NoProfile\",\n \"-NonInteractive\",\n \"-ExecutionPolicy\",\n \"Bypass\",\n \"-EncodedCommand\"\n];\nexecutePowerShell.encodeCommand = (command) => Buffer.from(command, \"utf16le\").toString(\"base64\");\nexecutePowerShell.escapeArgument = (value) => `'${String(value).replaceAll(\"'\", \"''\")}'`;\n\n// ../../node_modules/.pnpm/wsl-utils@0.3.1/node_modules/wsl-utils/utilities.js\nfunction parseMountPointFromConfig(content) {\n for (const line of content.split(\"\\n\")) {\n if (/^\\s*#/.test(line)) {\n continue;\n }\n const match = /^\\s*root\\s*=\\s*(?<mountPoint>\"[^\"]*\"|'[^']*'|[^#]*)/.exec(line);\n if (!match) {\n continue;\n }\n return match.groups.mountPoint.trim().replaceAll(/^[\"']|[\"']$/g, \"\");\n }\n}\n__name(parseMountPointFromConfig, \"parseMountPointFromConfig\");\n\n// ../../node_modules/.pnpm/wsl-utils@0.3.1/node_modules/wsl-utils/index.js\nvar execFile2 = promisify(childProcess.execFile);\nvar wslDrivesMountPoint = /* @__PURE__ */ (() => {\n const defaultMountPoint = \"/mnt/\";\n let mountPoint;\n return async function() {\n if (mountPoint) {\n return mountPoint;\n }\n const configFilePath = \"/etc/wsl.conf\";\n let isConfigFileExists = false;\n try {\n await fs4.access(configFilePath, constants.F_OK);\n isConfigFileExists = true;\n } catch {\n }\n if (!isConfigFileExists) {\n return defaultMountPoint;\n }\n const configContent = await fs4.readFile(configFilePath, { encoding: \"utf8\" });\n const parsedMountPoint = parseMountPointFromConfig(configContent);\n if (parsedMountPoint === void 0) {\n return defaultMountPoint;\n }\n mountPoint = parsedMountPoint;\n mountPoint = mountPoint.endsWith(\"/\") ? mountPoint : `${mountPoint}/`;\n return mountPoint;\n };\n})();\nvar powerShellPathFromWsl = /* @__PURE__ */ __name(async () => {\n const mountPoint = await wslDrivesMountPoint();\n return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;\n}, \"powerShellPathFromWsl\");\nvar powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath;\nvar canAccessPowerShellPromise;\nvar canAccessPowerShell = /* @__PURE__ */ __name(async () => {\n canAccessPowerShellPromise ??= (async () => {\n try {\n const psPath = await powerShellPath2();\n await fs4.access(psPath, constants.X_OK);\n return true;\n } catch {\n return false;\n }\n })();\n return canAccessPowerShellPromise;\n}, \"canAccessPowerShell\");\nvar wslDefaultBrowser = /* @__PURE__ */ __name(async () => {\n const psPath = await powerShellPath2();\n const command = String.raw`(Get-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice\").ProgId`;\n const { stdout } = await executePowerShell(command, { powerShellPath: psPath });\n return stdout.trim();\n}, \"wslDefaultBrowser\");\nvar convertWslPathToWindows = /* @__PURE__ */ __name(async (path2) => {\n if (/^[a-z]+:\\/\\//i.test(path2)) {\n return path2;\n }\n try {\n const { stdout } = await execFile2(\"wslpath\", [\"-aw\", path2], { encoding: \"utf8\" });\n return stdout.trim();\n } catch {\n return path2;\n }\n}, \"convertWslPathToWindows\");\n\n// ../../node_modules/.pnpm/define-lazy-prop@3.0.0/node_modules/define-lazy-prop/index.js\nfunction defineLazyProperty(object, propertyName, valueGetter) {\n const define = /* @__PURE__ */ __name((value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true }), \"define\");\n Object.defineProperty(object, propertyName, {\n configurable: true,\n enumerable: true,\n get() {\n const result = valueGetter();\n define(result);\n return result;\n },\n set(value) {\n define(value);\n }\n });\n return object;\n}\n__name(defineLazyProperty, \"defineLazyProperty\");\nvar execFileAsync = promisify(execFile$1);\nasync function defaultBrowserId() {\n if (process5.platform !== \"darwin\") {\n throw new Error(\"macOS only\");\n }\n const { stdout } = await execFileAsync(\"defaults\", [\"read\", \"com.apple.LaunchServices/com.apple.launchservices.secure\", \"LSHandlers\"]);\n const match = /LSHandlerRoleAll = \"(?!-)(?<id>[^\"]+?)\";\\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);\n const browserId = match?.groups.id ?? \"com.apple.Safari\";\n if (browserId === \"com.apple.safari\") {\n return \"com.apple.Safari\";\n }\n return browserId;\n}\n__name(defaultBrowserId, \"defaultBrowserId\");\nvar execFileAsync2 = promisify(execFile$1);\nasync function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {\n if (process5.platform !== \"darwin\") {\n throw new Error(\"macOS only\");\n }\n const outputArguments = humanReadableOutput ? [] : [\"-ss\"];\n const execOptions = {};\n if (signal) {\n execOptions.signal = signal;\n }\n const { stdout } = await execFileAsync2(\"osascript\", [\"-e\", script, outputArguments], execOptions);\n return stdout.trim();\n}\n__name(runAppleScript, \"runAppleScript\");\n\n// ../../node_modules/.pnpm/bundle-name@4.1.0/node_modules/bundle-name/index.js\nasync function bundleName(bundleId) {\n return runAppleScript(`tell application \"Finder\" to set app_path to application file id \"${bundleId}\" as string\ntell application \"System Events\" to get value of property list item \"CFBundleName\" of property list file (app_path & \":Contents:Info.plist\")`);\n}\n__name(bundleName, \"bundleName\");\nvar execFileAsync3 = promisify(execFile$1);\nvar windowsBrowserProgIds = {\n MSEdgeHTM: { name: \"Edge\", id: \"com.microsoft.edge\" },\n // The missing `L` is correct.\n MSEdgeBHTML: { name: \"Edge Beta\", id: \"com.microsoft.edge.beta\" },\n MSEdgeDHTML: { name: \"Edge Dev\", id: \"com.microsoft.edge.dev\" },\n AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: \"Edge\", id: \"com.microsoft.edge.old\" },\n ChromeHTML: { name: \"Chrome\", id: \"com.google.chrome\" },\n ChromeBHTML: { name: \"Chrome Beta\", id: \"com.google.chrome.beta\" },\n ChromeDHTML: { name: \"Chrome Dev\", id: \"com.google.chrome.dev\" },\n ChromiumHTM: { name: \"Chromium\", id: \"org.chromium.Chromium\" },\n BraveHTML: { name: \"Brave\", id: \"com.brave.Browser\" },\n BraveBHTML: { name: \"Brave Beta\", id: \"com.brave.Browser.beta\" },\n BraveDHTML: { name: \"Brave Dev\", id: \"com.brave.Browser.dev\" },\n BraveSSHTM: { name: \"Brave Nightly\", id: \"com.brave.Browser.nightly\" },\n FirefoxURL: { name: \"Firefox\", id: \"org.mozilla.firefox\" },\n OperaStable: { name: \"Opera\", id: \"com.operasoftware.Opera\" },\n VivaldiHTM: { name: \"Vivaldi\", id: \"com.vivaldi.Vivaldi\" },\n \"IE.HTTP\": { name: \"Internet Explorer\", id: \"com.microsoft.ie\" }\n};\nvar _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));\nvar UnknownBrowserError = class extends Error {\n static {\n __name(this, \"UnknownBrowserError\");\n }\n};\nasync function defaultBrowser(_execFileAsync = execFileAsync3) {\n const { stdout } = await _execFileAsync(\"reg\", [\n \"QUERY\",\n \" HKEY_CURRENT_USER\\\\Software\\\\Microsoft\\\\Windows\\\\Shell\\\\Associations\\\\UrlAssociations\\\\http\\\\UserChoice\",\n \"/v\",\n \"ProgId\"\n ]);\n const match = /ProgId\\s*REG_SZ\\s*(?<id>\\S+)/.exec(stdout);\n if (!match) {\n throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);\n }\n const { id } = match.groups;\n const browser = windowsBrowserProgIds[id];\n if (!browser) {\n throw new UnknownBrowserError(`Unknown browser ID: ${id}`);\n }\n return browser;\n}\n__name(defaultBrowser, \"defaultBrowser\");\n\n// ../../node_modules/.pnpm/default-browser@5.4.0/node_modules/default-browser/index.js\nvar execFileAsync4 = promisify(execFile$1);\nvar titleize = /* @__PURE__ */ __name((string) => string.toLowerCase().replaceAll(/(?:^|\\s|-)\\S/g, (x) => x.toUpperCase()), \"titleize\");\nasync function defaultBrowser2() {\n if (process5.platform === \"darwin\") {\n const id = await defaultBrowserId();\n const name = await bundleName(id);\n return { name, id };\n }\n if (process5.platform === \"linux\") {\n const { stdout } = await execFileAsync4(\"xdg-mime\", [\"query\", \"default\", \"x-scheme-handler/http\"]);\n const id = stdout.trim();\n const name = titleize(id.replace(/.desktop$/, \"\").replace(\"-\", \" \"));\n return { name, id };\n }\n if (process5.platform === \"win32\") {\n return defaultBrowser();\n }\n throw new Error(\"Only macOS, Linux, and Windows are supported\");\n}\n__name(defaultBrowser2, \"defaultBrowser\");\nvar isInSsh = Boolean(process5.env.SSH_CONNECTION || process5.env.SSH_CLIENT || process5.env.SSH_TTY);\nvar is_in_ssh_default = isInSsh;\n\n// ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js\nvar fallbackAttemptSymbol = Symbol(\"fallbackAttempt\");\nvar __dirname$1 = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : \"\";\nvar localXdgOpenPath = path.join(__dirname$1, \"xdg-open\");\nvar { platform, arch } = process5;\nvar tryEachApp = /* @__PURE__ */ __name(async (apps2, opener) => {\n if (apps2.length === 0) {\n return;\n }\n const errors = [];\n for (const app of apps2) {\n try {\n return await opener(app);\n } catch (error) {\n errors.push(error);\n }\n }\n throw new AggregateError(errors, \"Failed to open in all supported apps\");\n}, \"tryEachApp\");\nvar baseOpen = /* @__PURE__ */ __name(async (options) => {\n options = {\n wait: false,\n background: false,\n newInstance: false,\n allowNonzeroExitCode: false,\n ...options\n };\n const isFallbackAttempt = options[fallbackAttemptSymbol] === true;\n delete options[fallbackAttemptSymbol];\n if (Array.isArray(options.app)) {\n return tryEachApp(options.app, (singleApp) => baseOpen({\n ...options,\n app: singleApp,\n [fallbackAttemptSymbol]: true\n }));\n }\n let { name: app, arguments: appArguments = [] } = options.app ?? {};\n appArguments = [...appArguments];\n if (Array.isArray(app)) {\n return tryEachApp(app, (appName) => baseOpen({\n ...options,\n app: {\n name: appName,\n arguments: appArguments\n },\n [fallbackAttemptSymbol]: true\n }));\n }\n if (app === \"browser\" || app === \"browserPrivate\") {\n const ids = {\n \"com.google.chrome\": \"chrome\",\n \"google-chrome.desktop\": \"chrome\",\n \"com.brave.browser\": \"brave\",\n \"org.mozilla.firefox\": \"firefox\",\n \"firefox.desktop\": \"firefox\",\n \"com.microsoft.msedge\": \"edge\",\n \"com.microsoft.edge\": \"edge\",\n \"com.microsoft.edgemac\": \"edge\",\n \"microsoft-edge.desktop\": \"edge\",\n \"com.apple.safari\": \"safari\"\n };\n const flags = {\n chrome: \"--incognito\",\n brave: \"--incognito\",\n firefox: \"--private-window\",\n edge: \"--inPrivate\"\n // Safari doesn't support private mode via command line\n };\n let browser;\n if (is_wsl_default) {\n const progId = await wslDefaultBrowser();\n const browserInfo = _windowsBrowserProgIdMap.get(progId);\n browser = browserInfo ?? {};\n } else {\n browser = await defaultBrowser2();\n }\n if (browser.id in ids) {\n const browserName = ids[browser.id.toLowerCase()];\n if (app === \"browserPrivate\") {\n if (browserName === \"safari\") {\n throw new Error(\"Safari doesn't support opening in private mode via command line\");\n }\n appArguments.push(flags[browserName]);\n }\n return baseOpen({\n ...options,\n app: {\n name: apps[browserName],\n arguments: appArguments\n }\n });\n }\n throw new Error(`${browser.name} is not supported as a default browser`);\n }\n let command;\n const cliArguments = [];\n const childProcessOptions = {};\n let shouldUseWindowsInWsl = false;\n if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) {\n shouldUseWindowsInWsl = await canAccessPowerShell();\n }\n if (platform === \"darwin\") {\n command = \"open\";\n if (options.wait) {\n cliArguments.push(\"--wait-apps\");\n }\n if (options.background) {\n cliArguments.push(\"--background\");\n }\n if (options.newInstance) {\n cliArguments.push(\"--new\");\n }\n if (app) {\n cliArguments.push(\"-a\", app);\n }\n } else if (platform === \"win32\" || shouldUseWindowsInWsl) {\n command = await powerShellPath2();\n cliArguments.push(...executePowerShell.argumentsPrefix);\n if (!is_wsl_default) {\n childProcessOptions.windowsVerbatimArguments = true;\n }\n if (is_wsl_default && options.target) {\n options.target = await convertWslPathToWindows(options.target);\n }\n const encodedArguments = [\"$ProgressPreference = 'SilentlyContinue';\", \"Start\"];\n if (options.wait) {\n encodedArguments.push(\"-Wait\");\n }\n if (app) {\n encodedArguments.push(executePowerShell.escapeArgument(app));\n if (options.target) {\n appArguments.push(options.target);\n }\n } else if (options.target) {\n encodedArguments.push(executePowerShell.escapeArgument(options.target));\n }\n if (appArguments.length > 0) {\n appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));\n encodedArguments.push(\"-ArgumentList\", appArguments.join(\",\"));\n }\n options.target = executePowerShell.encodeCommand(encodedArguments.join(\" \"));\n if (!options.wait) {\n childProcessOptions.stdio = \"ignore\";\n }\n } else {\n if (app) {\n command = app;\n } else {\n const isBundled = !__dirname$1 || __dirname$1 === \"/\";\n let exeLocalXdgOpen = false;\n try {\n await fs4.access(localXdgOpenPath, constants.X_OK);\n exeLocalXdgOpen = true;\n } catch {\n }\n const useSystemXdgOpen = process5.versions.electron ?? (platform === \"android\" || isBundled || !exeLocalXdgOpen);\n command = useSystemXdgOpen ? \"xdg-open\" : localXdgOpenPath;\n }\n if (appArguments.length > 0) {\n cliArguments.push(...appArguments);\n }\n if (!options.wait) {\n childProcessOptions.stdio = \"ignore\";\n childProcessOptions.detached = true;\n }\n }\n if (platform === \"darwin\" && appArguments.length > 0) {\n cliArguments.push(\"--args\", ...appArguments);\n }\n if (options.target) {\n cliArguments.push(options.target);\n }\n const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);\n if (options.wait) {\n return new Promise((resolve, reject) => {\n subprocess.once(\"error\", reject);\n subprocess.once(\"close\", (exitCode) => {\n if (!options.allowNonzeroExitCode && exitCode !== 0) {\n reject(new Error(`Exited with code ${exitCode}`));\n return;\n }\n resolve(subprocess);\n });\n });\n }\n if (isFallbackAttempt) {\n return new Promise((resolve, reject) => {\n subprocess.once(\"error\", reject);\n subprocess.once(\"spawn\", () => {\n subprocess.once(\"close\", (exitCode) => {\n subprocess.off(\"error\", reject);\n if (exitCode !== 0) {\n reject(new Error(`Exited with code ${exitCode}`));\n return;\n }\n subprocess.unref();\n resolve(subprocess);\n });\n });\n });\n }\n subprocess.unref();\n return new Promise((resolve, reject) => {\n subprocess.once(\"error\", reject);\n subprocess.once(\"spawn\", () => {\n subprocess.off(\"error\", reject);\n resolve(subprocess);\n });\n });\n}, \"baseOpen\");\nvar open = /* @__PURE__ */ __name((target, options) => {\n if (typeof target !== \"string\") {\n throw new TypeError(\"Expected a `target`\");\n }\n return baseOpen({\n ...options,\n target\n });\n}, \"open\");\nvar openApp = /* @__PURE__ */ __name((name, options) => {\n if (typeof name !== \"string\" && !Array.isArray(name)) {\n throw new TypeError(\"Expected a valid `name`\");\n }\n const { arguments: appArguments = [] } = options ?? {};\n if (appArguments !== void 0 && appArguments !== null && !Array.isArray(appArguments)) {\n throw new TypeError(\"Expected `appArguments` as Array type\");\n }\n return baseOpen({\n ...options,\n app: {\n name,\n arguments: appArguments\n }\n });\n}, \"openApp\");\nfunction detectArchBinary(binary) {\n if (typeof binary === \"string\" || Array.isArray(binary)) {\n return binary;\n }\n const { [arch]: archBinary } = binary;\n if (!archBinary) {\n throw new Error(`${arch} is not supported`);\n }\n return archBinary;\n}\n__name(detectArchBinary, \"detectArchBinary\");\nfunction detectPlatformBinary({ [platform]: platformBinary }, { wsl } = {}) {\n if (wsl && is_wsl_default) {\n return detectArchBinary(wsl);\n }\n if (!platformBinary) {\n throw new Error(`${platform} is not supported`);\n }\n return detectArchBinary(platformBinary);\n}\n__name(detectPlatformBinary, \"detectPlatformBinary\");\nvar apps = {\n browser: \"browser\",\n browserPrivate: \"browserPrivate\"\n};\ndefineLazyProperty(apps, \"chrome\", () => detectPlatformBinary({\n darwin: \"google chrome\",\n win32: \"chrome\",\n // `chromium-browser` is the older deb package name used by Ubuntu/Debian before snap.\n linux: [\"google-chrome\", \"google-chrome-stable\", \"chromium\", \"chromium-browser\"]\n}, {\n wsl: {\n ia32: \"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe\",\n x64: [\"/mnt/c/Program Files/Google/Chrome/Application/chrome.exe\", \"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe\"]\n }\n}));\ndefineLazyProperty(apps, \"brave\", () => detectPlatformBinary({\n darwin: \"brave browser\",\n win32: \"brave\",\n linux: [\"brave-browser\", \"brave\"]\n}, {\n wsl: {\n ia32: \"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe\",\n x64: [\"/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe\", \"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe\"]\n }\n}));\ndefineLazyProperty(apps, \"firefox\", () => detectPlatformBinary({\n darwin: \"firefox\",\n win32: String.raw`C:\\Program Files\\Mozilla Firefox\\firefox.exe`,\n linux: \"firefox\"\n}, {\n wsl: \"/mnt/c/Program Files/Mozilla Firefox/firefox.exe\"\n}));\ndefineLazyProperty(apps, \"edge\", () => detectPlatformBinary({\n darwin: \"microsoft edge\",\n win32: \"msedge\",\n linux: [\"microsoft-edge\", \"microsoft-edge-dev\"]\n}, {\n wsl: \"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe\"\n}));\ndefineLazyProperty(apps, \"safari\", () => detectPlatformBinary({\n darwin: \"Safari\"\n}));\nvar open_default = open;\n\nexport { apps, open_default as default, openApp };\n"],"mappings":";;;;;;;;;;;;AAWA,IAAI;AACJ,SAAS,eAAe;AACtB,KAAI;AACF,MAAG,SAAS,cAAc;AAC1B,SAAO;SACD;AACN,SAAO;;;AAGX,OAAO,cAAc,eAAe;AACpC,SAAS,kBAAkB;AACzB,KAAI;AACF,SAAOA,IAAG,aAAa,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,CAAC,6DAA6D,kEAAkE;CACtI,EACF,CAAC,CAAC;AACH,mBAAmB,MAAM,eAAe,qBAAqB;CAC3D,QAAQ;CACR,OAAO;CACP,OAAO,CAAC,iBAAiB,QAAQ;CAClC,EAAE,EACD,KAAK;CACH,MAAM;CACN,KAAK,CAAC,0EAA0E,+EAA+E;CAChK,EACF,CAAC,CAAC;AACH,mBAAmB,MAAM,iBAAiB,qBAAqB;CAC7D,QAAQ;CACR,OAAO,OAAO,GAAG;CACjB,OAAO;CACR,EAAE,EACD,KAAK,oDACN,CAAC,CAAC;AACH,mBAAmB,MAAM,cAAc,qBAAqB;CAC1D,QAAQ;CACR,OAAO;CACP,OAAO,CAAC,kBAAkB,qBAAqB;CAChD,EAAE,EACD,KAAK,oEACN,CAAC,CAAC;AACH,mBAAmB,MAAM,gBAAgB,qBAAqB,EAC5D,QAAQ,UACT,CAAC,CAAC;AACH,IAAI,eAAe"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "@cloudflare/vite-plugin",
|
|
4
|
-
version: "1.53.
|
|
4
|
+
version: "1.53.1",
|
|
5
5
|
description: "Cloudflare plugin for Vite",
|
|
6
6
|
keywords: [
|
|
7
7
|
"cloudflare",
|
|
@@ -93,4 +93,4 @@ var package_default = {
|
|
|
93
93
|
|
|
94
94
|
//#endregion
|
|
95
95
|
export { package_default as default };
|
|
96
|
-
//# sourceMappingURL=package-
|
|
96
|
+
//# sourceMappingURL=package-lfy4Z5C1.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-
|
|
1
|
+
{"version":3,"file":"package-lfy4Z5C1.mjs","names":[],"sources":["../package.json"],"sourcesContent":["{\n\t\"name\": \"@cloudflare/vite-plugin\",\n\t\"version\": \"1.53.1\",\n\t\"description\": \"Cloudflare plugin for Vite\",\n\t\"keywords\": [\n\t\t\"cloudflare\",\n\t\t\"cloudflare-workers\",\n\t\t\"vite\",\n\t\t\"vite-plugin\",\n\t\t\"workers\"\n\t],\n\t\"homepage\": \"https://github.com/cloudflare/workers-sdk/tree/main/packages/vite-plugin-cloudflare#readme\",\n\t\"bugs\": {\n\t\t\"url\": \"https://github.com/cloudflare/workers-sdk/issues\"\n\t},\n\t\"license\": \"MIT\",\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"https://github.com/cloudflare/workers-sdk.git\",\n\t\t\"directory\": \"packages/vite-plugin-cloudflare\"\n\t},\n\t\"bin\": {\n\t\t\"cf-vite\": \"./bin/cf-vite\"\n\t},\n\t\"files\": [\n\t\t\"bin\",\n\t\t\"dist\"\n\t],\n\t\"type\": \"module\",\n\t\"sideEffects\": false,\n\t\"main\": \"./dist/index.mjs\",\n\t\"types\": \"./dist/index.d.mts\",\n\t\"exports\": {\n\t\t\".\": {\n\t\t\t\"types\": \"./dist/index.d.mts\",\n\t\t\t\"import\": \"./dist/index.mjs\"\n\t\t},\n\t\t\"./experimental-config\": {\n\t\t\t\"types\": \"./dist/experimental-config.d.mts\",\n\t\t\t\"import\": \"./dist/experimental-config.mjs\"\n\t\t}\n\t},\n\t\"publishConfig\": {\n\t\t\"access\": \"public\"\n\t},\n\t\"scripts\": {\n\t\t\"build\": \"tsdown\",\n\t\t\"check:type\": \"tsc --build\",\n\t\t\"dev\": \"tsdown --watch\",\n\t\t\"test\": \"vitest run\",\n\t\t\"test:ci\": \"pnpm test\",\n\t\t\"test:e2e\": \"vitest run -c e2e/vitest.config.ts\",\n\t\t\"test:watch\": \"vitest\"\n\t},\n\t\"dependencies\": {\n\t\t\"@cloudflare/unenv-preset\": \"workspace:*\",\n\t\t\"miniflare\": \"workspace:*\",\n\t\t\"unenv\": \"2.0.0-rc.24\",\n\t\t\"workerd\": \"catalog:default\",\n\t\t\"wrangler\": \"workspace:*\",\n\t\t\"ws\": \"catalog:default\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@cloudflare/build-output-utils\": \"workspace:*\",\n\t\t\"@cloudflare/config\": \"workspace:*\",\n\t\t\"@cloudflare/containers-shared\": \"workspace:*\",\n\t\t\"@cloudflare/mock-npm-registry\": \"workspace:*\",\n\t\t\"@cloudflare/remote-bindings\": \"workspace:*\",\n\t\t\"@cloudflare/runtime-types\": \"workspace:*\",\n\t\t\"@cloudflare/workers-shared\": \"workspace:*\",\n\t\t\"@cloudflare/workers-tsconfig\": \"workspace:*\",\n\t\t\"@cloudflare/workers-types\": \"catalog:default\",\n\t\t\"@cloudflare/workers-utils\": \"workspace:*\",\n\t\t\"@remix-run/node-fetch-server\": \"^0.8.0\",\n\t\t\"@types/node\": \"catalog:default\",\n\t\t\"@types/semver\": \"^7.5.1\",\n\t\t\"@types/ws\": \"^8.5.13\",\n\t\t\"am-i-vibing\": \"^0.5.0\",\n\t\t\"defu\": \"^6.1.4\",\n\t\t\"get-port\": \"^7.1.0\",\n\t\t\"magic-string\": \"^0.30.12\",\n\t\t\"mlly\": \"^1.7.4\",\n\t\t\"open\": \"catalog:default\",\n\t\t\"picocolors\": \"^1.1.1\",\n\t\t\"qr\": \"^0.6.0\",\n\t\t\"semver\": \"^7.7.1\",\n\t\t\"tinyglobby\": \"catalog:default\",\n\t\t\"tree-kill\": \"catalog:default\",\n\t\t\"tsdown\": \"0.16.3\",\n\t\t\"typescript\": \"catalog:default\",\n\t\t\"vite\": \"catalog:default\",\n\t\t\"vite-legacy\": \"npm:vite@7.1.12\",\n\t\t\"vitest\": \"catalog:default\"\n\t},\n\t\"peerDependencies\": {\n\t\t\"vite\": \"^6.1.0 || ^7.0.0 || ^8.0.0\",\n\t\t\"wrangler\": \"workspace:^\"\n\t},\n\t\"workers-sdk\": {\n\t\t\"prerelease\": true\n\t}\n}\n"],"mappings":";sBAAA;OACS;UACG;cACI;WACH;EACX;EACA;EACA;EACA;EACA;EACA;WACW;OACJ,EACP,OAAO,oDACP;UACU;aACG;EACb,QAAQ;EACR,OAAO;EACP,aAAa;EACb;MACM,EACN,WAAW,iBACX;QACQ,CACR,OACA,OACA;OACO;cACO;OACP;QACC;UACE;EACV,KAAK;GACJ,SAAS;GACT,UAAU;GACV;EACD,yBAAyB;GACxB,SAAS;GACT,UAAU;GACV;EACD;gBACgB,EAChB,UAAU,UACV;UACU;EACV,SAAS;EACT,cAAc;EACd,OAAO;EACP,QAAQ;EACR,WAAW;EACX,YAAY;EACZ,cAAc;EACd;eACe;EACf,4BAA4B;EAC5B,aAAa;EACb,SAAS;EACT,WAAW;EACX,YAAY;EACZ,MAAM;EACN;kBACkB;EAClB,kCAAkC;EAClC,sBAAsB;EACtB,iCAAiC;EACjC,iCAAiC;EACjC,+BAA+B;EAC/B,6BAA6B;EAC7B,8BAA8B;EAC9B,gCAAgC;EAChC,6BAA6B;EAC7B,6BAA6B;EAC7B,gCAAgC;EAChC,eAAe;EACf,iBAAiB;EACjB,aAAa;EACb,eAAe;EACf,QAAQ;EACR,YAAY;EACZ,gBAAgB;EAChB,QAAQ;EACR,QAAQ;EACR,cAAc;EACd,MAAM;EACN,UAAU;EACV,cAAc;EACd,aAAa;EACb,UAAU;EACV,cAAc;EACd,QAAQ;EACR,eAAe;EACf,UAAU;EACV;mBACmB;EACnB,QAAQ;EACR,YAAY;EACZ;CACD,eAAe,EACd,cAAc,MACd;CACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/vite-plugin",
|
|
3
|
-
"version": "1.53.
|
|
3
|
+
"version": "1.53.1",
|
|
4
4
|
"description": "Cloudflare plugin for Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"unenv": "2.0.0-rc.24",
|
|
48
|
-
"workerd": "1.
|
|
48
|
+
"workerd": "1.20260820.1",
|
|
49
49
|
"ws": "8.21.0",
|
|
50
50
|
"@cloudflare/unenv-preset": "2.16.1",
|
|
51
|
-
"miniflare": "5.
|
|
52
|
-
"wrangler": "4.
|
|
51
|
+
"miniflare": "5.20260820.0-alpha",
|
|
52
|
+
"wrangler": "4.125.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@cloudflare/workers-types": "^5.
|
|
55
|
+
"@cloudflare/workers-types": "^5.20260820.1",
|
|
56
56
|
"@remix-run/node-fetch-server": "^0.8.0",
|
|
57
57
|
"@types/node": "22.15.17",
|
|
58
58
|
"@types/semver": "^7.5.1",
|
|
@@ -73,19 +73,19 @@
|
|
|
73
73
|
"vite": "8.1.5",
|
|
74
74
|
"vite-legacy": "npm:vite@7.1.12",
|
|
75
75
|
"vitest": "4.1.0",
|
|
76
|
-
"@cloudflare/build-output-utils": "0.1.
|
|
76
|
+
"@cloudflare/build-output-utils": "0.1.3",
|
|
77
|
+
"@cloudflare/config": "0.7.0",
|
|
77
78
|
"@cloudflare/containers-shared": "0.16.0",
|
|
78
|
-
"@cloudflare/
|
|
79
|
-
"@cloudflare/runtime-types": "0.0.
|
|
80
|
-
"@cloudflare/config": "0.6.0",
|
|
79
|
+
"@cloudflare/remote-bindings": "0.0.14",
|
|
80
|
+
"@cloudflare/runtime-types": "0.0.16",
|
|
81
81
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
82
|
-
"@cloudflare/remote-bindings": "0.0.13",
|
|
83
82
|
"@cloudflare/workers-shared": "0.19.9",
|
|
84
|
-
"@cloudflare/workers-utils": "0.
|
|
83
|
+
"@cloudflare/workers-utils": "0.34.0",
|
|
84
|
+
"@cloudflare/mock-npm-registry": "0.0.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"vite": "^6.1.0 || ^7.0.0 || ^8.0.0",
|
|
88
|
-
"wrangler": "^4.
|
|
88
|
+
"wrangler": "^4.125.0"
|
|
89
89
|
},
|
|
90
90
|
"workers-sdk": {
|
|
91
91
|
"prerelease": true
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"open-PBXRGS4R-BtaaKU2N.mjs","names":["fs","process5","execFile","fs4","constants","stdout","execFile$1","path","arch"],"sources":["../../workers-utils/dist/open-PBXRGS4R.mjs"],"sourcesContent":["import { __name } from './chunk-Q72B4Q5Z.mjs';\nimport process5 from 'node:process';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport childProcess, { execFile as execFile$1 } from 'node:child_process';\nimport fs4, { constants } from 'node:fs/promises';\nimport { promisify } from 'node:util';\nimport os from 'node:os';\nimport fs from 'node:fs';\nimport { Buffer } from 'node:buffer';\n\nvar isDockerCached;\nfunction hasDockerEnv() {\n try {\n fs.statSync(\"/.dockerenv\");\n return true;\n } catch {\n return false;\n }\n}\n__name(hasDockerEnv, \"hasDockerEnv\");\nfunction hasDockerCGroup() {\n try {\n return fs.readFileSync(\"/proc/self/cgroup\", \"utf8\").includes(\"docker\");\n } catch {\n return false;\n }\n}\n__name(hasDockerCGroup, \"hasDockerCGroup\");\nfunction isDocker() {\n if (isDockerCached === void 0) {\n isDockerCached = hasDockerEnv() || hasDockerCGroup();\n }\n return isDockerCached;\n}\n__name(isDocker, \"isDocker\");\n\n// ../../node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js\nvar cachedResult;\nvar hasContainerEnv = /* @__PURE__ */ __name(() => {\n try {\n fs.statSync(\"/run/.containerenv\");\n return true;\n } catch {\n return false;\n }\n}, \"hasContainerEnv\");\nfunction isInsideContainer() {\n if (cachedResult === void 0) {\n cachedResult = hasContainerEnv() || isDocker();\n }\n return cachedResult;\n}\n__name(isInsideContainer, \"isInsideContainer\");\n\n// ../../node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js\nvar isWsl = /* @__PURE__ */ __name(() => {\n if (process5.platform !== \"linux\") {\n return false;\n }\n if (os.release().toLowerCase().includes(\"microsoft\")) {\n if (isInsideContainer()) {\n return false;\n }\n return true;\n }\n try {\n return fs.readFileSync(\"/proc/version\", \"utf8\").toLowerCase().includes(\"microsoft\") ? !isInsideContainer() : false;\n } catch {\n return false;\n }\n}, \"isWsl\");\nvar is_wsl_default = process5.env.__IS_WSL_TEST__ ? isWsl : isWsl();\nvar execFile = promisify(childProcess.execFile);\nvar powerShellPath = /* @__PURE__ */ __name(() => `${process5.env.SYSTEMROOT || process5.env.windir || String.raw`C:\\Windows`}\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe`, \"powerShellPath\");\nvar executePowerShell = /* @__PURE__ */ __name(async (command, options = {}) => {\n const {\n powerShellPath: psPath,\n ...execFileOptions\n } = options;\n const encodedCommand = executePowerShell.encodeCommand(command);\n return execFile(\n psPath ?? powerShellPath(),\n [\n ...executePowerShell.argumentsPrefix,\n encodedCommand\n ],\n {\n encoding: \"utf8\",\n ...execFileOptions\n }\n );\n}, \"executePowerShell\");\nexecutePowerShell.argumentsPrefix = [\n \"-NoProfile\",\n \"-NonInteractive\",\n \"-ExecutionPolicy\",\n \"Bypass\",\n \"-EncodedCommand\"\n];\nexecutePowerShell.encodeCommand = (command) => Buffer.from(command, \"utf16le\").toString(\"base64\");\nexecutePowerShell.escapeArgument = (value) => `'${String(value).replaceAll(\"'\", \"''\")}'`;\n\n// ../../node_modules/.pnpm/wsl-utils@0.3.1/node_modules/wsl-utils/utilities.js\nfunction parseMountPointFromConfig(content) {\n for (const line of content.split(\"\\n\")) {\n if (/^\\s*#/.test(line)) {\n continue;\n }\n const match = /^\\s*root\\s*=\\s*(?<mountPoint>\"[^\"]*\"|'[^']*'|[^#]*)/.exec(line);\n if (!match) {\n continue;\n }\n return match.groups.mountPoint.trim().replaceAll(/^[\"']|[\"']$/g, \"\");\n }\n}\n__name(parseMountPointFromConfig, \"parseMountPointFromConfig\");\n\n// ../../node_modules/.pnpm/wsl-utils@0.3.1/node_modules/wsl-utils/index.js\nvar execFile2 = promisify(childProcess.execFile);\nvar wslDrivesMountPoint = /* @__PURE__ */ (() => {\n const defaultMountPoint = \"/mnt/\";\n let mountPoint;\n return async function() {\n if (mountPoint) {\n return mountPoint;\n }\n const configFilePath = \"/etc/wsl.conf\";\n let isConfigFileExists = false;\n try {\n await fs4.access(configFilePath, constants.F_OK);\n isConfigFileExists = true;\n } catch {\n }\n if (!isConfigFileExists) {\n return defaultMountPoint;\n }\n const configContent = await fs4.readFile(configFilePath, { encoding: \"utf8\" });\n const parsedMountPoint = parseMountPointFromConfig(configContent);\n if (parsedMountPoint === void 0) {\n return defaultMountPoint;\n }\n mountPoint = parsedMountPoint;\n mountPoint = mountPoint.endsWith(\"/\") ? mountPoint : `${mountPoint}/`;\n return mountPoint;\n };\n})();\nvar powerShellPathFromWsl = /* @__PURE__ */ __name(async () => {\n const mountPoint = await wslDrivesMountPoint();\n return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;\n}, \"powerShellPathFromWsl\");\nvar powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath;\nvar canAccessPowerShellPromise;\nvar canAccessPowerShell = /* @__PURE__ */ __name(async () => {\n canAccessPowerShellPromise ??= (async () => {\n try {\n const psPath = await powerShellPath2();\n await fs4.access(psPath, constants.X_OK);\n return true;\n } catch {\n return false;\n }\n })();\n return canAccessPowerShellPromise;\n}, \"canAccessPowerShell\");\nvar wslDefaultBrowser = /* @__PURE__ */ __name(async () => {\n const psPath = await powerShellPath2();\n const command = String.raw`(Get-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice\").ProgId`;\n const { stdout } = await executePowerShell(command, { powerShellPath: psPath });\n return stdout.trim();\n}, \"wslDefaultBrowser\");\nvar convertWslPathToWindows = /* @__PURE__ */ __name(async (path2) => {\n if (/^[a-z]+:\\/\\//i.test(path2)) {\n return path2;\n }\n try {\n const { stdout } = await execFile2(\"wslpath\", [\"-aw\", path2], { encoding: \"utf8\" });\n return stdout.trim();\n } catch {\n return path2;\n }\n}, \"convertWslPathToWindows\");\n\n// ../../node_modules/.pnpm/define-lazy-prop@3.0.0/node_modules/define-lazy-prop/index.js\nfunction defineLazyProperty(object, propertyName, valueGetter) {\n const define = /* @__PURE__ */ __name((value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true }), \"define\");\n Object.defineProperty(object, propertyName, {\n configurable: true,\n enumerable: true,\n get() {\n const result = valueGetter();\n define(result);\n return result;\n },\n set(value) {\n define(value);\n }\n });\n return object;\n}\n__name(defineLazyProperty, \"defineLazyProperty\");\nvar execFileAsync = promisify(execFile$1);\nasync function defaultBrowserId() {\n if (process5.platform !== \"darwin\") {\n throw new Error(\"macOS only\");\n }\n const { stdout } = await execFileAsync(\"defaults\", [\"read\", \"com.apple.LaunchServices/com.apple.launchservices.secure\", \"LSHandlers\"]);\n const match = /LSHandlerRoleAll = \"(?!-)(?<id>[^\"]+?)\";\\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);\n const browserId = match?.groups.id ?? \"com.apple.Safari\";\n if (browserId === \"com.apple.safari\") {\n return \"com.apple.Safari\";\n }\n return browserId;\n}\n__name(defaultBrowserId, \"defaultBrowserId\");\nvar execFileAsync2 = promisify(execFile$1);\nasync function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {\n if (process5.platform !== \"darwin\") {\n throw new Error(\"macOS only\");\n }\n const outputArguments = humanReadableOutput ? [] : [\"-ss\"];\n const execOptions = {};\n if (signal) {\n execOptions.signal = signal;\n }\n const { stdout } = await execFileAsync2(\"osascript\", [\"-e\", script, outputArguments], execOptions);\n return stdout.trim();\n}\n__name(runAppleScript, \"runAppleScript\");\n\n// ../../node_modules/.pnpm/bundle-name@4.1.0/node_modules/bundle-name/index.js\nasync function bundleName(bundleId) {\n return runAppleScript(`tell application \"Finder\" to set app_path to application file id \"${bundleId}\" as string\ntell application \"System Events\" to get value of property list item \"CFBundleName\" of property list file (app_path & \":Contents:Info.plist\")`);\n}\n__name(bundleName, \"bundleName\");\nvar execFileAsync3 = promisify(execFile$1);\nvar windowsBrowserProgIds = {\n MSEdgeHTM: { name: \"Edge\", id: \"com.microsoft.edge\" },\n // The missing `L` is correct.\n MSEdgeBHTML: { name: \"Edge Beta\", id: \"com.microsoft.edge.beta\" },\n MSEdgeDHTML: { name: \"Edge Dev\", id: \"com.microsoft.edge.dev\" },\n AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: \"Edge\", id: \"com.microsoft.edge.old\" },\n ChromeHTML: { name: \"Chrome\", id: \"com.google.chrome\" },\n ChromeBHTML: { name: \"Chrome Beta\", id: \"com.google.chrome.beta\" },\n ChromeDHTML: { name: \"Chrome Dev\", id: \"com.google.chrome.dev\" },\n ChromiumHTM: { name: \"Chromium\", id: \"org.chromium.Chromium\" },\n BraveHTML: { name: \"Brave\", id: \"com.brave.Browser\" },\n BraveBHTML: { name: \"Brave Beta\", id: \"com.brave.Browser.beta\" },\n BraveDHTML: { name: \"Brave Dev\", id: \"com.brave.Browser.dev\" },\n BraveSSHTM: { name: \"Brave Nightly\", id: \"com.brave.Browser.nightly\" },\n FirefoxURL: { name: \"Firefox\", id: \"org.mozilla.firefox\" },\n OperaStable: { name: \"Opera\", id: \"com.operasoftware.Opera\" },\n VivaldiHTM: { name: \"Vivaldi\", id: \"com.vivaldi.Vivaldi\" },\n \"IE.HTTP\": { name: \"Internet Explorer\", id: \"com.microsoft.ie\" }\n};\nvar _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));\nvar UnknownBrowserError = class extends Error {\n static {\n __name(this, \"UnknownBrowserError\");\n }\n};\nasync function defaultBrowser(_execFileAsync = execFileAsync3) {\n const { stdout } = await _execFileAsync(\"reg\", [\n \"QUERY\",\n \" HKEY_CURRENT_USER\\\\Software\\\\Microsoft\\\\Windows\\\\Shell\\\\Associations\\\\UrlAssociations\\\\http\\\\UserChoice\",\n \"/v\",\n \"ProgId\"\n ]);\n const match = /ProgId\\s*REG_SZ\\s*(?<id>\\S+)/.exec(stdout);\n if (!match) {\n throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);\n }\n const { id } = match.groups;\n const browser = windowsBrowserProgIds[id];\n if (!browser) {\n throw new UnknownBrowserError(`Unknown browser ID: ${id}`);\n }\n return browser;\n}\n__name(defaultBrowser, \"defaultBrowser\");\n\n// ../../node_modules/.pnpm/default-browser@5.4.0/node_modules/default-browser/index.js\nvar execFileAsync4 = promisify(execFile$1);\nvar titleize = /* @__PURE__ */ __name((string) => string.toLowerCase().replaceAll(/(?:^|\\s|-)\\S/g, (x) => x.toUpperCase()), \"titleize\");\nasync function defaultBrowser2() {\n if (process5.platform === \"darwin\") {\n const id = await defaultBrowserId();\n const name = await bundleName(id);\n return { name, id };\n }\n if (process5.platform === \"linux\") {\n const { stdout } = await execFileAsync4(\"xdg-mime\", [\"query\", \"default\", \"x-scheme-handler/http\"]);\n const id = stdout.trim();\n const name = titleize(id.replace(/.desktop$/, \"\").replace(\"-\", \" \"));\n return { name, id };\n }\n if (process5.platform === \"win32\") {\n return defaultBrowser();\n }\n throw new Error(\"Only macOS, Linux, and Windows are supported\");\n}\n__name(defaultBrowser2, \"defaultBrowser\");\nvar isInSsh = Boolean(process5.env.SSH_CONNECTION || process5.env.SSH_CLIENT || process5.env.SSH_TTY);\nvar is_in_ssh_default = isInSsh;\n\n// ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js\nvar fallbackAttemptSymbol = Symbol(\"fallbackAttempt\");\nvar __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : \"\";\nvar localXdgOpenPath = path.join(__dirname, \"xdg-open\");\nvar { platform, arch } = process5;\nvar tryEachApp = /* @__PURE__ */ __name(async (apps2, opener) => {\n if (apps2.length === 0) {\n return;\n }\n const errors = [];\n for (const app of apps2) {\n try {\n return await opener(app);\n } catch (error) {\n errors.push(error);\n }\n }\n throw new AggregateError(errors, \"Failed to open in all supported apps\");\n}, \"tryEachApp\");\nvar baseOpen = /* @__PURE__ */ __name(async (options) => {\n options = {\n wait: false,\n background: false,\n newInstance: false,\n allowNonzeroExitCode: false,\n ...options\n };\n const isFallbackAttempt = options[fallbackAttemptSymbol] === true;\n delete options[fallbackAttemptSymbol];\n if (Array.isArray(options.app)) {\n return tryEachApp(options.app, (singleApp) => baseOpen({\n ...options,\n app: singleApp,\n [fallbackAttemptSymbol]: true\n }));\n }\n let { name: app, arguments: appArguments = [] } = options.app ?? {};\n appArguments = [...appArguments];\n if (Array.isArray(app)) {\n return tryEachApp(app, (appName) => baseOpen({\n ...options,\n app: {\n name: appName,\n arguments: appArguments\n },\n [fallbackAttemptSymbol]: true\n }));\n }\n if (app === \"browser\" || app === \"browserPrivate\") {\n const ids = {\n \"com.google.chrome\": \"chrome\",\n \"google-chrome.desktop\": \"chrome\",\n \"com.brave.browser\": \"brave\",\n \"org.mozilla.firefox\": \"firefox\",\n \"firefox.desktop\": \"firefox\",\n \"com.microsoft.msedge\": \"edge\",\n \"com.microsoft.edge\": \"edge\",\n \"com.microsoft.edgemac\": \"edge\",\n \"microsoft-edge.desktop\": \"edge\",\n \"com.apple.safari\": \"safari\"\n };\n const flags = {\n chrome: \"--incognito\",\n brave: \"--incognito\",\n firefox: \"--private-window\",\n edge: \"--inPrivate\"\n // Safari doesn't support private mode via command line\n };\n let browser;\n if (is_wsl_default) {\n const progId = await wslDefaultBrowser();\n const browserInfo = _windowsBrowserProgIdMap.get(progId);\n browser = browserInfo ?? {};\n } else {\n browser = await defaultBrowser2();\n }\n if (browser.id in ids) {\n const browserName = ids[browser.id.toLowerCase()];\n if (app === \"browserPrivate\") {\n if (browserName === \"safari\") {\n throw new Error(\"Safari doesn't support opening in private mode via command line\");\n }\n appArguments.push(flags[browserName]);\n }\n return baseOpen({\n ...options,\n app: {\n name: apps[browserName],\n arguments: appArguments\n }\n });\n }\n throw new Error(`${browser.name} is not supported as a default browser`);\n }\n let command;\n const cliArguments = [];\n const childProcessOptions = {};\n let shouldUseWindowsInWsl = false;\n if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) {\n shouldUseWindowsInWsl = await canAccessPowerShell();\n }\n if (platform === \"darwin\") {\n command = \"open\";\n if (options.wait) {\n cliArguments.push(\"--wait-apps\");\n }\n if (options.background) {\n cliArguments.push(\"--background\");\n }\n if (options.newInstance) {\n cliArguments.push(\"--new\");\n }\n if (app) {\n cliArguments.push(\"-a\", app);\n }\n } else if (platform === \"win32\" || shouldUseWindowsInWsl) {\n command = await powerShellPath2();\n cliArguments.push(...executePowerShell.argumentsPrefix);\n if (!is_wsl_default) {\n childProcessOptions.windowsVerbatimArguments = true;\n }\n if (is_wsl_default && options.target) {\n options.target = await convertWslPathToWindows(options.target);\n }\n const encodedArguments = [\"$ProgressPreference = 'SilentlyContinue';\", \"Start\"];\n if (options.wait) {\n encodedArguments.push(\"-Wait\");\n }\n if (app) {\n encodedArguments.push(executePowerShell.escapeArgument(app));\n if (options.target) {\n appArguments.push(options.target);\n }\n } else if (options.target) {\n encodedArguments.push(executePowerShell.escapeArgument(options.target));\n }\n if (appArguments.length > 0) {\n appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));\n encodedArguments.push(\"-ArgumentList\", appArguments.join(\",\"));\n }\n options.target = executePowerShell.encodeCommand(encodedArguments.join(\" \"));\n if (!options.wait) {\n childProcessOptions.stdio = \"ignore\";\n }\n } else {\n if (app) {\n command = app;\n } else {\n const isBundled = !__dirname || __dirname === \"/\";\n let exeLocalXdgOpen = false;\n try {\n await fs4.access(localXdgOpenPath, constants.X_OK);\n exeLocalXdgOpen = true;\n } catch {\n }\n const useSystemXdgOpen = process5.versions.electron ?? (platform === \"android\" || isBundled || !exeLocalXdgOpen);\n command = useSystemXdgOpen ? \"xdg-open\" : localXdgOpenPath;\n }\n if (appArguments.length > 0) {\n cliArguments.push(...appArguments);\n }\n if (!options.wait) {\n childProcessOptions.stdio = \"ignore\";\n childProcessOptions.detached = true;\n }\n }\n if (platform === \"darwin\" && appArguments.length > 0) {\n cliArguments.push(\"--args\", ...appArguments);\n }\n if (options.target) {\n cliArguments.push(options.target);\n }\n const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);\n if (options.wait) {\n return new Promise((resolve, reject) => {\n subprocess.once(\"error\", reject);\n subprocess.once(\"close\", (exitCode) => {\n if (!options.allowNonzeroExitCode && exitCode !== 0) {\n reject(new Error(`Exited with code ${exitCode}`));\n return;\n }\n resolve(subprocess);\n });\n });\n }\n if (isFallbackAttempt) {\n return new Promise((resolve, reject) => {\n subprocess.once(\"error\", reject);\n subprocess.once(\"spawn\", () => {\n subprocess.once(\"close\", (exitCode) => {\n subprocess.off(\"error\", reject);\n if (exitCode !== 0) {\n reject(new Error(`Exited with code ${exitCode}`));\n return;\n }\n subprocess.unref();\n resolve(subprocess);\n });\n });\n });\n }\n subprocess.unref();\n return new Promise((resolve, reject) => {\n subprocess.once(\"error\", reject);\n subprocess.once(\"spawn\", () => {\n subprocess.off(\"error\", reject);\n resolve(subprocess);\n });\n });\n}, \"baseOpen\");\nvar open = /* @__PURE__ */ __name((target, options) => {\n if (typeof target !== \"string\") {\n throw new TypeError(\"Expected a `target`\");\n }\n return baseOpen({\n ...options,\n target\n });\n}, \"open\");\nvar openApp = /* @__PURE__ */ __name((name, options) => {\n if (typeof name !== \"string\" && !Array.isArray(name)) {\n throw new TypeError(\"Expected a valid `name`\");\n }\n const { arguments: appArguments = [] } = options ?? {};\n if (appArguments !== void 0 && appArguments !== null && !Array.isArray(appArguments)) {\n throw new TypeError(\"Expected `appArguments` as Array type\");\n }\n return baseOpen({\n ...options,\n app: {\n name,\n arguments: appArguments\n }\n });\n}, \"openApp\");\nfunction detectArchBinary(binary) {\n if (typeof binary === \"string\" || Array.isArray(binary)) {\n return binary;\n }\n const { [arch]: archBinary } = binary;\n if (!archBinary) {\n throw new Error(`${arch} is not supported`);\n }\n return archBinary;\n}\n__name(detectArchBinary, \"detectArchBinary\");\nfunction detectPlatformBinary({ [platform]: platformBinary }, { wsl } = {}) {\n if (wsl && is_wsl_default) {\n return detectArchBinary(wsl);\n }\n if (!platformBinary) {\n throw new Error(`${platform} is not supported`);\n }\n return detectArchBinary(platformBinary);\n}\n__name(detectPlatformBinary, \"detectPlatformBinary\");\nvar apps = {\n browser: \"browser\",\n browserPrivate: \"browserPrivate\"\n};\ndefineLazyProperty(apps, \"chrome\", () => detectPlatformBinary({\n darwin: \"google chrome\",\n win32: \"chrome\",\n // `chromium-browser` is the older deb package name used by Ubuntu/Debian before snap.\n linux: [\"google-chrome\", \"google-chrome-stable\", \"chromium\", \"chromium-browser\"]\n}, {\n wsl: {\n ia32: \"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe\",\n x64: [\"/mnt/c/Program Files/Google/Chrome/Application/chrome.exe\", \"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe\"]\n }\n}));\ndefineLazyProperty(apps, \"brave\", () => detectPlatformBinary({\n darwin: \"brave browser\",\n win32: \"brave\",\n linux: [\"brave-browser\", \"brave\"]\n}, {\n wsl: {\n ia32: \"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe\",\n x64: [\"/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe\", \"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe\"]\n }\n}));\ndefineLazyProperty(apps, \"firefox\", () => detectPlatformBinary({\n darwin: \"firefox\",\n win32: String.raw`C:\\Program Files\\Mozilla Firefox\\firefox.exe`,\n linux: \"firefox\"\n}, {\n wsl: \"/mnt/c/Program Files/Mozilla Firefox/firefox.exe\"\n}));\ndefineLazyProperty(apps, \"edge\", () => detectPlatformBinary({\n darwin: \"microsoft edge\",\n win32: \"msedge\",\n linux: [\"microsoft-edge\", \"microsoft-edge-dev\"]\n}, {\n wsl: \"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe\"\n}));\ndefineLazyProperty(apps, \"safari\", () => detectPlatformBinary({\n darwin: \"Safari\"\n}));\nvar open_default = open;\n\nexport { apps, open_default as default, openApp };\n"],"mappings":";;;;;;;;;;;;AAWA,IAAI;AACJ,SAAS,eAAe;AACtB,K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,MAAM,gBAAgB,qBAAqB;CAC5D,QAAQ;CACR,OAAO;CAEP,OAAO;EAAC;EAAiB;EAAwB;EAAY;EAAmB;CACjF,EAAE,EACD,KAAK;CACH,MAAM;CACN,KAAK,CAAC,6DAA6D,kEAAkE;CACtI,EACF,CAAC,CAAC;AACH,mBAAmB,MAAM,eAAe,qBAAqB;CAC3D,QAAQ;CACR,OAAO;CACP,OAAO,CAAC,iBAAiB,QAAQ;CAClC,EAAE,EACD,KAAK;CACH,MAAM;CACN,KAAK,CAAC,0EAA0E,+EAA+E;CAChK,EACF,CAAC,CAAC;AACH,mBAAmB,MAAM,iBAAiB,qBAAqB;CAC7D,QAAQ;CACR,OAAO,OAAO,GAAG;CACjB,OAAO;CACR,EAAE,EACD,KAAK,oDACN,CAAC,CAAC;AACH,mBAAmB,MAAM,cAAc,qBAAqB;CAC1D,QAAQ;CACR,OAAO;CACP,OAAO,CAAC,kBAAkB,qBAAqB;CAChD,EAAE,EACD,KAAK,oEACN,CAAC,CAAC;AACH,mBAAmB,MAAM,gBAAgB,qBAAqB,EAC5D,QAAQ,UACT,CAAC,CAAC;AACH,IAAI,eAAe"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"open-PBXRGS4R-qOWuyhJy-DF6hl_jp.mjs","names":["process5","fs4","constants","stdout"],"sources":["../../runtime-types/dist/open-PBXRGS4R-qOWuyhJy.mjs"],"sourcesContent":["import { r as __name } from \"./chunk-Q72B4Q5Z-CeVNOsQb.mjs\";\nimport fs4, { constants } from \"node:fs/promises\";\nimport fs2 from \"node:fs\";\nimport os from \"node:os\";\nimport path2__default from \"node:path\";\nimport childProcess, { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport { Buffer } from \"node:buffer\";\nimport { fileURLToPath } from \"node:url\";\nimport process5 from \"node:process\";\n\n//#region ../workers-utils/dist/open-PBXRGS4R.mjs\nvar isDockerCached;\nfunction hasDockerEnv() {\n\ttry {\n\t\tfs2.statSync(\"/.dockerenv\");\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n__name(hasDockerEnv, \"hasDockerEnv\");\nfunction hasDockerCGroup() {\n\ttry {\n\t\treturn fs2.readFileSync(\"/proc/self/cgroup\", \"utf8\").includes(\"docker\");\n\t} catch {\n\t\treturn false;\n\t}\n}\n__name(hasDockerCGroup, \"hasDockerCGroup\");\nfunction isDocker() {\n\tif (isDockerCached === void 0) isDockerCached = hasDockerEnv() || hasDockerCGroup();\n\treturn isDockerCached;\n}\n__name(isDocker, \"isDocker\");\nvar cachedResult;\nvar hasContainerEnv = /* @__PURE__ */ __name(() => {\n\ttry {\n\t\tfs2.statSync(\"/run/.containerenv\");\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}, \"hasContainerEnv\");\nfunction isInsideContainer() {\n\tif (cachedResult === void 0) cachedResult = hasContainerEnv() || isDocker();\n\treturn cachedResult;\n}\n__name(isInsideContainer, \"isInsideContainer\");\nvar isWsl = /* @__PURE__ */ __name(() => {\n\tif (process5.platform !== \"linux\") return false;\n\tif (os.release().toLowerCase().includes(\"microsoft\")) {\n\t\tif (isInsideContainer()) return false;\n\t\treturn true;\n\t}\n\ttry {\n\t\treturn fs2.readFileSync(\"/proc/version\", \"utf8\").toLowerCase().includes(\"microsoft\") ? !isInsideContainer() : false;\n\t} catch {\n\t\treturn false;\n\t}\n}, \"isWsl\");\nvar is_wsl_default = process5.env.__IS_WSL_TEST__ ? isWsl : isWsl();\nvar execFile$1 = promisify(childProcess.execFile);\nvar powerShellPath = /* @__PURE__ */ __name(() => `${process5.env.SYSTEMROOT || process5.env.windir || String.raw`C:\\Windows`}\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe`, \"powerShellPath\");\nvar executePowerShell = /* @__PURE__ */ __name(async (command, options = {}) => {\n\tconst { powerShellPath: psPath,...execFileOptions } = options;\n\tconst encodedCommand = executePowerShell.encodeCommand(command);\n\treturn execFile$1(psPath ?? powerShellPath(), [...executePowerShell.argumentsPrefix, encodedCommand], {\n\t\tencoding: \"utf8\",\n\t\t...execFileOptions\n\t});\n}, \"executePowerShell\");\nexecutePowerShell.argumentsPrefix = [\n\t\"-NoProfile\",\n\t\"-NonInteractive\",\n\t\"-ExecutionPolicy\",\n\t\"Bypass\",\n\t\"-EncodedCommand\"\n];\nexecutePowerShell.encodeCommand = (command) => Buffer.from(command, \"utf16le\").toString(\"base64\");\nexecutePowerShell.escapeArgument = (value) => `'${String(value).replaceAll(\"'\", \"''\")}'`;\nfunction parseMountPointFromConfig(content) {\n\tfor (const line of content.split(\"\\n\")) {\n\t\tif (/^\\s*#/.test(line)) continue;\n\t\tconst match = /^\\s*root\\s*=\\s*(?<mountPoint>\"[^\"]*\"|'[^']*'|[^#]*)/.exec(line);\n\t\tif (!match) continue;\n\t\treturn match.groups.mountPoint.trim().replaceAll(/^[\"']|[\"']$/g, \"\");\n\t}\n}\n__name(parseMountPointFromConfig, \"parseMountPointFromConfig\");\nvar execFile2 = promisify(childProcess.execFile);\nvar wslDrivesMountPoint = /* @__PURE__ */ (() => {\n\tconst defaultMountPoint = \"/mnt/\";\n\tlet mountPoint;\n\treturn async function() {\n\t\tif (mountPoint) return mountPoint;\n\t\tconst configFilePath = \"/etc/wsl.conf\";\n\t\tlet isConfigFileExists = false;\n\t\ttry {\n\t\t\tawait fs4.access(configFilePath, constants.F_OK);\n\t\t\tisConfigFileExists = true;\n\t\t} catch {}\n\t\tif (!isConfigFileExists) return defaultMountPoint;\n\t\tconst parsedMountPoint = parseMountPointFromConfig(await fs4.readFile(configFilePath, { encoding: \"utf8\" }));\n\t\tif (parsedMountPoint === void 0) return defaultMountPoint;\n\t\tmountPoint = parsedMountPoint;\n\t\tmountPoint = mountPoint.endsWith(\"/\") ? mountPoint : `${mountPoint}/`;\n\t\treturn mountPoint;\n\t};\n})();\nvar powerShellPath2 = is_wsl_default ? /* @__PURE__ */ __name(async () => {\n\treturn `${await wslDrivesMountPoint()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;\n}, \"powerShellPathFromWsl\") : powerShellPath;\nvar canAccessPowerShellPromise;\nvar canAccessPowerShell = /* @__PURE__ */ __name(async () => {\n\tcanAccessPowerShellPromise ??= (async () => {\n\t\ttry {\n\t\t\tconst psPath = await powerShellPath2();\n\t\t\tawait fs4.access(psPath, constants.X_OK);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t})();\n\treturn canAccessPowerShellPromise;\n}, \"canAccessPowerShell\");\nvar wslDefaultBrowser = /* @__PURE__ */ __name(async () => {\n\tconst psPath = await powerShellPath2();\n\tconst { stdout } = await executePowerShell(String.raw`(Get-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice\").ProgId`, { powerShellPath: psPath });\n\treturn stdout.trim();\n}, \"wslDefaultBrowser\");\nvar convertWslPathToWindows = /* @__PURE__ */ __name(async (path2) => {\n\tif (/^[a-z]+:\\/\\//i.test(path2)) return path2;\n\ttry {\n\t\tconst { stdout } = await execFile2(\"wslpath\", [\"-aw\", path2], { encoding: \"utf8\" });\n\t\treturn stdout.trim();\n\t} catch {\n\t\treturn path2;\n\t}\n}, \"convertWslPathToWindows\");\nfunction defineLazyProperty(object, propertyName, valueGetter) {\n\tconst define = /* @__PURE__ */ __name((value) => Object.defineProperty(object, propertyName, {\n\t\tvalue,\n\t\tenumerable: true,\n\t\twritable: true\n\t}), \"define\");\n\tObject.defineProperty(object, propertyName, {\n\t\tconfigurable: true,\n\t\tenumerable: true,\n\t\tget() {\n\t\t\tconst result = valueGetter();\n\t\t\tdefine(result);\n\t\t\treturn result;\n\t\t},\n\t\tset(value) {\n\t\t\tdefine(value);\n\t\t}\n\t});\n\treturn object;\n}\n__name(defineLazyProperty, \"defineLazyProperty\");\nvar execFileAsync = promisify(execFile);\nasync function defaultBrowserId() {\n\tif (process5.platform !== \"darwin\") throw new Error(\"macOS only\");\n\tconst { stdout } = await execFileAsync(\"defaults\", [\n\t\t\"read\",\n\t\t\"com.apple.LaunchServices/com.apple.launchservices.secure\",\n\t\t\"LSHandlers\"\n\t]);\n\tconst browserId = /LSHandlerRoleAll = \"(?!-)(?<id>[^\"]+?)\";\\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout)?.groups.id ?? \"com.apple.Safari\";\n\tif (browserId === \"com.apple.safari\") return \"com.apple.Safari\";\n\treturn browserId;\n}\n__name(defaultBrowserId, \"defaultBrowserId\");\nvar execFileAsync2 = promisify(execFile);\nasync function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {\n\tif (process5.platform !== \"darwin\") throw new Error(\"macOS only\");\n\tconst outputArguments = humanReadableOutput ? [] : [\"-ss\"];\n\tconst execOptions = {};\n\tif (signal) execOptions.signal = signal;\n\tconst { stdout } = await execFileAsync2(\"osascript\", [\n\t\t\"-e\",\n\t\tscript,\n\t\toutputArguments\n\t], execOptions);\n\treturn stdout.trim();\n}\n__name(runAppleScript, \"runAppleScript\");\nasync function bundleName(bundleId) {\n\treturn runAppleScript(`tell application \"Finder\" to set app_path to application file id \"${bundleId}\" as string\ntell application \"System Events\" to get value of property list item \"CFBundleName\" of property list file (app_path & \":Contents:Info.plist\")`);\n}\n__name(bundleName, \"bundleName\");\nvar execFileAsync3 = promisify(execFile);\nvar windowsBrowserProgIds = {\n\tMSEdgeHTM: {\n\t\tname: \"Edge\",\n\t\tid: \"com.microsoft.edge\"\n\t},\n\tMSEdgeBHTML: {\n\t\tname: \"Edge Beta\",\n\t\tid: \"com.microsoft.edge.beta\"\n\t},\n\tMSEdgeDHTML: {\n\t\tname: \"Edge Dev\",\n\t\tid: \"com.microsoft.edge.dev\"\n\t},\n\tAppXq0fevzme2pys62n3e0fbqa7peapykr8v: {\n\t\tname: \"Edge\",\n\t\tid: \"com.microsoft.edge.old\"\n\t},\n\tChromeHTML: {\n\t\tname: \"Chrome\",\n\t\tid: \"com.google.chrome\"\n\t},\n\tChromeBHTML: {\n\t\tname: \"Chrome Beta\",\n\t\tid: \"com.google.chrome.beta\"\n\t},\n\tChromeDHTML: {\n\t\tname: \"Chrome Dev\",\n\t\tid: \"com.google.chrome.dev\"\n\t},\n\tChromiumHTM: {\n\t\tname: \"Chromium\",\n\t\tid: \"org.chromium.Chromium\"\n\t},\n\tBraveHTML: {\n\t\tname: \"Brave\",\n\t\tid: \"com.brave.Browser\"\n\t},\n\tBraveBHTML: {\n\t\tname: \"Brave Beta\",\n\t\tid: \"com.brave.Browser.beta\"\n\t},\n\tBraveDHTML: {\n\t\tname: \"Brave Dev\",\n\t\tid: \"com.brave.Browser.dev\"\n\t},\n\tBraveSSHTM: {\n\t\tname: \"Brave Nightly\",\n\t\tid: \"com.brave.Browser.nightly\"\n\t},\n\tFirefoxURL: {\n\t\tname: \"Firefox\",\n\t\tid: \"org.mozilla.firefox\"\n\t},\n\tOperaStable: {\n\t\tname: \"Opera\",\n\t\tid: \"com.operasoftware.Opera\"\n\t},\n\tVivaldiHTM: {\n\t\tname: \"Vivaldi\",\n\t\tid: \"com.vivaldi.Vivaldi\"\n\t},\n\t\"IE.HTTP\": {\n\t\tname: \"Internet Explorer\",\n\t\tid: \"com.microsoft.ie\"\n\t}\n};\nvar _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));\nvar UnknownBrowserError = class extends Error {\n\tstatic {\n\t\t__name(this, \"UnknownBrowserError\");\n\t}\n};\nasync function defaultBrowser(_execFileAsync = execFileAsync3) {\n\tconst { stdout } = await _execFileAsync(\"reg\", [\n\t\t\"QUERY\",\n\t\t\" HKEY_CURRENT_USER\\\\Software\\\\Microsoft\\\\Windows\\\\Shell\\\\Associations\\\\UrlAssociations\\\\http\\\\UserChoice\",\n\t\t\"/v\",\n\t\t\"ProgId\"\n\t]);\n\tconst match = /ProgId\\s*REG_SZ\\s*(?<id>\\S+)/.exec(stdout);\n\tif (!match) throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);\n\tconst { id } = match.groups;\n\tconst browser = windowsBrowserProgIds[id];\n\tif (!browser) throw new UnknownBrowserError(`Unknown browser ID: ${id}`);\n\treturn browser;\n}\n__name(defaultBrowser, \"defaultBrowser\");\nvar execFileAsync4 = promisify(execFile);\nvar titleize = /* @__PURE__ */ __name((string) => string.toLowerCase().replaceAll(/(?:^|\\s|-)\\S/g, (x) => x.toUpperCase()), \"titleize\");\nasync function defaultBrowser2() {\n\tif (process5.platform === \"darwin\") {\n\t\tconst id = await defaultBrowserId();\n\t\treturn {\n\t\t\tname: await bundleName(id),\n\t\t\tid\n\t\t};\n\t}\n\tif (process5.platform === \"linux\") {\n\t\tconst { stdout } = await execFileAsync4(\"xdg-mime\", [\n\t\t\t\"query\",\n\t\t\t\"default\",\n\t\t\t\"x-scheme-handler/http\"\n\t\t]);\n\t\tconst id = stdout.trim();\n\t\treturn {\n\t\t\tname: titleize(id.replace(/.desktop$/, \"\").replace(\"-\", \" \")),\n\t\t\tid\n\t\t};\n\t}\n\tif (process5.platform === \"win32\") return defaultBrowser();\n\tthrow new Error(\"Only macOS, Linux, and Windows are supported\");\n}\n__name(defaultBrowser2, \"defaultBrowser\");\nvar is_in_ssh_default = Boolean(process5.env.SSH_CONNECTION || process5.env.SSH_CLIENT || process5.env.SSH_TTY);\nvar fallbackAttemptSymbol = Symbol(\"fallbackAttempt\");\nvar __dirname = import.meta.url ? path2__default.dirname(fileURLToPath(import.meta.url)) : \"\";\nvar localXdgOpenPath = path2__default.join(__dirname, \"xdg-open\");\nvar { platform, arch: arch$1 } = process5;\nvar tryEachApp = /* @__PURE__ */ __name(async (apps2, opener) => {\n\tif (apps2.length === 0) return;\n\tconst errors = [];\n\tfor (const app of apps2) try {\n\t\treturn await opener(app);\n\t} catch (error) {\n\t\terrors.push(error);\n\t}\n\tthrow new AggregateError(errors, \"Failed to open in all supported apps\");\n}, \"tryEachApp\");\nvar baseOpen = /* @__PURE__ */ __name(async (options) => {\n\toptions = {\n\t\twait: false,\n\t\tbackground: false,\n\t\tnewInstance: false,\n\t\tallowNonzeroExitCode: false,\n\t\t...options\n\t};\n\tconst isFallbackAttempt = options[fallbackAttemptSymbol] === true;\n\tdelete options[fallbackAttemptSymbol];\n\tif (Array.isArray(options.app)) return tryEachApp(options.app, (singleApp) => baseOpen({\n\t\t...options,\n\t\tapp: singleApp,\n\t\t[fallbackAttemptSymbol]: true\n\t}));\n\tlet { name: app, arguments: appArguments = [] } = options.app ?? {};\n\tappArguments = [...appArguments];\n\tif (Array.isArray(app)) return tryEachApp(app, (appName) => baseOpen({\n\t\t...options,\n\t\tapp: {\n\t\t\tname: appName,\n\t\t\targuments: appArguments\n\t\t},\n\t\t[fallbackAttemptSymbol]: true\n\t}));\n\tif (app === \"browser\" || app === \"browserPrivate\") {\n\t\tconst ids = {\n\t\t\t\"com.google.chrome\": \"chrome\",\n\t\t\t\"google-chrome.desktop\": \"chrome\",\n\t\t\t\"com.brave.browser\": \"brave\",\n\t\t\t\"org.mozilla.firefox\": \"firefox\",\n\t\t\t\"firefox.desktop\": \"firefox\",\n\t\t\t\"com.microsoft.msedge\": \"edge\",\n\t\t\t\"com.microsoft.edge\": \"edge\",\n\t\t\t\"com.microsoft.edgemac\": \"edge\",\n\t\t\t\"microsoft-edge.desktop\": \"edge\",\n\t\t\t\"com.apple.safari\": \"safari\"\n\t\t};\n\t\tconst flags = {\n\t\t\tchrome: \"--incognito\",\n\t\t\tbrave: \"--incognito\",\n\t\t\tfirefox: \"--private-window\",\n\t\t\tedge: \"--inPrivate\"\n\t\t};\n\t\tlet browser;\n\t\tif (is_wsl_default) {\n\t\t\tconst progId = await wslDefaultBrowser();\n\t\t\tbrowser = _windowsBrowserProgIdMap.get(progId) ?? {};\n\t\t} else browser = await defaultBrowser2();\n\t\tif (browser.id in ids) {\n\t\t\tconst browserName = ids[browser.id.toLowerCase()];\n\t\t\tif (app === \"browserPrivate\") {\n\t\t\t\tif (browserName === \"safari\") throw new Error(\"Safari doesn't support opening in private mode via command line\");\n\t\t\t\tappArguments.push(flags[browserName]);\n\t\t\t}\n\t\t\treturn baseOpen({\n\t\t\t\t...options,\n\t\t\t\tapp: {\n\t\t\t\t\tname: apps[browserName],\n\t\t\t\t\targuments: appArguments\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tthrow new Error(`${browser.name} is not supported as a default browser`);\n\t}\n\tlet command;\n\tconst cliArguments = [];\n\tconst childProcessOptions = {};\n\tlet shouldUseWindowsInWsl = false;\n\tif (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) shouldUseWindowsInWsl = await canAccessPowerShell();\n\tif (platform === \"darwin\") {\n\t\tcommand = \"open\";\n\t\tif (options.wait) cliArguments.push(\"--wait-apps\");\n\t\tif (options.background) cliArguments.push(\"--background\");\n\t\tif (options.newInstance) cliArguments.push(\"--new\");\n\t\tif (app) cliArguments.push(\"-a\", app);\n\t} else if (platform === \"win32\" || shouldUseWindowsInWsl) {\n\t\tcommand = await powerShellPath2();\n\t\tcliArguments.push(...executePowerShell.argumentsPrefix);\n\t\tif (!is_wsl_default) childProcessOptions.windowsVerbatimArguments = true;\n\t\tif (is_wsl_default && options.target) options.target = await convertWslPathToWindows(options.target);\n\t\tconst encodedArguments = [\"$ProgressPreference = 'SilentlyContinue';\", \"Start\"];\n\t\tif (options.wait) encodedArguments.push(\"-Wait\");\n\t\tif (app) {\n\t\t\tencodedArguments.push(executePowerShell.escapeArgument(app));\n\t\t\tif (options.target) appArguments.push(options.target);\n\t\t} else if (options.target) encodedArguments.push(executePowerShell.escapeArgument(options.target));\n\t\tif (appArguments.length > 0) {\n\t\t\tappArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));\n\t\t\tencodedArguments.push(\"-ArgumentList\", appArguments.join(\",\"));\n\t\t}\n\t\toptions.target = executePowerShell.encodeCommand(encodedArguments.join(\" \"));\n\t\tif (!options.wait) childProcessOptions.stdio = \"ignore\";\n\t} else {\n\t\tif (app) command = app;\n\t\telse {\n\t\t\tconst isBundled = !__dirname || __dirname === \"/\";\n\t\t\tlet exeLocalXdgOpen = false;\n\t\t\ttry {\n\t\t\t\tawait fs4.access(localXdgOpenPath, constants.X_OK);\n\t\t\t\texeLocalXdgOpen = true;\n\t\t\t} catch {}\n\t\t\tcommand = process5.versions.electron ?? (platform === \"android\" || isBundled || !exeLocalXdgOpen) ? \"xdg-open\" : localXdgOpenPath;\n\t\t}\n\t\tif (appArguments.length > 0) cliArguments.push(...appArguments);\n\t\tif (!options.wait) {\n\t\t\tchildProcessOptions.stdio = \"ignore\";\n\t\t\tchildProcessOptions.detached = true;\n\t\t}\n\t}\n\tif (platform === \"darwin\" && appArguments.length > 0) cliArguments.push(\"--args\", ...appArguments);\n\tif (options.target) cliArguments.push(options.target);\n\tconst subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);\n\tif (options.wait) return new Promise((resolve$1, reject) => {\n\t\tsubprocess.once(\"error\", reject);\n\t\tsubprocess.once(\"close\", (exitCode) => {\n\t\t\tif (!options.allowNonzeroExitCode && exitCode !== 0) {\n\t\t\t\treject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tresolve$1(subprocess);\n\t\t});\n\t});\n\tif (isFallbackAttempt) return new Promise((resolve$1, reject) => {\n\t\tsubprocess.once(\"error\", reject);\n\t\tsubprocess.once(\"spawn\", () => {\n\t\t\tsubprocess.once(\"close\", (exitCode) => {\n\t\t\t\tsubprocess.off(\"error\", reject);\n\t\t\t\tif (exitCode !== 0) {\n\t\t\t\t\treject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsubprocess.unref();\n\t\t\t\tresolve$1(subprocess);\n\t\t\t});\n\t\t});\n\t});\n\tsubprocess.unref();\n\treturn new Promise((resolve$1, reject) => {\n\t\tsubprocess.once(\"error\", reject);\n\t\tsubprocess.once(\"spawn\", () => {\n\t\t\tsubprocess.off(\"error\", reject);\n\t\t\tresolve$1(subprocess);\n\t\t});\n\t});\n}, \"baseOpen\");\nvar open = /* @__PURE__ */ __name((target, options) => {\n\tif (typeof target !== \"string\") throw new TypeError(\"Expected a `target`\");\n\treturn baseOpen({\n\t\t...options,\n\t\ttarget\n\t});\n}, \"open\");\nfunction detectArchBinary(binary) {\n\tif (typeof binary === \"string\" || Array.isArray(binary)) return binary;\n\tconst { [arch$1]: archBinary } = binary;\n\tif (!archBinary) throw new Error(`${arch$1} is not supported`);\n\treturn archBinary;\n}\n__name(detectArchBinary, \"detectArchBinary\");\nfunction detectPlatformBinary({ [platform]: platformBinary }, { wsl } = {}) {\n\tif (wsl && is_wsl_default) return detectArchBinary(wsl);\n\tif (!platformBinary) throw new Error(`${platform} is not supported`);\n\treturn detectArchBinary(platformBinary);\n}\n__name(detectPlatformBinary, \"detectPlatformBinary\");\nvar apps = {\n\tbrowser: \"browser\",\n\tbrowserPrivate: \"browserPrivate\"\n};\ndefineLazyProperty(apps, \"chrome\", () => detectPlatformBinary({\n\tdarwin: \"google chrome\",\n\twin32: \"chrome\",\n\tlinux: [\n\t\t\"google-chrome\",\n\t\t\"google-chrome-stable\",\n\t\t\"chromium\",\n\t\t\"chromium-browser\"\n\t]\n}, { wsl: {\n\tia32: \"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe\",\n\tx64: [\"/mnt/c/Program Files/Google/Chrome/Application/chrome.exe\", \"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe\"]\n} }));\ndefineLazyProperty(apps, \"brave\", () => detectPlatformBinary({\n\tdarwin: \"brave browser\",\n\twin32: \"brave\",\n\tlinux: [\"brave-browser\", \"brave\"]\n}, { wsl: {\n\tia32: \"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe\",\n\tx64: [\"/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe\", \"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe\"]\n} }));\ndefineLazyProperty(apps, \"firefox\", () => detectPlatformBinary({\n\tdarwin: \"firefox\",\n\twin32: String.raw`C:\\Program Files\\Mozilla Firefox\\firefox.exe`,\n\tlinux: \"firefox\"\n}, { wsl: \"/mnt/c/Program Files/Mozilla Firefox/firefox.exe\" }));\ndefineLazyProperty(apps, \"edge\", () => detectPlatformBinary({\n\tdarwin: \"microsoft edge\",\n\twin32: \"msedge\",\n\tlinux: [\"microsoft-edge\", \"microsoft-edge-dev\"]\n}, { wsl: \"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe\" }));\ndefineLazyProperty(apps, \"safari\", () => detectPlatformBinary({ darwin: \"Safari\" }));\nvar open_default = open;\n\n//#endregion\nexport { open_default as default };"],"mappings":";;;;;;;;;;;;AAYA,IAAI;AACJ,SAAS,eAAe;AACvB,KAAI;AACH,MAAI,SAAS,cAAc;AAC3B,SAAO;SACA;AACP,SAAO;;;AAGT,OAAO,cAAc,eAAe;AACpC,SAAS,kBAAkB;AAC1B,KAAI;AACH,SAAO,IAAI,aAAa,qBAAqB,OAAO,CAAC,SAAS,SAAS;SAChE;AACP,SAAO;;;AAGT,OAAO,iBAAiB,kBAAkB;AAC1C,SAAS,WAAW;AACnB,KAAI,mBAAmB,KAAK,EAAG,kBAAiB,cAAc,IAAI,iBAAiB;AACnF,QAAO;;AAER,OAAO,UAAU,WAAW;AAC5B,IAAI;AACJ,IAAI,kBAAkC,6BAAa;AAClD,KAAI;AACH,MAAI,SAAS,qBAAqB;AAClC,SAAO;SACA;AACP,SAAO;;GAEN,kBAAkB;AACrB,SAAS,oBAAoB;AAC5B,KAAI,iBAAiB,KAAK,EAAG,gBAAe,iBAAiB,IAAI,UAAU;AAC3E,QAAO;;AAER,OAAO,mBAAmB,oBAAoB;AAC9C,IAAI,QAAwB,6BAAa;AACxC,KAAIA,QAAS,aAAa,QAAS,QAAO;AAC1C,KAAI,GAAG,SAAS,CAAC,aAAa,CAAC,SAAS,YAAY,EAAE;AACrD,MAAI,mBAAmB,CAAE,QAAO;AAChC,SAAO;;AAER,KAAI;AACH,S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