diff --git a/apps/cloud/next.config.ts b/apps/cloud/next.config.ts index 47346dcd..2913d4ed 100644 --- a/apps/cloud/next.config.ts +++ b/apps/cloud/next.config.ts @@ -4,13 +4,95 @@ * This repository utilizes multiple licenses across different directories. To * see this files license find the nearest LICENSE file up the source tree. */ +import { dirname, join } from "node:path"; +import { fileURLToPath } from "node:url"; import type { NextConfig } from "next"; +const __dirname = dirname(fileURLToPath(import.meta.url)); + const nextConfig: NextConfig = { transpilePackages: ["@triplex/lib"], + // esbuild ships platform-specific binary packages whose folders contain a + // README.md that Turbopack tries to parse as a module. Keep it out of the + // bundle and let Node resolve it at runtime. + serverExternalPackages: ["esbuild"], + // The /api/triplex-bundle + /api/pkg/[...name] routes read prebuilt files + // from `packages//{dist,themes,package.json}` at runtime via fs.readdir. + // Next's auto-tracing can't see those reads, so we point it at the + // monorepo root and include the workspace pkgs explicitly. Without this, + // Vercel ships an empty `packages/` tree and the prod-bundle endpoint + // returns the unrewritten src-pointing package.json. + outputFileTracingRoot: join(__dirname, "../.."), + outputFileTracingIncludes: { + "/api/triplex-bundle": [ + "../../packages/renderer/dist/**", + "../../packages/renderer/themes/**", + "../../packages/renderer/package.json", + "../../packages/bridge/dist/**", + "../../packages/bridge/package.json", + "../../packages/lib/dist/**", + "../../packages/lib/themes/**", + "../../packages/lib/package.json", + ], + "/api/pkg/[...name]": [ + "../../packages/renderer/**", + "../../packages/bridge/**", + "../../packages/lib/**", + "../../packages/@triplex/**", + ], + }, typescript: { ignoreBuildErrors: true, }, + // The Web Worker (`wss-worker.ts`) pulls in @triplex/lib/path which + // imports node:path. path-browserify also works in the server runtime, + // so a single global alias is fine. node:fs / node:os only get used by + // server code paths — leaving them on the real module so API routes + // (e.g. /api/pkg-watch's fs.watch) keep their behaviour. + turbopack: { + resolveAlias: { + "node:path": "path-browserify", + }, + }, + // The Web Worker (`wss-worker.ts`) pulls in @triplex/server + @triplex/lib + // which use `node:path`, `node:fs`, and `node:os`. Webpack's prod build + // doesn't know how to resolve `node:` URIs in browser bundles. Provide + // browser-safe shims so the prod build succeeds; the worker only ever + // calls `path`'s pure-string helpers — `fs` and `os` are imported but the + // calls are guarded out of the browser code paths. + webpack(config, { isServer, webpack }) { + if (!isServer) { + // Webpack 5 rejects `node:*` URIs before they reach `resolve.alias`, + // so we have to intercept them via NormalModuleReplacementPlugin and + // rewrite the request to either a browser shim or an empty module. + config.plugins.push( + new webpack.NormalModuleReplacementPlugin( + /^node:path$/, + (resource: { request: string }) => { + resource.request = "path-browserify"; + }, + ), + new webpack.NormalModuleReplacementPlugin( + /^node:(fs|os)$/, + (resource: { request: string }) => { + resource.request = require.resolve("./src/lib/empty-node-module"); + }, + ), + ); + } + return config; + }, + async headers() { + return [ + { + source: "/:path*", + headers: [ + { key: "Cross-Origin-Embedder-Policy", value: "require-corp" }, + { key: "Cross-Origin-Opener-Policy", value: "same-origin" }, + ], + }, + ]; + }, }; export default nextConfig; diff --git a/apps/cloud/package.json b/apps/cloud/package.json index 0fafc538..db998b13 100644 --- a/apps/cloud/package.json +++ b/apps/cloud/package.json @@ -4,7 +4,7 @@ "private": true, "license": "SEE LICENSE IN LICENSE", "scripts": { - "build": "next build", + "build": "pnpm --filter @triplex/renderer --filter @triplex/bridge --filter @triplex/lib build && next build", "dev": "next dev --turbopack", "start": "next start", "typedef": "tsc" @@ -12,10 +12,14 @@ "dependencies": { "@ai-sdk/google": "^1.2.14", "@triplex/lib": "0.69.20", + "@triplex/server": "workspace:*", + "@webcontainer/api": "^1.6.4", "ai": "^4.3.12", "next": "15.3.8", + "path-browserify": "^1.0.1", "react": "^19.1.0", "react-dom": "^19.1.0", + "ts-morph": "^25.0.1", "valibot": "^0.25.0" }, "devDependencies": { @@ -23,6 +27,7 @@ "@types/node": "^22.15.17", "@types/react": "^19.1.6", "@types/react-dom": "^19.1.5", + "esbuild": "^0.24.2", "kill-port": "^2.0.1", "tree-kill": "^1.2.2", "typescript": "^5.8.3" diff --git a/apps/cloud/public/triplex-babel-plugin.cjs b/apps/cloud/public/triplex-babel-plugin.cjs new file mode 100644 index 00000000..3e8bbfb0 --- /dev/null +++ b/apps/cloud/public/triplex-babel-plugin.cjs @@ -0,0 +1,1225 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// ../../packages/@triplex/client/src/plugins/babel-plugin.ts +var babel_plugin_exports = {}; +__export(babel_plugin_exports, { + default: () => triplexBabelPlugin +}); +module.exports = __toCommonJS(babel_plugin_exports); +var t2 = __toESM(require("@babel/types")); + +// ../../packages/lib/src/path.ts +var nodePath = __toESM(require("node:path")); +function toUnix(p) { + p = p.replaceAll("\\", "/"); + p = p.replaceAll(/(? match.slice(1)); + if (p.match(/^[A-z]:\//)) { + p = p[0].toUpperCase() + p.slice(1); + } + return p; +} +function resolve2(...paths) { + return toUnix(nodePath.resolve(...paths.map(toUnix))); +} +function dirname2(p) { + return toUnix(nodePath.dirname(p)); +} +function normalize2(p) { + return toUnix(nodePath.normalize(toUnix(p))); +} +function extname2(p) { + return nodePath.extname(p); +} + +// ../../packages/@triplex/client/src/util/babel.ts +var t = __toESM(require("@babel/types")); +var ignoredJSXElements = { + Route: "react-router", + Routes: "react-router" +}; +function isIgnoredJSXElement(path) { + const identifier3 = path.get("openingElement").get("name"); + if (!identifier3.isJSXIdentifier()) { + return false; + } + const isPossiblyIgnoredElement = ignoredJSXElements[identifier3.node.name]; + if (!isPossiblyIgnoredElement) { + return false; + } + const importSpecifierPath = resolveIdentifierImportSpecifier(identifier3); + if (!importSpecifierPath || !importSpecifierPath.parentPath.isImportDeclaration()) { + return false; + } + const modulePath = importSpecifierPath.parentPath.node.source.value; + const isIgnoredElement = isPossiblyIgnoredElement === modulePath; + if (isIgnoredElement) { + return true; + } + return false; +} +function isIdentifierFromModule(path, moduleName) { + const importSpecifier2 = resolveIdentifierImportSpecifier(path); + if (importSpecifier2 && importSpecifier2.parentPath.isImportDeclaration() && importSpecifier2.parentPath.node.source.value === moduleName) { + return true; + } + return false; +} +function resolveIdentifierImportSpecifier(path) { + const name = path.node.name; + const binding = path.scope.getBinding(name); + if (!binding?.path.isImportSpecifier() && !binding?.path.isImportDefaultSpecifier()) { + return void 0; + } + return binding.path; +} +function isJSXIdentifierFromNodeModules(path, cwd) { + const identifier3 = path.get("openingElement").get("name"); + if (!identifier3.isJSXIdentifier()) { + return false; + } + const importSpecifierPath = resolveIdentifierImportSpecifier(identifier3); + if (!importSpecifierPath || !importSpecifierPath.parentPath.isImportDeclaration()) { + return false; + } + try { + const location = require.resolve( + importSpecifierPath.parentPath.node.source.value, + { + paths: [cwd] + } + ); + return location.includes("node_modules"); + } catch { + } + return false; +} +function isChildOf(path, predicate) { + if (path.findParent((parent) => predicate(parent))) { + return true; + } + return false; +} +function isChildOfReturnStatement(path) { + if (path.findParent((parent) => parent.isReturnStatement())) { + return true; + } + if (path.findParent( + (parent) => parent.isArrowFunctionExpression() && !parent.get("body").isBlockStatement() + )) { + return true; + } + return false; +} +function extractFunctionArgs(args) { + const destructured = []; + let spreadIdentifier = void 0; + switch (args?.type) { + case "Identifier": + spreadIdentifier = args.name; + break; + case "ObjectPattern": + args.properties.forEach((prop) => { + if (prop.type === "ObjectProperty" && prop.key.type === "Identifier") { + destructured.push(prop.key.name); + } else if (prop.type === "RestElement" && prop.argument.type === "Identifier") { + spreadIdentifier = prop.argument.name; + } + }); + break; + } + return { destructured, spreadIdentifier }; +} +function importIfMissing(pass, module2, namedImport) { + if (pass.scope.hasBinding(namedImport)) { + return; + } + pass.node.body.unshift( + t.importDeclaration( + [t.importSpecifier(t.identifier(namedImport), t.identifier(namedImport))], + t.stringLiteral(module2) + ) + ); +} +function resolveIdentifierExportName(path, identifierName) { + const foundExport = path.scope.getBinding(identifierName)?.referencePaths.map((path2) => { + if (path2.parentPath?.isExportDeclaration() || path2.parentPath?.isExportDefaultDeclaration() || path2.parentPath?.isExportSpecifier() || path2.parentPath?.isExportDefaultSpecifier()) { + return path2.parentPath; + } + return path2; + }).find( + (path2) => path2.isExportDefaultDeclaration() || path2.isExportDeclaration() || path2.isExportSpecifier() || path2.isExportDefaultSpecifier() + ); + if (!foundExport) { + return ""; + } + if (foundExport.isExportDefaultDeclaration() || foundExport.isExportDefaultSpecifier()) { + return "default"; + } else if (foundExport.isExportDeclaration() || foundExport.isExportSpecifier()) { + return identifierName; + } + return ""; +} +function resolvePath(root, path) { + if (path.startsWith(".")) { + return resolve2(dirname2(root || "/"), path) + extname2(root || ""); + } else if (path.startsWith("/")) { + return path; + } + return ""; +} +function resolveIdentifierOrigin(pass, path, identifierName) { + const exportName = resolveIdentifierExportName(path, identifierName); + const filename = normalize2(pass.filename || ""); + if (exportName) { + return { + exportName, + path: filename + }; + } + const binding = path.scope.getBinding(identifierName); + if (binding?.path.isImportSpecifier() && binding.path.node.imported.type === "Identifier" && binding.path.parentPath.isImportDeclaration()) { + return { + exportName: binding.path.node.imported.name, + path: resolvePath(filename, binding.path.parentPath.node.source.value) + }; + } + if (binding?.path.isImportDefaultSpecifier() && binding.path.parentPath.isImportDeclaration()) { + return { + exportName: "default", + path: resolvePath(filename, binding.path.parentPath.node.source.value) + }; + } + return void 0; +} + +// ../../packages/@triplex/client/src/util/is-react-element.ts +var elements = { + a: true, + abbr: true, + address: true, + animate: true, + animateMotion: true, + animateTransform: true, + area: true, + article: true, + aside: true, + audio: true, + b: true, + base: true, + bdi: true, + bdo: true, + big: true, + blockquote: true, + body: true, + br: true, + button: true, + canvas: true, + caption: true, + center: true, + circle: true, + cite: true, + clipPath: true, + code: true, + col: true, + colgroup: true, + data: true, + datalist: true, + dd: true, + defs: true, + del: true, + desc: true, + details: true, + dfn: true, + dialog: true, + div: true, + dl: true, + dt: true, + ellipse: true, + em: true, + embed: true, + feBlend: true, + feColorMatrix: true, + feComponentTransfer: true, + feComposite: true, + feConvolveMatrix: true, + feDiffuseLighting: true, + feDisplacementMap: true, + feDistantLight: true, + feDropShadow: true, + feFlood: true, + feFuncA: true, + feFuncB: true, + feFuncG: true, + feFuncR: true, + feGaussianBlur: true, + feImage: true, + feMerge: true, + feMergeNode: true, + feMorphology: true, + feOffset: true, + fePointLight: true, + feSpecularLighting: true, + feSpotLight: true, + feTile: true, + feTurbulence: true, + fieldset: true, + figcaption: true, + figure: true, + filter: true, + footer: true, + foreignObject: true, + form: true, + g: true, + h1: true, + h2: true, + h3: true, + h4: true, + h5: true, + h6: true, + head: true, + header: true, + hgroup: true, + hr: true, + html: true, + i: true, + iframe: true, + image: true, + img: true, + input: true, + ins: true, + kbd: true, + keygen: true, + label: true, + legend: true, + li: true, + line: true, + linearGradient: true, + link: true, + main: true, + map: true, + mark: true, + marker: true, + mask: true, + menu: true, + menuitem: true, + meta: true, + metadata: true, + meter: true, + mpath: true, + nav: true, + noindex: true, + noscript: true, + object: true, + ol: true, + optgroup: true, + option: true, + output: true, + p: true, + param: true, + path: true, + pattern: true, + picture: true, + polygon: true, + polyline: true, + pre: true, + progress: true, + q: true, + radialGradient: true, + rect: true, + rp: true, + rt: true, + ruby: true, + s: true, + samp: true, + script: true, + search: true, + section: true, + select: true, + set: true, + slot: true, + small: true, + source: true, + span: true, + stop: true, + strong: true, + style: true, + sub: true, + summary: true, + sup: true, + svg: true, + switch: true, + symbol: true, + table: true, + tbody: true, + td: true, + template: true, + text: true, + textPath: true, + textarea: true, + tfoot: true, + th: true, + thead: true, + time: true, + title: true, + tr: true, + track: true, + tspan: true, + u: true, + ul: true, + use: true, + var: true, + video: true, + view: true, + wbr: true, + webview: true +}; +function isReactDOMElement(elementName) { + return elements[elementName] ?? false; +} + +// ../../packages/@triplex/client/src/util/is-three-element.ts +var elements2 = { + ambientLight: true, + ambientLightProbe: true, + arrayCamera: true, + arrowHelper: true, + audioListener: true, + axesHelper: true, + batchedMesh: true, + bone: true, + box3Helper: true, + boxBufferGeometry: true, + boxGeometry: true, + boxHelper: true, + bufferAttribute: true, + bufferGeometry: true, + camera: true, + cameraHelper: true, + canvasTexture: true, + capsuleGeometry: true, + circleBufferGeometry: true, + circleGeometry: true, + color: true, + compressedTexture: true, + coneBufferGeometry: true, + coneGeometry: true, + cubeCamera: true, + cubeTexture: true, + cylinderBufferGeometry: true, + cylinderGeometry: true, + dataTexture: true, + dataTexture3D: true, + depthTexture: true, + directionalLight: true, + directionalLightHelper: true, + directionalLightShadow: true, + dodecahedronBufferGeometry: true, + dodecahedronGeometry: true, + edgesGeometry: true, + euler: true, + extrudeBufferGeometry: true, + extrudeGeometry: true, + float16BufferAttribute: true, + float32BufferAttribute: true, + float64BufferAttribute: true, + fog: true, + fogExp2: true, + gridHelper: true, + group: true, + hemisphereLight: true, + hemisphereLightHelper: true, + hemisphereLightProbe: true, + icosahedronBufferGeometry: true, + icosahedronGeometry: true, + instancedBufferAttribute: true, + instancedBufferGeometry: true, + instancedMesh: true, + int16BufferAttribute: true, + int32BufferAttribute: true, + int8BufferAttribute: true, + lOD: true, + latheBufferGeometry: true, + latheGeometry: true, + light: true, + lightProbe: true, + lightShadow: true, + lineBasicMaterial: true, + lineDashedMaterial: true, + lineLoop: true, + lineSegments: true, + material: true, + matrix3: true, + matrix4: true, + mesh: true, + meshBasicMaterial: true, + meshDepthMaterial: true, + meshDistanceMaterial: true, + meshLambertMaterial: true, + meshMatcapMaterial: true, + meshNormalMaterial: true, + meshPhongMaterial: true, + meshPhysicalMaterial: true, + meshStandardMaterial: true, + meshToonMaterial: true, + object3D: true, + octahedronBufferGeometry: true, + octahedronGeometry: true, + orthographicCamera: true, + perspectiveCamera: true, + planeBufferGeometry: true, + planeGeometry: true, + planeHelper: true, + pointLight: true, + pointLightHelper: true, + points: true, + pointsMaterial: true, + polarGridHelper: true, + polyhedronBufferGeometry: true, + polyhedronGeometry: true, + positionalAudio: true, + primitive: true, + quaternion: true, + rawShaderMaterial: true, + raycaster: true, + rectAreaLight: true, + ringBufferGeometry: true, + ringGeometry: true, + scene: true, + shaderMaterial: true, + shadowMaterial: true, + shape: true, + shapeBufferGeometry: true, + shapeGeometry: true, + skeleton: true, + skeletonHelper: true, + skinnedMesh: true, + sphereBufferGeometry: true, + sphereGeometry: true, + spotLight: true, + spotLightHelper: true, + spotLightShadow: true, + sprite: true, + spriteMaterial: true, + tetrahedronBufferGeometry: true, + tetrahedronGeometry: true, + texture: true, + torusBufferGeometry: true, + torusGeometry: true, + torusKnotBufferGeometry: true, + torusKnotGeometry: true, + tubeBufferGeometry: true, + tubeGeometry: true, + uint16BufferAttribute: true, + uint32BufferAttribute: true, + uint8BufferAttribute: true, + vector2: true, + vector3: true, + vector4: true, + videoTexture: true, + wireframeGeometry: true +}; +var THREE_FIBER_MODULES = /(^@react-three\/)|(^ecctrl$)/; +var IGNORED_HOOKS_MODULES = ["@react-three/drei"]; +var PROBABLY_THREE_FIBER = ["object3d"]; +function isReactThreeElement(elementName) { + return elements2[elementName] ?? false; +} +function isCanvasFromThreeFiber(path) { + const identifierPath = path.get("openingElement").get("name"); + if (!identifierPath.isJSXIdentifier()) { + return false; + } + const importSpecifierPath = resolveIdentifierImportSpecifier(identifierPath); + if (!importSpecifierPath || !importSpecifierPath.isImportSpecifier()) { + return false; + } + return importSpecifierPath.get("imported").isIdentifier({ name: "Canvas" }) && importSpecifierPath.parentPath.isImportDeclaration() && importSpecifierPath.parentPath.get("source").isStringLiteral({ value: "@react-three/fiber" }); +} +function isComponentFromThreeFiber(path) { + const identifierPath = path.get("openingElement").get("name"); + if (!identifierPath.isJSXIdentifier()) { + return false; + } + const elementName = identifierPath.node.name; + if (PROBABLY_THREE_FIBER.some( + (name) => elementName.toLowerCase().includes(name) + )) { + return true; + } + const importSpecifierPath = resolveIdentifierImportSpecifier(identifierPath); + if (!importSpecifierPath || !importSpecifierPath.parentPath.isImportDeclaration()) { + return false; + } + const source = importSpecifierPath.parentPath.get("source"); + if (!source.isStringLiteral()) { + return false; + } + return THREE_FIBER_MODULES.test(source.node.value); +} +function isHookFromThreeFiber(path) { + if (path.node.name.startsWith("use")) { + const importSpecifier2 = resolveIdentifierImportSpecifier(path); + const moduleName = importSpecifier2?.parentPath.isImportDeclaration() && importSpecifier2?.parentPath.node.source.value || ""; + if (THREE_FIBER_MODULES.test(moduleName) && // Ignore hooks from @react-three/drei as some of them can be used outside of three fiber. + IGNORED_HOOKS_MODULES.every((module2) => moduleName !== module2)) { + return true; + } + } + return false; +} + +// ../../packages/@triplex/client/src/plugins/babel-plugin.ts +var AUTOMATIC_JSX_RUNTIME = ["jsx", "jsxs", "_jsx", "_jsxs"]; +var SCENE_OBJECT_COMPONENT_NAME = "SceneObject"; +function resolveOrderingFromMap(dependencyMap) { + const order = []; + const visited = /* @__PURE__ */ new Set(); + function visit(name) { + if (visited.has(name)) { + return; + } + visited.add(name); + const dependency = dependencyMap.get(name); + if (dependency) { + visit(dependency); + } + order.push(name); + } + dependencyMap.forEach((_, name) => visit(name)); + return order; +} +function triplexBabelPlugin({ + cwd = process.cwd(), + exclude: excludeDirs, + skipFunctionMeta +}) { + const cache = /* @__PURE__ */ new WeakSet(); + const componentsFoundInPass = /* @__PURE__ */ new Map(); + const componentMetaDependencyMap = /* @__PURE__ */ new Map(); + const exclude = excludeDirs.filter(Boolean); + const locationPointer = []; + function pushLocation(elementName, exportName) { + if (locationPointer.length === 0) { + locationPointer.push({ + children: [], + name: exportName, + parent: null + }); + } else if (locationPointer.at(0)?.name !== exportName) { + locationPointer.length = 0; + locationPointer.push({ + children: [], + name: exportName, + parent: null + }); + } + const pointer = locationPointer.at(-1); + const newLocation = { + children: [], + name: elementName, + parent: locationPointer.at(-1) || null + }; + if (!pointer) { + throw new Error("invariant: pointer should be defined (push)"); + } + pointer.children.push(newLocation); + locationPointer.push(newLocation); + } + function popLocation() { + if (locationPointer.length > 1) { + locationPointer.pop(); + } + } + function buildLocation() { + const path = []; + const pointer = locationPointer.at(-1); + if (!pointer) { + throw new Error("invariant: pointer should be defined (build)"); + } + let parent = pointer; + while (parent) { + const siblingCounts = {}; + const grandparent = parent.parent; + if (grandparent) { + for (let i = 0; i < grandparent.children.length; i++) { + const child = grandparent.children[i]; + siblingCounts[child.name] = (siblingCounts[child.name] || 0) + 1; + } + } + const count = siblingCounts[parent.name]; + const suffix = count > 1 ? `.${count - 1}` : ""; + path.push(`${parent.name}${suffix}`); + parent = parent.parent; + } + return path.reverse().join("/"); + } + function resetLocation() { + locationPointer.length = 0; + } + let shouldSkip = false; + let shouldImportFragment = false; + let currentFunction = void 0; + function initializeMetaForCurrentFunction() { + if (!skipFunctionMeta && currentFunction && !componentsFoundInPass.has(currentFunction.name)) { + componentsFoundInPass.set(currentFunction.name, { + lighting: "default", + root: void 0 + }); + } + } + function resetCurrentFunction(path) { + if (path.node.id?.type === "Identifier" && path.node.id.name === currentFunction?.name && !skipFunctionMeta) { + const meta = componentsFoundInPass.get(currentFunction.name); + if (currentFunction.canvasComponent) { + meta.root = "react"; + } else if (currentFunction.firstFoundHookSource) { + meta.root = "react-three-fiber"; + } else if (currentFunction.firstFoundHostElementSource && currentFunction.firstFoundCustomComponentName) { + meta.root = t2.logicalExpression( + "||", + t2.optionalMemberExpression( + t2.optionalMemberExpression( + t2.identifier(currentFunction.firstFoundCustomComponentName), + t2.identifier("triplexMeta"), + false, + true + ), + t2.identifier("root"), + false, + true + ), + t2.stringLiteral(currentFunction.firstFoundHostElementSource) + ); + } else if (currentFunction.firstFoundHostElementSource) { + meta.root = currentFunction.firstFoundHostElementSource; + } else if (currentFunction.firstFoundCustomComponentName) { + meta.root = t2.optionalMemberExpression( + t2.optionalMemberExpression( + t2.identifier(currentFunction.firstFoundCustomComponentName), + t2.identifier("triplexMeta"), + false, + true + ), + t2.identifier("root"), + false, + true + ); + } else if (currentFunction.returnsJSX) { + meta.root = "react"; + } + if (currentFunction.firstFoundCustomComponentName) { + componentMetaDependencyMap.set( + currentFunction.name, + currentFunction.firstFoundCustomComponentName + ); + } + currentFunction = void 0; + } + } + const plugin = { + visitor: { + CallExpression(path) { + const callee = path.get("callee"); + if (!shouldSkip && callee.isIdentifier() && callee.node.name === "createRoot" && isIdentifierFromModule(callee, "react-dom/client")) { + path.replaceWith( + t2.objectExpression([ + t2.objectProperty( + t2.identifier("render"), + t2.arrowFunctionExpression([], t2.blockStatement([])) + ), + t2.objectProperty( + t2.identifier("unmount"), + t2.arrowFunctionExpression([], t2.blockStatement([])) + ) + ]) + ); + return; + } + if (currentFunction) { + if (callee.isIdentifier() && isHookFromThreeFiber(callee)) { + currentFunction.firstFoundHookSource ??= "react-three-fiber"; + } + } + if (path.node.callee.type === "MemberExpression" && path.node.callee.object.type === "Identifier" && path.node.callee.object.name !== "document" && path.node.callee.property.type === "Identifier" && path.node.callee.property.name === "createElement" && path.node.arguments.length >= 2 && t2.isExpression(path.node.arguments[0]) && !cache.has(path.node)) { + const elementName = path.node.arguments[0].type === "StringLiteral" ? path.node.arguments[0].value : "unknown"; + const props = path.node.arguments[1]; + const componentArg = path.node.arguments[0]; + const newNode = t2.callExpression(path.node.callee, [ + t2.identifier(SCENE_OBJECT_COMPONENT_NAME), + t2.objectExpression([ + // Since the current props can be manually created it could be anything. + // We spread it in instead of taking its properties. + t2.spreadElement( + t2.isExpression(props) ? props : t2.identifier("undefined") + ), + t2.objectProperty(t2.identifier("__component"), componentArg), + t2.objectProperty( + t2.identifier("__meta"), + t2.objectExpression([ + t2.objectProperty( + t2.stringLiteral("path"), + t2.stringLiteral("") + ), + t2.objectProperty( + t2.stringLiteral("name"), + t2.stringLiteral(elementName) + ), + t2.objectProperty( + t2.stringLiteral("line"), + t2.numericLiteral(-2) + ), + t2.objectProperty( + t2.stringLiteral("column"), + t2.numericLiteral(-2) + ) + ]) + ) + ]), + ...path.node.arguments.slice(2) + ]); + cache.add(newNode); + path.replaceWith(newNode); + } + if ( + // Basic jsx() calls + (path.node.callee.type === "Identifier" && AUTOMATIC_JSX_RUNTIME.includes(path.node.callee.name) || // OR basic jsxRuntime.jsx() calls. + path.node.callee.type === "MemberExpression" && path.node.callee.property.type === "Identifier" && AUTOMATIC_JSX_RUNTIME.includes(path.node.callee.property.name) || // OR mangled (0, jsxRuntime.jsx) calls. + path.node.callee.type === "SequenceExpression" && path.node.callee.expressions[1].type === "MemberExpression" && path.node.callee.expressions[1].property.type === "Identifier" && AUTOMATIC_JSX_RUNTIME.includes( + path.node.callee.expressions[1].property.name + )) && t2.isExpression(path.node.arguments[0]) && !cache.has(path.node) + ) { + const elementName = path.node.arguments[0].type === "StringLiteral" ? path.node.arguments[0].value : "unknown"; + const props = path.node.arguments[1]; + const componentArg = path.node.arguments[0]; + const newNode = t2.callExpression(path.node.callee, [ + t2.identifier(SCENE_OBJECT_COMPONENT_NAME), + t2.objectExpression([ + ...t2.isObjectExpression(props) ? props.properties : [], + t2.objectProperty(t2.identifier("__component"), componentArg), + t2.objectProperty( + t2.identifier("__meta"), + t2.objectExpression([ + t2.objectProperty( + t2.stringLiteral("path"), + t2.stringLiteral("") + ), + t2.objectProperty( + t2.stringLiteral("name"), + t2.stringLiteral(elementName) + ), + t2.objectProperty( + t2.stringLiteral("line"), + t2.numericLiteral(-2) + ), + t2.objectProperty( + t2.stringLiteral("column"), + t2.numericLiteral(-2) + ) + ]) + ) + ]), + ...path.node.arguments.slice(2) + ]); + cache.add(newNode); + path.replaceWith(newNode); + } + }, + ExportDefaultDeclaration(path) { + if (path.node.declaration.type === "CallExpression") { + const variableName = "T" + path.scope.generateUid("Hoisted"); + const variableDeclaration2 = t2.variableDeclaration("const", [ + t2.variableDeclarator( + t2.identifier(variableName), + path.node.declaration + ) + ]); + path.insertBefore(variableDeclaration2); + path.set("declaration", t2.identifier(variableName)); + } + }, + FunctionDeclaration: { + enter(path) { + if (shouldSkip || !path.node.id || !/^[A-Z]/.exec(path.node.id.name) || isChildOf( + path, + (parent) => parent.isFunctionDeclaration() || parent.isArrowFunctionExpression() + )) { + return; + } + const propsArg = path.node.params[0]; + const { destructured, spreadIdentifier } = extractFunctionArgs(propsArg); + currentFunction = { + exportName: resolveIdentifierExportName(path, path.node.id.name), + name: path.node.id.name, + props: { destructured, spreadIdentifier }, + returnsJSX: false + }; + initializeMetaForCurrentFunction(); + }, + exit(path) { + resetCurrentFunction(path); + } + }, + JSXElement: { + enter(path, pass) { + if (shouldSkip) { + return; + } + if (cache.has(path.node) || path.node.openingElement.name.type !== "JSXIdentifier" || !path.node.loc || isIgnoredJSXElement(path)) { + return; + } + const elementName = path.node.openingElement.name.name; + const elementType = /^[A-Z]/.exec(elementName) ? "custom" : "host"; + const functionMeta = currentFunction && componentsFoundInPass.get(currentFunction.name); + pushLocation( + elementName, + currentFunction && currentFunction.exportName || "root" + ); + cache.add(path.node); + if (functionMeta && currentFunction) { + currentFunction.returnsJSX = true; + if (elementName.endsWith("Light")) { + functionMeta.lighting = "custom"; + } + if (isChildOfReturnStatement(path)) { + if (elementType === "custom") { + if (isCanvasFromThreeFiber(path)) { + currentFunction.canvasComponent = true; + } else if (isComponentFromThreeFiber(path)) { + currentFunction.firstFoundHostElementSource ??= "react-three-fiber"; + } else if (!isJSXIdentifierFromNodeModules(path, cwd) && elementName !== currentFunction.name && !!pass.file.scope.getBinding(elementName)) { + currentFunction.firstFoundCustomComponentName = elementName; + } + } else if (isReactDOMElement(elementName)) { + currentFunction.firstFoundHostElementSource ??= "react"; + } else if (isReactThreeElement(elementName)) { + currentFunction.firstFoundHostElementSource ??= "react-three-fiber"; + } + } + } + const line = path.node.loc.start.line; + const column = path.node.loc.start.column + 1; + const transformsFound = { + rotate: false, + scale: false, + translate: false + }; + const attributes = path.node.openingElement.attributes.filter( + (attr) => { + if (attr.type === "JSXAttribute") { + if (elementType === "host" || isJSXIdentifierFromNodeModules(path, cwd)) { + const isIdentifierFromDestructuredProps = attr.value?.type === "JSXExpressionContainer" && attr.value.expression.type === "Identifier" && currentFunction?.props.destructured.includes( + attr.value.expression.name + ); + const isPropsMemberExpression = attr.value?.type === "JSXExpressionContainer" && attr.value.expression.type === "MemberExpression" && attr.value.expression.object.type === "Identifier" && attr.value.expression.object.name === currentFunction?.props.spreadIdentifier; + if (isIdentifierFromDestructuredProps || isPropsMemberExpression) { + if (attr.name.name === "position") { + transformsFound.translate = true; + } + if (attr.name.name === "rotation") { + transformsFound.rotate = true; + } + if (attr.name.name === "scale") { + transformsFound.scale = true; + } + } + } + } else { + if (attr.argument.type === "Identifier" && attr.argument.name === currentFunction?.props.spreadIdentifier) { + if (!currentFunction.props.destructured.includes("position")) { + transformsFound.translate = true; + } + if (!currentFunction.props.destructured.includes("rotation")) { + transformsFound.rotate = true; + } + if (!currentFunction.props.destructured.includes("scale")) { + transformsFound.scale = true; + } + } + } + return true; + } + ); + const elementOrigin = resolveIdentifierOrigin( + pass, + path, + elementName + ); + const newNode = t2.jsxElement( + t2.jsxOpeningElement(t2.jsxIdentifier(SCENE_OBJECT_COMPONENT_NAME), [ + ...attributes, + t2.jsxAttribute( + t2.jsxIdentifier("__component"), + t2.jsxExpressionContainer( + elementType === "custom" ? t2.identifier(elementName) : t2.stringLiteral(elementName) + ) + ), + t2.jsxAttribute( + t2.jsxIdentifier("__meta"), + t2.jsxExpressionContainer( + t2.objectExpression([ + t2.objectProperty( + t2.stringLiteral("astPath"), + t2.stringLiteral(buildLocation()) + ), + t2.objectProperty( + t2.stringLiteral("originExportName"), + t2.stringLiteral(elementOrigin?.exportName || "") + ), + t2.objectProperty( + t2.stringLiteral("originPath"), + t2.stringLiteral(elementOrigin?.path || "") + ), + t2.objectProperty( + t2.stringLiteral("exportName"), + t2.stringLiteral(currentFunction?.exportName || "") + ), + t2.objectProperty( + t2.stringLiteral("path"), + t2.stringLiteral( + pass.filename ? normalize2(pass.filename) : "" + ) + ), + t2.objectProperty( + t2.stringLiteral("name"), + t2.stringLiteral(elementName) + ), + t2.objectProperty( + t2.stringLiteral("line"), + t2.numericLiteral(line) + ), + t2.objectProperty( + t2.stringLiteral("column"), + t2.numericLiteral(column) + ), + t2.objectProperty( + t2.stringLiteral("translate"), + t2.booleanLiteral(transformsFound.translate) + ), + t2.objectProperty( + t2.stringLiteral("rotate"), + t2.booleanLiteral(transformsFound.rotate) + ), + t2.objectProperty( + t2.stringLiteral("scale"), + t2.booleanLiteral(transformsFound.scale) + ) + ]) + ) + ) + ]), + t2.jsxClosingElement(t2.jsxIdentifier(SCENE_OBJECT_COMPONENT_NAME)), + path.node.children + ); + path.replaceWith(newNode); + }, + exit() { + popLocation(); + } + }, + JSXFragment: { + enter(path, pass) { + if (shouldSkip) { + return; + } + if (cache.has(path.node) || !path.node.loc) { + return; + } + pushLocation( + "Fragment", + currentFunction && currentFunction.exportName || "root" + ); + shouldImportFragment = true; + cache.add(path.node); + const line = path.node.loc.start.line; + const column = path.node.loc.start.column + 1; + const newNode = t2.jsxElement( + t2.jsxOpeningElement(t2.jsxIdentifier(SCENE_OBJECT_COMPONENT_NAME), [ + t2.jsxAttribute( + t2.jsxIdentifier("__component"), + t2.jsxExpressionContainer(t2.identifier("Fragment")) + ), + t2.jsxAttribute( + t2.jsxIdentifier("__meta"), + t2.jsxExpressionContainer( + t2.objectExpression([ + t2.objectProperty( + t2.stringLiteral("astPath"), + t2.stringLiteral(buildLocation()) + ), + t2.objectProperty( + t2.stringLiteral("path"), + t2.stringLiteral( + pass.filename ? normalize2(pass.filename) : "" + ) + ), + t2.objectProperty( + t2.stringLiteral("name"), + t2.stringLiteral("Fragment") + ), + t2.objectProperty( + t2.stringLiteral("line"), + t2.numericLiteral(line) + ), + t2.objectProperty( + t2.stringLiteral("column"), + t2.numericLiteral(column) + ) + ]) + ) + ) + ]), + t2.jsxClosingElement(t2.jsxIdentifier(SCENE_OBJECT_COMPONENT_NAME)), + path.node.children + ); + path.replaceWith(newNode); + }, + exit() { + popLocation(); + } + }, + Program: { + enter(_, state) { + const normalizedPath = normalize2(state.filename || ""); + const exclusions = exclude.map( + (dir) => dir.replace(/(^[A-z]:\/)/, "") + ); + if (exclusions.some((exclusion) => normalizedPath.includes(exclusion))) { + shouldSkip = true; + } + }, + exit(path) { + if (!shouldSkip) { + const importDeclarations = path.get("body").filter((path2) => path2.isImportDeclaration()); + importDeclarations.forEach((path2) => { + const isReactThreeFiberImport = path2.node.source.value === "@react-three/fiber"; + if (!isReactThreeFiberImport) { + return; + } + const [canvasImportSpecifier] = path2.get("specifiers").filter( + (spec) => spec.node.type === "ImportSpecifier" && spec.node.imported.type === "Identifier" && spec.node.imported.name === "Canvas" + ); + if (canvasImportSpecifier) { + path2.insertAfter( + t2.importDeclaration( + [canvasImportSpecifier.node], + t2.stringLiteral("triplex:canvas") + ) + ); + canvasImportSpecifier.remove(); + } + }); + } + const componentMetaOrder = resolveOrderingFromMap( + componentMetaDependencyMap + ); + Array.from(componentsFoundInPass.entries()).sort(([nameA], [nameB]) => { + return componentMetaOrder.indexOf(nameA) - componentMetaOrder.indexOf(nameB); + }).forEach(([componentName, meta]) => { + path.pushContainer( + "body", + t2.expressionStatement( + t2.assignmentExpression( + "=", + t2.memberExpression( + t2.identifier(componentName), + t2.identifier("triplexMeta") + ), + t2.objectExpression( + Object.entries(meta).map(([key, value]) => { + return t2.objectProperty( + t2.stringLiteral(key), + typeof value === "string" ? t2.stringLiteral(value) : value === void 0 ? t2.identifier("undefined") : value + ); + }) + ) + ) + ) + ); + }); + if (shouldImportFragment) { + importIfMissing(path, "react", "Fragment"); + } + shouldSkip = false; + shouldImportFragment = false; + componentsFoundInPass.clear(); + componentMetaDependencyMap.clear(); + resetLocation(); + } + }, + VariableDeclarator: { + enter(path) { + if (shouldSkip || path.node.id.type !== "Identifier" || !/^[A-Z]/.exec(path.node.id.name) || isChildOf( + path, + (parent) => parent.isFunctionDeclaration() || parent.isArrowFunctionExpression() + )) { + return; + } + let destructured = []; + let spreadIdentifier = void 0; + let isFunction = false; + path.traverse({ + ArrowFunctionExpression(innerPath) { + const propsArg = innerPath.node.params[0]; + ({ destructured, spreadIdentifier } = extractFunctionArgs(propsArg)); + isFunction = true; + innerPath.stop(); + }, + FunctionExpression(innerPath) { + const propsArg = innerPath.node.params[0]; + ({ destructured, spreadIdentifier } = extractFunctionArgs(propsArg)); + isFunction = true; + innerPath.stop(); + } + }); + if (isFunction) { + currentFunction = { + exportName: resolveIdentifierExportName(path, path.node.id.name), + name: path.node.id.name, + props: { destructured, spreadIdentifier }, + returnsJSX: false + }; + initializeMetaForCurrentFunction(); + } + }, + exit(path) { + resetCurrentFunction(path); + } + } + } + }; + return plugin; +} +var __triplexInner = module.exports.default || module.exports; +module.exports = function (opts) { + var o = opts || {}; + if (!o.exclude) o.exclude = ['node_modules']; + return __triplexInner(o); +}; diff --git a/apps/cloud/public/triplex-editor/assets/_commonjsHelpers.js b/apps/cloud/public/triplex-editor/assets/_commonjsHelpers.js new file mode 100644 index 00000000..0d78df47 --- /dev/null +++ b/apps/cloud/public/triplex-editor/assets/_commonjsHelpers.js @@ -0,0 +1 @@ +"use strict";function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function c(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var o=e.default;if(typeof o=="function"){var t=function r(){return this instanceof r?Reflect.construct(o,arguments,this.constructor):o.apply(this,arguments)};t.prototype=o.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var u=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,u.get?u:{enumerable:!0,get:function(){return e[r]}})}),t}exports.getAugmentedNamespace=c;exports.getDefaultExportFromCjs=n; diff --git a/apps/cloud/public/triplex-editor/assets/browser.js b/apps/cloud/public/triplex-editor/assets/browser.js new file mode 100644 index 00000000..91fcc029 --- /dev/null +++ b/apps/cloud/public/triplex-editor/assets/browser.js @@ -0,0 +1 @@ +import{g as o}from"../index.js";var r,e;function t(){return e||(e=1,r=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}),r}var s=t();const n=o(s),w=Object.freeze(Object.defineProperty({__proto__:null,default:n},Symbol.toStringTag,{value:"Module"}));export{w as b}; diff --git a/apps/cloud/public/triplex-editor/assets/index.css b/apps/cloud/public/triplex-editor/assets/index.css new file mode 100644 index 00000000..5752679a --- /dev/null +++ b/apps/cloud/public/triplex-editor/assets/index.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.-bottom-0{bottom:-0px}.-bottom-0\.5{bottom:-.125rem}.-left-0{left:-0px}.-left-0\.5{left:-.125rem}.-left-1{left:-.25rem}.-left-1\.5{left:-.375rem}.-right-0{right:-0px}.-right-0\.5{right:-.125rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-top-0{top:-0px}.-top-0\.5{top:-.125rem}.bottom-0{bottom:0}.left-0{left:0}.left-\[1px\]{left:1px}.left-\[5px\]{left:5px}.right-0{right:0}.right-1{right:.25rem}.right-1\.5{right:.375rem}.right-2{right:.5rem}.right-\[1px\]{right:1px}.top-0{top:0}.top-1{top:.25rem}.top-1\.5{top:.375rem}.top-1\/2{top:50%}.top-\[21\.5px\]{top:21.5px}.top-\[5px\]{top:5px}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[-1\]{z-index:-1}.z-\[1\]{z-index:1}.col-span-2{grid-column:span 2 / span 2}.col-start-1{grid-column-start:1}.row-start-1{grid-row-start:1}.-my-0{margin-top:-0px;margin-bottom:-0px}.-my-0\.5{margin-top:-.125rem;margin-bottom:-.125rem}.mx-0{margin-left:0;margin-right:0}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-mb-1{margin-bottom:-.25rem}.-mb-1\.5{margin-bottom:-.375rem}.-ml-\[5px\]{margin-left:-5px}.-mt-0{margin-top:-0px}.-mt-0\.5{margin-top:-.125rem}.-mt-1{margin-top:-.25rem}.-mt-1\.5{margin-top:-.375rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.ml-auto{margin-left:auto}.mt-1{margin-top:.25rem}.mt-auto{margin-top:auto}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-1\/2{height:50%}.h-10{height:2.5rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-\[16px\]{height:16px}.h-\[22px\]{height:22px}.h-\[26px\]{height:26px}.h-full{height:100%}.max-h-32{max-height:8rem}.max-h-\[33\%\]{max-height:33%}.w-10{width:2.5rem}.w-2{width:.5rem}.w-36{width:9rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-\[0\.5px\]{width:.5px}.w-\[16px\]{width:16px}.w-\[22px\]{width:22px}.w-\[26px\]{width:26px}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-2xl{max-width:42rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-scale-100{--tw-scale-x: -1;--tw-scale-y: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-col-resize{cursor:col-resize}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.resize-none{resize:none}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-flow-col{grid-auto-flow:column}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-rows-1{grid-template-rows:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-4{border-right-width:4px}.border-t{border-top-width:1px}.border-\[var\(--vscode-sash-hoverBorder\)\]{border-color:var(--vscode-sash-hoverBorder)}.border-button{border-color:var(--vscode-button-border, transparent)}.border-danger{border-color:var(--vscode-editorError-foreground, transparent)}.border-indent{border-color:var(--vscode-tree-indentGuidesStroke, transparent)}.border-input{border-color:var(--vscode-dropdown-border, transparent)}.border-overlay{border-color:var(--vscode-panel-border, transparent)}.border-selected{border-color:var(--vscode-focusBorder, transparent)}.border-r-overlay{border-right-color:var(--vscode-panel-border, transparent)}.bg-\[currentColor\]{background-color:currentColor}.bg-active-selected{background-color:var(--vscode-list-activeSelectionBackground)}.bg-editor{background-color:var(--vscode-editor-background)}.bg-inactive-selected{background-color:var(--vscode-list-inactiveSelectionBackground)}.bg-input{background-color:var(--vscode-input-background)}.bg-list-hovered{background-color:var(--vscode-list-hoverBackground)}.bg-neutral{background-color:var(--vscode-button-secondaryBackground)}.bg-overlay{background-color:var(--vscode-panel-background)}.bg-overlay-top{background-color:var(--vscode-notifications-background)}.bg-primary{background-color:var(--vscode-button-background)}.bg-scrollbar{background-color:var(--vscode-scrollbarSlider-background)}.bg-selected{background-color:var(--vscode-toolbar-activeBackground)}.bg-warning{background-color:var(--vscode-editorWarning-foreground)}.bg-canvas{background-image:radial-gradient(ellipse at center,#535353,#2d2d2d)}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-\[9px\]{padding-left:9px;padding-right:9px}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-\[1px\]{padding-top:1px;padding-bottom:1px}.pb-1{padding-bottom:.25rem}.pb-1\.5{padding-bottom:.375rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.text-left{text-align:left}.text-center{text-align:center}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-heading{font-size:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.leading-\[18px\]{line-height:18px}.leading-none{line-height:1}.text-active-selected{color:var(--vscode-list-activeSelectionForeground)}.text-danger{color:var(--vscode-editorError-foreground)}.text-default{color:var(--vscode-foreground)}.text-disabled{color:var(--vscode-disabledForeground)}.text-input{color:var(--vscode-input-foreground)}.text-link{color:var(--vscode-textLink-foreground)}.text-list-hovered{color:var(--vscode-list-hoverForeground)}.text-primary{color:var(--vscode-button-foreground)}.text-selected{color:var(--vscode-tab-activeForeground)}.text-subtle{color:var(--vscode-button-secondaryForeground)}.text-subtlest{color:var(--vscode-descriptionForeground)}.text-warning{color:var(--vscode-editorWarning-foreground)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-100{opacity:1}.opacity-40{opacity:.4}.opacity-5{opacity:.05}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow-scrollbar{--tw-shadow: var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset;--tw-shadow-colored: inset 0 6px 6px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.outline-default{outline-width:1px}.-outline-offset-\[1px\]{outline-offset:-1px}.outline-offset-button{outline-offset:2px}.outline-offset-inset{outline-offset:-1px}.outline-danger{outline-color:var(--vscode-editorError-foreground, transparent)}.outline-selected{outline-color:var(--vscode-focusBorder, transparent)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-0{transition-delay:0s}.duration-100{transition-duration:.1s}.\[color-scheme\:light_dark\]{color-scheme:light dark}.\[font-variant-numeric\:tabular-nums\]{font-variant-numeric:tabular-nums}.\[grid-area\:action\]{grid-area:action}.\[grid-column\:1\]{grid-column:1}.\[grid-row\:1\]{grid-row:1}.\[grid-template\:\'input_\.\'_\'input_action\'\]{grid-template:"input ." "input action"}.placeholder\:text-input-placeholder::-moz-placeholder{color:var(--vscode-input-placeholderForeground)}.placeholder\:text-input-placeholder::placeholder{color:var(--vscode-input-placeholderForeground)}.placeholder\:text-subtlest::-moz-placeholder{color:var(--vscode-descriptionForeground)}.placeholder\:text-subtlest::placeholder{color:var(--vscode-descriptionForeground)}.backdrop\:bg-overlay::backdrop{background-color:var(--vscode-panel-background)}.backdrop\:opacity-80::backdrop{opacity:.8}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:left-1\/2:before{content:var(--tw-content);left:50%}.before\:top-1\/2:before{content:var(--tw-content);top:50%}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:min-h-\[44px\]:before{content:var(--tw-content);min-height:44px}.before\:w-full:before{content:var(--tw-content);width:100%}.before\:min-w-\[12px\]:before{content:var(--tw-content);min-width:12px}.before\:-translate-x-1\/2:before{content:var(--tw-content);--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.before\:-translate-y-1\/2:before{content:var(--tw-content);--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.before\:content-\[\'\'\]:before{--tw-content: "";content:var(--tw-content)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:bottom-0:after{content:var(--tw-content);bottom:0}.after\:left-0:after{content:var(--tw-content);left:0}.after\:right-0:after{content:var(--tw-content);right:0}.after\:border-b:after{content:var(--tw-content);border-bottom-width:1px}.after\:border-b-selected:after{content:var(--tw-content);border-bottom-color:var(--vscode-focusBorder, transparent)}.invalid\:border-danger:invalid{border-color:var(--vscode-editorError-foreground, transparent)}.focus-within\:border:focus-within{border-width:1px}.focus-within\:border-selected:focus-within{border-color:var(--vscode-focusBorder, transparent)}.hover\:bg-hover:hover{background-color:var(--vscode-toolbar-hoverBackground)}.hover\:bg-list-hovered:hover{background-color:var(--vscode-list-hoverBackground)}.hover\:bg-neutral-hovered:hover{background-color:var(--vscode-button-secondaryHoverBackground)}.hover\:bg-primary-hovered:hover{background-color:var(--vscode-button-hoverBackground)}.hover\:bg-scrollbar-hovered:hover{background-color:var(--vscode-scrollbarSlider-hoverBackground)}.hover\:text-disabled:hover{color:var(--vscode-disabledForeground)}.hover\:text-list-hovered:hover{color:var(--vscode-list-hoverForeground)}.hover\:text-primary:hover{color:var(--vscode-button-foreground)}.hover\:text-subtle:hover{color:var(--vscode-button-secondaryForeground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:transition-opacity:hover{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\:delay-200:hover{transition-delay:.2s}.hover\:duration-150:hover{transition-duration:.15s}.focus\:cursor-text:focus{cursor:text}.focus\:border-selected:focus{border-color:var(--vscode-focusBorder, transparent)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:outline-\[transparent\]:focus{outline-color:transparent}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-default:focus-visible{outline-width:1px}.focus-visible\:outline-selected:focus-visible{outline-color:var(--vscode-focusBorder, transparent)}.active\:bg-pressed:active{background-color:var(--vscode-toolbar-activeBackground)}.active\:bg-scrollbar-active:active{background-color:var(--vscode-scrollbarSlider-activeBackground)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:text-disabled:disabled{color:var(--vscode-disabledForeground)}.group:focus-within .group-focus-within\:opacity-0{opacity:0}.group:focus-within .group-focus-within\:opacity-100{opacity:1}.group:hover .group-hover\:opacity-0{opacity:0}.group:hover .group-hover\:opacity-100{opacity:1}.group:hover .group-hover\:opacity-40{opacity:.4}.peer:checked~.peer-checked\:opacity-100{opacity:1}.peer:hover~.peer-hover\:bg-hover{background-color:var(--vscode-toolbar-hoverBackground)}.peer:focus~.peer-focus\:border-selected{border-color:var(--vscode-focusBorder, transparent)}.peer:focus-visible~.peer-focus-visible\:outline{outline-style:solid}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:text-disabled{color:var(--vscode-disabledForeground)}.data-\[orientation\=horizontal\]\:h-2[data-orientation=horizontal]{height:.5rem}.data-\[orientation\=vertical\]\:w-2[data-orientation=vertical]{width:.5rem}.data-\[orientation\=horizontal\]\:flex-col[data-orientation=horizontal]{flex-direction:column}.\[\&\:\:-webkit-color-swatch-wrapper\]\:p-0::-webkit-color-swatch-wrapper{padding:0}.\[\&\:\:-webkit-color-swatch\]\:rounded-sm::-webkit-color-swatch{border-radius:.125rem}.\[\&\:\:-webkit-color-swatch\]\:border-none::-webkit-color-swatch{border-style:none}.\[\&\:\:-webkit-color-swatch\]\:\[background\:repeating-conic-gradient\(\#717171_0\%_25\%\,transparent_0\%_50\%\)_50\%_\/_26px_26px\!important\]::-webkit-color-swatch{background:repeating-conic-gradient(#717171 0% 25%,transparent 0% 50%) 50% / 26px 26px!important}.\[\&\>div\]\:\!block>div{display:block!important} diff --git a/apps/cloud/public/triplex-editor/assets/index.js b/apps/cloud/public/triplex-editor/assets/index.js new file mode 100644 index 00000000..88652b12 --- /dev/null +++ b/apps/cloud/public/triplex-editor/assets/index.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("node:net"),b=require("node:os");class f extends Error{constructor(r){super(`${r} is locked`)}}const s={old:new Set,young:new Set},h=1e3*15,a=1024,i=65535;let u;const m=()=>{const e=b.networkInterfaces(),r=new Set([void 0,"0.0.0.0"]);for(const c of Object.values(e))for(const o of c)r.add(o.address);return r},l=e=>new Promise((r,c)=>{const o=w.createServer();o.unref(),o.on("error",c),o.listen(e,()=>{const{port:n}=o.address();o.close(()=>{r(n)})})}),d=async(e,r)=>{if(e.host||e.port===0)return l(e);for(const c of r)try{await l({port:e.port,host:c})}catch(o){if(!["EADDRNOTAVAIL","EINVAL"].includes(o.code))throw o}return e.port},g=function*(e){e&&(yield*e),yield 0};async function y(e){let r,c=new Set;if(e&&(e.port&&(r=typeof e.port=="number"?[e.port]:e.port),e.exclude)){const n=e.exclude;if(typeof n[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(const t of n){if(typeof t!="number")throw new TypeError("Each item in the `exclude` option must be a number corresponding to the port you want excluded.");if(!Number.isSafeInteger(t))throw new TypeError(`Number ${t} in the exclude option is not a safe integer and can't be used`)}c=new Set(n)}u===void 0&&(u=setTimeout(()=>{u=void 0,s.old=s.young,s.young=new Set},h),u.unref&&u.unref());const o=m();for(const n of g(r))try{if(c.has(n))continue;let t=await d({...e,port:n},o);for(;s.old.has(t)||s.young.has(t);){if(n!==0)throw new f(n);t=await d({...e,port:n},o)}return s.young.add(t),t}catch(t){if(!["EADDRINUSE","EACCES"].includes(t.code)&&!(t instanceof f))throw t}throw new Error("No available ports found")}function p(e,r){if(!Number.isInteger(e)||!Number.isInteger(r))throw new TypeError("`from` and `to` must be integer numbers");if(ei)throw new RangeError(`'from' must be between ${a} and ${i}`);if(ri)throw new RangeError(`'to' must be between ${a} and ${i}`);if(e>r)throw new RangeError("`to` must be greater than or equal to `from`");return function*(o,n){for(let t=o;t<=n;t++)yield t}(e,r)}exports.default=y;exports.portNumbers=p; diff --git a/apps/cloud/public/triplex-editor/index.js b/apps/cloud/public/triplex-editor/index.js new file mode 100644 index 00000000..f765af58 --- /dev/null +++ b/apps/cloud/public/triplex-editor/index.js @@ -0,0 +1,157 @@ +var H3=Object.defineProperty;var z3=(t,e,r)=>e in t?H3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var fn=(t,e,r)=>z3(t,typeof e!="symbol"?e+"":e,r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function r(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(s){if(s.ep)return;s.ep=!0;const l=r(s);fetch(s.href,l)}})();var qm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function m1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function q3(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function a(){return this instanceof a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var s=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(r,a,s.get?s:{enumerable:!0,get:function(){return t[a]}})}),r}var Ld={exports:{}},uo={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Bm;function B3(){if(Bm)return uo;Bm=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(a,s,l){var u=null;if(l!==void 0&&(u=""+l),s.key!==void 0&&(u=""+s.key),"key"in s){l={};for(var f in s)f!=="key"&&(l[f]=s[f])}else l=s;return s=l.ref,{$$typeof:t,type:a,key:u,ref:s!==void 0?s:null,props:l}}return uo.Fragment=e,uo.jsx=r,uo.jsxs=r,uo}var Vm;function V3(){return Vm||(Vm=1,Ld.exports=B3()),Ld.exports}var x=V3();const i2=Object.prototype.toString;function v1(t){switch(i2.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return $i(t,Error)}}function cs(t,e){return i2.call(t)===`[object ${e}]`}function a2(t){return cs(t,"ErrorEvent")}function Gm(t){return cs(t,"DOMError")}function G3(t){return cs(t,"DOMException")}function ir(t){return cs(t,"String")}function _1(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function y1(t){return t===null||_1(t)||typeof t!="object"&&typeof t!="function"}function es(t){return cs(t,"Object")}function Xc(t){return typeof Event<"u"&&$i(t,Event)}function K3(t){return typeof Element<"u"&&$i(t,Element)}function F3(t){return cs(t,"RegExp")}function Zc(t){return!!(t&&t.then&&typeof t.then=="function")}function Y3(t){return es(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function $i(t,e){try{return t instanceof e}catch{return!1}}function s2(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function Ja(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Km(t,e){if(!Array.isArray(t))return"";const r=[];for(let a=0;aX3(t,a,r))}function Z3(t,e,r=250,a,s,l,u){if(!l.exception||!l.exception.values||!u||!$i(u.originalException,Error))return;const f=l.exception.values.length>0?l.exception.values[l.exception.values.length-1]:void 0;f&&(l.exception.values=J3(Ah(t,e,s,u.originalException,a,l.exception.values,f,0),r))}function Ah(t,e,r,a,s,l,u,f){if(l.length>=r+1)return l;let d=[...l];if($i(a[s],Error)){Fm(u,f);const h=t(e,a[s]),g=d.length;Ym(h,s,g,f),d=Ah(t,e,r,a[s],s,[h,...d],h,g)}return Array.isArray(a.errors)&&a.errors.forEach((h,g)=>{if($i(h,Error)){Fm(u,f);const m=t(e,h),_=d.length;Ym(m,`errors[${g}]`,_,f),d=Ah(t,e,r,h,s,[m,...d],m,_)}}),d}function Fm(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function Ym(t,e,r,a){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:r,parent_id:a}}function J3(t,e){return t.map(r=>(r.value&&(r.value=Ja(r.value,e)),r))}const Mi="8.30.0",ke=globalThis;function Qc(t,e,r){const a=r||ke,s=a.__SENTRY__=a.__SENTRY__||{},l=s[Mi]=s[Mi]||{};return l[t]||(l[t]=e())}const b1=ke,Q3=80;function o2(t,e={}){if(!t)return"";try{let r=t;const a=5,s=[];let l=0,u=0;const f=" > ",d=f.length;let h;const g=Array.isArray(e)?e:e.keyAttrs,m=!Array.isArray(e)&&e.maxStringLength||Q3;for(;r&&l++1&&u+s.length*d+h.length>=m));)s.push(h),u+=h.length,r=r.parentNode;return s.reverse().join(f)}catch{return""}}function W3(t,e){const r=t,a=[];if(!r||!r.tagName)return"";if(b1.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}a.push(r.tagName.toLowerCase());const s=e&&e.length?e.filter(u=>r.getAttribute(u)).map(u=>[u,r.getAttribute(u)]):null;if(s&&s.length)s.forEach(u=>{a.push(`[${u[0]}="${u[1]}"]`)});else{r.id&&a.push(`#${r.id}`);const u=r.className;if(u&&ir(u)){const f=u.split(/\s+/);for(const d of f)a.push(`.${d}`)}}const l=["aria-label","type","name","title","alt"];for(const u of l){const f=r.getAttribute(u);f&&a.push(`[${u}="${f}"]`)}return a.join("")}function e8(){try{return b1.document.location.href}catch{return""}}function t8(t){if(!b1.HTMLElement)return null;let e=t;const r=5;for(let a=0;a"u"||__SENTRY_DEBUG__,n8="Sentry Logger ",Rh=["debug","info","warn","error","log","assert","trace"],kc={};function Go(t){if(!("console"in ke))return t();const e=ke.console,r={},a=Object.keys(kc);a.forEach(s=>{const l=kc[s];r[s]=e[s],e[s]=l});try{return t()}finally{a.forEach(s=>{e[s]=r[s]})}}function r8(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return Vo?Rh.forEach(r=>{e[r]=(...a)=>{t&&Go(()=>{ke.console[r](`${n8}[${r}]:`,...a)})}}):Rh.forEach(r=>{e[r]=()=>{}}),e}const ce=Qc("logger",r8),i8=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function a8(t){return t==="http"||t==="https"}function Wc(t,e=!1){const{host:r,path:a,pass:s,port:l,projectId:u,protocol:f,publicKey:d}=t;return`${f}://${d}${e&&s?`:${s}`:""}@${r}${l?`:${l}`:""}/${a&&`${a}/`}${u}`}function s8(t){const e=i8.exec(t);if(!e){Go(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[r,a,s="",l="",u="",f=""]=e.slice(1);let d="",h=f;const g=h.split("/");if(g.length>1&&(d=g.slice(0,-1).join("/"),h=g.pop()),h){const m=h.match(/^\d+/);m&&(h=m[0])}return l2({host:l,pass:s,path:d,projectId:h,port:u,protocol:r,publicKey:a})}function l2(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function o8(t){if(!Vo)return!0;const{port:e,projectId:r,protocol:a}=t;return["protocol","publicKey","host","projectId"].find(u=>t[u]?!1:(ce.error(`Invalid Sentry Dsn: ${u} missing`),!0))?!1:r.match(/^\d+$/)?a8(a)?e&&isNaN(parseInt(e,10))?(ce.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(ce.error(`Invalid Sentry Dsn: Invalid protocol ${a}`),!1):(ce.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function l8(t){const e=typeof t=="string"?s8(t):l2(t);if(!(!e||!o8(e)))return e}class Dn extends Error{constructor(e,r="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}}function Wt(t,e,r){if(!(e in t))return;const a=t[e],s=r(a);typeof s=="function"&&c2(s,a),t[e]=s}function Ui(t,e,r){try{Object.defineProperty(t,e,{value:r,writable:!0,configurable:!0})}catch{Vo&&ce.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function c2(t,e){try{const r=e.prototype||{};t.prototype=e.prototype=r,Ui(t,"__sentry_original__",e)}catch{}}function S1(t){return t.__sentry_original__}function c8(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function u2(t){if(v1(t))return{message:t.message,name:t.name,stack:t.stack,...Zm(t)};if(Xc(t)){const e={type:t.type,target:Xm(t.target),currentTarget:Xm(t.currentTarget),...Zm(t)};return typeof CustomEvent<"u"&&$i(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function Xm(t){try{return K3(t)?o2(t):Object.prototype.toString.call(t)}catch{return""}}function Zm(t){if(typeof t=="object"&&t!==null){const e={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}else return{}}function u8(t,e=40){const r=Object.keys(u2(t));r.sort();const a=r[0];if(!a)return"[object has no keys]";if(a.length>=e)return Ja(a,e);for(let s=r.length;s>0;s--){const l=r.slice(0,s).join(", ");if(!(l.length>e))return s===r.length?l:Ja(l,e)}return""}function hn(t){return Dh(t,new Map)}function Dh(t,e){if(f8(t)){const r=e.get(t);if(r!==void 0)return r;const a={};e.set(t,a);for(const s of Object.keys(t))typeof t[s]<"u"&&(a[s]=Dh(t[s],e));return a}if(Array.isArray(t)){const r=e.get(t);if(r!==void 0)return r;const a=[];return e.set(t,a),t.forEach(s=>{a.push(Dh(s,e))}),a}return t}function f8(t){if(!es(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}const f2=50,Ii="?",Jm=/\(error: (.*)\)/,Qm=/captureMessage|captureException/;function d2(...t){const e=t.sort((r,a)=>r[0]-a[0]).map(r=>r[1]);return(r,a=0,s=0)=>{const l=[],u=r.split(` +`);for(let f=a;f1024)continue;const h=Jm.test(d)?d.replace(Jm,"$1"):d;if(!h.match(/\S*Error: /)){for(const g of e){const m=g(h);if(m){l.push(m);break}}if(l.length>=f2+s)break}}return h8(l.slice(s))}}function d8(t){return Array.isArray(t)?d2(...t):t}function h8(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(pc(e).function||"")&&e.pop(),e.reverse(),Qm.test(pc(e).function||"")&&(e.pop(),Qm.test(pc(e).function||"")&&e.pop()),e.slice(0,f2).map(r=>({...r,filename:r.filename||pc(e).filename,function:r.function||Ii}))}function pc(t){return t[t.length-1]||{}}const $d="";function Gr(t){try{return!t||typeof t!="function"?$d:t.name||$d}catch{return $d}}function Wm(t){const e=t.exception;if(e){const r=[];try{return e.values.forEach(a=>{a.stacktrace.frames&&r.push(...a.stacktrace.frames)}),r}catch{return}}}const Rc={},ev={};function qi(t,e){Rc[t]=Rc[t]||[],Rc[t].push(e)}function Bi(t,e){ev[t]||(e(),ev[t]=!0)}function Sn(t,e){const r=t&&Rc[t];if(r)for(const a of r)try{a(e)}catch(s){Vo&&ce.error(`Error while triggering instrumentation handler. +Type: ${t} +Name: ${Gr(a)} +Error:`,s)}}function p8(t){const e="console";qi(e,t),Bi(e,g8)}function g8(){"console"in ke&&Rh.forEach(function(t){t in ke.console&&Wt(ke.console,t,function(e){return kc[t]=e,function(...r){Sn("console",{args:r,level:t});const s=kc[t];s&&s.apply(ke.console,r)}})})}const jh=ke;function h2(){if(!("fetch"in jh))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function kh(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function p2(){if(typeof EdgeRuntime=="string")return!0;if(!h2())return!1;if(kh(jh.fetch))return!0;let t=!1;const e=jh.document;if(e&&typeof e.createElement=="function")try{const r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=kh(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){Vo&&ce.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return t}const g2=1e3;function Ko(){return Date.now()/g2}function m8(){const{performance:t}=ke;if(!t||!t.now)return Ko;const e=Date.now()-t.now(),r=t.timeOrigin==null?e:t.timeOrigin;return()=>(r+t.now())/g2}const pn=m8(),tv=(()=>{const{performance:t}=ke;if(!t||!t.now)return;const e=3600*1e3,r=t.now(),a=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+r-a):e,l=sv8(void 0,e))}function v8(t,e=!1){e&&!p2()||Wt(ke,"fetch",function(r){return function(...a){const{method:s,url:l}=_8(a),u={args:a,fetchData:{method:s,url:l},startTimestamp:pn()*1e3};Sn("fetch",{...u});const f=new Error().stack;return r.apply(ke,a).then(async d=>(Sn("fetch",{...u,endTimestamp:pn()*1e3,response:d}),d),d=>{throw Sn("fetch",{...u,endTimestamp:pn()*1e3,error:d}),v1(d)&&d.stack===void 0&&(d.stack=f,Ui(d,"framesToPop",1)),d})}})}function Nh(t,e){return!!t&&typeof t=="object"&&!!t[e]}function nv(t){return typeof t=="string"?t:t?Nh(t,"url")?t.url:t.toString?t.toString():"":""}function _8(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[r,a]=t;return{url:nv(r),method:Nh(a,"method")?String(a.method).toUpperCase():"GET"}}const e=t[0];return{url:nv(e),method:Nh(e,"method")?String(e.method).toUpperCase():"GET"}}let gc=null;function y8(t){const e="error";qi(e,t),Bi(e,b8)}function b8(){gc=ke.onerror,ke.onerror=function(t,e,r,a,s){return Sn("error",{column:a,error:s,line:r,msg:t,url:e}),gc&&!gc.__SENTRY_LOADER__?gc.apply(this,arguments):!1},ke.onerror.__SENTRY_INSTRUMENTED__=!0}let mc=null;function S8(t){const e="unhandledrejection";qi(e,t),Bi(e,E8)}function E8(){mc=ke.onunhandledrejection,ke.onunhandledrejection=function(t){return Sn("unhandledrejection",t),mc&&!mc.__SENTRY_LOADER__?mc.apply(this,arguments):!0},ke.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function w8(){return"npm"}function x8(){const t=typeof WeakSet=="function",e=t?new WeakSet:[];function r(s){if(t)return e.has(s)?!0:(e.add(s),!1);for(let l=0;lMath.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(r=()=>{const a=new Uint8Array(1);return e.getRandomValues(a),a[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,a=>(a^(r()&15)>>a/4).toString(16))}function v2(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Hr(t){const{message:e,event_id:r}=t;if(e)return e;const a=v2(t);return a?a.type&&a.value?`${a.type}: ${a.value}`:a.type||a.value||r||"":r||""}function Mh(t,e,r){const a=t.exception=t.exception||{},s=a.values=a.values||[],l=s[0]=s[0]||{};l.value||(l.value=e||""),l.type||(l.type="Error")}function ts(t,e){const r=v2(t);if(!r)return;const a={type:"generic",handled:!0},s=r.mechanism;if(r.mechanism={...a,...s,...e},e&&"data"in e){const l={...s&&s.data,...e.data};r.mechanism.data=l}}function rv(t){if(t&&t.__sentry_captured__)return!0;try{Ui(t,"__sentry_captured__",!0)}catch{}return!1}function _2(t){return Array.isArray(t)?t:[t]}function zr(t,e=100,r=1/0){try{return Lh("",t,e,r)}catch(a){return{ERROR:`**non-serializable** (${a})`}}}function y2(t,e=3,r=100*1024){const a=zr(t,e);return A8(a)>r?y2(t,e-1,r):a}function Lh(t,e,r=1/0,a=1/0,s=x8()){const[l,u]=s;if(e==null||["number","boolean","string"].includes(typeof e)&&!Number.isNaN(e))return e;const f=C8(t,e);if(!f.startsWith("[object "))return f;if(e.__sentry_skip_normalization__)return e;const d=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:r;if(d===0)return f.replace("object ","");if(l(e))return"[Circular ~]";const h=e;if(h&&typeof h.toJSON=="function")try{const y=h.toJSON();return Lh("",y,d-1,a,s)}catch{}const g=Array.isArray(e)?[]:{};let m=0;const _=u2(e);for(const y in _){if(!Object.prototype.hasOwnProperty.call(_,y))continue;if(m>=a){g[y]="[MaxProperties ~]";break}const b=_[y];g[y]=Lh(y,b,d-1,a,s),m++}return u(e),g}function C8(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(s2(e))return"[VueViewModel]";if(Y3(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${Gr(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;const r=T8(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function T8(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function O8(t){return~-encodeURI(t).split(/%..|./).length}function A8(t){return O8(JSON.stringify(t))}var tr;(function(t){t[t.PENDING=0]="PENDING";const r=1;t[t.RESOLVED=r]="RESOLVED";const a=2;t[t.REJECTED=a]="REJECTED"})(tr||(tr={}));function Pi(t){return new dn(e=>{e(t)})}function Nc(t){return new dn((e,r)=>{r(t)})}class dn{constructor(e){dn.prototype.__init.call(this),dn.prototype.__init2.call(this),dn.prototype.__init3.call(this),dn.prototype.__init4.call(this),this._state=tr.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(r){this._reject(r)}}then(e,r){return new dn((a,s)=>{this._handlers.push([!1,l=>{if(!e)a(l);else try{a(e(l))}catch(u){s(u)}},l=>{if(!r)s(l);else try{a(r(l))}catch(u){s(u)}}]),this._executeHandlers()})}catch(e){return this.then(r=>r,e)}finally(e){return new dn((r,a)=>{let s,l;return this.then(u=>{l=!1,s=u,e&&e()},u=>{l=!0,s=u,e&&e()}).then(()=>{if(l){a(s);return}r(s)})})}__init(){this._resolve=e=>{this._setResult(tr.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(tr.REJECTED,e)}}__init3(){this._setResult=(e,r)=>{if(this._state===tr.PENDING){if(Zc(r)){r.then(this._resolve,this._reject);return}this._state=e,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===tr.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(r=>{r[0]||(this._state===tr.RESOLVED&&r[1](this._value),this._state===tr.REJECTED&&r[2](this._value),r[0]=!0)})}}}function R8(t){const e=[];function r(){return t===void 0||e.lengtha(f)).then(null,()=>a(f).then(null,()=>{})),f}function l(u){return new dn((f,d)=>{let h=e.length;if(!h)return f(!0);const g=setTimeout(()=>{u&&u>0&&f(!1)},u);e.forEach(m=>{Pi(m).then(()=>{--h||(clearTimeout(g),f(!0))},d)})})}return{$:e,add:s,drain:l}}function Ud(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const r=e[6]||"",a=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:r,hash:a,relative:e[5]+r+a}}const D8=["fatal","error","warning","log","info","debug"];function j8(t){return t==="warn"?"warning":D8.includes(t)?t:"log"}const k8="sentry-",N8=/^sentry-/;function M8(t){const e=L8(t);if(!e)return;const r=Object.entries(e).reduce((a,[s,l])=>{if(s.match(N8)){const u=s.slice(k8.length);a[u]=l}return a},{});if(Object.keys(r).length>0)return r}function L8(t){if(!(!t||!ir(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,r)=>{const a=iv(r);return Object.entries(a).forEach(([s,l])=>{e[s]=l}),e},{}):iv(t)}function iv(t){return t.split(",").map(e=>e.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((e,[r,a])=>(r&&a&&(e[r]=a),e),{})}function Fo(t,e=[]){return[t,e]}function $8(t,e){const[r,a]=t;return[r,[...a,e]]}function $h(t,e){const r=t[1];for(const a of r){const s=a[0].type;if(e(a,s))return!0}return!1}function Uh(t){return ke.__SENTRY__&&ke.__SENTRY__.encodePolyfill?ke.__SENTRY__.encodePolyfill(t):new TextEncoder().encode(t)}function U8(t){const[e,r]=t;let a=JSON.stringify(e);function s(l){typeof a=="string"?a=typeof l=="string"?a+l:[Uh(a),l]:a.push(typeof l=="string"?Uh(l):l)}for(const l of r){const[u,f]=l;if(s(` +${JSON.stringify(u)} +`),typeof f=="string"||f instanceof Uint8Array)s(f);else{let d;try{d=JSON.stringify(f)}catch{d=JSON.stringify(zr(f))}s(d)}}return typeof a=="string"?a:I8(a)}function I8(t){const e=t.reduce((s,l)=>s+l.length,0),r=new Uint8Array(e);let a=0;for(const s of t)r.set(s,a),a+=s.length;return r}function P8(t){const e=typeof t.data=="string"?Uh(t.data):t.data;return[hn({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}const H8={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function av(t){return H8[t]}function b2(t){if(!t||!t.sdk)return;const{name:e,version:r}=t.sdk;return{name:e,version:r}}function z8(t,e,r,a){const s=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!r&&a&&{dsn:Wc(a)},...s&&{trace:hn({...s})}}}function q8(t,e,r){const a=[{type:"client_report"},{timestamp:Ko(),discarded_events:t}];return Fo(e?{dsn:e}:{},[a])}const B8=60*1e3;function V8(t,e=Date.now()){const r=parseInt(`${t}`,10);if(!isNaN(r))return r*1e3;const a=Date.parse(`${t}`);return isNaN(a)?B8:a-e}function G8(t,e){return t[e]||t.all||0}function K8(t,e,r=Date.now()){return G8(t,e)>r}function F8(t,{statusCode:e,headers:r},a=Date.now()){const s={...t},l=r&&r["x-sentry-rate-limits"],u=r&&r["retry-after"];if(l)for(const f of l.trim().split(",")){const[d,h,,,g]=f.split(":",5),m=parseInt(d,10),_=(isNaN(m)?60:m)*1e3;if(!h)s.all=a+_;else for(const y of h.split(";"))y==="metric_bucket"?(!g||g.split(";").includes("custom"))&&(s[y]=a+_):s[y]=a+_}else u?s.all=a+V8(u,a):e===429&&(s.all=a+60*1e3);return s}function sv(){return{traceId:It(),spanId:It().substring(16)}}const vc=ke;function Y8(){const t=vc.chrome,e=t&&t.app&&t.app.runtime,r="history"in vc&&!!vc.history.pushState&&!!vc.history.replaceState;return!e&&r}const Ve=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Yo(){return E1(ke),ke}function E1(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||Mi,e[Mi]=e[Mi]||{}}function X8(t){const e=pn(),r={sid:It(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>J8(r)};return t&&ns(r,t),r}function ns(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||pn(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:It()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{const r=t.timestamp-t.started;t.duration=r>=0?r:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function Z8(t,e){let r={};t.status==="ok"&&(r={status:"exited"}),ns(t,r)}function J8(t){return hn({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}const Ih="_sentrySpan";function ov(t,e){e?Ui(t,Ih,e):delete t[Ih]}function Ph(t){return t[Ih]}const Q8=100;class w1{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=sv()}clone(){const e=new w1;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,ov(e,Ph(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&ns(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,r){return this._tags={...this._tags,[e]:r},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,r){return this._extra={...this._extra,[e]:r},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,r){return r===null?delete this._contexts[e]:this._contexts[e]=r,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const r=typeof e=="function"?e(this):e,[a,s]=r instanceof Hi?[r.getScopeData(),r.getRequestSession()]:es(r)?[e,e.requestSession]:[],{tags:l,extra:u,user:f,contexts:d,level:h,fingerprint:g=[],propagationContext:m}=a||{};return this._tags={...this._tags,...l},this._extra={...this._extra,...u},this._contexts={...this._contexts,...d},f&&Object.keys(f).length&&(this._user=f),h&&(this._level=h),g.length&&(this._fingerprint=g),m&&(this._propagationContext=m),s&&(this._requestSession=s),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,ov(this,void 0),this._attachments=[],this._propagationContext=sv(),this._notifyScopeListeners(),this}addBreadcrumb(e,r){const a=typeof r=="number"?r:Q8;if(a<=0)return this;const s={timestamp:Ko(),...e},l=this._breadcrumbs;return l.push(s),this._breadcrumbs=l.length>a?l.slice(-a):l,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Ph(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,r){const a=r&&r.event_id?r.event_id:It();if(!this._client)return ce.warn("No client configured on scope - will not capture exception!"),a;const s=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:s,...r,event_id:a},this),a}captureMessage(e,r,a){const s=a&&a.event_id?a.event_id:It();if(!this._client)return ce.warn("No client configured on scope - will not capture message!"),s;const l=new Error(e);return this._client.captureMessage(e,r,{originalException:e,syntheticException:l,...a,event_id:s},this),s}captureEvent(e,r){const a=r&&r.event_id?r.event_id:It();return this._client?(this._client.captureEvent(e,{...r,event_id:a},this),a):(ce.warn("No client configured on scope - will not capture event!"),a)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}const Hi=w1;function W8(){return Qc("defaultCurrentScope",()=>new Hi)}function e4(){return Qc("defaultIsolationScope",()=>new Hi)}class t4{constructor(e,r){let a;e?a=e:a=new Hi;let s;r?s=r:s=new Hi,this._stack=[{scope:a}],this._isolationScope=s}withScope(e){const r=this._pushScope();let a;try{a=e(r)}catch(s){throw this._popScope(),s}return Zc(a)?a.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(this._popScope(),a)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function rs(){const t=Yo(),e=E1(t);return e.stack=e.stack||new t4(W8(),e4())}function n4(t){return rs().withScope(t)}function r4(t,e){const r=rs();return r.withScope(()=>(r.getStackTop().scope=t,e(t)))}function lv(t){return rs().withScope(()=>t(rs().getIsolationScope()))}function i4(){return{withIsolationScope:lv,withScope:n4,withSetScope:r4,withSetIsolationScope:(t,e)=>lv(e),getCurrentScope:()=>rs().getScope(),getIsolationScope:()=>rs().getIsolationScope()}}function eu(t){const e=E1(t);return e.acs?e.acs:i4()}function jn(){const t=Yo();return eu(t).getCurrentScope()}function Vi(){const t=Yo();return eu(t).getIsolationScope()}function a4(){return Qc("globalScope",()=>new Hi)}function s4(...t){const e=Yo(),r=eu(e);if(t.length===2){const[a,s]=t;return a?r.withSetScope(a,s):r.withScope(s)}return r.withScope(t[0])}function it(){return jn().getClient()}const o4="_sentryMetrics";function l4(t){const e=t[o4];if(!e)return;const r={};for(const[,[a,s]]of e)(r[a]||(r[a]=[])).push(hn(s));return r}const c4="sentry.source",u4="sentry.sample_rate",f4="sentry.op",d4="sentry.origin",h4=0,p4=1,g4=1;function m4(t){const{spanId:e,traceId:r}=t.spanContext(),{parent_span_id:a}=rr(t);return hn({parent_span_id:a,span_id:e,trace_id:r})}function cv(t){return typeof t=="number"?uv(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?uv(t.getTime()):pn()}function uv(t){return t>9999999999?t/1e3:t}function rr(t){if(_4(t))return t.getSpanJSON();try{const{spanId:e,traceId:r}=t.spanContext();if(v4(t)){const{attributes:a,startTime:s,name:l,endTime:u,parentSpanId:f,status:d}=t;return hn({span_id:e,trace_id:r,data:a,description:l,parent_span_id:f,start_timestamp:cv(s),timestamp:cv(u)||void 0,status:b4(d),op:a[f4],origin:a[d4],_metrics_summary:l4(t)})}return{span_id:e,trace_id:r}}catch{return{}}}function v4(t){const e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function _4(t){return typeof t.getSpanJSON=="function"}function y4(t){const{traceFlags:e}=t.spanContext();return e===g4}function b4(t){if(!(!t||t.code===h4))return t.code===p4?"ok":t.message||"unknown_error"}const S4="_sentryRootSpan";function Mc(t){return t[S4]||t}function E4(){const t=Yo(),e=eu(t);return e.getActiveSpan?e.getActiveSpan():Ph(jn())}const tu="production",w4="_frozenDsc";function S2(t,e){const r=e.getOptions(),{publicKey:a}=e.getDsn()||{},s=hn({environment:r.environment||tu,release:r.release,public_key:a,trace_id:t});return e.emit("createDsc",s),s}function x4(t){const e=it();if(!e)return{};const r=S2(rr(t).trace_id||"",e),a=Mc(t),s=a[w4];if(s)return s;const l=a.spanContext().traceState,u=l&&l.get("sentry.dsc"),f=u&&M8(u);if(f)return f;const d=rr(a),h=d.data||{},g=h[u4];g!=null&&(r.sample_rate=`${g}`);const m=h[c4],_=d.description;return m!=="url"&&_&&(r.transaction=_),r.sampled=String(y4(a)),e.emit("createDsc",r,a),r}function C4(t){if(typeof t=="boolean")return Number(t);const e=typeof t=="string"?parseFloat(t):t;if(typeof e!="number"||isNaN(e)||e<0||e>1){Ve&&ce.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`);return}return e}function T4(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function O4(t,e,r,a){const s=b2(r),l={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!a&&e&&{dsn:Wc(e)}},u="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Fo(l,[u])}function A4(t,e,r,a){const s=b2(r),l=t.type&&t.type!=="replay_event"?t.type:"event";T4(t,r&&r.sdk);const u=z8(t,s,a,e);return delete t.sdkProcessingMetadata,Fo(u,[[{type:l},t]])}function Hh(t,e,r,a=0){return new dn((s,l)=>{const u=t[a];if(e===null||typeof u!="function")s(e);else{const f=u({...e},r);Ve&&u.id&&f===null&&ce.log(`Event processor "${u.id}" dropped event`),Zc(f)?f.then(d=>Hh(t,d,r,a+1).then(s)).then(null,l):Hh(t,f,r,a+1).then(s).then(null,l)}})}function R4(t,e){const{fingerprint:r,span:a,breadcrumbs:s,sdkProcessingMetadata:l}=e;D4(t,e),a&&N4(t,a),M4(t,r),j4(t,s),k4(t,l)}function fv(t,e){const{extra:r,tags:a,user:s,contexts:l,level:u,sdkProcessingMetadata:f,breadcrumbs:d,fingerprint:h,eventProcessors:g,attachments:m,propagationContext:_,transactionName:y,span:b}=e;fo(t,"extra",r),fo(t,"tags",a),fo(t,"user",s),fo(t,"contexts",l),fo(t,"sdkProcessingMetadata",f),u&&(t.level=u),y&&(t.transactionName=y),b&&(t.span=b),d.length&&(t.breadcrumbs=[...t.breadcrumbs,...d]),h.length&&(t.fingerprint=[...t.fingerprint,...h]),g.length&&(t.eventProcessors=[...t.eventProcessors,...g]),m.length&&(t.attachments=[...t.attachments,...m]),t.propagationContext={...t.propagationContext,..._}}function fo(t,e,r){if(r&&Object.keys(r).length){t[e]={...t[e]};for(const a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[e][a]=r[a])}}function D4(t,e){const{extra:r,tags:a,user:s,contexts:l,level:u,transactionName:f}=e,d=hn(r);d&&Object.keys(d).length&&(t.extra={...d,...t.extra});const h=hn(a);h&&Object.keys(h).length&&(t.tags={...h,...t.tags});const g=hn(s);g&&Object.keys(g).length&&(t.user={...g,...t.user});const m=hn(l);m&&Object.keys(m).length&&(t.contexts={...m,...t.contexts}),u&&(t.level=u),f&&t.type!=="transaction"&&(t.transaction=f)}function j4(t,e){const r=[...t.breadcrumbs||[],...e];t.breadcrumbs=r.length?r:void 0}function k4(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function N4(t,e){t.contexts={trace:m4(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:x4(e),...t.sdkProcessingMetadata};const r=Mc(e),a=rr(r).description;a&&!t.transaction&&t.type==="transaction"&&(t.transaction=a)}function M4(t,e){t.fingerprint=t.fingerprint?_2(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}function L4(t,e,r,a,s,l){const{normalizeDepth:u=3,normalizeMaxBreadth:f=1e3}=t,d={...e,event_id:e.event_id||r.event_id||It(),timestamp:e.timestamp||Ko()},h=r.integrations||t.integrations.map(w=>w.name);$4(d,t),P4(d,h),s&&s.emit("applyFrameMetadata",e),e.type===void 0&&U4(d,t.stackParser);const g=z4(a,r.captureContext);r.mechanism&&ts(d,r.mechanism);const m=s?s.getEventProcessors():[],_=a4().getScopeData();if(l){const w=l.getScopeData();fv(_,w)}if(g){const w=g.getScopeData();fv(_,w)}const y=[...r.attachments||[],..._.attachments];y.length&&(r.attachments=y),R4(d,_);const b=[...m,..._.eventProcessors];return Hh(b,d,r).then(w=>(w&&I4(w),typeof u=="number"&&u>0?H4(w,u,f):w))}function $4(t,e){const{environment:r,release:a,dist:s,maxValueLength:l=250}=e;"environment"in t||(t.environment="environment"in e?r:tu),t.release===void 0&&a!==void 0&&(t.release=a),t.dist===void 0&&s!==void 0&&(t.dist=s),t.message&&(t.message=Ja(t.message,l));const u=t.exception&&t.exception.values&&t.exception.values[0];u&&u.value&&(u.value=Ja(u.value,l));const f=t.request;f&&f.url&&(f.url=Ja(f.url,l))}const dv=new WeakMap;function U4(t,e){const r=ke._sentryDebugIds;if(!r)return;let a;const s=dv.get(e);s?a=s:(a=new Map,dv.set(e,a));const l=Object.entries(r).reduce((u,[f,d])=>{let h;const g=a.get(f);g?h=g:(h=e(f),a.set(f,h));for(let m=h.length-1;m>=0;m--){const _=h[m];if(_.filename){u[_.filename]=d;break}}return u},{});try{t.exception.values.forEach(u=>{u.stacktrace.frames.forEach(f=>{f.filename&&(f.debug_id=l[f.filename])})})}catch{}}function I4(t){const e={};try{t.exception.values.forEach(a=>{a.stacktrace.frames.forEach(s=>{s.debug_id&&(s.abs_path?e[s.abs_path]=s.debug_id:s.filename&&(e[s.filename]=s.debug_id),delete s.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const r=t.debug_meta.images;Object.entries(e).forEach(([a,s])=>{r.push({type:"sourcemap",code_file:a,debug_id:s})})}function P4(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function H4(t,e,r){if(!t)return null;const a={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(s=>({...s,...s.data&&{data:zr(s.data,e,r)}}))},...t.user&&{user:zr(t.user,e,r)},...t.contexts&&{contexts:zr(t.contexts,e,r)},...t.extra&&{extra:zr(t.extra,e,r)}};return t.contexts&&t.contexts.trace&&a.contexts&&(a.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(a.contexts.trace.data=zr(t.contexts.trace.data,e,r))),t.spans&&(a.spans=t.spans.map(s=>({...s,...s.data&&{data:zr(s.data,e,r)}}))),a}function z4(t,e){if(!e)return t;const r=t?t.clone():new Hi;return r.update(e),r}function q4(t,e){return jn().captureException(t,void 0)}function nu(t,e){return jn().captureEvent(t,e)}function B4(t,e){Vi().setContext(t,e)}function V4(t,e){Vi().setTag(t,e)}function hv(t){const e=it(),r=Vi(),a=jn(),{release:s,environment:l=tu}=e&&e.getOptions()||{},{userAgent:u}=ke.navigator||{},f=X8({release:s,environment:l,user:a.getUser()||r.getUser(),...u&&{userAgent:u},...t}),d=r.getSession();return d&&d.status==="ok"&&ns(d,{status:"exited"}),E2(),r.setSession(f),a.setSession(f),f}function E2(){const t=Vi(),e=jn(),r=e.getSession()||t.getSession();r&&Z8(r),w2(),t.setSession(),e.setSession()}function w2(){const t=Vi(),e=jn(),r=it(),a=e.getSession()||t.getSession();a&&r&&r.captureSession(a)}function pv(t=!1){if(t){E2();return}w2()}const G4="7";function K4(t){const e=t.protocol?`${t.protocol}:`:"",r=t.port?`:${t.port}`:"";return`${e}//${t.host}${r}${t.path?`/${t.path}`:""}/api/`}function F4(t){return`${K4(t)}${t.projectId}/envelope/`}function Y4(t,e){return c8({sentry_key:t.publicKey,sentry_version:G4,...e&&{sentry_client:`${e.name}/${e.version}`}})}function X4(t,e,r){return e||`${F4(t)}?${Y4(t,r)}`}const gv=[];function Z4(t){const e={};return t.forEach(r=>{const{name:a}=r,s=e[a];s&&!s.isDefaultInstance&&r.isDefaultInstance||(e[a]=r)}),Object.values(e)}function J4(t){const e=t.defaultIntegrations||[],r=t.integrations;e.forEach(u=>{u.isDefaultInstance=!0});let a;Array.isArray(r)?a=[...e,...r]:typeof r=="function"?a=_2(r(e)):a=e;const s=Z4(a),l=s.findIndex(u=>u.name==="Debug");if(l>-1){const[u]=s.splice(l,1);s.push(u)}return s}function Q4(t,e){const r={};return e.forEach(a=>{a&&x2(t,a,r)}),r}function mv(t,e){for(const r of e)r&&r.afterAllSetup&&r.afterAllSetup(t)}function x2(t,e,r){if(r[e.name]){Ve&&ce.log(`Integration skipped because it was already installed: ${e.name}`);return}if(r[e.name]=e,gv.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),gv.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){const a=e.preprocessEvent.bind(e);t.on("preprocessEvent",(s,l)=>a(s,l,t))}if(typeof e.processEvent=="function"){const a=e.processEvent.bind(e),s=Object.assign((l,u)=>a(l,u,t),{id:e.name});t.addEventProcessor(s)}Ve&&ce.log(`Integration installed: ${e.name}`)}const vv="Not capturing exception because it's already been captured.";class W4{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=l8(e.dsn):Ve&&ce.warn("No DSN provided, client will not send events."),this._dsn){const r=X4(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:r})}}captureException(e,r,a){const s=It();if(rv(e))return Ve&&ce.log(vv),s;const l={event_id:s,...r};return this._process(this.eventFromException(e,l).then(u=>this._captureEvent(u,l,a))),l.event_id}captureMessage(e,r,a,s){const l={event_id:It(),...a},u=_1(e)?e:String(e),f=y1(e)?this.eventFromMessage(u,r,l):this.eventFromException(e,l);return this._process(f.then(d=>this._captureEvent(d,l,s))),l.event_id}captureEvent(e,r,a){const s=It();if(r&&r.originalException&&rv(r.originalException))return Ve&&ce.log(vv),s;const l={event_id:s,...r},f=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,l,f||a)),l.event_id}captureSession(e){typeof e.release!="string"?Ve&&ce.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ns(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const r=this._transport;return r?(this.emit("flush"),this._isClientDoneProcessing(e).then(a=>r.flush(e).then(s=>a&&s))):Pi(!0)}close(e){return this.flush(e).then(r=>(this.getOptions().enabled=!1,this.emit("close"),r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const r=this._integrations[e.name];x2(this,e,this._integrations),r||mv(this,[e])}sendEvent(e,r={}){this.emit("beforeSendEvent",e,r);let a=A4(e,this._dsn,this._options._metadata,this._options.tunnel);for(const l of r.attachments||[])a=$8(a,P8(l));const s=this.sendEnvelope(a);s&&s.then(l=>this.emit("afterSendEvent",e,l),null)}sendSession(e){const r=O4(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,r,a){if(this._options.sendClientReports){const s=typeof a=="number"?a:1,l=`${e}:${r}`;Ve&&ce.log(`Recording outcome: "${l}"${s>1?` (${s} times)`:""}`),this._outcomes[l]=(this._outcomes[l]||0)+s}}on(e,r){const a=this._hooks[e]=this._hooks[e]||[];return a.push(r),()=>{const s=a.indexOf(r);s>-1&&a.splice(s,1)}}emit(e,...r){const a=this._hooks[e];a&&a.forEach(s=>s(...r))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,r=>(Ve&&ce.error("Error while sending event:",r),r)):(Ve&&ce.error("Transport disabled"),Pi({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=Q4(this,e),mv(this,e)}_updateSessionFromEvent(e,r){let a=!1,s=!1;const l=r.exception&&r.exception.values;if(l){s=!0;for(const d of l){const h=d.mechanism;if(h&&h.handled===!1){a=!0;break}}}const u=e.status==="ok";(u&&e.errors===0||u&&a)&&(ns(e,{...a&&{status:"crashed"},errors:e.errors||Number(s||a)}),this.captureSession(e))}_isClientDoneProcessing(e){return new dn(r=>{let a=0;const s=1,l=setInterval(()=>{this._numProcessing==0?(clearInterval(l),r(!0)):(a+=s,e&&a>=e&&(clearInterval(l),r(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,r,a,s=Vi()){const l=this.getOptions(),u=Object.keys(this._integrations);return!r.integrations&&u.length>0&&(r.integrations=u),this.emit("preprocessEvent",e,r),e.type||s.setLastEventId(e.event_id||r.event_id),L4(l,e,r,a,this,s).then(f=>{if(f===null)return f;const d={...s.getPropagationContext(),...a?a.getPropagationContext():void 0};if(!(f.contexts&&f.contexts.trace)&&d){const{traceId:g,spanId:m,parentSpanId:_,dsc:y}=d;f.contexts={trace:hn({trace_id:g,span_id:m,parent_span_id:_}),...f.contexts};const b=y||S2(g,this);f.sdkProcessingMetadata={dynamicSamplingContext:b,...f.sdkProcessingMetadata}}return f})}_captureEvent(e,r={},a){return this._processEvent(e,r,a).then(s=>s.event_id,s=>{if(Ve){const l=s;l.logLevel==="log"?ce.log(l.message):ce.warn(l)}})}_processEvent(e,r,a){const s=this.getOptions(),{sampleRate:l}=s,u=T2(e),f=C2(e),d=e.type||"error",h=`before send for type \`${d}\``,g=typeof l>"u"?void 0:C4(l);if(f&&typeof g=="number"&&Math.random()>g)return this.recordDroppedEvent("sample_rate","error",e),Nc(new Dn(`Discarding event because it's not included in the random sample (sampling rate = ${l})`,"log"));const m=d==="replay_event"?"replay":d,y=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,r,a,y).then(b=>{if(b===null)throw this.recordDroppedEvent("event_processor",m,e),new Dn("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return b;const w=tS(this,s,b,r);return eS(w,h)}).then(b=>{if(b===null){if(this.recordDroppedEvent("before_send",m,e),u){const T=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",T)}throw new Dn(`${h} returned \`null\`, will not send event.`,"log")}const S=a&&a.getSession();if(!u&&S&&this._updateSessionFromEvent(S,b),u){const R=b.sdkProcessingMetadata&&b.sdkProcessingMetadata.spanCountBeforeProcessing||0,T=b.spans?b.spans.length:0,D=R-T;D>0&&this.recordDroppedEvent("before_send","span",D)}const w=b.transaction_info;if(u&&w&&b.transaction!==e.transaction){const R="custom";b.transaction_info={...w,source:R}}return this.sendEvent(b,r),b}).then(null,b=>{throw b instanceof Dn?b:(this.captureException(b,{data:{__sentry__:!0},originalException:b}),new Dn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${b}`))})}_process(e){this._numProcessing++,e.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([r,a])=>{const[s,l]=r.split(":");return{reason:s,category:l,quantity:a}})}_flushOutcomes(){Ve&&ce.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0){Ve&&ce.log("No outcomes to send");return}if(!this._dsn){Ve&&ce.log("No dsn provided, will not send outcomes");return}Ve&&ce.log("Sending outcomes:",e);const r=q8(e,this._options.tunnel&&Wc(this._dsn));this.sendEnvelope(r)}}function eS(t,e){const r=`${e} must return \`null\` or a valid event.`;if(Zc(t))return t.then(a=>{if(!es(a)&&a!==null)throw new Dn(r);return a},a=>{throw new Dn(`${e} rejected with ${a}`)});if(!es(t)&&t!==null)throw new Dn(r);return t}function tS(t,e,r,a){const{beforeSend:s,beforeSendTransaction:l,beforeSendSpan:u}=e;if(C2(r)&&s)return s(r,a);if(T2(r)){if(r.spans&&u){const f=[];for(const d of r.spans){const h=u(d);h?f.push(h):t.recordDroppedEvent("before_send","span")}r.spans=f}if(l){if(r.spans){const f=r.spans.length;r.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:f}}return l(r,a)}}return r}function C2(t){return t.type===void 0}function T2(t){return t.type==="transaction"}function nS(t,e){e.debug===!0&&(Ve?ce.enable():Go(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),jn().update(e.initialScope);const a=new t(e);return rS(a),a.init(),a}function rS(t){jn().setClient(t)}const iS=64;function aS(t,e,r=R8(t.bufferSize||iS)){let a={};const s=u=>r.drain(u);function l(u){const f=[];if($h(u,(m,_)=>{const y=av(_);if(K8(a,y)){const b=_v(m,_);t.recordDroppedEvent("ratelimit_backoff",y,b)}else f.push(m)}),f.length===0)return Pi({});const d=Fo(u[0],f),h=m=>{$h(d,(_,y)=>{const b=_v(_,y);t.recordDroppedEvent(m,av(y),b)})},g=()=>e({body:U8(d)}).then(m=>(m.statusCode!==void 0&&(m.statusCode<200||m.statusCode>=300)&&Ve&&ce.warn(`Sentry responded with status code ${m.statusCode} to sent event.`),a=F8(a,m),m),m=>{throw h("network_error"),m});return r.add(g).then(m=>m,m=>{if(m instanceof Dn)return Ve&&ce.error("Skipped sending event because buffer is full."),h("queue_overflow"),Pi({});throw m})}return{send:l,flush:s}}function _v(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function sS(t,e){const r=e&&e.getDsn(),a=e&&e.getOptions().tunnel;return lS(t,r)||oS(t,a)}function oS(t,e){return e?yv(t)===yv(e):!1}function lS(t,e){return e?t.includes(e.host):!1}function yv(t){return t[t.length-1]==="/"?t.slice(0,-1):t}function O2(t,e,r=[e],a="npm"){const s=t._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:r.map(l=>({name:`${a}:@sentry/${l}`,version:Mi})),version:Mi}),t._metadata=s}const cS=100;function zi(t,e){const r=it(),a=Vi();if(!r)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:l=cS}=r.getOptions();if(l<=0)return;const f={timestamp:Ko(),...t},d=s?Go(()=>s(f,e)):f;d!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",d,e),a.addBreadcrumb(d,l))}let bv;const uS="FunctionToString",Sv=new WeakMap,fS=()=>({name:uS,setupOnce(){bv=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=S1(this),r=Sv.has(it())&&e!==void 0?e:this;return bv.apply(r,t)}}catch{}},setup(t){Sv.set(t,!0)}}),dS=fS,hS=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],pS="InboundFilters",gS=(t={})=>({name:pS,processEvent(e,r,a){const s=a.getOptions(),l=vS(t,s);return _S(e,l)?null:e}}),mS=gS;function vS(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:hS],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function _S(t,e){return e.ignoreInternal&&xS(t)?(Ve&&ce.warn(`Event dropped due to being internal Sentry Error. +Event: ${Hr(t)}`),!0):yS(t,e.ignoreErrors)?(Ve&&ce.warn(`Event dropped due to being matched by \`ignoreErrors\` option. +Event: ${Hr(t)}`),!0):TS(t)?(Ve&&ce.warn(`Event dropped due to not having an error message, error type or stacktrace. +Event: ${Hr(t)}`),!0):bS(t,e.ignoreTransactions)?(Ve&&ce.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. +Event: ${Hr(t)}`),!0):SS(t,e.denyUrls)?(Ve&&ce.warn(`Event dropped due to being matched by \`denyUrls\` option. +Event: ${Hr(t)}. +Url: ${Lc(t)}`),!0):ES(t,e.allowUrls)?!1:(Ve&&ce.warn(`Event dropped due to not being matched by \`allowUrls\` option. +Event: ${Hr(t)}. +Url: ${Lc(t)}`),!0)}function yS(t,e){return t.type||!e||!e.length?!1:wS(t).some(r=>Jc(r,e))}function bS(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;const r=t.transaction;return r?Jc(r,e):!1}function SS(t,e){if(!e||!e.length)return!1;const r=Lc(t);return r?Jc(r,e):!1}function ES(t,e){if(!e||!e.length)return!0;const r=Lc(t);return r?Jc(r,e):!0}function wS(t){const e=[];t.message&&e.push(t.message);let r;try{r=t.exception.values[t.exception.values.length-1]}catch{}return r&&r.value&&(e.push(r.value),r.type&&e.push(`${r.type}: ${r.value}`)),e}function xS(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function CS(t=[]){for(let e=t.length-1;e>=0;e--){const r=t[e];if(r&&r.filename!==""&&r.filename!=="[native code]")return r.filename||null}return null}function Lc(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?CS(e):null}catch{return Ve&&ce.error(`Cannot extract url for event ${Hr(t)}`),null}}function TS(t){return t.type||!t.exception||!t.exception.values||t.exception.values.length===0?!1:!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value)}const OS="Dedupe",AS=()=>{let t;return{name:OS,processEvent(e){if(e.type)return e;try{if(DS(e,t))return Ve&&ce.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},RS=AS;function DS(t,e){return e?!!(jS(t,e)||kS(t,e)):!1}function jS(t,e){const r=t.message,a=e.message;return!(!r&&!a||r&&!a||!r&&a||r!==a||!R2(t,e)||!A2(t,e))}function kS(t,e){const r=Ev(e),a=Ev(t);return!(!r||!a||r.type!==a.type||r.value!==a.value||!R2(t,e)||!A2(t,e))}function A2(t,e){let r=Wm(t),a=Wm(e);if(!r&&!a)return!0;if(r&&!a||!r&&a||(r=r,a=a,a.length!==r.length))return!1;for(let s=0;s0}function NS(){zh++,setTimeout(()=>{zh--})}function is(t,e={},r){if(typeof t!="function")return t;try{const s=t.__sentry_wrapped__;if(s)return s;if(S1(t))return t}catch{return t}const a=function(){const s=Array.prototype.slice.call(arguments);try{const l=s.map(u=>is(u,e));return t.apply(this,l)}catch(l){throw NS(),s4(u=>{u.addEventProcessor(f=>(e.mechanism&&(Mh(f,void 0),ts(f,e.mechanism)),f.extra={...f.extra,arguments:s},f)),q4(l)}),l}};try{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(a[s]=t[s])}catch{}c2(a,t),Ui(t,"__sentry_wrapped__",a);try{Object.getOwnPropertyDescriptor(a,"name").configurable&&Object.defineProperty(a,"name",{get(){return t.name}})}catch{}return a}const Le=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function x1(t,e){const r=C1(t,e),a={type:e&&e.name,value:IS(e)};return r.length&&(a.stacktrace={frames:r}),a.type===void 0&&a.value===""&&(a.value="Unrecoverable error caught"),a}function MS(t,e,r,a){const s=it(),l=s&&s.getOptions().normalizeDepth,u=BS(e),f={__serialized__:y2(e,l)};if(u)return{exception:{values:[x1(t,u)]},extra:f};const d={exception:{values:[{type:Xc(e)?e.constructor.name:a?"UnhandledRejection":"Error",value:zS(e,{isUnhandledRejection:a})}]},extra:f};if(r){const h=C1(t,r);h.length&&(d.exception.values[0].stacktrace={frames:h})}return d}function Id(t,e){return{exception:{values:[x1(t,e)]}}}function C1(t,e){const r=e.stacktrace||e.stack||"",a=$S(e),s=US(e);try{return t(r,a,s)}catch{}return[]}const LS=/Minified React error #\d+;/i;function $S(t){return t&&LS.test(t.message)?1:0}function US(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function IS(t){const e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function PS(t,e,r,a){const s=r&&r.syntheticException||void 0,l=T1(t,e,s,a);return ts(l),l.level="error",r&&r.event_id&&(l.event_id=r.event_id),Pi(l)}function HS(t,e,r="info",a,s){const l=a&&a.syntheticException||void 0,u=qh(t,e,l,s);return u.level=r,a&&a.event_id&&(u.event_id=a.event_id),Pi(u)}function T1(t,e,r,a,s){let l;if(a2(e)&&e.error)return Id(t,e.error);if(Gm(e)||G3(e)){const u=e;if("stack"in e)l=Id(t,e);else{const f=u.name||(Gm(u)?"DOMError":"DOMException"),d=u.message?`${f}: ${u.message}`:f;l=qh(t,d,r,a),Mh(l,d)}return"code"in u&&(l.tags={...l.tags,"DOMException.code":`${u.code}`}),l}return v1(e)?Id(t,e):es(e)||Xc(e)?(l=MS(t,e,r,s),ts(l,{synthetic:!0}),l):(l=qh(t,e,r,a),Mh(l,`${e}`),ts(l,{synthetic:!0}),l)}function qh(t,e,r,a){const s={};if(a&&r){const l=C1(t,r);l.length&&(s.exception={values:[{value:e,stacktrace:{frames:l}}]})}if(_1(e)){const{__sentry_template_string__:l,__sentry_template_values__:u}=e;return s.logentry={message:l,params:u},s}return s.message=e,s}function zS(t,{isUnhandledRejection:e}){const r=u8(t),a=e?"promise rejection":"exception";return a2(t)?`Event \`ErrorEvent\` captured as ${a} with message \`${t.message}\``:Xc(t)?`Event \`${qS(t)}\` (type=${t.type}) captured as ${a}`:`Object captured as ${a} with keys: ${r}`}function qS(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function BS(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const r=t[e];if(r instanceof Error)return r}}function VS(t,{metadata:e,tunnel:r,dsn:a}){const s={event_id:t.event_id,sent_at:new Date().toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!r&&!!a&&{dsn:Wc(a)}},l=GS(t);return Fo(s,[l])}function GS(t){return[{type:"user_report"},t]}class KS extends W4{constructor(e){const r={parentSpanIsAlwaysRootSpan:!0,...e},a=Ce.SENTRY_SDK_SOURCE||w8();O2(r,"browser",["browser"],a),super(r),r.sendClientReports&&Ce.document&&Ce.document.addEventListener("visibilitychange",()=>{Ce.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,r){return PS(this._options.stackParser,e,r,this._options.attachStacktrace)}eventFromMessage(e,r="info",a){return HS(this._options.stackParser,e,r,a,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){Le&&ce.warn("SDK not enabled, will not capture user feedback.");return}const r=VS(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(r)}_prepareEvent(e,r,a){return e.platform=e.platform||"javascript",super._prepareEvent(e,r,a)}}const FS=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Tt=ke,YS=1e3;let wv,Bh,Vh;function XS(t){const e="dom";qi(e,t),Bi(e,ZS)}function ZS(){if(!Tt.document)return;const t=Sn.bind(null,"dom"),e=xv(t,!0);Tt.document.addEventListener("click",e,!1),Tt.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(r=>{const a=Tt[r]&&Tt[r].prototype;!a||!a.hasOwnProperty||!a.hasOwnProperty("addEventListener")||(Wt(a,"addEventListener",function(s){return function(l,u,f){if(l==="click"||l=="keypress")try{const d=this,h=d.__sentry_instrumentation_handlers__=d.__sentry_instrumentation_handlers__||{},g=h[l]=h[l]||{refCount:0};if(!g.handler){const m=xv(t);g.handler=m,s.call(this,l,m,f)}g.refCount++}catch{}return s.call(this,l,u,f)}}),Wt(a,"removeEventListener",function(s){return function(l,u,f){if(l==="click"||l=="keypress")try{const d=this,h=d.__sentry_instrumentation_handlers__||{},g=h[l];g&&(g.refCount--,g.refCount<=0&&(s.call(this,l,g.handler,f),g.handler=void 0,delete h[l]),Object.keys(h).length===0&&delete d.__sentry_instrumentation_handlers__)}catch{}return s.call(this,l,u,f)}}))})}function JS(t){if(t.type!==Bh)return!1;try{if(!t.target||t.target._sentryId!==Vh)return!1}catch{}return!0}function QS(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function xv(t,e=!1){return r=>{if(!r||r._sentryCaptured)return;const a=WS(r);if(QS(r.type,a))return;Ui(r,"_sentryCaptured",!0),a&&!a._sentryId&&Ui(a,"_sentryId",It());const s=r.type==="keypress"?"input":r.type;JS(r)||(t({event:r,name:s,global:e}),Bh=r.type,Vh=a?a._sentryId:void 0),clearTimeout(wv),wv=Tt.setTimeout(()=>{Vh=void 0,Bh=void 0},YS)}}function WS(t){try{return t.target}catch{return null}}let _c;function j2(t){const e="history";qi(e,t),Bi(e,e7)}function e7(){if(!Y8())return;const t=Tt.onpopstate;Tt.onpopstate=function(...r){const a=Tt.location.href,s=_c;if(_c=a,Sn("history",{from:s,to:a}),t)try{return t.apply(this,r)}catch{}};function e(r){return function(...a){const s=a.length>2?a[2]:void 0;if(s){const l=_c,u=String(s);_c=u,Sn("history",{from:l,to:u})}return r.apply(this,a)}}Wt(Tt.history,"pushState",e),Wt(Tt.history,"replaceState",e)}const Dc={};function t7(t){const e=Dc[t];if(e)return e;let r=Tt[t];if(kh(r))return Dc[t]=r.bind(Tt);const a=Tt.document;if(a&&typeof a.createElement=="function")try{const s=a.createElement("iframe");s.hidden=!0,a.head.appendChild(s);const l=s.contentWindow;l&&l[t]&&(r=l[t]),a.head.removeChild(s)}catch(s){FS&&ce.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,s)}return r&&(Dc[t]=r.bind(Tt))}function Cv(t){Dc[t]=void 0}const Za="__sentry_xhr_v3__";function k2(t){const e="xhr";qi(e,t),Bi(e,n7)}function n7(){if(!Tt.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,r,a){const s=pn()*1e3,l=ir(a[0])?a[0].toUpperCase():void 0,u=r7(a[1]);if(!l||!u)return e.apply(r,a);r[Za]={method:l,url:u,request_headers:{}},l==="POST"&&u.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const f=()=>{const d=r[Za];if(d&&r.readyState===4){try{d.status_code=r.status}catch{}const h={endTimestamp:pn()*1e3,startTimestamp:s,xhr:r};Sn("xhr",h)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(d,h,g){return f(),d.apply(h,g)}}):r.addEventListener("readystatechange",f),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(d,h,g){const[m,_]=g,y=h[Za];return y&&ir(m)&&ir(_)&&(y.request_headers[m.toLowerCase()]=_),d.apply(h,g)}}),e.apply(r,a)}}),t.send=new Proxy(t.send,{apply(e,r,a){const s=r[Za];if(!s)return e.apply(r,a);a[0]!==void 0&&(s.body=a[0]);const l={startTimestamp:pn()*1e3,xhr:r};return Sn("xhr",l),e.apply(r,a)}})}function r7(t){if(ir(t))return t;try{return t.toString()}catch{}}function i7(t,e=t7("fetch")){let r=0,a=0;function s(l){const u=l.body.length;r+=u,a++;const f={body:l.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:r<=6e4&&a<15,...t.fetchOptions};if(!e)return Cv("fetch"),Nc("No fetch implementation available");try{return e(t.url,f).then(d=>(r-=u,a--,{statusCode:d.status,headers:{"x-sentry-rate-limits":d.headers.get("X-Sentry-Rate-Limits"),"retry-after":d.headers.get("Retry-After")}}))}catch(d){return Cv("fetch"),r-=u,a--,Nc(d)}}return aS(t,s)}const a7=30,s7=50;function Gh(t,e,r,a){const s={filename:t,function:e===""?Ii:e,in_app:!0};return r!==void 0&&(s.lineno=r),a!==void 0&&(s.colno=a),s}const o7=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,l7=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,c7=/\((\S*)(?::(\d+))(?::(\d+))\)/,u7=t=>{const e=o7.exec(t);if(e){const[,a,s,l]=e;return Gh(a,Ii,+s,+l)}const r=l7.exec(t);if(r){if(r[2]&&r[2].indexOf("eval")===0){const u=c7.exec(r[2]);u&&(r[2]=u[1],r[3]=u[2],r[4]=u[3])}const[s,l]=N2(r[1]||Ii,r[2]);return Gh(l,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},f7=[a7,u7],d7=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,h7=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,p7=t=>{const e=d7.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const l=h7.exec(e[3]);l&&(e[1]=e[1]||"eval",e[3]=l[1],e[4]=l[2],e[5]="")}let a=e[3],s=e[1]||Ii;return[s,a]=N2(s,a),Gh(a,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},g7=[s7,p7],m7=[f7,g7],v7=d2(...m7),N2=(t,e)=>{const r=t.indexOf("safari-extension")!==-1,a=t.indexOf("safari-web-extension")!==-1;return r||a?[t.indexOf("@")!==-1?t.split("@")[0]:Ii,r?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},yc=1024,_7="Breadcrumbs",y7=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:_7,setup(r){e.console&&p8(w7(r)),e.dom&&XS(E7(r,e.dom)),e.xhr&&k2(x7(r)),e.fetch&&m2(C7(r)),e.history&&j2(T7(r)),e.sentry&&r.on("beforeSendEvent",S7(r))}}},b7=y7;function S7(t){return function(r){it()===t&&zi({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:Hr(r)},{event:r})}}function E7(t,e){return function(a){if(it()!==t)return;let s,l,u=typeof e=="object"?e.serializeAttribute:void 0,f=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;f&&f>yc&&(Le&&ce.warn(`\`dom.maxStringLength\` cannot exceed ${yc}, but a value of ${f} was configured. Sentry will use ${yc} instead.`),f=yc),typeof u=="string"&&(u=[u]);try{const h=a.event,g=O7(h)?h.target:h;s=o2(g,{keyAttrs:u,maxStringLength:f}),l=t8(g)}catch{s=""}if(s.length===0)return;const d={category:`ui.${a.name}`,message:s};l&&(d.data={"ui.component_name":l}),zi(d,{event:a.event,name:a.name,global:a.global})}}function w7(t){return function(r){if(it()!==t)return;const a={category:"console",data:{arguments:r.args,logger:"console"},level:j8(r.level),message:Km(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)a.message=`Assertion failed: ${Km(r.args.slice(1)," ")||"console.assert"}`,a.data.arguments=r.args.slice(1);else return;zi(a,{input:r.args,level:r.level})}}function x7(t){return function(r){if(it()!==t)return;const{startTimestamp:a,endTimestamp:s}=r,l=r.xhr[Za];if(!a||!s||!l)return;const{method:u,url:f,status_code:d,body:h}=l,g={method:u,url:f,status_code:d},m={xhr:r.xhr,input:h,startTimestamp:a,endTimestamp:s};zi({category:"xhr",data:g,type:"http"},m)}}function C7(t){return function(r){if(it()!==t)return;const{startTimestamp:a,endTimestamp:s}=r;if(s&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.error){const l=r.fetchData,u={data:r.error,input:r.args,startTimestamp:a,endTimestamp:s};zi({category:"fetch",data:l,level:"error",type:"http"},u)}else{const l=r.response,u={...r.fetchData,status_code:l&&l.status},f={input:r.args,response:l,startTimestamp:a,endTimestamp:s};zi({category:"fetch",data:u,type:"http"},f)}}}function T7(t){return function(r){if(it()!==t)return;let a=r.from,s=r.to;const l=Ud(Ce.location.href);let u=a?Ud(a):void 0;const f=Ud(s);(!u||!u.path)&&(u=l),l.protocol===f.protocol&&l.host===f.host&&(s=f.relative),l.protocol===u.protocol&&l.host===u.host&&(a=u.relative),zi({category:"navigation",data:{from:a,to:s}})}}function O7(t){return!!t&&!!t.target}const A7=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],R7="BrowserApiErrors",D7=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:R7,setupOnce(){e.setTimeout&&Wt(Ce,"setTimeout",Tv),e.setInterval&&Wt(Ce,"setInterval",Tv),e.requestAnimationFrame&&Wt(Ce,"requestAnimationFrame",k7),e.XMLHttpRequest&&"XMLHttpRequest"in Ce&&Wt(XMLHttpRequest.prototype,"send",N7);const r=e.eventTarget;r&&(Array.isArray(r)?r:A7).forEach(M7)}}},j7=D7;function Tv(t){return function(...e){const r=e[0];return e[0]=is(r,{mechanism:{data:{function:Gr(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function k7(t){return function(e){return t.apply(this,[is(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Gr(t)},handled:!1,type:"instrument"}})])}}function N7(t){return function(...e){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in r&&typeof r[s]=="function"&&Wt(r,s,function(l){const u={mechanism:{data:{function:s,handler:Gr(l)},handled:!1,type:"instrument"}},f=S1(l);return f&&(u.mechanism.data.handler=Gr(f)),is(l,u)})}),t.apply(this,e)}}function M7(t){const e=Ce,r=e[t]&&e[t].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Wt(r,"addEventListener",function(a){return function(s,l,u){try{typeof l.handleEvent=="function"&&(l.handleEvent=is(l.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Gr(l),target:t},handled:!1,type:"instrument"}}))}catch{}return a.apply(this,[s,is(l,{mechanism:{data:{function:"addEventListener",handler:Gr(l),target:t},handled:!1,type:"instrument"}}),u])}}),Wt(r,"removeEventListener",function(a){return function(s,l,u){const f=l;try{const d=f&&f.__sentry_wrapped__;d&&a.call(this,s,d,u)}catch{}return a.call(this,s,f,u)}}))}const L7="GlobalHandlers",$7=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:L7,setupOnce(){Error.stackTraceLimit=50},setup(r){e.onerror&&(I7(r),Ov("onerror")),e.onunhandledrejection&&(P7(r),Ov("onunhandledrejection"))}}},U7=$7;function I7(t){y8(e=>{const{stackParser:r,attachStacktrace:a}=M2();if(it()!==t||D2())return;const{msg:s,url:l,line:u,column:f,error:d}=e,h=q7(T1(r,d||s,void 0,a,!1),l,u,f);h.level="error",nu(h,{originalException:d,mechanism:{handled:!1,type:"onerror"}})})}function P7(t){S8(e=>{const{stackParser:r,attachStacktrace:a}=M2();if(it()!==t||D2())return;const s=H7(e),l=y1(s)?z7(s):T1(r,s,void 0,a,!0);l.level="error",nu(l,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function H7(t){if(y1(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function z7(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function q7(t,e,r,a){const s=t.exception=t.exception||{},l=s.values=s.values||[],u=l[0]=l[0]||{},f=u.stacktrace=u.stacktrace||{},d=f.frames=f.frames||[],h=isNaN(parseInt(a,10))?void 0:a,g=isNaN(parseInt(r,10))?void 0:r,m=ir(e)&&e.length>0?e:e8();return d.length===0&&d.push({colno:h,filename:m,function:Ii,in_app:!0,lineno:g}),t}function Ov(t){Le&&ce.log(`Global Handler attached: ${t}`)}function M2(){const t=it();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const B7=()=>({name:"HttpContext",preprocessEvent(t){if(!Ce.navigator&&!Ce.location&&!Ce.document)return;const e=t.request&&t.request.url||Ce.location&&Ce.location.href,{referrer:r}=Ce.document||{},{userAgent:a}=Ce.navigator||{},s={...t.request&&t.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},l={...t.request,...e&&{url:e},headers:s};t.request=l}}),V7="cause",G7=5,K7="LinkedErrors",F7=(t={})=>{const e=t.limit||G7,r=t.key||V7;return{name:K7,preprocessEvent(a,s,l){const u=l.getOptions();Z3(x1,u.stackParser,u.maxValueLength,r,e,a,s)}}},Y7=F7;function X7(t){return[mS(),dS(),j7(),b7(),U7(),Y7(),RS(),B7()]}function Z7(t={}){const e={defaultIntegrations:X7(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Ce.SENTRY_RELEASE&&Ce.SENTRY_RELEASE.id?Ce.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return t.defaultIntegrations==null&&delete t.defaultIntegrations,{...e,...t}}function J7(){const t=typeof Ce.window<"u"&&Ce;if(!t)return!1;const e=t.chrome?"chrome":"browser",r=t[e],a=r&&r.runtime&&r.runtime.id,s=Ce.location&&Ce.location.href||"",l=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],u=!!a&&Ce===Ce.top&&l.some(d=>s.startsWith(`${d}//`)),f=typeof t.nw<"u";return!!a&&!u&&!f}function Q7(t={}){const e=Z7(t);if(J7()){Go(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}Le&&(h2()||ce.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const r={...e,stackParser:d8(e.stackParser||v7),integrations:J4(e),transport:e.transport||i7},a=nS(KS,r);return e.autoSessionTracking&&W7(),a}function W7(){if(typeof Ce.document>"u"){Le&&ce.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}hv({ignoreDuration:!0}),pv(),j2(({from:t,to:e})=>{t!==void 0&&t!==e&&(hv({ignoreDuration:!0}),pv())})}const e6="HttpClient",t6=(t={})=>{const e={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...t};return{name:e6,setup(r){u6(r,e),f6(r,e)}}},n6=t6;function r6(t,e,r,a){if($2(t,r.status,r.url)){const s=d6(e,a);let l,u,f,d;I2()&&([l,f]=Av("Cookie",s),[u,d]=Av("Set-Cookie",r));const h=U2({url:s.url,method:s.method,status:r.status,requestHeaders:l,responseHeaders:u,requestCookies:f,responseCookies:d});nu(h)}}function Av(t,e){const r=s6(e.headers);let a;try{const s=r[t]||r[t.toLowerCase()]||void 0;s&&(a=L2(s))}catch{Le&&ce.log(`Could not extract cookies from header ${t}`)}return[r,a]}function i6(t,e,r,a){if($2(t,e.status,e.responseURL)){let s,l,u;if(I2()){try{const d=e.getResponseHeader("Set-Cookie")||e.getResponseHeader("set-cookie")||void 0;d&&(l=L2(d))}catch{Le&&ce.log("Could not extract cookies from response headers")}try{u=o6(e)}catch{Le&&ce.log("Could not extract headers from response")}s=a}const f=U2({url:e.responseURL,method:r,status:e.status,requestHeaders:s,responseHeaders:u,responseCookies:l});nu(f)}}function a6(t){if(t){const e=t["Content-Length"]||t["content-length"];if(e)return parseInt(e,10)}}function L2(t){return t.split("; ").reduce((e,r)=>{const[a,s]=r.split("=");return a&&s&&(e[a]=s),e},{})}function s6(t){const e={};return t.forEach((r,a)=>{e[a]=r}),e}function o6(t){const e=t.getAllResponseHeaders();return e?e.split(`\r +`).reduce((r,a)=>{const[s,l]=a.split(": ");return s&&l&&(r[s]=l),r},{}):{}}function l6(t,e){return t.some(r=>typeof r=="string"?e.includes(r):r.test(e))}function c6(t,e){return t.some(r=>typeof r=="number"?r===e:e>=r[0]&&e<=r[1])}function u6(t,e){p2()&&m2(r=>{if(it()!==t)return;const{response:a,args:s}=r,[l,u]=s;a&&r6(e,l,a,u)})}function f6(t,e){"XMLHttpRequest"in ke&&k2(r=>{if(it()!==t)return;const a=r.xhr,s=a[Za];if(!s)return;const{method:l,request_headers:u}=s;try{i6(e,a,l,u)}catch(f){Le&&ce.warn("Error while extracting response event form XHR response",f)}})}function $2(t,e,r){return c6(t.failedRequestStatusCodes,e)&&l6(t.failedRequestTargets,r)&&!sS(r,it())}function U2(t){const e=`HTTP Client Error with status code: ${t.status}`,r={message:e,exception:{values:[{type:"Error",value:e}]},request:{url:t.url,method:t.method,headers:t.requestHeaders,cookies:t.requestCookies},contexts:{response:{status_code:t.status,headers:t.responseHeaders,cookies:t.responseCookies,body_size:a6(t.responseHeaders)}}};return ts(r,{type:"http.client",handled:!1}),r}function d6(t,e){return!e&&t instanceof Request||t instanceof Request&&t.bodyUsed?t:new Request(t,e)}function I2(){const t=it();return t?!!t.getOptions().sendDefaultPii:!1}const Rv=1e6,jc=String(0),h6="main";let P2="",H2="",z2="",Kh=Ce.navigator&&Ce.navigator.userAgent||"",q2="";const p6=Ce.navigator&&Ce.navigator.language||Ce.navigator&&Ce.navigator.languages&&Ce.navigator.languages[0]||"";function g6(t){return typeof t=="object"&&t!==null&&"getHighEntropyValues"in t}const Dv=Ce.navigator&&Ce.navigator.userAgentData;g6(Dv)&&Dv.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(t=>{if(P2=t.platform||"",z2=t.architecture||"",q2=t.model||"",H2=t.platformVersion||"",t.fullVersionList&&t.fullVersionList.length>0){const e=t.fullVersionList[t.fullVersionList.length-1];Kh=`${e.brand} ${e.version}`}}).catch(t=>{});function m6(t){return!("thread_metadata"in t)}function v6(t){return m6(t)?b6(t):t}function _6(t){const e=t&&t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id;return typeof e=="string"&&e.length!==32&&Le&&ce.log(`[Profiling] Invalid traceId: ${e} on profiled event`),typeof e!="string"?"":e}function y6(t,e,r,a){if(a.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(r==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${r} instead.`);const s=_6(a),l=v6(r),u=e||(typeof a.start_timestamp=="number"?a.start_timestamp*1e3:pn()*1e3),f=typeof a.timestamp=="number"?a.timestamp*1e3:pn()*1e3;return{event_id:t,timestamp:new Date(u).toISOString(),platform:"javascript",version:"1",release:a.release||"",environment:a.environment||tu,runtime:{name:"javascript",version:Ce.navigator.userAgent},os:{name:P2,version:H2,build_number:Kh},device:{locale:p6,model:q2,manufacturer:Kh,architecture:z2,is_emulator:!1},debug_meta:{images:w6(r.resources)},profile:l,transactions:[{name:a.transaction||"",id:a.event_id||It(),trace_id:s,active_thread_id:jc,relative_start_ns:"0",relative_end_ns:((f-u)*1e6).toFixed(0)}]}}function B2(t){return rr(t).op==="pageload"}function b6(t){let e,r=0;const a={samples:[],stacks:[],frames:[],thread_metadata:{[jc]:{name:h6}}},s=t.samples[0];if(!s)return a;const l=s.timestamp,u=typeof performance.timeOrigin=="number"?performance.timeOrigin:tv||0,f=u-(tv||u);return t.samples.forEach((d,h)=>{if(d.stackId===void 0){e===void 0&&(e=r,a.stacks[e]=[],r++),a.samples[h]={elapsed_since_start_ns:((d.timestamp+f-l)*Rv).toFixed(0),stack_id:e,thread_id:jc};return}let g=t.stacks[d.stackId];const m=[];for(;g;){m.push(g.frameId);const y=t.frames[g.frameId];y&&a.frames[g.frameId]===void 0&&(a.frames[g.frameId]={function:y.name,abs_path:typeof y.resourceId=="number"?t.resources[y.resourceId]:void 0,lineno:y.line,colno:y.column}),g=g.parentId===void 0?void 0:t.stacks[g.parentId]}const _={elapsed_since_start_ns:((d.timestamp+f-l)*Rv).toFixed(0),stack_id:r,thread_id:jc};a.stacks[r]=m,a.samples[h]=_,r++}),a}function S6(t,e){if(!e.length)return t;for(const r of e)t[1].push([{type:"profile"},r]);return t}function E6(t){const e=[];return $h(t,(r,a)=>{if(a==="transaction")for(let s=1;s{let m;const _=l.get(g);_?m=_:(m=s(g),l.set(g,m));for(let y=m.length-1;y>=0;y--){const b=m[y],S=b&&b.filename;if(b&&S){h[S]=e[g];break}}return h},{}),d=[];for(const h of t)h&&f[h]&&d.push({type:"sourcemap",code_file:h,debug_id:f[h]});return d}function x6(t){return typeof t!="number"&&typeof t!="boolean"||typeof t=="number"&&isNaN(t)?(Le&&ce.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`),!1):t===!0||t===!1?!0:t<0||t>1?(Le&&ce.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${t}.`),!1):!0}function C6(t){return t.samples.length<2?(Le&&ce.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):t.frames.length?!0:(Le&&ce.log("[Profiling] Discarding profile because it contains no frames"),!1)}let V2=!1;const G2=3e4;function T6(t){return typeof t=="function"}function O6(){const t=Ce.Profiler;if(!T6(t)){Le&&ce.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const e=10,r=Math.floor(G2/e);try{return new t({sampleInterval:e,maxBufferSize:r})}catch{Le&&(ce.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),ce.log("[Profiling] Disabling profiling for current user session.")),V2=!0}}function kv(t){if(V2)return Le&&ce.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!t.isRecording())return Le&&ce.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const e=it(),r=e&&e.getOptions();if(!r)return Le&&ce.log("[Profiling] Profiling disabled, no options found."),!1;const a=r.profilesSampleRate;return x6(a)?a?(a===!0?!0:Math.random()30){const r=Ni.keys().next().value;Ni.delete(r)}}function Nv(t){let e;B2(t)&&(e=pn()*1e3);const r=O6();if(!r)return;Le&&ce.log(`[Profiling] started profiling span: ${rr(t).description}`);const a=It();jn().setContext("profile",{profile_id:a,start_timestamp:e});async function s(){if(t&&r)return r.stop().then(d=>{if(l&&(Ce.clearTimeout(l),l=void 0),Le&&ce.log(`[Profiling] stopped profiling of span: ${rr(t).description}`),!d){Le&&ce.log(`[Profiling] profiler returned null profile for: ${rr(t).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}j6(a,d)}).catch(d=>{Le&&ce.log("[Profiling] error while stopping profiler:",d)})}let l=Ce.setTimeout(()=>{Le&&ce.log("[Profiling] max profile duration elapsed, stopping profiling for:",rr(t).description),s()},G2);const u=t.end.bind(t);function f(){return t?(s().then(()=>{u()},()=>{u()}),t):u()}t.end=f}const k6="BrowserProfiling",N6=()=>({name:k6,setup(t){const e=E4(),r=e&&Mc(e);r&&B2(r)&&kv(r)&&Nv(r),t.on("spanStart",a=>{a===Mc(a)&&kv(a)&&Nv(a)}),t.on("beforeEnvelope",a=>{if(!R6())return;const s=E6(a);if(!s.length)return;const l=[];for(const u of s){const f=u&&u.contexts,d=f&&f.profile&&f.profile.profile_id,h=f&&f.profile&&f.profile.start_timestamp;if(typeof d!="string"){Le&&ce.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!d){Le&&ce.log("[Profiling] cannot find profile for a span without a profile context");continue}f&&f.profile&&delete f.profile;const g=D6(d);if(!g){Le&&ce.log(`[Profiling] Could not retrieve profile for span: ${d}`);continue}const m=A6(d,h,g,u);m&&l.push(m)}S6(a,l)})}}),M6=N6;var Pd={exports:{}},we={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Mv;function L6(){if(Mv)return we;Mv=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.iterator;function _(j){return j===null||typeof j!="object"?null:(j=m&&j[m]||j["@@iterator"],typeof j=="function"?j:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,S={};function w(j,H,ee){this.props=j,this.context=H,this.refs=S,this.updater=ee||y}w.prototype.isReactComponent={},w.prototype.setState=function(j,H){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,H,"setState")},w.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function R(){}R.prototype=w.prototype;function T(j,H,ee){this.props=j,this.context=H,this.refs=S,this.updater=ee||y}var D=T.prototype=new R;D.constructor=T,b(D,w.prototype),D.isPureReactComponent=!0;var N=Array.isArray,A={H:null,A:null,T:null,S:null,V:null},k=Object.prototype.hasOwnProperty;function U(j,H,ee,ne,re,de){return ee=de.ref,{$$typeof:t,type:j,key:H,ref:ee!==void 0?ee:null,props:de}}function I(j,H){return U(j.type,H,void 0,void 0,void 0,j.props)}function z(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function Z(j){var H={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(ee){return H[ee]})}var q=/\/+/g;function te(j,H){return typeof j=="object"&&j!==null&&j.key!=null?Z(""+j.key):H.toString(36)}function ue(){}function he(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(ue,ue):(j.status="pending",j.then(function(H){j.status==="pending"&&(j.status="fulfilled",j.value=H)},function(H){j.status==="pending"&&(j.status="rejected",j.reason=H)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function ae(j,H,ee,ne,re){var de=typeof j;(de==="undefined"||de==="boolean")&&(j=null);var oe=!1;if(j===null)oe=!0;else switch(de){case"bigint":case"string":case"number":oe=!0;break;case"object":switch(j.$$typeof){case t:case e:oe=!0;break;case g:return oe=j._init,ae(oe(j._payload),H,ee,ne,re)}}if(oe)return re=re(j),oe=ne===""?"."+te(j,0):ne,N(re)?(ee="",oe!=null&&(ee=oe.replace(q,"$&/")+"/"),ae(re,H,ee,"",function(me){return me})):re!=null&&(z(re)&&(re=I(re,ee+(re.key==null||j&&j.key===re.key?"":(""+re.key).replace(q,"$&/")+"/")+oe)),H.push(re)),1;oe=0;var le=ne===""?".":ne+":";if(N(j))for(var se=0;se=t.LogLevel.Info&&console.info(r,...l(d))}static debug(...d){u.level>=t.LogLevel.Debug&&console.debug(e,...l(d))}static warn(...d){u.level>=t.LogLevel.Warn&&console.warn(a,...l(d))}static error(...d){u.level>=t.LogLevel.Error&&console.error(s,...l(d))}}t.Log=u,u.level=t.LogLevel.Warn}(zd)),zd}var Uv;function Vr(){return Uv||(Uv=1,function(t){var e,r,a;Object.defineProperty(t,"__esModule",{value:!0}),t._getInstance=t._getStatsigGlobalFlag=t._getStatsigGlobal=void 0;const s=jt(),l=()=>{try{return typeof __STATSIG__<"u"?__STATSIG__:_}catch{return _}};t._getStatsigGlobal=l;const u=y=>(0,t._getStatsigGlobal)()[y];t._getStatsigGlobalFlag=u;const f=y=>{const b=(0,t._getStatsigGlobal)();return y?b.instances&&b.instances[y]:(b.instances&&Object.keys(b.instances).length>1&&s.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),b.firstInstance)};t._getInstance=f;const d="__STATSIG__",h=typeof window<"u"?window:{},g=typeof qm<"u"?qm:{},m=typeof globalThis<"u"?globalThis:{},_=(a=(r=(e=h[d])!==null&&e!==void 0?e:g[d])!==null&&r!==void 0?r:m[d])!==null&&a!==void 0?a:{instance:t._getInstance};h[d]=_,g[d]=_,m[d]=_}(Hd)),Hd}var qd={},Iv;function Fh(){return Iv||(Iv=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Diagnostics=void 0;const e=new Map,r="start",a="end",s="statsig::diagnostics";t.Diagnostics={_getMarkers:h=>e.get(h),_markInitOverallStart:h=>{f(h,l({},r,"overall"))},_markInitOverallEnd:(h,g,m)=>{f(h,l({success:g,error:g?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:m},a,"overall"))},_markInitNetworkReqStart:(h,g)=>{f(h,l(g,r,"initialize","network_request"))},_markInitNetworkReqEnd:(h,g)=>{f(h,l(g,a,"initialize","network_request"))},_markInitProcessStart:h=>{f(h,l({},r,"initialize","process"))},_markInitProcessEnd:(h,g)=>{f(h,l(g,a,"initialize","process"))},_clearMarkers:h=>{e.delete(h)},_formatError(h){if(h&&typeof h=="object")return{code:d(h,"code"),name:d(h,"name"),message:d(h,"message")}},_getDiagnosticsData(h,g,m,_){var y;return{success:(h==null?void 0:h.ok)===!0,statusCode:h==null?void 0:h.status,sdkRegion:(y=h==null?void 0:h.headers)===null||y===void 0?void 0:y.get("x-statsig-region"),isDelta:m.includes('"is_delta":true')===!0?!0:void 0,attempt:g,error:t.Diagnostics._formatError(_)}},_enqueueDiagnosticsEvent(h,g,m,_){const y=t.Diagnostics._getMarkers(m);if(y==null||y.length<=0)return-1;const b=y[y.length-1].timestamp-y[0].timestamp;t.Diagnostics._clearMarkers(m);const S=u(h,{context:"initialize",markers:y.slice(),statsigOptions:_});return g.enqueue(S),b}};function l(h,g,m,_){return Object.assign({key:m,action:g,step:_,timestamp:Date.now()},h)}function u(h,g){return{eventName:s,user:h,value:null,metadata:g,time:Date.now()}}function f(h,g){var m;const _=(m=e.get(h))!==null&&m!==void 0?m:[];_.push(g),e.set(h,_)}function d(h,g){if(g in h)return h[g]}}(qd)),qd}var hi={},pi={},Bd={},gi={},Pv;function O1(){if(Pv)return gi;Pv=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi._isTypeMatch=gi._typeOf=void 0;function t(r){return Array.isArray(r)?"array":typeof r}gi._typeOf=t;function e(r,a){const s=l=>Array.isArray(l)?"array":typeof l;return s(r)===s(a)}return gi._isTypeMatch=e,gi}var Hv;function fs(){return Hv||(Hv=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t._getSortedObject=t._DJB2Object=t._DJB2=void 0;const e=O1(),r=l=>{let u=0;for(let f=0;f>>0)};t._DJB2=r;const a=(l,u)=>(0,t._DJB2)(JSON.stringify((0,t._getSortedObject)(l,u)));t._DJB2Object=a;const s=(l,u)=>{if(l==null)return null;const f=Object.keys(l).sort(),d={};return f.forEach(h=>{const g=l[h];if(u===0||(0,e._typeOf)(g)!=="object"){d[h]=g;return}d[h]=(0,t._getSortedObject)(g,u!=null?u-1:u)}),d};t._getSortedObject=s}(Bd)),Bd}var zv;function ru(){if(zv)return pi;zv=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi._getStorageKey=pi._getUserStorageKey=void 0;const t=fs();function e(a,s,l){var u;if(l)return l(a,s);const f=s&&s.customIDs?s.customIDs:{},d=[`uid:${(u=s==null?void 0:s.userID)!==null&&u!==void 0?u:""}`,`cids:${Object.keys(f).sort((h,g)=>h.localeCompare(g)).map(h=>`${h}-${f[h]}`).join(",")}`,`k:${a}`];return(0,t._DJB2)(d.join("|"))}pi._getUserStorageKey=e;function r(a,s,l){return s?e(a,s,l):(0,t._DJB2)(`k:${a}`)}return pi._getStorageKey=r,pi}var Vd={},qv;function iu(){return qv||(qv=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkParam=t.NetworkDefault=t.Endpoint=void 0,t.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},t.NetworkDefault={[t.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[t.Endpoint._initialize]:"https://featureassets.org/v1",[t.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},t.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}}(Vd)),Vd}var Gd={},Bv;function Gi(){return Bv||(Bv=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t._getUnloadEvent=t._getCurrentPageUrlSafe=t._addDocumentEventListenerSafe=t._addWindowEventListenerSafe=t._isServerEnv=t._getDocumentSafe=t._getWindowSafe=void 0;const e=()=>typeof window<"u"?window:null;t._getWindowSafe=e;const r=()=>{var d;const h=(0,t._getWindowSafe)();return(d=h==null?void 0:h.document)!==null&&d!==void 0?d:null};t._getDocumentSafe=r;const a=()=>{if((0,t._getDocumentSafe)()!==null)return!1;const d=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;return typeof EdgeRuntime=="string"||d};t._isServerEnv=a;const s=(d,h)=>{const g=(0,t._getWindowSafe)();typeof(g==null?void 0:g.addEventListener)=="function"&&g.addEventListener(d,h)};t._addWindowEventListenerSafe=s;const l=(d,h)=>{const g=(0,t._getDocumentSafe)();typeof(g==null?void 0:g.addEventListener)=="function"&&g.addEventListener(d,h)};t._addDocumentEventListenerSafe=l;const u=()=>{var d;try{return(d=(0,t._getWindowSafe)())===null||d===void 0?void 0:d.location.href.split(/[?#]/)[0]}catch{return}};t._getCurrentPageUrlSafe=u;const f=()=>{const d=(0,t._getWindowSafe)();return d&&"onpagehide"in d?"pagehide":"beforeunload"};t._getUnloadEvent=f}(Gd)),Gd}var Zt={},Vv;function K2(){if(Vv)return Zt;Vv=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt._createLayerParameterExposure=Zt._createConfigExposure=Zt._mapExposures=Zt._createGateExposure=Zt._isExposureEvent=void 0;const t="statsig::config_exposure",e="statsig::gate_exposure",r="statsig::layer_exposure",a=(g,m,_,y,b)=>(_.bootstrapMetadata&&(y.bootstrapMetadata=_.bootstrapMetadata),{eventName:g,user:m,value:null,metadata:h(_,y),secondaryExposures:b,time:Date.now()}),s=({eventName:g})=>g===e||g===t||g===r;Zt._isExposureEvent=s;const l=(g,m,_)=>{var y,b,S;const w={gate:m.name,gateValue:String(m.value),ruleID:m.ruleID};return((y=m.__evaluation)===null||y===void 0?void 0:y.version)!=null&&(w.configVersion=m.__evaluation.version),a(e,g,m.details,w,u((S=(b=m.__evaluation)===null||b===void 0?void 0:b.secondary_exposures)!==null&&S!==void 0?S:[],_))};Zt._createGateExposure=l;function u(g,m){return g.map(_=>typeof _=="string"?(m??{})[_]:_).filter(_=>_!=null)}Zt._mapExposures=u;const f=(g,m,_)=>{var y,b,S,w;const R={config:m.name,ruleID:m.ruleID};return((y=m.__evaluation)===null||y===void 0?void 0:y.version)!=null&&(R.configVersion=m.__evaluation.version),((b=m.__evaluation)===null||b===void 0?void 0:b.passed)!=null&&(R.rulePassed=String(m.__evaluation.passed)),a(t,g,m.details,R,u((w=(S=m.__evaluation)===null||S===void 0?void 0:S.secondary_exposures)!==null&&w!==void 0?w:[],_))};Zt._createConfigExposure=f;const d=(g,m,_,y)=>{var b,S,w,R,T,D;const N=m.__evaluation,A=((b=N==null?void 0:N.explicit_parameters)===null||b===void 0?void 0:b.includes(_))===!0;let k="",U=(S=N==null?void 0:N.undelegated_secondary_exposures)!==null&&S!==void 0?S:[];A&&(k=(w=N.allocated_experiment_name)!==null&&w!==void 0?w:"",U=N.secondary_exposures);const I=(R=m.__evaluation)===null||R===void 0?void 0:R.parameter_rule_ids,z={config:m.name,parameterName:_,ruleID:(T=I==null?void 0:I[_])!==null&&T!==void 0?T:m.ruleID,allocatedExperiment:k,isExplicitParameter:String(A)};return((D=m.__evaluation)===null||D===void 0?void 0:D.version)!=null&&(z.configVersion=m.__evaluation.version),a(r,g,m.details,z,u(U,y))};Zt._createLayerParameterExposure=d;const h=(g,m)=>(m.reason=g.reason,g.lcut&&(m.lcut=String(g.lcut)),g.receivedAt&&(m.receivedAt=String(g.receivedAt)),m);return Zt}var mi={},Gv;function au(){return Gv||(Gv=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.LoggingEnabledOption=mi.LogEventCompressionMode=void 0,mi.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},mi.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}),mi}var Kd={},Kv;function Kr(){return Kv||(Kv=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t._setObjectInStorage=t._getObjectFromStorage=t.Storage=void 0;const e=jt(),r=Gi(),a={},s={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:m=>a[m]?a[m]:null,setItem:(m,_)=>{a[m]=_},removeItem:m=>{delete a[m]},getAllKeys:()=>Object.keys(a)};let l=null;try{const m=(0,r._getWindowSafe)();m&&m.localStorage&&typeof m.localStorage.getItem=="function"&&(l={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:_=>m.localStorage.getItem(_),setItem:(_,y)=>m.localStorage.setItem(_,y),removeItem:_=>m.localStorage.removeItem(_),getAllKeys:()=>Object.keys(m.localStorage)})}catch{e.Log.warn("Failed to setup localStorageProvider.")}let u=l??s,f=u;function d(m){try{return m()}catch(_){if(_ instanceof Error&&_.name==="SecurityError")return t.Storage._setProvider(s),null;if(_ instanceof Error&&_.name==="QuotaExceededError"){const b=t.Storage.getAllKeys().filter(S=>S.startsWith("statsig."));_.message=`${_.message}. Statsig Keys: ${b.length}`}throw _}}t.Storage={isReady:()=>f.isReady(),isReadyResolver:()=>f.isReadyResolver(),getProviderName:()=>f.getProviderName(),getItem:m=>d(()=>f.getItem(m)),setItem:(m,_)=>d(()=>f.setItem(m,_)),removeItem:m=>f.removeItem(m),getAllKeys:()=>f.getAllKeys(),_setProvider:m=>{u=m,f=m},_setDisabled:m=>{m?f=s:f=u}};function h(m){const _=t.Storage.getItem(m);return JSON.parse(_??"null")}t._getObjectFromStorage=h;function g(m,_){t.Storage.setItem(m,JSON.stringify(_))}t._setObjectInStorage=g}(Kd)),Kd}var ho={},Fv;function F2(){if(Fv)return ho;Fv=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.UrlConfiguration=void 0;const t=fs(),e=iu(),r={[e.Endpoint._initialize]:"i",[e.Endpoint._rgstr]:"e",[e.Endpoint._download_config_specs]:"d"};let a=class{constructor(l,u,f,d){this.customUrl=null,this.fallbackUrls=null,this.endpoint=l,this.endpointDnsKey=r[l],u&&(this.customUrl=u),!u&&f&&(this.customUrl=f.endsWith("/")?`${f}${l}`:`${f}/${l}`),d&&(this.fallbackUrls=d);const h=e.NetworkDefault[l];this.defaultUrl=`${h}/${l}`}getUrl(){var l;return(l=this.customUrl)!==null&&l!==void 0?l:this.defaultUrl}getChecksum(){var l;const u=((l=this.fallbackUrls)!==null&&l!==void 0?l:[]).sort().join(",");return(0,t._DJB2)(this.customUrl+u)}};return ho.UrlConfiguration=a,ho}var Fd={},Yv;function A1(){return Yv||(Yv=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t._notifyVisibilityChanged=t._subscribeToVisiblityChanged=t._isUnloading=t._isCurrentlyVisible=void 0;const e=Gi(),r="foreground",a="background",s=[];let l=r,u=!1;const f=()=>l===r;t._isCurrentlyVisible=f;const d=()=>u;t._isUnloading=d;const h=m=>{s.unshift(m)};t._subscribeToVisiblityChanged=h;const g=m=>{m!==l&&(l=m,s.forEach(_=>_(m)))};t._notifyVisibilityChanged=g,(0,e._addWindowEventListenerSafe)("focus",()=>{u=!1,(0,t._notifyVisibilityChanged)(r)}),(0,e._addWindowEventListenerSafe)("blur",()=>(0,t._notifyVisibilityChanged)(a)),(0,e._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,t._notifyVisibilityChanged)(document.visibilityState==="visible"?r:a)}),(0,e._addWindowEventListenerSafe)((0,e._getUnloadEvent)(),()=>{u=!0,(0,t._notifyVisibilityChanged)(a)})}(Fd)),Fd}var Xv;function Y2(){if(Xv)return hi;Xv=1;var t=hi&&hi.__awaiter||function(N,A,k,U){function I(z){return z instanceof k?z:new k(function(Z){Z(z)})}return new(k||(k=Promise))(function(z,Z){function q(he){try{ue(U.next(he))}catch(ae){Z(ae)}}function te(he){try{ue(U.throw(he))}catch(ae){Z(ae)}}function ue(he){he.done?z(he.value):I(he.value).then(q,te)}ue((U=U.apply(N,A||[])).next())})};Object.defineProperty(hi,"__esModule",{value:!0}),hi.EventLogger=void 0;const e=ru(),r=fs(),a=jt(),s=iu(),l=Gi(),u=K2(),f=au(),d=Kr(),h=F2(),g=A1(),m=100,_=1e4,y=1e3,b=6e5,S=500,w=200,R={},T={Startup:"startup",GainedFocus:"gained_focus"};let D=class Ya{static _safeFlushAndForget(A){var k;(k=R[A])===null||k===void 0||k.flush().catch(()=>{})}static _safeRetryFailedLogs(A){var k;(k=R[A])===null||k===void 0||k._retryFailedLogs(T.GainedFocus)}constructor(A,k,U,I){var z,Z;this._sdkKey=A,this._emitter=k,this._network=U,this._options=I,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=(z=I==null?void 0:I.loggingEnabled)!==null&&z!==void 0?z:(I==null?void 0:I.disableLogging)===!0?f.LoggingEnabledOption.disabled:f.LoggingEnabledOption.browserOnly,I!=null&&I.loggingEnabled&&I.disableLogging!==void 0&&a.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=(Z=I==null?void 0:I.loggingBufferMaxSize)!==null&&Z!==void 0?Z:m;const q=I==null?void 0:I.networkConfig;this._logEventUrlConfig=new h.UrlConfiguration(s.Endpoint._rgstr,q==null?void 0:q.logEventUrl,q==null?void 0:q.api,q==null?void 0:q.logEventFallbackUrls)}setLogEventCompressionMode(A){this._network.setLogEventCompressionMode(A)}setLoggingEnabled(A){this._loggingEnabled=A}enqueue(A){this._shouldLogEvent(A)&&(this._normalizeAndAppendEvent(A),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&Ya._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(A){var k;const U=(k=this._nonExposedChecks[A])!==null&&k!==void 0?k:0;this._nonExposedChecks[A]=U+1}reset(){this._lastExposureTimeMap={}}start(){var A;const k=(0,l._isServerEnv)();k&&((A=this._options)===null||A===void 0?void 0:A.loggingEnabled)!=="always"||(R[this._sdkKey]=this,k||(0,g._subscribeToVisiblityChanged)(U=>{U==="background"?Ya._safeFlushAndForget(this._sdkKey):U==="foreground"&&Ya._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(T.Startup),this._startBackgroundFlushInterval())}stop(){return t(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete R[this._sdkKey],yield this.flush()})}flush(){return t(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),this._queue.length===0)return;const A=this._queue;this._queue=[],yield this._sendEvents(A)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,!(Date.now()-this._creationTime>w)&&setTimeout(()=>Ya._safeFlushAndForget(this._sdkKey),w))}_shouldLogEvent(A){var k;if(((k=this._options)===null||k===void 0?void 0:k.loggingEnabled)!=="always"&&(0,l._isServerEnv)())return!1;if(!(0,u._isExposureEvent)(A))return!0;const U=A.user?A.user:{statsigEnvironment:void 0},I=(0,e._getUserStorageKey)(this._sdkKey,U),z=A.metadata?A.metadata:{},Z=[A.eventName,I,z.gate,z.config,z.ruleID,z.allocatedExperiment,z.parameterName,String(z.isExplicitParameter),z.reason].join("|"),q=this._lastExposureTimeMap[Z],te=Date.now();return q&&te-qy&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[Z]=te,!0)}_sendEvents(A){var k,U;return t(this,void 0,void 0,function*(){if(this._loggingEnabled==="disabled")return this._saveFailedLogsToStorage(A),!1;try{const z=(0,g._isUnloading)()&&this._network.isBeaconSupported()&&((U=(k=this._options)===null||k===void 0?void 0:k.networkConfig)===null||U===void 0?void 0:U.networkOverrideFunc)==null;return this._emitter({name:"pre_logs_flushed",events:A}),(z?this._sendEventsViaBeacon(A):yield this._sendEventsViaPost(A)).success?(this._emitter({name:"logs_flushed",events:A}),!0):(a.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(A),!1)}catch{return a.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(A){var k;return t(this,void 0,void 0,function*(){const U=yield this._network.post(this._getRequestData(A)),I=(k=U==null?void 0:U.code)!==null&&k!==void 0?k:-1;return{success:I>=200&&I<300}})}_sendEventsViaBeacon(A){return{success:this._network.beacon(this._getRequestData(A))}}_getRequestData(A){return{sdkKey:this._sdkKey,data:{events:A},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[s.NetworkParam.EventCount]:String(A.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(A){for(;A.length>S;)A.shift();const k=this._getStorageKey();try{(0,d._setObjectInStorage)(k,A)}catch{a.Log.warn("Unable to save failed logs to storage")}}_retryFailedLogs(A){const k=this._getStorageKey();t(this,void 0,void 0,function*(){d.Storage.isReady()||(yield d.Storage.isReadyResolver());const U=(0,d._getObjectFromStorage)(k);if(!U)return;A===T.Startup&&d.Storage.removeItem(k),(yield this._sendEvents(U))&&A===T.GainedFocus&&d.Storage.removeItem(k)}).catch(()=>{a.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,r._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(A){A.user&&(A.user=Object.assign({},A.user),delete A.user.privateAttributes);const k={},U=this._getCurrentPageUrl();U&&(k.statsigMetadata={currentPage:U});const I=Object.assign(Object.assign({},A),k);a.Log.debug("Enqueued Event:",I),this._queue.push(I)}_appendAndResetNonExposedChecks(){Object.keys(this._nonExposedChecks).length!==0&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var A;if(((A=this._options)===null||A===void 0?void 0:A.includeCurrentPageUrlWithEvents)!==!1)return(0,l._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var A,k;const U=(k=(A=this._options)===null||A===void 0?void 0:A.loggingIntervalMs)!==null&&k!==void 0?k:_,I=setInterval(()=>{const z=R[this._sdkKey];!z||z._flushIntervalId!==I?clearInterval(I):Ya._safeFlushAndForget(this._sdkKey)},U);this._flushIntervalId=I}};return hi.EventLogger=D,hi}var Yd={},Zv;function $c(){return Zv||(Zv=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigMetadataProvider=t.SDK_VERSION=void 0,t.SDK_VERSION="3.17.2";let e={sdkVersion:t.SDK_VERSION,sdkType:"js-mono"};t.StatsigMetadataProvider={get:()=>e,add:r=>{e=Object.assign(Object.assign({},e),r)}}}(Yd)),Yd}var Xd={},Jv;function I6(){return Jv||(Jv=1,Object.defineProperty(Xd,"__esModule",{value:!0})),Xd}var Qn={},po={},go={},Qv;function R1(){if(Qv)return go;Qv=1,Object.defineProperty(go,"__esModule",{value:!0}),go.getUUID=void 0;function t(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let e=new Date().getTime(),r=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(Math.random()*4)]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,s=>{let l=Math.random()*16;return e>0?(l=(e+l)%16|0,e=Math.floor(e/16)):(l=(r+l)%16|0,r=Math.floor(r/16)),(s==="x"?l:l&7|8).toString(16)})}return go.getUUID=t,go}var Wv;function su(){if(Wv)return po;Wv=1,Object.defineProperty(po,"__esModule",{value:!0}),po.StableID=void 0;const t=ru(),e=jt(),r=Gi(),a=Kr(),s=R1(),l={},u={},f={};po.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:b=>{if(f[b])return null;if(l[b]!=null)return l[b];let S=null;return S=m(b),S!=null?(l[b]=S,h(S,b),S):(S=g(b),S==null&&(S=(0,s.getUUID)()),h(S,b),_(S,b),l[b]=S,S)},setOverride:(b,S)=>{l[S]=b,h(b,S),_(b,S)},_setCookiesEnabled:(b,S)=>{u[b]=S},_setDisabled:(b,S)=>{f[b]=S}};function d(b){return`statsig.stable_id.${(0,t._getStorageKey)(b)}`}function h(b,S){const w=d(S);try{(0,a._setObjectInStorage)(w,b)}catch{e.Log.warn("Failed to save StableID to storage")}}function g(b){const S=d(b);return(0,a._getObjectFromStorage)(S)}function m(b){if(!u[b]||(0,r._getDocumentSafe)()==null)return null;const S=document.cookie.split(";");for(const w of S){const[R,T]=w.trim().split("=");if(R===y(b))return decodeURIComponent(T)}return null}function _(b,S){if(!u[S]||!document)return;const w=new Date;w.setFullYear(w.getFullYear()+1),document.cookie=`${y(S)}=${encodeURIComponent(b)}; expires=${w.toUTCString()}; path=/`}function y(b){return`statsig.stable_id.${(0,t._getStorageKey)(b)}`}return po}var vi={},e_;function X2(){if(e_)return vi;e_=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi._getFullUserHash=vi._normalizeUser=void 0;const t=fs(),e=jt();function r(s,l,u){try{const f=JSON.parse(JSON.stringify(s));return l!=null&&l.environment!=null?f.statsigEnvironment=l.environment:u!=null&&(f.statsigEnvironment={tier:u}),f}catch{return e.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}}vi._normalizeUser=r;function a(s){return s?(0,t._DJB2Object)(s):null}return vi._getFullUserHash=a,vi}var mo={},t_;function Z2(){if(t_)return mo;t_=1,Object.defineProperty(mo,"__esModule",{value:!0}),mo._typedJsonParse=void 0;const t=jt();function e(r,a,s){try{const l=JSON.parse(r);if(l&&typeof l=="object"&&a in l)return l}catch{}return t.Log.error(`Failed to parse ${s}`),null}return mo._typedJsonParse=e,mo}var n_;function P6(){if(n_)return Qn;n_=1;var t=Qn&&Qn.__awaiter||function(m,_,y,b){function S(w){return w instanceof y?w:new y(function(R){R(w)})}return new(y||(y=Promise))(function(w,R){function T(A){try{N(b.next(A))}catch(k){R(k)}}function D(A){try{N(b.throw(A))}catch(k){R(k)}}function N(A){A.done?w(A.value):S(A.value).then(T,D)}N((b=b.apply(m,_||[])).next())})};Object.defineProperty(Qn,"__esModule",{value:!0}),Qn._makeDataAdapterResult=Qn.DataAdapterCore=void 0;const e=jt(),r=su(),a=X2(),s=Kr(),l=Z2(),u=10;let f=class{constructor(_,y){this._adapterName=_,this._cacheSuffix=y,this._options=null,this._sdkKey=null,this._lastModifiedStoreKey=`statsig.last_modified_time.${y}`,this._inMemoryCache=new h}attach(_,y,b){this._sdkKey=_,this._options=y}getDataSync(_){const y=_&&(0,a._normalizeUser)(_,this._options),b=this._getCacheKey(y),S=this._inMemoryCache.get(b,y);if(S)return S;const w=this._loadFromCache(b);return w?(this._inMemoryCache.add(b,w),this._inMemoryCache.get(b,y)):null}setData(_,y){const b=y&&(0,a._normalizeUser)(y,this._options),S=this._getCacheKey(b);this._inMemoryCache.add(S,d("Bootstrap",_,null,b))}_getDataAsyncImpl(_,y,b){return t(this,void 0,void 0,function*(){s.Storage.isReady()||(yield s.Storage.isReadyResolver());const S=_??this.getDataSync(y),w=[this._fetchAndPrepFromNetwork(S,y,b)];return b!=null&&b.timeoutMs&&w.push(new Promise(R=>setTimeout(R,b.timeoutMs)).then(()=>(e.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(w)})}_prefetchDataImpl(_,y){return t(this,void 0,void 0,function*(){const b=_&&(0,a._normalizeUser)(_,this._options),S=this._getCacheKey(b),w=yield this._getDataAsyncImpl(null,b,y);w&&this._inMemoryCache.add(S,Object.assign(Object.assign({},w),{source:"Prefetch"}))})}_fetchAndPrepFromNetwork(_,y,b){var S;return t(this,void 0,void 0,function*(){const w=(S=_==null?void 0:_.data)!==null&&S!==void 0?S:null,R=_!=null&&this._isCachedResultValidFor204(_,y),T=yield this._fetchFromNetwork(w,y,b,R);if(!T)return e.Log.debug("No response returned for latest value"),null;const D=(0,l._typedJsonParse)(T,"has_updates","Response"),N=this._getSdkKey(),A=r.StableID.get(N);let k=null;if((D==null?void 0:D.has_updates)===!0)k=d("Network",T,A,y);else if(w&&(D==null?void 0:D.has_updates)===!1)k=d("NetworkNotModified",w,A,y);else return null;const U=this._getCacheKey(y);return this._inMemoryCache.add(U,k),this._writeToCache(U,k),k})}_getSdkKey(){return this._sdkKey!=null?this._sdkKey:(e.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(_){var y;const b=(y=s.Storage.getItem)===null||y===void 0?void 0:y.call(s.Storage,_);if(b==null)return null;const S=(0,l._typedJsonParse)(b,"source","Cached Result");return S?Object.assign(Object.assign({},S),{source:"Cache"}):null}_writeToCache(_,y){s.Storage.setItem(_,JSON.stringify(y)),this._runLocalStorageCacheEviction(_)}_runLocalStorageCacheEviction(_){var y;const b=(y=(0,s._getObjectFromStorage)(this._lastModifiedStoreKey))!==null&&y!==void 0?y:{};b[_]=Date.now();const S=g(b,u);S&&(delete b[S],s.Storage.removeItem(S)),(0,s._setObjectInStorage)(this._lastModifiedStoreKey,b)}};Qn.DataAdapterCore=f;function d(m,_,y,b){return{source:m,data:_,receivedAt:Date.now(),stableID:y,fullUserHash:(0,a._getFullUserHash)(b)}}Qn._makeDataAdapterResult=d;class h{constructor(){this._data={}}get(_,y){var b;const S=this._data[_],w=S==null?void 0:S.stableID,R=(b=y==null?void 0:y.customIDs)===null||b===void 0?void 0:b.stableID;return R&&w&&R!==w?(e.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):S}add(_,y){const b=g(this._data,u-1);b&&delete this._data[b],this._data[_]=y}merge(_){this._data=Object.assign(Object.assign({},this._data),_)}}function g(m,_){const y=Object.keys(m);return y.length<=_?null:y.reduce((b,S)=>{const w=m[b],R=m[S];return typeof w=="object"&&typeof R=="object"?R.receivedAt{var a;return((a=t[r])!==null&&a!==void 0?a:"js-mono")+(e??"")},_setClientType(r,a){t[r]=a},_setBindingType(r){(!e||e==="-react")&&(e="-"+r)}},_o}var a_;function J2(){return a_||(a_=1,function(t){var e=vo&&vo.__awaiter||function(m,_,y,b){function S(w){return w instanceof y?w:new y(function(R){R(w)})}return new(y||(y=Promise))(function(w,R){function T(A){try{N(b.next(A))}catch(k){R(k)}}function D(A){try{N(b.throw(A))}catch(k){R(k)}}function N(A){A.done?w(A.value):S(A.value).then(T,D)}N((b=b.apply(m,_||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=t.EXCEPTION_ENDPOINT=void 0;const r=jt(),a=D1(),s=$c();t.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const l="[Statsig] UnknownError";class u{constructor(_,y,b,S){this._sdkKey=_,this._options=y,this._emitter=b,this._lastSeenError=S,this._seen=new Set}wrap(_){try{const y=_;h(y).forEach(b=>{const S=y[b];"$EB"in S||(y[b]=(...w)=>this._capture(b,()=>S.apply(_,w)),y[b].$EB=!0)})}catch(y){this._onError("eb:wrap",y)}}logError(_,y){this._onError(_,y)}getLastSeenErrorAndReset(){const _=this._lastSeenError;return this._lastSeenError=void 0,_??null}attachErrorIfNoneExists(_){this._lastSeenError||(this._lastSeenError=f(_))}_capture(_,y){try{const b=y();return b&&b instanceof Promise?b.catch(S=>this._onError(_,S)):b}catch(b){return this._onError(_,b),null}}_onError(_,y){try{r.Log.warn(`Caught error in ${_}`,{error:y}),e(this,void 0,void 0,function*(){var S,w,R,T,D,N,A;const k=y||Error(l),U=k instanceof Error,I=U?k.name:"No Name",z=f(k);if(this._lastSeenError=z,this._seen.has(I))return;if(this._seen.add(I),!((w=(S=this._options)===null||S===void 0?void 0:S.networkConfig)===null||w===void 0)&&w.preventAllNetworkTraffic){(R=this._emitter)===null||R===void 0||R.call(this,{name:"error",error:y,tag:_});return}const Z=a.SDKType._get(this._sdkKey),q=s.StatsigMetadataProvider.get(),te=U?k.stack:d(k),ue=Object.assign({tag:_,exception:I,info:te,statsigOptions:g(this._options)},Object.assign(Object.assign({},q),{sdkType:Z}));yield((N=(D=(T=this._options)===null||T===void 0?void 0:T.networkConfig)===null||D===void 0?void 0:D.networkOverrideFunc)!==null&&N!==void 0?N:fetch)(t.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(Z),"STATSIG-SDK-VERSION":String(q.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(ue)}),(A=this._emitter)===null||A===void 0||A.call(this,{name:"error",error:y,tag:_})}).then(()=>{}).catch(()=>{})}catch{}}}t.ErrorBoundary=u;function f(m){return m instanceof Error?m:typeof m=="string"?new Error(m):new Error("An unknown error occurred.")}function d(m){try{return JSON.stringify(m)}catch{return l}}function h(m){const _=new Set;let y=Object.getPrototypeOf(m);for(;y&&y!==Object.prototype;)Object.getOwnPropertyNames(y).filter(b=>typeof(y==null?void 0:y[b])=="function").forEach(b=>_.add(b)),y=Object.getPrototypeOf(y);return Array.from(_)}function g(m){if(!m)return{};const _={};return Object.entries(m).forEach(([y,b])=>{switch(typeof b){case"number":case"bigint":case"boolean":_[String(y)]=b;break;case"string":b.length<50?_[String(y)]=b:_[String(y)]="set";break;case"object":y==="environment"?_.environment=b:y==="networkConfig"?_.networkConfig=b:_[String(y)]=b!=null?"set":"unset";break}}),_}}(vo)),vo}var Jd={},s_;function z6(){return s_||(s_=1,Object.defineProperty(Jd,"__esModule",{value:!0})),Jd}var Qd={},o_;function q6(){return o_||(o_=1,Object.defineProperty(Qd,"__esModule",{value:!0})),Qd}var Wd={},l_;function B6(){return l_||(l_=1,Object.defineProperty(Wd,"__esModule",{value:!0})),Wd}var _i={},c_;function Q2(){if(c_)return _i;c_=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.createMemoKey=_i.MemoPrefix=void 0,_i.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_layer:"l",_paramStore:"p"};const t=new Set([]),e=new Set(["userPersistedValues"]);function r(a,s,l){let u=`${a}|${s}`;if(!l)return u;for(const f of Object.keys(l)){if(e.has(f))return;t.has(f)?u+=`|${f}=true`:u+=`|${f}=${l[f]}`}return u}return _i.createMemoKey=r,_i}var yi={},Wn={},bi={},u_;function V6(){if(u_)return bi;u_=1;var t=bi&&bi.__awaiter||function(f,d,h,g){function m(_){return _ instanceof h?_:new h(function(y){y(_)})}return new(h||(h=Promise))(function(_,y){function b(R){try{w(g.next(R))}catch(T){y(T)}}function S(R){try{w(g.throw(R))}catch(T){y(T)}}function w(R){R.done?_(R.value):m(R.value).then(b,S)}w((g=g.apply(f,d||[])).next())})};Object.defineProperty(bi,"__esModule",{value:!0}),bi._fetchTxtRecords=void 0;const e=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),r="https://cloudflare-dns.com/dns-query",a=["i","e","d"],s=200;function l(f){return t(this,void 0,void 0,function*(){const d=yield f(r,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:e});if(!d.ok){const m=new Error("Failed to fetch TXT records from DNS");throw m.name="DnsTxtFetchError",m}const h=yield d.arrayBuffer(),g=new Uint8Array(h);return u(g)})}bi._fetchTxtRecords=l;function u(f){const d=f.findIndex((g,m)=>m((R=D.expiryTime)!==null&&R!==void 0?R:0)||S.getChecksum()!==D.urlConfigChecksum?(delete T[S.endpoint],this._fallbackInfo=T,g(b,this._fallbackInfo),null):D.url?D.url:null}tryFetchUpdatedFallbackInfo(b,S,w,R){var T,D;return t(this,void 0,void 0,function*(){try{if(!d(w,R))return!1;const A=S.customUrl==null&&S.fallbackUrls==null?yield this._tryFetchFallbackUrlsFromNetwork(S):S.fallbackUrls,k=this._pickNewFallbackUrl((T=this._fallbackInfo)===null||T===void 0?void 0:T[S.endpoint],A);return k?(this._updateFallbackInfoWithNewUrl(b,S,k),!0):!1}catch(N){return(D=this._errorBoundary)===null||D===void 0||D.logError("tryFetchUpdatedFallbackInfo",N),!1}})}_updateFallbackInfoWithNewUrl(b,S,w){var R,T,D;const N={urlConfigChecksum:S.getChecksum(),url:w,expiryTime:Date.now()+l,previous:[]},A=S.endpoint,k=(R=this._fallbackInfo)===null||R===void 0?void 0:R[A];k&&N.previous.push(...k.previous),N.previous.length>10&&(N.previous=[]);const U=(D=(T=this._fallbackInfo)===null||T===void 0?void 0:T[A])===null||D===void 0?void 0:D.url;U!=null&&N.previous.push(U),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[A]:N}),g(b,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(b){var S;return t(this,void 0,void 0,function*(){const w=this._dnsQueryCooldowns[b.endpoint];if(w&&Date.now()1){let k=A[1];k.endsWith("/")&&(k=k.slice(0,-1)),R.push(`https://${k}${D}`)}}return R})}_pickNewFallbackUrl(b,S){var w;if(S==null)return null;const R=new Set((w=b==null?void 0:b.previous)!==null&&w!==void 0?w:[]),T=b==null?void 0:b.url;let D=null;for(const N of S){const A=N.endsWith("/")?N.slice(0,-1):N;if(!R.has(N)&&A!==T){D=A;break}}return D}};Wn.NetworkFallbackResolver=f;function d(y,b){var S;const w=(S=y==null?void 0:y.toLowerCase())!==null&&S!==void 0?S:"";return b||w.includes("uncaught exception")||w.includes("failed to fetch")||w.includes("networkerror when attempting to fetch resource")}Wn._isDomainFailure=d;function h(y){return`statsig.network_fallback.${(0,r._DJB2)(y)}`}function g(y,b){const S=h(y);if(!b||Object.keys(b).length===0){s.Storage.removeItem(S);return}s.Storage.setItem(S,JSON.stringify(b))}function m(y){const b=h(y),S=s.Storage.getItem(b);if(!S)return null;try{return JSON.parse(S)}catch{return a.Log.error("Failed to parse FallbackInfo"),null}}function _(y){try{return new URL(y).pathname}catch{return null}}return Wn}var yo={},d_;function W2(){if(d_)return yo;d_=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.SDKFlags=void 0;const t={};return yo.SDKFlags={setFlags:(e,r)=>{t[e]=r},get:(e,r)=>{var a,s;return(s=(a=t[e])===null||a===void 0?void 0:a[r])!==null&&s!==void 0?s:!1}},yo}var eh={},h_;function j1(){return h_||(h_=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigSession=t.SessionID=void 0;const e=Vr(),r=ru(),a=jt(),s=Kr(),l=R1(),u=30*60*1e3,f=4*60*60*1e3,d={};t.SessionID={get:T=>t.StatsigSession.get(T).data.sessionID},t.StatsigSession={get:T=>{d[T]==null&&(d[T]=h(T));const D=d[T];return m(D)},overrideInitialSessionID:(T,D)=>{d[D]=g(T,D)}};function h(T){let D=R(T);const N=Date.now();return D||(D={sessionID:(0,l.getUUID)(),startTime:N,lastUpdate:N}),{data:D,sdkKey:T}}function g(T,D){const N=Date.now();return{data:{sessionID:T,startTime:N,lastUpdate:N},sdkKey:D}}function m(T){const D=Date.now(),N=T.data,A=T.sdkKey;if(y(N)||b(N)){N.sessionID=(0,l.getUUID)(),N.startTime=D;const U=__STATSIG__==null?void 0:__STATSIG__.instance(A);U&&U.$emt({name:"session_expired"})}N.lastUpdate=D,w(N,T.sdkKey),clearTimeout(T.idleTimeoutID),clearTimeout(T.ageTimeoutID);const k=D-N.startTime;return T.idleTimeoutID=_(A,u),T.ageTimeoutID=_(A,f-k),T}function _(T,D){return setTimeout(()=>{var N;const A=(N=(0,e._getStatsigGlobal)())===null||N===void 0?void 0:N.instance(T);A&&A.$emt({name:"session_expired"})},D)}function y({lastUpdate:T}){return Date.now()-T>u}function b({startTime:T}){return Date.now()-T>f}function S(T){return`statsig.session_id.${(0,r._getStorageKey)(T)}`}function w(T,D){const N=S(D);try{(0,s._setObjectInStorage)(N,T)}catch{a.Log.warn("Failed to save SessionID")}}function R(T){const D=S(T);return(0,s._getObjectFromStorage)(D)}}(eh)),eh}var bo={},p_;function e9(){return p_||(p_=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.ErrorTag=void 0,bo.ErrorTag={NetworkError:"NetworkError"}),bo}var g_;function K6(){if(g_)return yi;g_=1;var t=yi&&yi.__awaiter||function(ae,M,G,Y){function W(j){return j instanceof G?j:new G(function(H){H(j)})}return new(G||(G=Promise))(function(j,H){function ee(de){try{re(Y.next(de))}catch(oe){H(oe)}}function ne(de){try{re(Y.throw(de))}catch(oe){H(oe)}}function re(de){de.done?j(de.value):W(de.value).then(ee,ne)}re((Y=Y.apply(ae,M||[])).next())})};Object.defineProperty(yi,"__esModule",{value:!0}),yi.NetworkCore=void 0,Vr();const e=Vr(),r=Fh(),a=jt(),s=iu(),l=G6(),u=W2(),f=D1(),d=Gi(),h=j1(),g=su(),m=e9(),_=$c(),y=au(),b=A1(),S=1e4,w=500,R=3e4,T=1e3,D=50,N=D/T,A=new Set([408,500,502,503,504,522,524,599]);let k=class{constructor(M,G){this._emitter=G,this._errorBoundary=null,this._timeout=S,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,M&&(this._options=M),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new l.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(M))}setLogEventCompressionMode(M){this._options.logEventCompressionMode=M}setErrorBoundary(M){this._errorBoundary=M,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(M)}isBeaconSupported(){return typeof navigator<"u"&&typeof navigator.sendBeacon=="function"}getLastUsedInitUrlAndReset(){const M=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,M}beacon(M){if(!U(M))return!1;const G=this._getInternalRequestArgs("POST",M),Y=this._getPopulatedURL(G),W=navigator;return W.sendBeacon.bind(W)(Y,G.body)}post(M){return t(this,void 0,void 0,function*(){const G=this._getInternalRequestArgs("POST",M);return this._tryEncodeBody(G),yield this._tryToCompressBody(G),this._sendRequest(G)})}get(M){const G=this._getInternalRequestArgs("GET",M);return this._sendRequest(G)}_sendRequest(M){var G,Y,W,j;return t(this,void 0,void 0,function*(){if(!U(M)||this._netConfig.preventAllNetworkTraffic)return null;const{method:H,body:ee,retries:ne,attempt:re}=M,de=M.urlConfig.endpoint;if(this._isRateLimited(de))return a.Log.warn(`Request to ${de} was blocked because you are making requests too frequently.`),null;const oe=re??1,le=typeof AbortController<"u"?new AbortController:null,se=setTimeout(()=>{le==null||le.abort(`Timeout of ${this._timeout}ms expired.`)},this._timeout),me=this._getPopulatedURL(M);let _e=null;const et=(0,b._isUnloading)();try{const dt={method:H,body:ee,headers:Object.assign({},M.headers),signal:le==null?void 0:le.signal,priority:M.priority,keepalive:et};te(M,oe);const Ee=this._leakyBucket[de];if(Ee&&(Ee.lastRequestTime=Date.now(),this._leakyBucket[de]=Ee),_e=yield((G=this._netConfig.networkOverrideFunc)!==null&&G!==void 0?G:fetch)(me,dt),clearTimeout(se),!_e.ok){const Ht=yield _e.text().catch(()=>"No Text"),at=new Error(`NetworkError: ${me} ${Ht}`);throw at.name="NetworkError",at}const Nn=yield _e.text();return ue(M,_e,oe,Nn),this._fallbackResolver.tryBumpExpiryTime(M.sdkKey,M.urlConfig),{body:Nn,code:_e.status}}catch(dt){const Ee=Z(le,dt),Ot=q(le);if(ue(M,_e,oe,"",dt),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(M.sdkKey,M.urlConfig,Ee,Ot))&&(M.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(M.sdkKey,M.urlConfig)),!ne||oe>ne||!A.has((Y=_e==null?void 0:_e.status)!==null&&Y!==void 0?Y:500)){(W=this._emitter)===null||W===void 0||W.call(this,{name:"error",error:dt,tag:m.ErrorTag.NetworkError,requestArgs:M});const Ht=`A networking error occurred during ${H} request to ${me}.`;return a.Log.error(Ht,Ee,dt),(j=this._errorBoundary)===null||j===void 0||j.attachErrorIfNoneExists(Ht),null}return yield he(oe),this._sendRequest(Object.assign(Object.assign({},M),{retries:ne,attempt:oe+1}))}})}_getLogEventCompressionMode(M){let G=M==null?void 0:M.logEventCompressionMode;return!G&&(M==null?void 0:M.disableCompression)===!0&&(G=y.LogEventCompressionMode.Disabled),G||(G=y.LogEventCompressionMode.Enabled),G}_isRateLimited(M){var G;const Y=Date.now(),W=(G=this._leakyBucket[M])!==null&&G!==void 0?G:{count:0,lastRequestTime:Y},j=Y-W.lastRequestTime,H=Math.floor(j*N);return W.count=Math.max(0,W.count-H),W.count>=D?!0:(W.count+=1,W.lastRequestTime=Y,this._leakyBucket[M]=W,!1)}_getPopulatedURL(M){var G;const Y=(G=M.fallbackUrl)!==null&&G!==void 0?G:M.urlConfig.getUrl();(M.urlConfig.endpoint===s.Endpoint._initialize||M.urlConfig.endpoint===s.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=Y);const W=Object.assign({[s.NetworkParam.SdkKey]:M.sdkKey,[s.NetworkParam.SdkType]:f.SDKType._get(M.sdkKey),[s.NetworkParam.SdkVersion]:_.SDK_VERSION,[s.NetworkParam.Time]:String(Date.now()),[s.NetworkParam.SessionID]:h.SessionID.get(M.sdkKey)},M.params),j=Object.keys(W).map(H=>`${encodeURIComponent(H)}=${encodeURIComponent(W[H])}`).join("&");return`${Y}${j?`?${j}`:""}`}_tryEncodeBody(M){var G;const Y=(0,d._getWindowSafe)(),W=M.body;if(!(!M.isStatsigEncodable||this._options.disableStatsigEncoding||typeof W!="string"||(0,e._getStatsigGlobalFlag)("no-encode")!=null||!(Y!=null&&Y.btoa)))try{M.body=Y.btoa(W).split("").reverse().join(""),M.params=Object.assign(Object.assign({},(G=M.params)!==null&&G!==void 0?G:{}),{[s.NetworkParam.StatsigEncoded]:"1"})}catch(j){a.Log.warn(`Request encoding failed for ${M.urlConfig.getUrl()}`,j)}}_tryToCompressBody(M){var G;return t(this,void 0,void 0,function*(){const Y=M.body;if(!(typeof Y!="string"||!z(M,this._options)))try{const W=new TextEncoder().encode(Y),j=new CompressionStream("gzip"),H=j.writable.getWriter();H.write(W).catch(a.Log.error),H.close().catch(a.Log.error);const ee=j.readable.getReader(),ne=[];let re;for(;!(re=yield ee.read()).done;)ne.push(re.value);const de=ne.reduce((se,me)=>se+me.length,0),oe=new Uint8Array(de);let le=0;for(const se of ne)oe.set(se,le),le+=se.length;M.body=oe,M.params=Object.assign(Object.assign({},(G=M.params)!==null&&G!==void 0?G:{}),{[s.NetworkParam.IsGzipped]:"1"})}catch(W){a.Log.warn(`Request compression failed for ${M.urlConfig.getUrl()}`,W)}})}_getInternalRequestArgs(M,G){const Y=this._fallbackResolver.getActiveFallbackUrl(G.sdkKey,G.urlConfig),W=Object.assign(Object.assign({},G),{method:M,fallbackUrl:Y});return"data"in G&&I(W,G.data),W}};yi.NetworkCore=k;const U=ae=>ae.sdkKey?!0:(a.Log.warn("Unable to make request without an SDK key"),!1),I=(ae,M)=>{const{sdkKey:G,fallbackUrl:Y}=ae,W=g.StableID.get(G),j=h.SessionID.get(G),H=f.SDKType._get(G);ae.body=JSON.stringify(Object.assign(Object.assign({},M),{statsigMetadata:Object.assign(Object.assign({},_.StatsigMetadataProvider.get()),{stableID:W,sessionID:j,sdkType:H,fallbackUrl:Y})}))};function z(ae,M){if(!ae.isCompressable||(0,e._getStatsigGlobalFlag)("no-compress")!=null||typeof CompressionStream>"u"||typeof TextEncoder>"u")return!1;const G=ae.urlConfig.customUrl!=null||ae.urlConfig.fallbackUrls!=null,Y=u.SDKFlags.get(ae.sdkKey,"enable_log_event_compression")===!0;switch(M.logEventCompressionMode){case y.LogEventCompressionMode.Disabled:return!1;case y.LogEventCompressionMode.Enabled:return!(G&&!Y);case y.LogEventCompressionMode.Forced:return!0;default:return!1}}function Z(ae,M){return ae!=null&&ae.signal.aborted&&typeof ae.signal.reason=="string"?ae.signal.reason:typeof M=="string"?M:M instanceof Error?`${M.name}: ${M.message}`:"Unknown Error"}function q(ae){return(ae==null?void 0:ae.signal.aborted)&&typeof ae.signal.reason=="string"&&ae.signal.reason.includes("Timeout")||!1}function te(ae,M){ae.urlConfig.endpoint===s.Endpoint._initialize&&r.Diagnostics._markInitNetworkReqStart(ae.sdkKey,{attempt:M})}function ue(ae,M,G,Y,W){ae.urlConfig.endpoint===s.Endpoint._initialize&&r.Diagnostics._markInitNetworkReqEnd(ae.sdkKey,r.Diagnostics._getDiagnosticsData(M,G,Y,W))}function he(ae){return t(this,void 0,void 0,function*(){yield new Promise(M=>setTimeout(M,Math.min(w*(ae*ae),R)))})}return yi}var th={},m_;function F6(){return m_||(m_=1,Object.defineProperty(th,"__esModule",{value:!0})),th}var nh={},v_;function Y6(){return v_||(v_=1,Object.defineProperty(nh,"__esModule",{value:!0})),nh}var Si={},__;function X6(){if(__)return Si;__=1;var t=Si&&Si.__awaiter||function(b,S,w,R){function T(D){return D instanceof w?D:new w(function(N){N(D)})}return new(w||(w=Promise))(function(D,N){function A(I){try{U(R.next(I))}catch(z){N(z)}}function k(I){try{U(R.throw(I))}catch(z){N(z)}}function U(I){I.done?D(I.value):T(I.value).then(A,k)}U((R=R.apply(b,S||[])).next())})};Object.defineProperty(Si,"__esModule",{value:!0}),Si.StatsigClientBase=void 0,Vr();const e=Vr(),r=J2(),a=Y2(),s=jt(),l=Q2(),u=Gi(),f=j1(),d=su(),h=au(),g=Kr(),m=3e3;let _=class{constructor(S,w,R,T){var D,N,A,k;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const U=this.$emt.bind(this);(T==null?void 0:T.logLevel)!=null&&(s.Log.level=T.logLevel),T!=null&&T.disableStorage&&g.Storage._setDisabled(!0),T!=null&&T.initialSessionID&&f.StatsigSession.overrideInitialSessionID(T.initialSessionID,S),T!=null&&T.storageProvider&&g.Storage._setProvider(T.storageProvider),T!=null&&T.enableCookies&&d.StableID._setCookiesEnabled(S,T.enableCookies),T!=null&&T.disableStableID&&d.StableID._setDisabled(S,!0),this._sdkKey=S,this._options=T??{},this._memoCache={},this.overrideAdapter=(D=T==null?void 0:T.overrideAdapter)!==null&&D!==void 0?D:null,this._logger=new a.EventLogger(S,U,R,T),this._errorBoundary=new r.ErrorBoundary(S,T,U),this._errorBoundary.wrap(this),this._errorBoundary.wrap(w),this._errorBoundary.wrap(this._logger),R.setErrorBoundary(this._errorBoundary),this.dataAdapter=w,this.dataAdapter.attach(S,T,R),this.storageProvider=g.Storage,(k=(A=(N=this.overrideAdapter)===null||N===void 0?void 0:N.loadFromStorage)===null||A===void 0?void 0:A.call(N))===null||k===void 0||k.catch(I=>this._errorBoundary.logError("OA::loadFromStorage",I)),this._primeReadyRipcord(),y(S,this)}updateRuntimeOptions(S){S.loggingEnabled?(this._options.loggingEnabled=S.loggingEnabled,this._logger.setLoggingEnabled(S.loggingEnabled)):S.disableLogging!=null&&(this._options.disableLogging=S.disableLogging,this._logger.setLoggingEnabled(S.disableLogging?"disabled":"browser-only")),S.disableStorage!=null&&(this._options.disableStorage=S.disableStorage,g.Storage._setDisabled(S.disableStorage)),S.enableCookies!=null&&(this._options.enableCookies=S.enableCookies,d.StableID._setCookiesEnabled(this._sdkKey,S.enableCookies)),S.logEventCompressionMode?this._logger.setLogEventCompressionMode(S.logEventCompressionMode):S.disableCompression&&this._logger.setLogEventCompressionMode(h.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return t(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(S,w){this._listeners[S]||(this._listeners[S]=[]),this._listeners[S].push(w)}off(S,w){if(this._listeners[S]){const R=this._listeners[S].indexOf(w);R!==-1&&this._listeners[S].splice(R,1)}}$on(S,w){w.__isInternal=!0,this.on(S,w)}$emt(S){var w;const R=T=>{try{T(S)}catch(D){if(T.__isInternal===!0){this._errorBoundary.logError(`__emit:${S.name}`,D);return}s.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",S)}};this._listeners[S.name]&&this._listeners[S.name].forEach(T=>R(T)),(w=this._listeners["*"])===null||w===void 0||w.forEach(R)}_setStatus(S,w){this.loadingStatus=S,this._memoCache={},this.$emt({name:"values_updated",status:S,values:w})}_enqueueExposure(S,w,R){if((R==null?void 0:R.disableExposureLog)===!0){this._logger.incrementNonExposureCount(S);return}this._logger.enqueue(w)}_memoize(S,w){return(R,T)=>{if(this._options.disableEvaluationMemoization)return w(R,T);const D=(0,l.createMemoKey)(S,R,T);return D?(D in this._memoCache||(Object.keys(this._memoCache).length>=m&&(this._memoCache={}),this._memoCache[D]=w(R,T)),this._memoCache[D]):w(R,T)}}};Si.StatsigClientBase=_;function y(b,S){var w;if((0,u._isServerEnv)())return;const R=(0,e._getStatsigGlobal)(),T=(w=R.instances)!==null&&w!==void 0?w:{},D=S;T[b]!=null&&s.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),T[b]=D,R.firstInstance||(R.firstInstance=D),R.instances=T,__STATSIG__=R}return Si}var So={},y_;function Z6(){return y_||(y_=1,Object.defineProperty(So,"__esModule",{value:!0}),So.DataAdapterCachePrefix=void 0,So.DataAdapterCachePrefix="statsig.cached"),So}var rh={},b_;function J6(){return b_||(b_=1,Object.defineProperty(rh,"__esModule",{value:!0})),rh}var Rt={},S_;function Q6(){if(S_)return Rt;S_=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt._makeTypedGet=Rt._mergeOverride=Rt._makeLayer=Rt._makeExperiment=Rt._makeDynamicConfig=Rt._makeFeatureGate=void 0;const t=jt(),e=O1();function r(h,g,m,_){var y;return{name:h,details:g,ruleID:(y=m==null?void 0:m.rule_id)!==null&&y!==void 0?y:"",__evaluation:m,value:_}}function a(h,g,m){var _;return Object.assign(Object.assign({},r(h,g,m,(m==null?void 0:m.value)===!0)),{idType:(_=m==null?void 0:m.id_type)!==null&&_!==void 0?_:null})}Rt._makeFeatureGate=a;function s(h,g,m){var _;const y=(_=m==null?void 0:m.value)!==null&&_!==void 0?_:{};return Object.assign(Object.assign({},r(h,g,m,y)),{get:d(h,m==null?void 0:m.value)})}Rt._makeDynamicConfig=s;function l(h,g,m){var _;const y=s(h,g,m);return Object.assign(Object.assign({},y),{groupName:(_=m==null?void 0:m.group_name)!==null&&_!==void 0?_:null})}Rt._makeExperiment=l;function u(h,g,m,_){var y,b;return Object.assign(Object.assign({},r(h,g,m,void 0)),{get:d(h,m==null?void 0:m.value,_),groupName:(y=m==null?void 0:m.group_name)!==null&&y!==void 0?y:null,__value:(b=m==null?void 0:m.value)!==null&&b!==void 0?b:{}})}Rt._makeLayer=u;function f(h,g,m,_){return Object.assign(Object.assign(Object.assign({},h),g),{get:d(h.name,m,_)})}Rt._mergeOverride=f;function d(h,g,m){return(_,y)=>{var b;const S=(b=g==null?void 0:g[_])!==null&&b!==void 0?b:null;return S==null?y??null:y!=null&&!(0,e._isTypeMatch)(S,y)?(t.Log.warn(`Parameter type mismatch. '${h}.${_}' was found to be type '${typeof S}' but fallback/return type is '${typeof y}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),y??null):(m==null||m(_),S)}}return Rt._makeTypedGet=d,Rt}var ih={},E_;function W6(){return E_||(E_=1,Object.defineProperty(ih,"__esModule",{value:!0})),ih}var Ei={},w_;function eE(){if(w_)return Ei;w_=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.UPDATE_DETAIL_ERROR_MESSAGES=Ei.createUpdateDetails=void 0;const t=(e,r,a,s,l,u)=>({duration:a,source:r,success:e,error:s,sourceUrl:l,warnings:u});return Ei.createUpdateDetails=t,Ei.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."},Ei}var x_;function ar(){return x_||(x_=1,function(t){var e=di&&di.__createBinding||(Object.create?function(h,g,m,_){_===void 0&&(_=m);var y=Object.getOwnPropertyDescriptor(g,m);(!y||("get"in y?!g.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return g[m]}}),Object.defineProperty(h,_,y)}:function(h,g,m,_){_===void 0&&(_=m),h[_]=g[m]}),r=di&&di.__exportStar||function(h,g){for(var m in h)m!=="default"&&!Object.prototype.hasOwnProperty.call(g,m)&&e(g,h,m)};Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=t.Log=t.EventLogger=t.Diagnostics=void 0,Vr();const a=Vr(),s=Fh();Object.defineProperty(t,"Diagnostics",{enumerable:!0,get:function(){return s.Diagnostics}});const l=Y2();Object.defineProperty(t,"EventLogger",{enumerable:!0,get:function(){return l.EventLogger}});const u=jt();Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return u.Log}});const f=$c(),d=Kr();Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return d.Storage}}),r(Vr(),t),r(ru(),t),r(I6(),t),r(P6(),t),r(Fh(),t),r(H6(),t),r(J2(),t),r(z6(),t),r(q6(),t),r(fs(),t),r(B6(),t),r(jt(),t),r(Q2(),t),r(iu(),t),r(K6(),t),r(F6(),t),r(Y6(),t),r(Gi(),t),r(D1(),t),r(j1(),t),r(su(),t),r(X6(),t),r(e9(),t),r(Z6(),t),r(K2(),t),r($c(),t),r(au(),t),r(J6(),t),r(Q6(),t),r(W6(),t),r(X2(),t),r(Kr(),t),r(Z2(),t),r(O1(),t),r(F2(),t),r(R1(),t),r(A1(),t),r(eE(),t),r(W2(),t),Object.assign((0,a._getStatsigGlobal)(),{Log:u.Log,SDK_VERSION:f.SDK_VERSION})}(di)),di}var Ua={},bc={},C_;function tE(){if(C_)return bc;C_=1,Object.defineProperty(bc,"__esModule",{value:!0});const t=ar();let e=class{constructor(a){this._sdkKey=a,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,t._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(a,s){var l;if(!a)return!1;const u=(0,t._typedJsonParse)(a.data,"has_updates","EvaluationResponse");return u==null?!1:(this._source=a.source,(u==null?void 0:u.has_updates)!==!0||(this._rawValues=a.data,this._lcut=u.time,this._receivedAt=a.receivedAt,this._values=u,this._bootstrapMetadata=this._extractBootstrapMetadata(a.source,u),a.source&&u.user&&this._setWarningState(s,u),t.SDKFlags.setFlags(this._sdkKey,(l=u.sdk_flags)!==null&&l!==void 0?l:{})),!0)}getWarnings(){if(this._warnings.size!==0)return Array.from(this._warnings)}getGate(a){var s;return this._getDetailedStoreResult((s=this._values)===null||s===void 0?void 0:s.feature_gates,a)}getConfig(a){var s;return this._getDetailedStoreResult((s=this._values)===null||s===void 0?void 0:s.dynamic_configs,a)}getLayer(a){var s;return this._getDetailedStoreResult((s=this._values)===null||s===void 0?void 0:s.layer_configs,a)}getParamStore(a){var s;return this._getDetailedStoreResult((s=this._values)===null||s===void 0?void 0:s.param_stores,a)}getSource(){return this._source}getExposureMapping(){var a;return(a=this._values)===null||a===void 0?void 0:a.exposures}_extractBootstrapMetadata(a,s){if(a!=="Bootstrap")return null;const l={};return s.user&&(l.user=s.user),s.sdkInfo&&(l.generatorSDKInfo=s.sdkInfo),l.lcut=s.time,l}_getDetailedStoreResult(a,s){let l=null;return a&&(l=a[s]?a[s]:a[(0,t._DJB2)(s)]),{result:l,details:this._getDetails(l==null)}}_setWarningState(a,s){var l,u;const f=t.StableID.get(this._sdkKey);if(((l=a.customIDs)===null||l===void 0?void 0:l.stableID)!==f&&(!((u=a.customIDs)===null||u===void 0)&&u.stableID||f)){this._warnings.add("StableIDMismatch");return}if("user"in s){const d=s.user;(0,t._getFullUserHash)(a)!==(0,t._getFullUserHash)(d)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if(this._source==="Uninitialized"||this._source==="NoValues")return{reason:this._source};const a={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(a.warnings=Array.from(this._warnings)),a}_getDetails(a){var s,l;const u=this.getCurrentSourceDetails();let f=u.reason;const d=(s=u.warnings)!==null&&s!==void 0?s:[];this._source==="Bootstrap"&&d.length>0&&(f=f+d[0]),f!=="Uninitialized"&&f!=="NoValues"&&(f=`${f}:${a?"Unrecognized":"Recognized"}`);const h=this._source==="Bootstrap"&&(l=this._bootstrapMetadata)!==null&&l!==void 0?l:void 0;return h&&(u.bootstrapMetadata=h),Object.assign(Object.assign({},u),{reason:f})}};return bc.default=e,bc}var Ia={},Eo={},T_;function nE(){if(T_)return Eo;T_=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo._resolveDeltasResponse=void 0;const t=ar(),e=2;function r(u,f){const d=(0,t._typedJsonParse)(f,"checksum","DeltasEvaluationResponse");if(!d)return{hadBadDeltaChecksum:!0};const h=a(u,d),g=s(h),m=(0,t._DJB2Object)({feature_gates:g.feature_gates,dynamic_configs:g.dynamic_configs,layer_configs:g.layer_configs},e);return m===d.checksumV2?JSON.stringify(g):{hadBadDeltaChecksum:!0,badChecksum:m,badMergedConfigs:g,badFullResponse:d.deltas_full_response}}Eo._resolveDeltasResponse=r;function a(u,f){return Object.assign(Object.assign(Object.assign({},u),f),{feature_gates:Object.assign(Object.assign({},u.feature_gates),f.feature_gates),layer_configs:Object.assign(Object.assign({},u.layer_configs),f.layer_configs),dynamic_configs:Object.assign(Object.assign({},u.dynamic_configs),f.dynamic_configs)})}function s(u){const f=u;return l(u.deleted_gates,f.feature_gates),delete f.deleted_gates,l(u.deleted_configs,f.dynamic_configs),delete f.deleted_configs,l(u.deleted_layers,f.layer_configs),delete f.deleted_layers,f}function l(u,f){u==null||u.forEach(d=>{delete f[d]})}return Eo}var O_;function t9(){if(O_)return Ia;O_=1;var t=Ia&&Ia.__awaiter||function(s,l,u,f){function d(h){return h instanceof u?h:new u(function(g){g(h)})}return new(u||(u=Promise))(function(h,g){function m(b){try{y(f.next(b))}catch(S){g(S)}}function _(b){try{y(f.throw(b))}catch(S){g(S)}}function y(b){b.done?h(b.value):d(b.value).then(m,_)}y((f=f.apply(s,l||[])).next())})};Object.defineProperty(Ia,"__esModule",{value:!0});const e=ar(),r=nE();class a extends e.NetworkCore{constructor(l,u){super(l,u);const f=l==null?void 0:l.networkConfig;this._option=l,this._initializeUrlConfig=new e.UrlConfiguration(e.Endpoint._initialize,f==null?void 0:f.initializeUrl,f==null?void 0:f.api,f==null?void 0:f.initializeFallbackUrls)}fetchEvaluations(l,u,f,d,h){var g,m,_,y,b,S;return t(this,void 0,void 0,function*(){const w=u?(0,e._typedJsonParse)(u,"has_updates","InitializeResponse"):null;let R={user:d,hash:(_=(m=(g=this._option)===null||g===void 0?void 0:g.networkConfig)===null||m===void 0?void 0:m.initializeHashAlgorithm)!==null&&_!==void 0?_:"djb2",deltasResponseRequested:!1,full_checksum:null};if(w!=null&&w.has_updates){const T=(w==null?void 0:w.hash_used)!==((S=(b=(y=this._option)===null||y===void 0?void 0:y.networkConfig)===null||b===void 0?void 0:b.initializeHashAlgorithm)!==null&&S!==void 0?S:"djb2");R=Object.assign(Object.assign({},R),{sinceTime:h&&!T?w.time:0,previousDerivedFields:"derived_fields"in w&&h?w.derived_fields:{},deltasResponseRequested:!0,full_checksum:w.full_checksum,partialUserMatchSinceTime:T?0:w.time})}return this._fetchEvaluations(l,w,R,f)})}_fetchEvaluations(l,u,f,d){var h,g;return t(this,void 0,void 0,function*(){const m=yield this.post({sdkKey:l,urlConfig:this._initializeUrlConfig,data:f,retries:2,isStatsigEncodable:!0,priority:d});if((m==null?void 0:m.code)===204)return'{"has_updates": false}';if((m==null?void 0:m.code)!==200)return(h=m==null?void 0:m.body)!==null&&h!==void 0?h:null;if((u==null?void 0:u.has_updates)!==!0||((g=m.body)===null||g===void 0?void 0:g.includes('"is_delta":true'))!==!0||f.deltasResponseRequested!==!0)return m.body;const _=(0,r._resolveDeltasResponse)(u,m.body);return typeof _=="string"?_:this._fetchEvaluations(l,u,Object.assign(Object.assign(Object.assign({},f),_),{deltasResponseRequested:!1}),d)})}}return Ia.default=a,Ia}var wo={},A_;function rE(){if(A_)return wo;A_=1,Object.defineProperty(wo,"__esModule",{value:!0}),wo._makeParamStoreGetter=void 0;const t=ar(),e={disableExposureLog:!0};function r(g){return g==null||g.disableExposureLog===!1}function a(g,m){return m!=null&&!(0,t._isTypeMatch)(g,m)}function s(g,m){return g.value}function l(g,m,_){return g.getFeatureGate(m.gate_name,r(_)?void 0:e).value?m.pass_value:m.fail_value}function u(g,m,_,y){const S=g.getDynamicConfig(m.config_name,r(y)?void 0:e).get(m.param_name);return a(S,_)?_:S}function f(g,m,_,y){const S=g.getExperiment(m.experiment_name,r(y)?void 0:e).get(m.param_name);return a(S,_)?_:S}function d(g,m,_,y){const S=g.getLayer(m.layer_name,r(y)?void 0:e).get(m.param_name);return a(S,_)?_:S}function h(g,m,_){return(y,b)=>{if(m==null)return b;const S=m[y];if(S==null||b!=null&&(0,t._typeOf)(b)!==S.param_type)return b;switch(S.ref_type){case"static":return s(S);case"gate":return l(g,S,_);case"dynamic_config":return u(g,S,b,_);case"experiment":return f(g,S,b,_);case"layer":return d(g,S,b,_);default:return b}}}return wo._makeParamStoreGetter=h,wo}var wi={},R_;function iE(){if(R_)return wi;R_=1;var t=wi&&wi.__awaiter||function(s,l,u,f){function d(h){return h instanceof u?h:new u(function(g){g(h)})}return new(u||(u=Promise))(function(h,g){function m(b){try{y(f.next(b))}catch(S){g(S)}}function _(b){try{y(f.throw(b))}catch(S){g(S)}}function y(b){b.done?h(b.value):d(b.value).then(m,_)}y((f=f.apply(s,l||[])).next())})};Object.defineProperty(wi,"__esModule",{value:!0}),wi.StatsigEvaluationsDataAdapter=void 0;const e=ar(),r=t9();let a=class extends e.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(l,u,f){super.attach(l,u,f),f!==null&&f instanceof r.default?this._network=f:this._network=new r.default(u??{})}getDataAsync(l,u,f){return this._getDataAsyncImpl(l,(0,e._normalizeUser)(u,this._options),f)}prefetchData(l,u){return this._prefetchDataImpl(l,u)}setData(l){const u=(0,e._typedJsonParse)(l,"has_updates","data");u&&"user"in u?super.setData(l,u.user):e.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(l,u){super.setData(l,u)}_fetchFromNetwork(l,u,f,d){var h;return t(this,void 0,void 0,function*(){const g=yield(h=this._network)===null||h===void 0?void 0:h.fetchEvaluations(this._getSdkKey(),l,f==null?void 0:f.priority,u,d);return g??null})}_getCacheKey(l){var u;const f=(0,e._getStorageKey)(this._getSdkKey(),l,(u=this._options)===null||u===void 0?void 0:u.customUserCacheKeyFunc);return`${e.DataAdapterCachePrefix}.${this._cacheSuffix}.${f}`}_isCachedResultValidFor204(l,u){return l.fullUserHash!=null&&l.fullUserHash===(0,e._getFullUserHash)(u)}};return wi.StatsigEvaluationsDataAdapter=a,wi}var D_;function aE(){if(D_)return Ua;D_=1;var t=Ua&&Ua.__awaiter||function(f,d,h,g){function m(_){return _ instanceof h?_:new h(function(y){y(_)})}return new(h||(h=Promise))(function(_,y){function b(R){try{w(g.next(R))}catch(T){y(T)}}function S(R){try{w(g.throw(R))}catch(T){y(T)}}function w(R){R.done?_(R.value):m(R.value).then(b,S)}w((g=g.apply(f,d||[])).next())})};Object.defineProperty(Ua,"__esModule",{value:!0});const e=ar(),r=tE(),a=t9(),s=rE(),l=iE();let u=class Yh extends e.StatsigClientBase{static instance(d){const h=(0,e._getStatsigGlobal)().instance(d);return h instanceof Yh?h:(e.Log.warn((0,e._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new Yh(d??"",{}))}constructor(d,h,g=null){var m,_;e.SDKType._setClientType(d,"javascript-client");const y=new a.default(g,S=>{this.$emt(S)});super(d,(m=g==null?void 0:g.dataAdapter)!==null&&m!==void 0?m:new l.StatsigEvaluationsDataAdapter,y,g),this.getFeatureGate=this._memoize(e.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(e.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(e.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getLayer=this._memoize(e.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(e.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new r.default(d),this._network=y,this._user=this._configureUser(h,g);const b=(_=g==null?void 0:g.plugins)!==null&&_!==void 0?_:[];for(const S of b)S.bind(this)}initializeSync(d){var h;return this.loadingStatus!=="Uninitialized"?(0,e.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...(h=this._store.getWarnings())!==null&&h!==void 0?h:[]]):(this._logger.start(),this.updateUserSync(this._user,d))}initializeAsync(d){return t(this,void 0,void 0,function*(){return this._initializePromise?this._initializePromise:(this._initializePromise=this._initializeAsyncImpl(d),this._initializePromise)})}updateUserSync(d,h){var g;const m=performance.now(),_=[...(g=this._store.getWarnings())!==null&&g!==void 0?g:[]];this._resetForUser(d);const y=this.dataAdapter.getDataSync(this._user);y==null&&_.push("NoCachedValues"),this._store.setValues(y,this._user),this._finalizeUpdate(y);const b=h==null?void 0:h.disableBackgroundCacheRefresh;return b===!0||b==null&&(y==null?void 0:y.source)==="Bootstrap"?(0,e.createUpdateDetails)(!0,this._store.getSource(),performance.now()-m,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),_):(this._runPostUpdate(y??null,this._user),(0,e.createUpdateDetails)(!0,this._store.getSource(),performance.now()-m,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),_))}updateUserAsync(d,h){return t(this,void 0,void 0,function*(){this._resetForUser(d);const g=this._user;e.Diagnostics._markInitOverallStart(this._sdkKey);let m=this.dataAdapter.getDataSync(g);if(this._store.setValues(m,this._user),this._setStatus("Loading",m),m=yield this.dataAdapter.getDataAsync(m,g,h),g!==this._user)return(0,e.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let _=!1;m!=null&&(e.Diagnostics._markInitProcessStart(this._sdkKey),_=this._store.setValues(m,this._user),e.Diagnostics._markInitProcessEnd(this._sdkKey,{success:_})),this._finalizeUpdate(m),_||(this._errorBoundary.attachErrorIfNoneExists(e.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),e.Diagnostics._markInitOverallEnd(this._sdkKey,_,this._store.getCurrentSourceDetails());const y=e.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,e.createUpdateDetails)(_,this._store.getSource(),y,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:e.StatsigSession.get(this._sdkKey),stableID:e.StableID.get(this._sdkKey)}}checkGate(d,h){return this.getFeatureGate(d,h).value}logEvent(d,h,g){const m=typeof d=="string"?{eventName:d,value:h,metadata:g}:d;this.$emt({name:"log_event_called",event:m}),this._logger.enqueue(Object.assign(Object.assign({},m),{user:this._user,time:Date.now()}))}_primeReadyRipcord(){this.$on("error",()=>{this.loadingStatus==="Loading"&&this._finalizeUpdate(null)})}_initializeAsyncImpl(d){return t(this,void 0,void 0,function*(){return e.Storage.isReady()||(yield e.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,d)})}_finalizeUpdate(d){this._store.finalize(),this._setStatus("Ready",d)}_runPostUpdate(d,h){this.dataAdapter.getDataAsync(d,h,{priority:"low"}).catch(g=>{e.Log.error("An error occurred after update.",g)})}_resetForUser(d){this._logger.reset(),this._store.reset(),this._user=this._configureUser(d,this._options)}_configureUser(d,h){var g;const m=(0,e._normalizeUser)(d,h),_=(g=m.customIDs)===null||g===void 0?void 0:g.stableID;return _&&e.StableID.setOverride(_,this._sdkKey),m}_getFeatureGateImpl(d,h){var g,m;const{result:_,details:y}=this._store.getGate(d),b=(0,e._makeFeatureGate)(d,y,_),S=(m=(g=this.overrideAdapter)===null||g===void 0?void 0:g.getGateOverride)===null||m===void 0?void 0:m.call(g,b,this._user,h),w=S??b;return this._enqueueExposure(d,(0,e._createGateExposure)(this._user,w,this._store.getExposureMapping()),h),this.$emt({name:"gate_evaluation",gate:w}),w}_getDynamicConfigImpl(d,h){var g,m;const{result:_,details:y}=this._store.getConfig(d),b=(0,e._makeDynamicConfig)(d,y,_),S=(m=(g=this.overrideAdapter)===null||g===void 0?void 0:g.getDynamicConfigOverride)===null||m===void 0?void 0:m.call(g,b,this._user,h),w=S??b;return this._enqueueExposure(d,(0,e._createConfigExposure)(this._user,w,this._store.getExposureMapping()),h),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:w}),w}_getExperimentImpl(d,h){var g,m,_,y;const{result:b,details:S}=this._store.getConfig(d),w=(0,e._makeExperiment)(d,S,b);w.__evaluation!=null&&(w.__evaluation.secondary_exposures=(0,e._mapExposures)((m=(g=w.__evaluation)===null||g===void 0?void 0:g.secondary_exposures)!==null&&m!==void 0?m:[],this._store.getExposureMapping()));const R=(y=(_=this.overrideAdapter)===null||_===void 0?void 0:_.getExperimentOverride)===null||y===void 0?void 0:y.call(_,w,this._user,h),T=R??w;return this._enqueueExposure(d,(0,e._createConfigExposure)(this._user,T,this._store.getExposureMapping()),h),this.$emt({name:"experiment_evaluation",experiment:T}),T}_getLayerImpl(d,h){var g,m,_;const{result:y,details:b}=this._store.getLayer(d),S=(0,e._makeLayer)(d,b,y),w=(m=(g=this.overrideAdapter)===null||g===void 0?void 0:g.getLayerOverride)===null||m===void 0?void 0:m.call(g,S,this._user,h);h!=null&&h.disableExposureLog&&this._logger.incrementNonExposureCount(d);const R=(0,e._mergeOverride)(S,w,(_=w==null?void 0:w.__value)!==null&&_!==void 0?_:S.__value,T=>{h!=null&&h.disableExposureLog||this._enqueueExposure(d,(0,e._createLayerParameterExposure)(this._user,R,T,this._store.getExposureMapping()),h)});return this.$emt({name:"layer_evaluation",layer:R}),R}_getParameterStoreImpl(d,h){var g,m;const{result:_,details:y}=this._store.getParamStore(d);this._logger.incrementNonExposureCount(d);const b={name:d,details:y,__configuration:_,get:(0,s._makeParamStoreGetter)(this,_,h)},S=(m=(g=this.overrideAdapter)===null||g===void 0?void 0:g.getParamStoreOverride)===null||m===void 0?void 0:m.call(g,b,h);return S!=null&&(b.__configuration=S.config,b.details=S.details,b.get=(0,s._makeParamStoreGetter)(this,S.config,h)),b}};return Ua.default=u,Ua}var j_;function sE(){return j_||(j_=1,function(t){var e=fi&&fi.__createBinding||(Object.create?function(u,f,d,h){h===void 0&&(h=d);var g=Object.getOwnPropertyDescriptor(f,d);(!g||("get"in g?!f.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return f[d]}}),Object.defineProperty(u,h,g)}:function(u,f,d,h){h===void 0&&(h=d),u[h]=f[d]}),r=fi&&fi.__exportStar||function(u,f){for(var d in u)d!=="default"&&!Object.prototype.hasOwnProperty.call(f,d)&&e(f,u,d)};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClient=void 0;const a=ar(),s=aE();t.StatsigClient=s.default,r(ar(),t);const l=Object.assign((0,a._getStatsigGlobal)(),{StatsigClient:s.default});t.default=l}(fi)),fi}var oE=sE(),xi={},Ci={},k_;function lE(){if(k_)return Ci;k_=1;var t=Ci&&Ci.__awaiter||function(u,f,d,h){function g(m){return m instanceof d?m:new d(function(_){_(m)})}return new(d||(d=Promise))(function(m,_){function y(w){try{S(h.next(w))}catch(R){_(R)}}function b(w){try{S(h.throw(w))}catch(R){_(R)}}function S(w){w.done?m(w.value):g(w.value).then(y,b)}S((h=h.apply(u,f||[])).next())})};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.LocalOverrideAdapter=void 0;const e=ar(),r="LocalOverride:Recognized";function a(){return{gate:{},dynamicConfig:{},experiment:{},layer:{}}}function s(u,f){return{gate:Object.assign({},u.gate,f.gate),dynamicConfig:Object.assign({},u.dynamicConfig,f.dynamicConfig),experiment:Object.assign({},u.experiment,f.experiment),layer:Object.assign({},u.layer,f.layer)}}let l=class{constructor(f){this._overrides=a(),this._sdkKey=f??null}_getLocalOverridesStorageKey(f){return`statsig.local-overrides.${(0,e._getStorageKey)(f)}`}loadFromStorage(){return t(this,void 0,void 0,function*(){if(this._sdkKey==null)return;e.Storage.isReady()||(yield e.Storage.isReadyResolver());const f=this._getLocalOverridesStorageKey(this._sdkKey),d=e.Storage.getItem(f),h=d?(0,e._typedJsonParse)(d,"gate","LocalOverrideAdapter overrides"):null,g=this._hasInMemoryOverrides();h&&(this._overrides=g?s(h,this._overrides):h),g&&this._saveOverridesToStorage()})}_saveOverridesToStorage(){if(this._sdkKey==null||!e.Storage.isReady())return;const f=this._getLocalOverridesStorageKey(this._sdkKey);e.Storage.setItem(f,JSON.stringify(this._overrides))}overrideGate(f,d){this._overrides.gate[f]=d,this._overrides.gate[(0,e._DJB2)(f)]=d,this._saveOverridesToStorage()}_warnIfStorageNotReady(){e.Storage.isReady()||e.Log.warn("Storage is not ready. Override removal may not persist.")}removeGateOverride(f){this._warnIfStorageNotReady(),delete this._overrides.gate[f],delete this._overrides.gate[(0,e._DJB2)(f)],this._saveOverridesToStorage()}getGateOverride(f,d){var h;const g=(h=this._overrides.gate[f.name])!==null&&h!==void 0?h:this._overrides.gate[(0,e._DJB2)(f.name)];return g==null?null:Object.assign(Object.assign({},f),{value:g,details:Object.assign(Object.assign({},f.details),{reason:r})})}overrideDynamicConfig(f,d){this._overrides.dynamicConfig[f]=d,this._overrides.dynamicConfig[(0,e._DJB2)(f)]=d,this._saveOverridesToStorage()}removeDynamicConfigOverride(f){this._warnIfStorageNotReady(),delete this._overrides.dynamicConfig[f],delete this._overrides.dynamicConfig[(0,e._DJB2)(f)],this._saveOverridesToStorage()}getDynamicConfigOverride(f,d){return this._getConfigOverride(f,this._overrides.dynamicConfig)}overrideExperiment(f,d){this._overrides.experiment[f]=d,this._overrides.experiment[(0,e._DJB2)(f)]=d,this._saveOverridesToStorage()}removeExperimentOverride(f){this._warnIfStorageNotReady(),delete this._overrides.experiment[f],delete this._overrides.experiment[(0,e._DJB2)(f)],this._saveOverridesToStorage()}getExperimentOverride(f,d){return this._getConfigOverride(f,this._overrides.experiment)}overrideLayer(f,d){this._overrides.layer[f]=d,this._overrides.layer[(0,e._DJB2)(f)]=d,this._saveOverridesToStorage()}removeLayerOverride(f){this._warnIfStorageNotReady(),delete this._overrides.layer[f],delete this._overrides.layer[(0,e._DJB2)(f)],this._saveOverridesToStorage()}getAllOverrides(){return JSON.parse(JSON.stringify(this._overrides))}removeAllOverrides(){this._warnIfStorageNotReady(),this._overrides=a(),this._saveOverridesToStorage()}getLayerOverride(f,d){var h;const g=(h=this._overrides.layer[f.name])!==null&&h!==void 0?h:this._overrides.layer[(0,e._DJB2)(f.name)];return g==null?null:Object.assign(Object.assign({},f),{__value:g,get:(0,e._makeTypedGet)(f.name,g),details:Object.assign(Object.assign({},f.details),{reason:r})})}_getConfigOverride(f,d){var h;const g=(h=d[f.name])!==null&&h!==void 0?h:d[(0,e._DJB2)(f.name)];return g==null?null:Object.assign(Object.assign({},f),{value:g,get:(0,e._makeTypedGet)(f.name,g),details:Object.assign(Object.assign({},f.details),{reason:r})})}_hasInMemoryOverrides(){return Object.keys(this._overrides.gate).length>0||Object.keys(this._overrides.dynamicConfig).length>0||Object.keys(this._overrides.experiment).length>0||Object.keys(this._overrides.layer).length>0}};return Ci.LocalOverrideAdapter=l,Ci}var N_;function cE(){return N_||(N_=1,function(t){var e=xi&&xi.__createBinding||(Object.create?function(a,s,l,u){u===void 0&&(u=l);var f=Object.getOwnPropertyDescriptor(s,l);(!f||("get"in f?!s.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(a,u,f)}:function(a,s,l,u){u===void 0&&(u=l),a[u]=s[l]}),r=xi&&xi.__exportStar||function(a,s){for(var l in a)l!=="default"&&!Object.prototype.hasOwnProperty.call(s,l)&&e(s,a,l)};Object.defineProperty(t,"__esModule",{value:!0}),r(lE(),t)}(xi)),xi}var uE=cE();const M_=new uE.LocalOverrideAdapter;let Mo;async function fE({environment:t,overrides:e,userId:r}){if(!r)throw new Error("invariant: missing userId");if(!Mo){try{const a=new oE.StatsigClient("client-RoO8UZOrk5aM4zXe3AP7vQjy66PWeumvN2PfQ2P6xt7",{userID:r},{environment:{tier:t},networkConfig:{networkTimeoutMs:2500,preventAllNetworkTraffic:t==="local"},overrideAdapter:M_});await a.initializeAsync(),Mo=a}catch(a){console.log("[Statsig] Failed to initialize Statsig:",a)}typeof document<"u"&&(document.documentElement.setAttribute("data-fg-user",r),document.documentElement.setAttribute("data-fg-env",t)),e&&Object.entries(e).forEach(([a,s])=>{typeof s=="boolean"&&M_.overrideGate(a,s)})}}function dE(t){return(Mo==null?void 0:Mo.checkGate(t))??!1}function hE(t,{off:e,on:r}){return function(s){return dE(t)?x.jsx(r,{...s}):x.jsx(e,{...s})}}/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @lightSyntaxTransform + * @noflow + * @nolint + * @preventMunge + * @preserve-invariant-messages + */var ah,L_;function pE(){if(L_)return ah;L_=1;var t=Object.create,e=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(Y,W)=>{for(var j in W)e(Y,j,{get:W[j],enumerable:!0})},f=(Y,W,j,H)=>{if(W&&typeof W=="object"||typeof W=="function")for(let ee of a(W))!l.call(Y,ee)&&ee!==j&&e(Y,ee,{get:()=>W[ee],enumerable:!(H=r(W,ee))||H.enumerable});return Y},d=(Y,W,j)=>(j=Y!=null?t(s(Y)):{},f(!Y||!Y.__esModule?e(j,"default",{value:Y,enumerable:!0}):j,Y)),h=Y=>f(e({},"__esModule",{value:!0}),Y),g={};u(g,{$dispatcherGuard:()=>I,$makeReadOnly:()=>Z,$reset:()=>z,$structuralCheck:()=>G,c:()=>D,clearRenderCounterRegistry:()=>te,renderCounterRegistry:()=>q,useRenderCounter:()=>ae}),ah=h(g);var m=d(us()),{useRef:_,useEffect:y,isValidElement:b}=m,S,w=(S=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)!=null?S:m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,R=Symbol.for("react.memo_cache_sentinel"),T,D=typeof((T=m.__COMPILER_RUNTIME)==null?void 0:T.c)=="function"?m.__COMPILER_RUNTIME.c:function(W){return m.useMemo(()=>{const j=new Array(W);for(let H=0;H{N[Y]=()=>{throw new Error(`[React] Unexpected React hook call (${Y}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var A=null;N.useMemoCache=Y=>{if(A==null)throw new Error("React Compiler internal invariant violation: unexpected null dispatcher");return A.useMemoCache(Y)};function k(Y){return w.ReactCurrentDispatcher.current=Y,w.ReactCurrentDispatcher.current}var U=[];function I(Y){const W=w.ReactCurrentDispatcher.current;if(Y===0){if(U.push(W),U.length===1&&(A=W),W===N)throw new Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");k(N)}else if(Y===1){const j=U.pop();if(j==null)throw new Error("React Compiler internal error: unexpected null in guard stack");U.length===0&&(A=null),k(j)}else if(Y===2)U.push(W),k(A);else if(Y===3){const j=U.pop();if(j==null)throw new Error("React Compiler internal error: unexpected null in guard stack");k(j)}else throw new Error("React Compiler internal error: unreachable block"+Y)}function z(Y){for(let W=0;W{W.count=0})}function ue(Y,W){let j=q.get(Y);j==null&&(j=new Set,q.set(Y,j)),j.add(W)}function he(Y,W){const j=q.get(Y);j!=null&&j.delete(W)}function ae(Y){const W=_(null);W.current!=null&&(W.current.count+=1),y(()=>{if(W.current==null){const j={count:0};ue(Y,j),W.current=j}return()=>{W.current!==null&&he(Y,W.current)}})}var M=new Set;function G(Y,W,j,H,ee,ne){function re(le,se,me,_e){const et=`${H}:${ne} [${ee}] ${j}${me} changed from ${le} to ${se} at depth ${_e}`;M.has(et)||(M.add(et),console.error(et))}const de=2;function oe(le,se,me,_e){if(!(_e>de)){if(le===se)return;if(typeof le!=typeof se)re(`type ${typeof le}`,`type ${typeof se}`,me,_e);else if(typeof le=="object"){const et=Array.isArray(le),dt=Array.isArray(se);if(le===null&&se!==null)re("null",`type ${typeof se}`,me,_e);else if(se===null)re(`type ${typeof le}`,"null",me,_e);else if(le instanceof Map)if(!(se instanceof Map))re("Map instance","other value",me,_e);else if(le.size!==se.size)re(`Map instance with size ${le.size}`,`Map instance with size ${se.size}`,me,_e);else for(const[Ee,Ot]of le)se.has(Ee)?oe(Ot,se.get(Ee),`${me}.get(${Ee})`,_e+1):re(`Map instance with key ${Ee}`,`Map instance without key ${Ee}`,me,_e);else if(se instanceof Map)re("other value","Map instance",me,_e);else if(le instanceof Set)if(!(se instanceof Set))re("Set instance","other value",me,_e);else if(le.size!==se.size)re(`Set instance with size ${le.size}`,`Set instance with size ${se.size}`,me,_e);else for(const Ee of se)le.has(Ee)||re(`Set instance without element ${Ee}`,`Set instance with element ${Ee}`,me,_e);else if(se instanceof Set)re("other value","Set instance",me,_e);else if(et||dt)if(et!==dt)re(`type ${et?"array":"object"}`,`type ${dt?"array":"object"}`,me,_e);else if(le.length!==se.length)re(`array with length ${le.length}`,`array with length ${se.length}`,me,_e);else for(let Ee=0;Ee`${e}${gE(r)}:${a};`,"")}const mE=ds({overflow:"visible"}),vE=ds({alignItems:"center",display:"flex",inset:"0px",justifyContent:"center",pointerEvents:"none",position:"fixed",strokeWidth:"2px"}),_E=ds({pointerEvents:"none",position:"fixed",right:"12px",strokeWidth:"2px",top:"12px"}),$_=ds({fill:"currentColor"}),U_=ds({fill:"transparent",stroke:"currentColor"}),I_=ds({fill:"transparent",opacity:.1,stroke:"currentColor"}),yE=({color:t="currentColor",id:e="_t",position:r,variant:a})=>` +
+ + + + + + + + + + ${a==="fill"?``:""} + ${a==="fill"?``:""} + ${a==="stroke"?``:""} + ${a==="stroke"?``:""} + ${a==="stroke"||a==="idle"?``:""} + ${a==="stroke"||a==="idle"?``:""} + + +
+`;function bE(t){const e=ie.c(7),{color:r,position:a,variant:s}=t,l=C.useId();let u;if(e[0]!==r||e[1]!==a||e[2]!==l||e[3]!==s){const d=l.replaceAll(":","");u=yE({color:r,id:d,position:a,variant:s}),e[0]=r,e[1]=a,e[2]=l,e[3]=s,e[4]=u}else u=e[4];let f;return e[5]!==u?(f=x.jsx("div",{dangerouslySetInnerHTML:{__html:u}}),e[5]=u,e[6]=f):f=e[6],f}function $e(t,e){if(t==null)return{};var r={},a=Object.keys(t),s,l;for(l=0;l=0)&&(r[s]=t[s]);return r}var SE=["color"],EE=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,SE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M7.5 0.75L9.75 3H5.25L7.5 0.75ZM7.5 14.25L9.75 12H5.25L7.5 14.25ZM3 5.25L0.75 7.5L3 9.75V5.25ZM14.25 7.5L12 5.25V9.75L14.25 7.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),wE=["color"],xE=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,wE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M8.8914 2.1937C9.1158 2.35464 9.16725 2.66701 9.00631 2.89141L2.47388 12H13.5C13.7761 12 14 12.2239 14 12.5C14 12.7762 13.7761 13 13.5 13H1.5C1.31254 13 1.14082 12.8952 1.0552 12.7284C0.969578 12.5616 0.984438 12.361 1.09369 12.2086L8.19369 2.30862C8.35462 2.08422 8.667 2.03277 8.8914 2.1937ZM11.1 6.50001C11.1 6.22387 11.3238 6.00001 11.6 6.00001C11.8761 6.00001 12.1 6.22387 12.1 6.50001C12.1 6.77615 11.8761 7.00001 11.6 7.00001C11.3238 7.00001 11.1 6.77615 11.1 6.50001ZM10.4 4.00001C10.1239 4.00001 9.90003 4.22387 9.90003 4.50001C9.90003 4.77615 10.1239 5.00001 10.4 5.00001C10.6762 5.00001 10.9 4.77615 10.9 4.50001C10.9 4.22387 10.6762 4.00001 10.4 4.00001ZM12.1 8.50001C12.1 8.22387 12.3238 8.00001 12.6 8.00001C12.8761 8.00001 13.1 8.22387 13.1 8.50001C13.1 8.77615 12.8761 9.00001 12.6 9.00001C12.3238 9.00001 12.1 8.77615 12.1 8.50001ZM13.4 10C13.1239 10 12.9 10.2239 12.9 10.5C12.9 10.7761 13.1239 11 13.4 11C13.6762 11 13.9 10.7761 13.9 10.5C13.9 10.2239 13.6762 10 13.4 10Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),CE=["color"],k1=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,CE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M12.5 2H2.5C2.22386 2 2 2.22386 2 2.5V12.5C2 12.7761 2.22386 13 2.5 13H12.5C12.7761 13 13 12.7761 13 12.5V2.5C13 2.22386 12.7761 2 12.5 2ZM2.5 1C1.67157 1 1 1.67157 1 2.5V12.5C1 13.3284 1.67157 14 2.5 14H12.5C13.3284 14 14 13.3284 14 12.5V2.5C14 1.67157 13.3284 1 12.5 1H2.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),TE=["color"],OE=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,TE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M2 3C1.44772 3 1 3.44772 1 4V11C1 11.5523 1.44772 12 2 12H13C13.5523 12 14 11.5523 14 11V4C14 3.44772 13.5523 3 13 3H2ZM0 4C0 2.89543 0.895431 2 2 2H13C14.1046 2 15 2.89543 15 4V11C15 12.1046 14.1046 13 13 13H2C0.895431 13 0 12.1046 0 11V4ZM2 4.25C2 4.11193 2.11193 4 2.25 4H4.75C4.88807 4 5 4.11193 5 4.25V5.75454C5 5.89261 4.88807 6.00454 4.75 6.00454H2.25C2.11193 6.00454 2 5.89261 2 5.75454V4.25ZM12.101 7.58421C12.101 9.02073 10.9365 10.1853 9.49998 10.1853C8.06346 10.1853 6.89893 9.02073 6.89893 7.58421C6.89893 6.14769 8.06346 4.98315 9.49998 4.98315C10.9365 4.98315 12.101 6.14769 12.101 7.58421ZM13.101 7.58421C13.101 9.57302 11.4888 11.1853 9.49998 11.1853C7.51117 11.1853 5.89893 9.57302 5.89893 7.58421C5.89893 5.5954 7.51117 3.98315 9.49998 3.98315C11.4888 3.98315 13.101 5.5954 13.101 7.58421Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),AE=["color"],RE=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,AE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),DE=["color"],n9=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,DE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),jE=["color"],r9=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,jE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),kE=["color"],NE=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,kE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M3.29227 0.048984C3.47033 -0.032338 3.67946 -0.00228214 3.8274 0.125891L12.8587 7.95026C13.0134 8.08432 13.0708 8.29916 13.0035 8.49251C12.9362 8.68586 12.7578 8.81866 12.5533 8.82768L9.21887 8.97474L11.1504 13.2187C11.2648 13.47 11.1538 13.7664 10.9026 13.8808L8.75024 14.8613C8.499 14.9758 8.20255 14.8649 8.08802 14.6137L6.15339 10.3703L3.86279 12.7855C3.72196 12.934 3.50487 12.9817 3.31479 12.9059C3.1247 12.8301 3 12.6461 3 12.4414V0.503792C3 0.308048 3.11422 0.130306 3.29227 0.048984ZM4 1.59852V11.1877L5.93799 9.14425C6.05238 9.02363 6.21924 8.96776 6.38319 8.99516C6.54715 9.02256 6.68677 9.12965 6.75573 9.2809L8.79056 13.7441L10.0332 13.178L8.00195 8.71497C7.93313 8.56376 7.94391 8.38824 8.03072 8.24659C8.11753 8.10494 8.26903 8.01566 8.435 8.00834L11.2549 7.88397L4 1.59852Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),ME=["color"],LE=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,ME);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M8.625 2.5C8.625 3.12132 8.12132 3.625 7.5 3.625C6.87868 3.625 6.375 3.12132 6.375 2.5C6.375 1.87868 6.87868 1.375 7.5 1.375C8.12132 1.375 8.625 1.87868 8.625 2.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM7.5 13.625C8.12132 13.625 8.625 13.1213 8.625 12.5C8.625 11.8787 8.12132 11.375 7.5 11.375C6.87868 11.375 6.375 11.8787 6.375 12.5C6.375 13.1213 6.87868 13.625 7.5 13.625Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),$E=["color"],i9=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,$E);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M8.36052 0.72921C8.55578 0.533948 8.87236 0.533948 9.06763 0.72921L14.2708 5.93235C14.466 6.12761 14.466 6.4442 14.2708 6.63946L8.95513 11.9551L7.3466 13.5636C6.76081 14.1494 5.81106 14.1494 5.22528 13.5636L1.43635 9.7747C0.850563 9.18891 0.850563 8.23917 1.43635 7.65338L3.04488 6.04485L8.36052 0.72921ZM8.71407 1.78987L4.10554 6.3984L8.60157 10.8944L13.2101 6.28591L8.71407 1.78987ZM7.89447 11.6015L3.39843 7.10551L2.14346 8.36049C1.94819 8.55575 1.94819 8.87233 2.14346 9.06759L5.93238 12.8565C6.12765 13.0518 6.44423 13.0518 6.63949 12.8565L7.89447 11.6015Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),UE=["color"],N1=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,UE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),IE=["color"],PE=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,IE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M3 1C2.44771 1 2 1.44772 2 2V13C2 13.5523 2.44772 14 3 14H10.5C10.7761 14 11 13.7761 11 13.5C11 13.2239 10.7761 13 10.5 13H3V2L10.5 2C10.7761 2 11 1.77614 11 1.5C11 1.22386 10.7761 1 10.5 1H3ZM12.6036 4.89645C12.4083 4.70118 12.0917 4.70118 11.8964 4.89645C11.7012 5.09171 11.7012 5.40829 11.8964 5.60355L13.2929 7H6.5C6.22386 7 6 7.22386 6 7.5C6 7.77614 6.22386 8 6.5 8H13.2929L11.8964 9.39645C11.7012 9.59171 11.7012 9.90829 11.8964 10.1036C12.0917 10.2988 12.4083 10.2988 12.6036 10.1036L14.8536 7.85355C15.0488 7.65829 15.0488 7.34171 14.8536 7.14645L12.6036 4.89645Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),HE=["color"],zE=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,HE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M7.07095 0.650238C6.67391 0.650238 6.32977 0.925096 6.24198 1.31231L6.0039 2.36247C5.6249 2.47269 5.26335 2.62363 4.92436 2.81013L4.01335 2.23585C3.67748 2.02413 3.23978 2.07312 2.95903 2.35386L2.35294 2.95996C2.0722 3.2407 2.0232 3.6784 2.23493 4.01427L2.80942 4.92561C2.62307 5.2645 2.47227 5.62594 2.36216 6.00481L1.31209 6.24287C0.924883 6.33065 0.650024 6.6748 0.650024 7.07183V7.92897C0.650024 8.32601 0.924883 8.67015 1.31209 8.75794L2.36228 8.99603C2.47246 9.375 2.62335 9.73652 2.80979 10.0755L2.2354 10.9867C2.02367 11.3225 2.07267 11.7602 2.35341 12.041L2.95951 12.6471C3.24025 12.9278 3.67795 12.9768 4.01382 12.7651L4.92506 12.1907C5.26384 12.377 5.62516 12.5278 6.0039 12.6379L6.24198 13.6881C6.32977 14.0753 6.67391 14.3502 7.07095 14.3502H7.92809C8.32512 14.3502 8.66927 14.0753 8.75705 13.6881L8.99505 12.6383C9.37411 12.5282 9.73573 12.3773 10.0748 12.1909L10.986 12.7653C11.3218 12.977 11.7595 12.928 12.0403 12.6473L12.6464 12.0412C12.9271 11.7604 12.9761 11.3227 12.7644 10.9869L12.1902 10.076C12.3768 9.73688 12.5278 9.37515 12.638 8.99596L13.6879 8.75794C14.0751 8.67015 14.35 8.32601 14.35 7.92897V7.07183C14.35 6.6748 14.0751 6.33065 13.6879 6.24287L12.6381 6.00488C12.528 5.62578 12.3771 5.26414 12.1906 4.92507L12.7648 4.01407C12.9766 3.6782 12.9276 3.2405 12.6468 2.95975L12.0407 2.35366C11.76 2.07292 11.3223 2.02392 10.9864 2.23565L10.0755 2.80989C9.73622 2.62328 9.37437 2.47229 8.99505 2.36209L8.75705 1.31231C8.66927 0.925096 8.32512 0.650238 7.92809 0.650238H7.07095ZM4.92053 3.81251C5.44724 3.44339 6.05665 3.18424 6.71543 3.06839L7.07095 1.50024H7.92809L8.28355 3.06816C8.94267 3.18387 9.5524 3.44302 10.0794 3.81224L11.4397 2.9547L12.0458 3.56079L11.1882 4.92117C11.5573 5.44798 11.8164 6.0575 11.9321 6.71638L13.5 7.07183V7.92897L11.932 8.28444C11.8162 8.94342 11.557 9.55301 11.1878 10.0798L12.0453 11.4402L11.4392 12.0462L10.0787 11.1886C9.55192 11.5576 8.94241 11.8166 8.28355 11.9323L7.92809 13.5002H7.07095L6.71543 11.932C6.0569 11.8162 5.44772 11.5572 4.92116 11.1883L3.56055 12.046L2.95445 11.4399L3.81213 10.0794C3.4431 9.55266 3.18403 8.94326 3.06825 8.2845L1.50002 7.92897V7.07183L3.06818 6.71632C3.18388 6.05765 3.44283 5.44833 3.81171 4.92165L2.95398 3.561L3.56008 2.95491L4.92053 3.81251ZM9.02496 7.50008C9.02496 8.34226 8.34223 9.02499 7.50005 9.02499C6.65786 9.02499 5.97513 8.34226 5.97513 7.50008C5.97513 6.65789 6.65786 5.97516 7.50005 5.97516C8.34223 5.97516 9.02496 6.65789 9.02496 7.50008ZM9.92496 7.50008C9.92496 8.83932 8.83929 9.92499 7.50005 9.92499C6.1608 9.92499 5.07513 8.83932 5.07513 7.50008C5.07513 6.16084 6.1608 5.07516 7.50005 5.07516C8.83929 5.07516 9.92496 6.16084 9.92496 7.50008Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),qE=["color"],P_=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,qE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M12.5 2H8V7H13V2.5C13 2.22386 12.7761 2 12.5 2ZM13 8H8V13H12.5C12.7761 13 13 12.7761 13 12.5V8ZM7 7V2H2.5C2.22386 2 2 2.22386 2 2.5V7H7ZM2 8V12.5C2 12.7761 2.22386 13 2.5 13H7V8H2ZM2.5 1C1.67157 1 1 1.67157 1 2.5V12.5C1 13.3284 1.67157 14 2.5 14H12.5C13.3284 14 14 13.3284 14 12.5V2.5C14 1.67157 13.3284 1 12.5 1H2.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),BE=["color"],VE=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,BE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M7.1813 1.68179C7.35704 1.50605 7.64196 1.50605 7.8177 1.68179L10.3177 4.18179C10.4934 4.35753 10.4934 4.64245 10.3177 4.81819C10.142 4.99392 9.85704 4.99392 9.6813 4.81819L7.9495 3.08638L7.9495 11.9136L9.6813 10.1818C9.85704 10.0061 10.142 10.0061 10.3177 10.1818C10.4934 10.3575 10.4934 10.6424 10.3177 10.8182L7.8177 13.3182C7.73331 13.4026 7.61885 13.45 7.4995 13.45C7.38015 13.45 7.26569 13.4026 7.1813 13.3182L4.6813 10.8182C4.50557 10.6424 4.50557 10.3575 4.6813 10.1818C4.85704 10.0061 5.14196 10.0061 5.3177 10.1818L7.0495 11.9136L7.0495 3.08638L5.3177 4.81819C5.14196 4.99392 4.85704 4.99392 4.6813 4.81819C4.50557 4.64245 4.50557 4.35753 4.6813 4.18179L7.1813 1.68179Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),GE=["color"],KE=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,GE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M7.75432 0.819537C7.59742 0.726821 7.4025 0.726821 7.24559 0.819537L1.74559 4.06954C1.59336 4.15949 1.49996 4.32317 1.49996 4.5C1.49996 4.67683 1.59336 4.84051 1.74559 4.93046L7.24559 8.18046C7.4025 8.27318 7.59742 8.27318 7.75432 8.18046L13.2543 4.93046C13.4066 4.84051 13.5 4.67683 13.5 4.5C13.5 4.32317 13.4066 4.15949 13.2543 4.06954L7.75432 0.819537ZM7.49996 7.16923L2.9828 4.5L7.49996 1.83077L12.0171 4.5L7.49996 7.16923ZM1.5695 7.49564C1.70998 7.2579 2.01659 7.17906 2.25432 7.31954L7.49996 10.4192L12.7456 7.31954C12.9833 7.17906 13.2899 7.2579 13.4304 7.49564C13.5709 7.73337 13.4921 8.03998 13.2543 8.18046L7.75432 11.4305C7.59742 11.5232 7.4025 11.5232 7.24559 11.4305L1.74559 8.18046C1.50786 8.03998 1.42901 7.73337 1.5695 7.49564ZM1.56949 10.4956C1.70998 10.2579 2.01658 10.1791 2.25432 10.3195L7.49996 13.4192L12.7456 10.3195C12.9833 10.1791 13.2899 10.2579 13.4304 10.4956C13.5709 10.7334 13.4921 11.04 13.2543 11.1805L7.75432 14.4305C7.59742 14.5232 7.4025 14.5232 7.24559 14.4305L1.74559 11.1805C1.50785 11.04 1.42901 10.7334 1.56949 10.4956Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),FE=["color"],YE=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,FE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M8.51194 3.00541C9.18829 2.54594 10.0435 2.53694 10.6788 2.95419C10.8231 3.04893 10.9771 3.1993 11.389 3.61119C11.8009 4.02307 11.9513 4.17714 12.046 4.32141C12.4633 4.95675 12.4543 5.81192 11.9948 6.48827C11.8899 6.64264 11.7276 6.80811 11.3006 7.23511L10.6819 7.85383C10.4867 8.04909 10.4867 8.36567 10.6819 8.56093C10.8772 8.7562 11.1938 8.7562 11.389 8.56093L12.0077 7.94221L12.0507 7.89929C12.4203 7.52976 12.6568 7.2933 12.822 7.0502C13.4972 6.05623 13.5321 4.76252 12.8819 3.77248C12.7233 3.53102 12.4922 3.30001 12.1408 2.94871L12.0961 2.90408L12.0515 2.85942C11.7002 2.508 11.4692 2.27689 11.2277 2.11832C10.2377 1.46813 8.94398 1.50299 7.95001 2.17822C7.70691 2.34336 7.47044 2.57991 7.1009 2.94955L7.058 2.99247L6.43928 3.61119C6.24401 3.80645 6.24401 4.12303 6.43928 4.31829C6.63454 4.51355 6.95112 4.51355 7.14638 4.31829L7.7651 3.69957C8.1921 3.27257 8.35757 3.11027 8.51194 3.00541ZM4.31796 7.14672C4.51322 6.95146 4.51322 6.63487 4.31796 6.43961C4.12269 6.24435 3.80611 6.24435 3.61085 6.43961L2.99213 7.05833L2.94922 7.10124C2.57957 7.47077 2.34303 7.70724 2.17788 7.95035C1.50265 8.94432 1.4678 10.238 2.11799 11.2281C2.27656 11.4695 2.50766 11.7005 2.8591 12.0518L2.90374 12.0965L2.94837 12.1411C3.29967 12.4925 3.53068 12.7237 3.77214 12.8822C4.76219 13.5324 6.05589 13.4976 7.04986 12.8223C7.29296 12.6572 7.52943 12.4206 7.89896 12.051L7.89897 12.051L7.94188 12.0081L8.5606 11.3894C8.75586 11.1941 8.75586 10.8775 8.5606 10.6823C8.36533 10.487 8.04875 10.487 7.85349 10.6823L7.23477 11.301C6.80777 11.728 6.6423 11.8903 6.48794 11.9951C5.81158 12.4546 4.95642 12.4636 4.32107 12.0464C4.17681 11.9516 4.02274 11.8012 3.61085 11.3894C3.19896 10.9775 3.0486 10.8234 2.95385 10.6791C2.53661 10.0438 2.54561 9.18863 3.00507 8.51227C3.10993 8.35791 3.27224 8.19244 3.69924 7.76544L4.31796 7.14672ZM9.62172 6.08558C9.81698 5.89032 9.81698 5.57373 9.62172 5.37847C9.42646 5.18321 9.10988 5.18321 8.91461 5.37847L5.37908 8.91401C5.18382 9.10927 5.18382 9.42585 5.37908 9.62111C5.57434 9.81637 5.89092 9.81637 6.08619 9.62111L9.62172 6.08558Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),XE=["color"],ZE=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,XE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),JE=["color"],QE=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,JE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M2.89998 0.499976C2.89998 0.279062 2.72089 0.0999756 2.49998 0.0999756C2.27906 0.0999756 2.09998 0.279062 2.09998 0.499976V1.09998H1.49998C1.27906 1.09998 1.09998 1.27906 1.09998 1.49998C1.09998 1.72089 1.27906 1.89998 1.49998 1.89998H2.09998V2.49998C2.09998 2.72089 2.27906 2.89998 2.49998 2.89998C2.72089 2.89998 2.89998 2.72089 2.89998 2.49998V1.89998H3.49998C3.72089 1.89998 3.89998 1.72089 3.89998 1.49998C3.89998 1.27906 3.72089 1.09998 3.49998 1.09998H2.89998V0.499976ZM5.89998 3.49998C5.89998 3.27906 5.72089 3.09998 5.49998 3.09998C5.27906 3.09998 5.09998 3.27906 5.09998 3.49998V4.09998H4.49998C4.27906 4.09998 4.09998 4.27906 4.09998 4.49998C4.09998 4.72089 4.27906 4.89998 4.49998 4.89998H5.09998V5.49998C5.09998 5.72089 5.27906 5.89998 5.49998 5.89998C5.72089 5.89998 5.89998 5.72089 5.89998 5.49998V4.89998H6.49998C6.72089 4.89998 6.89998 4.72089 6.89998 4.49998C6.89998 4.27906 6.72089 4.09998 6.49998 4.09998H5.89998V3.49998ZM1.89998 6.49998C1.89998 6.27906 1.72089 6.09998 1.49998 6.09998C1.27906 6.09998 1.09998 6.27906 1.09998 6.49998V7.09998H0.499976C0.279062 7.09998 0.0999756 7.27906 0.0999756 7.49998C0.0999756 7.72089 0.279062 7.89998 0.499976 7.89998H1.09998V8.49998C1.09998 8.72089 1.27906 8.89997 1.49998 8.89997C1.72089 8.89997 1.89998 8.72089 1.89998 8.49998V7.89998H2.49998C2.72089 7.89998 2.89998 7.72089 2.89998 7.49998C2.89998 7.27906 2.72089 7.09998 2.49998 7.09998H1.89998V6.49998ZM8.54406 0.98184L8.24618 0.941586C8.03275 0.917676 7.90692 1.1655 8.02936 1.34194C8.17013 1.54479 8.29981 1.75592 8.41754 1.97445C8.91878 2.90485 9.20322 3.96932 9.20322 5.10022C9.20322 8.37201 6.82247 11.0878 3.69887 11.6097C3.45736 11.65 3.20988 11.6772 2.96008 11.6906C2.74563 11.702 2.62729 11.9535 2.77721 12.1072C2.84551 12.1773 2.91535 12.2458 2.98667 12.3128L3.05883 12.3795L3.31883 12.6045L3.50684 12.7532L3.62796 12.8433L3.81491 12.9742L3.99079 13.089C4.11175 13.1651 4.23536 13.2375 4.36157 13.3059L4.62496 13.4412L4.88553 13.5607L5.18837 13.6828L5.43169 13.7686C5.56564 13.8128 5.70149 13.8529 5.83857 13.8885C5.94262 13.9155 6.04767 13.9401 6.15405 13.9622C6.27993 13.9883 6.40713 14.0109 6.53544 14.0298L6.85241 14.0685L7.11934 14.0892C7.24637 14.0965 7.37436 14.1002 7.50322 14.1002C11.1483 14.1002 14.1032 11.1453 14.1032 7.50023C14.1032 7.25044 14.0893 7.00389 14.0623 6.76131L14.0255 6.48407C13.991 6.26083 13.9453 6.04129 13.8891 5.82642C13.8213 5.56709 13.7382 5.31398 13.6409 5.06881L13.5279 4.80132L13.4507 4.63542L13.3766 4.48666C13.2178 4.17773 13.0353 3.88295 12.8312 3.60423L12.6782 3.40352L12.4793 3.16432L12.3157 2.98361L12.1961 2.85951L12.0355 2.70246L11.8134 2.50184L11.4925 2.24191L11.2483 2.06498L10.9562 1.87446L10.6346 1.68894L10.3073 1.52378L10.1938 1.47176L9.95488 1.3706L9.67791 1.2669L9.42566 1.1846L9.10075 1.09489L8.83599 1.03486L8.54406 0.98184ZM10.4032 5.30023C10.4032 4.27588 10.2002 3.29829 9.83244 2.40604C11.7623 3.28995 13.1032 5.23862 13.1032 7.50023C13.1032 10.593 10.596 13.1002 7.50322 13.1002C6.63646 13.1002 5.81597 12.9036 5.08355 12.5522C6.5419 12.0941 7.81081 11.2082 8.74322 10.0416C8.87963 10.2284 9.10028 10.3497 9.34928 10.3497C9.76349 10.3497 10.0993 10.0139 10.0993 9.59971C10.0993 9.24256 9.84965 8.94373 9.51535 8.86816C9.57741 8.75165 9.63653 8.63334 9.6926 8.51332C9.88358 8.63163 10.1088 8.69993 10.35 8.69993C11.0403 8.69993 11.6 8.14028 11.6 7.44993C11.6 6.75976 11.0406 6.20024 10.3505 6.19993C10.3853 5.90487 10.4032 5.60464 10.4032 5.30023Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),WE=["color"],ew=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,WE);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M7.81819 0.93179C7.64245 0.756054 7.35753 0.756054 7.18179 0.93179L5.43179 2.68179C5.25605 2.85753 5.25605 3.14245 5.43179 3.31819C5.60753 3.49392 5.89245 3.49392 6.06819 3.31819L6.99999 2.38638V5.49999C6.99999 5.77613 7.22385 5.99999 7.49999 5.99999C7.77613 5.99999 7.99999 5.77613 7.99999 5.49999V2.38638L8.93179 3.31819C9.10753 3.49392 9.39245 3.49392 9.56819 3.31819C9.74392 3.14245 9.74392 2.85753 9.56819 2.68179L7.81819 0.93179ZM7.99999 9.49999C7.99999 9.22385 7.77613 8.99999 7.49999 8.99999C7.22385 8.99999 6.99999 9.22385 6.99999 9.49999V12.6136L6.06819 11.6818C5.89245 11.5061 5.60753 11.5061 5.43179 11.6818C5.25605 11.8575 5.25605 12.1424 5.43179 12.3182L7.18179 14.0682C7.35753 14.2439 7.64245 14.2439 7.81819 14.0682L9.56819 12.3182C9.74392 12.1424 9.74392 11.8575 9.56819 11.6818C9.39245 11.5061 9.10753 11.5061 8.93179 11.6818L7.99999 12.6136V9.49999ZM8.99999 7.49999C8.99999 7.22385 9.22385 6.99999 9.49999 6.99999H12.6136L11.6818 6.06819C11.5061 5.89245 11.5061 5.60753 11.6818 5.43179C11.8575 5.25605 12.1424 5.25605 12.3182 5.43179L14.0682 7.18179C14.2439 7.35753 14.2439 7.64245 14.0682 7.81819L12.3182 9.56819C12.1424 9.74392 11.8575 9.74392 11.6818 9.56819C11.5061 9.39245 11.5061 9.10753 11.6818 8.93179L12.6136 7.99999H9.49999C9.22385 7.99999 8.99999 7.77613 8.99999 7.49999ZM3.31819 6.06819L2.38638 6.99999H5.49999C5.77613 6.99999 5.99999 7.22385 5.99999 7.49999C5.99999 7.77613 5.77613 7.99999 5.49999 7.99999H2.38638L3.31819 8.93179C3.49392 9.10753 3.49392 9.39245 3.31819 9.56819C3.14245 9.74392 2.85753 9.74392 2.68179 9.56819L0.93179 7.81819C0.756054 7.64245 0.756054 7.35753 0.93179 7.18179L2.68179 5.43179C2.85753 5.25605 3.14245 5.25605 3.31819 5.43179C3.49392 5.60753 3.49392 5.89245 3.31819 6.06819Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),tw=["color"],nw=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,tw);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M6.04995 2.74998C6.04995 2.44623 5.80371 2.19998 5.49995 2.19998C5.19619 2.19998 4.94995 2.44623 4.94995 2.74998V12.25C4.94995 12.5537 5.19619 12.8 5.49995 12.8C5.80371 12.8 6.04995 12.5537 6.04995 12.25V2.74998ZM10.05 2.74998C10.05 2.44623 9.80371 2.19998 9.49995 2.19998C9.19619 2.19998 8.94995 2.44623 8.94995 2.74998V12.25C8.94995 12.5537 9.19619 12.8 9.49995 12.8C9.80371 12.8 10.05 12.5537 10.05 12.25V2.74998Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),rw=["color"],iw=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,rw);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87932V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),aw=["color"],sw=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,aw);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M3.24182 2.32181C3.3919 2.23132 3.5784 2.22601 3.73338 2.30781L12.7334 7.05781C12.8974 7.14436 13 7.31457 13 7.5C13 7.68543 12.8974 7.85564 12.7334 7.94219L3.73338 12.6922C3.5784 12.774 3.3919 12.7687 3.24182 12.6782C3.09175 12.5877 3 12.4252 3 12.25V2.75C3 2.57476 3.09175 2.4123 3.24182 2.32181ZM4 3.57925V11.4207L11.4288 7.5L4 3.57925Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),ow=["color"],lw=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,ow);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),cw=["color"],uw=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,cw);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M4.85355 2.14645C5.04882 2.34171 5.04882 2.65829 4.85355 2.85355L3.70711 4H9C11.4853 4 13.5 6.01472 13.5 8.5C13.5 10.9853 11.4853 13 9 13H5C4.72386 13 4.5 12.7761 4.5 12.5C4.5 12.2239 4.72386 12 5 12H9C10.933 12 12.5 10.433 12.5 8.5C12.5 6.567 10.933 5 9 5H3.70711L4.85355 6.14645C5.04882 6.34171 5.04882 6.65829 4.85355 6.85355C4.65829 7.04882 4.34171 7.04882 4.14645 6.85355L2.14645 4.85355C1.95118 4.65829 1.95118 4.34171 2.14645 4.14645L4.14645 2.14645C4.34171 1.95118 4.65829 1.95118 4.85355 2.14645Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),fw=["color"],dw=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,fw);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M11.5 3.04999C11.7485 3.04999 11.95 3.25146 11.95 3.49999V7.49999C11.95 7.74852 11.7485 7.94999 11.5 7.94999C11.2515 7.94999 11.05 7.74852 11.05 7.49999V4.58639L4.58638 11.05H7.49999C7.74852 11.05 7.94999 11.2515 7.94999 11.5C7.94999 11.7485 7.74852 11.95 7.49999 11.95L3.49999 11.95C3.38064 11.95 3.26618 11.9026 3.18179 11.8182C3.0974 11.7338 3.04999 11.6193 3.04999 11.5L3.04999 7.49999C3.04999 7.25146 3.25146 7.04999 3.49999 7.04999C3.74852 7.04999 3.94999 7.25146 3.94999 7.49999L3.94999 10.4136L10.4136 3.94999L7.49999 3.94999C7.25146 3.94999 7.04999 3.74852 7.04999 3.49999C7.04999 3.25146 7.25146 3.04999 7.49999 3.04999L11.5 3.04999Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),hw=["color"],pw=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,hw);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M2 3C2 2.44772 2.44772 2 3 2H12C12.5523 2 13 2.44772 13 3V12C13 12.5523 12.5523 13 12 13H3C2.44772 13 2 12.5523 2 12V3ZM12 3H3V12H12V3Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),gw=["color"],mw=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,gw);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),vw=["color"],_w=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,vw);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M10.5 4C8.567 4 7 5.567 7 7.5C7 9.433 8.567 11 10.5 11C12.433 11 14 9.433 14 7.5C14 5.567 12.433 4 10.5 4ZM7.67133 11C6.65183 10.175 6 8.91363 6 7.5C6 6.08637 6.65183 4.82498 7.67133 4H4.5C2.567 4 1 5.567 1 7.5C1 9.433 2.567 11 4.5 11H7.67133ZM0 7.5C0 5.01472 2.01472 3 4.5 3H10.5C12.9853 3 15 5.01472 15 7.5C15 9.98528 12.9853 12 10.5 12H4.5C2.01472 12 0 9.98528 0 7.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),yw=["color"],bw=C.forwardRef(function(t,e){var r=t.color,a=r===void 0?"currentColor":r,s=$e(t,yw);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),C.createElement("path",{d:"M0.849976 1.74998C0.849976 1.25292 1.25292 0.849976 1.74998 0.849976H3.24998C3.74703 0.849976 4.14998 1.25292 4.14998 1.74998V2.04998H10.85V1.74998C10.85 1.25292 11.2529 0.849976 11.75 0.849976H13.25C13.747 0.849976 14.15 1.25292 14.15 1.74998V3.24998C14.15 3.74703 13.747 4.14998 13.25 4.14998H12.95V10.85H13.25C13.747 10.85 14.15 11.2529 14.15 11.75V13.25C14.15 13.747 13.747 14.15 13.25 14.15H11.75C11.2529 14.15 10.85 13.747 10.85 13.25V12.95H4.14998V13.25C4.14998 13.747 3.74703 14.15 3.24998 14.15H1.74998C1.25292 14.15 0.849976 13.747 0.849976 13.25V11.75C0.849976 11.2529 1.25292 10.85 1.74998 10.85H2.04998V4.14998H1.74998C1.25292 4.14998 0.849976 3.74703 0.849976 3.24998V1.74998ZM2.94998 4.14998V10.85H3.24998C3.74703 10.85 4.14998 11.2529 4.14998 11.75V12.05H10.85V11.75C10.85 11.2529 11.2529 10.85 11.75 10.85H12.05V4.14998H11.75C11.2529 4.14998 10.85 3.74703 10.85 3.24998V2.94998H4.14998V3.24998C4.14998 3.74703 3.74703 4.14998 3.24998 4.14998H2.94998ZM2.34998 1.74998H1.74998V2.34998V2.64998V3.24998H2.34998H2.64998H3.24998V2.64998V2.34998V1.74998H2.64998H2.34998ZM5.09998 5.99998C5.09998 5.50292 5.50292 5.09998 5.99998 5.09998H6.99998C7.49703 5.09998 7.89998 5.50292 7.89998 5.99998V6.99998C7.89998 7.03591 7.89787 7.07134 7.89378 7.10618C7.92861 7.10208 7.96405 7.09998 7.99998 7.09998H8.99998C9.49703 7.09998 9.89998 7.50292 9.89998 7.99998V8.99998C9.89998 9.49703 9.49703 9.89998 8.99998 9.89998H7.99998C7.50292 9.89998 7.09998 9.49703 7.09998 8.99998V7.99998C7.09998 7.96405 7.10208 7.92861 7.10618 7.89378C7.07134 7.89787 7.03591 7.89998 6.99998 7.89998H5.99998C5.50292 7.89998 5.09998 7.49703 5.09998 6.99998V5.99998ZM6.09998 5.99998H5.99998V6.09998V6.89998V6.99998H6.09998H6.89998H6.99998V6.89998V6.09998V5.99998H6.89998H6.09998ZM7.99998 7.99998H8.09998H8.89998H8.99998V8.09998V8.89998V8.99998H8.89998H8.09998H7.99998V8.89998V8.09998V7.99998ZM2.64998 11.75H2.34998H1.74998V12.35V12.65V13.25H2.34998H2.64998H3.24998V12.65V12.35V11.75H2.64998ZM11.75 1.74998H12.35H12.65H13.25V2.34998V2.64998V3.24998H12.65H12.35H11.75V2.64998V2.34998V1.74998ZM12.65 11.75H12.35H11.75V12.35V12.65V13.25H12.35H12.65H13.25V12.65V12.35V11.75H12.65Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});function ou(t){return()=>{t.forEach(e=>e())}}function Sw(t,{capture:e=!1,predicate:r=()=>!0}={}){function a(u){return f=>{if(f.target===f.currentTarget)return;const d=r(f);d&&(d==="stop-propagation"&&f.stopPropagation(),t(u,{altKey:f.altKey,code:f.code,ctrlKey:f.ctrlKey,isComposing:f.isComposing,key:f.key,keyCode:f.keyCode,location:f.location,metaKey:f.metaKey,repeat:f.repeat,shiftKey:f.shiftKey}))}}const s=a("keydown"),l=a("keyup");return window.addEventListener("keydown",s,{capture:e}),window.addEventListener("keyup",l,{capture:e}),()=>{window.removeEventListener("keydown",s,{capture:e}),window.removeEventListener("keyup",l,{capture:e})}}function Ew(){return ou([Dt("keydown",t=>{window.dispatchEvent(new KeyboardEvent("keydown",t))}),Dt("keyup",t=>{window.dispatchEvent(new KeyboardEvent("keyup",t))})])}function ww(){return Sw((t,e)=>{Pe(t,e)})}function Dt(t,e){const r=async a=>{if(typeof a.data=="object"&&a.data.eventName===t){const s=await e(a.data.data);s!==void 0&&xw(t,s)}};return window.addEventListener("message",r,!1),()=>{window.removeEventListener("message",r,!1)}}function a9(){if(window.triplex.env.mode==="webxr")return window;const t=document.getElementsByTagName("iframe")[0];if(!t)throw new Error("invariant: scene iframe could not be found");return t.contentWindow}function Pe(t,e,r=!1){const a=a9();return a==null||a.postMessage({data:e,eventName:t},"*"),r?new Promise(s=>{const l=`${t}Response`,u=Dt(l,f=>{s(f),u()})}):Promise.resolve(void 0)}function xw(t,e){const r=a9();r==null||r.postMessage({data:e,eventName:`${t}Response`},"*")}function Cw(t){const e=ie.c(4),{className:r}=t;let a,s;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=x.jsx("path",{d:"M12 6.5C12 7.285 11.7251 8.11914 11.2784 8.94948C10.8334 9.77669 10.2339 10.5707 9.62398 11.2666C9.01529 11.9612 8.40507 12.5481 7.94642 12.9616C7.77249 13.1184 7.62086 13.2499 7.5 13.3524C7.37915 13.2499 7.22751 13.1184 7.05358 12.9616C6.59493 12.5481 5.98471 11.9612 5.37602 11.2666C4.76607 10.5707 4.16657 9.77669 3.72158 8.94948C3.27492 8.11914 3 7.285 3 6.5C3 3.19196 5.27044 1.5 7.5 1.5C9.72956 1.5 12 3.19196 12 6.5Z",stroke:"currentColor"}),s=x.jsx("path",{d:"M9.49999 6C9.49999 7.10457 8.60456 8 7.49999 8C6.39542 8 5.49999 7.10457 5.49999 6C5.49999 4.89543 6.39542 4 7.49999 4C8.60456 4 9.49999 4.89543 9.49999 6Z",fill:"currentColor"}),e[0]=a,e[1]=s):(a=e[0],s=e[1]);let l;return e[2]!==r?(l=x.jsxs("svg",{className:r,fill:"none",height:"15",viewBox:"0 0 15 15",width:"15",children:[a,s]}),e[2]=r,e[3]=l):l=e[3],l}function Tw(t){const e=ie.c(7),{className:r}=t;let a,s,l,u,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=x.jsx("circle",{cx:"7.5",cy:"7.5",r:"6",stroke:"currentColor"}),s=x.jsx("path",{d:"M10.5 7.5C10.5 9.22874 10.1216 10.769 9.53464 11.8591C8.93669 12.9696 8.19442 13.5 7.5 13.5C6.80558 13.5 6.06331 12.9696 5.46536 11.8591C4.87838 10.769 4.5 9.22874 4.5 7.5C4.5 5.77126 4.87838 4.23096 5.46536 3.14086C6.06331 2.03038 6.80558 1.5 7.5 1.5C8.19442 1.5 8.93669 2.03038 9.53464 3.14086C10.1216 4.23096 10.5 5.77126 10.5 7.5Z",stroke:"currentColor"}),l=x.jsx("path",{d:"M10.5 7.5C10.5 9.22874 10.1216 10.769 9.53464 11.8591C8.93669 12.9696 8.19442 13.5 7.5 13.5C6.80558 13.5 6.06331 12.9696 5.46536 11.8591C4.87838 10.769 4.5 9.22874 4.5 7.5C4.5 5.77126 4.87838 4.23096 5.46536 3.14086C6.06331 2.03038 6.80558 1.5 7.5 1.5C8.19442 1.5 8.93669 2.03038 9.53464 3.14086C10.1216 4.23096 10.5 5.77126 10.5 7.5Z",stroke:"currentColor"}),u=x.jsx("path",{d:"M7.5 2V13",stroke:"currentColor"}),f=x.jsx("path",{d:"M13 7.5L2 7.5",stroke:"currentColor"}),e[0]=a,e[1]=s,e[2]=l,e[3]=u,e[4]=f):(a=e[0],s=e[1],l=e[2],u=e[3],f=e[4]);let d;return e[5]!==r?(d=x.jsxs("svg",{className:r,fill:"none",height:"15",viewBox:"0 0 15 15",width:"15",children:[a,s,l,u,f]}),e[5]=r,e[6]=d):d=e[6],d}function Ow(t){const e=ie.c(3),{className:r}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=x.jsx("path",{d:"M20 6a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-4a2 2 0 0 1-1.6-.8l-1.6-2.13a1 1 0 0 0-1.6 0L9.6 17.2A2 2 0 0 1 8 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",vectorEffect:"non-scaling-stroke"}),e[0]=a):a=e[0];let s;return e[1]!==r?(s=x.jsx("svg",{className:r,fill:"none",height:"15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",viewBox:"0 0 24 24",width:"15",children:a}),e[1]=r,e[2]=s):s=e[2],s}const M1={"all-sides":EE,angle:xE,camera:OE,cursor:NE,exit:PE,grid:P_,"grid-perspective":()=>x.jsx("div",{style:{transform:"perspective(30px) rotateX(45deg)",width:16},children:x.jsx(P_,{})}),height:VE,local:Cw,moon:QE,move:ew,size:dw,sun:mw,transform:bw,world:Tw};function Aw(t){const e=ie.c(15),{children:r,control:a,data:s,scope:l}=t,[u,f]=C.useState(0),d=a.buttons[u%a.buttons.length];let h,g;e[0]!==a.buttons?(h=()=>Dt("extension-point-triggered",w=>{const R=a.buttons.findIndex(T=>T.id===w.id);R!==-1&&f(R)}),g=[a.buttons],e[0]=a.buttons,e[1]=h,e[2]=g):(h=e[1],g=e[2]),C.useEffect(h,g);const m=d.icon?M1[d.icon]:k1,_=a.accelerator,y=!!d.isSelected;let b;e[3]!==d.id||e[4]!==s||e[5]!==l?(b=async()=>{(await Pe("extension-point-triggered",l==="scene"?{id:d.id,scope:l}:{data:s,id:d.id,scope:l},!0)).handled&&f(Rw)},e[3]=d.id,e[4]=s,e[5]=l,e[6]=b):b=e[6];let S;return e[7]!==d.id||e[8]!==d.label||e[9]!==r||e[10]!==m||e[11]!==_||e[12]!==y||e[13]!==b?(S=r({Icon:m,accelerator:_,id:d.id,isSelected:y,label:d.label,onClick:b}),e[7]=d.id,e[8]=d.label,e[9]=r,e[10]=m,e[11]=_,e[12]=y,e[13]=b,e[14]=S):S=e[14],S}function Rw(t){return t+1}function Dw(t){const e=ie.c(13),{children:r,control:a,data:s,scope:l}=t,[u,f]=C.useState(a.defaultSelected);let d;if(e[0]!==r||e[1]!==a.buttons||e[2]!==s||e[3]!==l||e[4]!==u){let g;e[6]!==r||e[7]!==s||e[8]!==l||e[9]!==u?(g=m=>r({Icon:m.icon?M1[m.icon]:k1,accelerator:m.accelerator,id:m.id,isSelected:m.id===u,label:m.label,onClick:()=>{Pe("extension-point-triggered",l==="scene"?{id:m.id,scope:l}:{data:s,id:m.id,scope:l}),f(m.id)}}),e[6]=r,e[7]=s,e[8]=l,e[9]=u,e[10]=g):g=e[10],d=a.buttons.map(g),e[0]=r,e[1]=a.buttons,e[2]=s,e[3]=l,e[4]=u,e[5]=d}else d=e[5];let h;return e[11]!==d?(h=x.jsx(x.Fragment,{children:d}),e[11]=d,e[12]=h):h=e[12],h}function jw({children:t,control:e,data:r,scope:a}){return t({Icon:e.icon?M1[e.icon]:k1,accelerator:e.accelerator,id:e.id,isSelected:!1,label:e.label,onClick:()=>Pe("extension-point-triggered",a==="scene"?{id:e.id,scope:a}:{data:r,id:e.id,scope:a})})}function s9(t,e){for(let r=0;r{e.current=t},[t]);const r=C.useRef(null);return r.current||(r.current=(...a)=>e.current(...a)),r.current}function kw(){throw new Error("INVALID_USEEVENT_INVOCATION: the callback from useEvent cannot be invoked before the component has mounted.")}const sh=[],Nw=["Escape","Enter"],o9=["CHECKBOX","DROPDOWN","INPUT","SELECT","TEXT-FIELD","TEXTAREA"];function Mw(t){if(t.includes("CommandOrCtrl+Shift+")){const[,,e]=t.split("+"),r=e.length===1?e.toLowerCase():e,a=navigator.userAgent.includes("Windows");return{ctrl:a,key:r,meta:!a,shift:!0}}else if(t.includes("+")){const[e,r]=t.split("+"),a=r.length===1?r.toLowerCase():r,s=navigator.userAgent.includes("Windows");return{ctrl:s&&e==="CommandOrCtrl",key:a,meta:!s&&e==="CommandOrCtrl",shift:e==="Shift"}}else return{ctrl:!1,key:t.length===1?t.toLowerCase():t,meta:!1,shift:!1}}function L1(t,e){const r=Mw(t);if(sh.includes(t))throw new Error(`invariant: "${t}" key already assigned`);const a=s=>{s.key===r.key&&s.metaKey===r.meta&&s.ctrlKey===r.ctrl&&s.altKey===!1&&s.shiftKey===r.shift&&!(document.activeElement&&o9.some(l=>{var u;return(u=document.activeElement)==null?void 0:u.tagName.includes(l)}))&&e(s)};return window.addEventListener("keydown",a),()=>{sh.splice(sh.indexOf(t),1),window.removeEventListener("keydown",a)}}function Lw(){const t=e=>{const r=document.activeElement;r&&e.metaKey===!1&&e.ctrlKey===!1&&e.altKey===!1&&e.shiftKey===!1&&Nw.includes(e.key)===!1&&o9.some(a=>r.tagName.includes(a))&&e.stopPropagation()};return window.addEventListener("keydown",t,!0),()=>{window.removeEventListener("keydown",t,!0)}}function $w(t,e){let r;return e.ctrl?typeof t=="number"?r=t*25:r=t.ctrl:r=typeof t=="number"?t:t.default,e.shift&&(r/=10),r}function Uw(t){const e=ie.c(9);let r;e[0]!==t?(r=t===void 0?{}:t,e[0]=t,e[1]=r):r=e[1];const{isDisabled:a}=r;let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s={ctrl:!1,shift:!1},e[2]=s):s=e[2];const[l,u]=C.useState(s);let f,d;e[3]!==a?(f=()=>{if(!a)return()=>{u({ctrl:!1,shift:!1})}},d=[a],e[3]=a,e[4]=f,e[5]=d):(f=e[4],d=e[5]),C.useLayoutEffect(f,d);let h,g;return e[6]!==a?(h=()=>{if(a)return;const m=y=>{y.ctrlKey&&u(Pw),y.shiftKey&&u(Iw)},_=y=>{u({ctrl:y.ctrlKey,shift:y.shiftKey})};return window.addEventListener("keydown",m),window.addEventListener("keyup",_),()=>{window.removeEventListener("keydown",m),window.removeEventListener("keyup",_)}},g=[a],e[6]=a,e[7]=h,e[8]=g):(h=e[7],g=e[8]),C.useEffect(h,g),l}function Iw(t){return{...t,shift:!0}}function Pw(t){return{...t,ctrl:!0}}function Hw(){const t=e=>{e.target instanceof HTMLInputElement&&e.target.tagName==="INPUT"&&e.target.type==="number"&&e.ctrlKey&&e.stopImmediatePropagation()};return window.addEventListener("contextmenu",t,!0),()=>{window.removeEventListener("contextmenu",t,!0)}}function zw(t,e){if(t===e)return!0;if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let r=0;r{};function qw(t,e,r){return e===r.length-1||JSON.stringify(t)!==JSON.stringify(r[e+1])}class Bw{constructor(e,r,a,s){fn(this,"trackingID");fn(this,"secretKey");fn(this,"clientID");fn(this,"sessionID");fn(this,"customParams",{});fn(this,"userProperties",null);fn(this,"baseURL","https://google-analytics.com/mp");fn(this,"collectURL","/collect");fn(this,"engagementTimestamp");fn(this,"collectedEvents",[]);fn(this,"fireEventTimeoutId");this.trackingID=e,this.secretKey=r,this.clientID=a,this.sessionID=s,document.hasFocus()&&(this.engagementTimestamp=Date.now())}setVisibility(){document.hasFocus()?this.engagementTimestamp=Date.now():this.engagementTimestamp=void 0}set(e,r){return r!==null?this.customParams[e]=r:delete this.customParams[e],this}setParams(e){return typeof e=="object"&&Object.keys(e).length>0?Object.assign(this.customParams,e):this.customParams={},this}setUserProperties(e){return typeof e=="object"&&Object.keys(e).length>0?this.userProperties=e:this.userProperties=null,this}event(e,r){const a={name:e,params:{engagement_time_msec:this.engagementTimestamp&&Date.now()-this.engagementTimestamp,session_id:this.sessionID,...this.customParams,...r}};return this.collectedEvents.push(a),window.clearTimeout(this.fireEventTimeoutId),this.fireEventTimeoutId=window.setTimeout(()=>{const s={client_id:this.clientID,events:this.collectedEvents.filter(qw)};this.userProperties&&Object.assign(s,{user_properties:this.userProperties}),fetch(`${this.baseURL}${this.collectURL}?measurement_id=${this.trackingID}&api_secret=${this.secretKey}`,{body:JSON.stringify(s),method:"POST"}).catch(()=>{}),this.collectedEvents=[]},333),a.params}}const l9={event:()=>!1,screenView:()=>!1},c9=C.createContext(l9);function ft(){const t=C.useContext(c9);if(t===l9)throw new Error("invariant: telemetry not set up");return t}function Ki(t,e,r){const a=ie.c(6),s=r===void 0?!0:r,l=ft();let u,f;a[0]!==s||a[1]!==t||a[2]!==e||a[3]!==l?(u=()=>{s&&setTimeout(()=>{l.screenView(t,e)},0)},f=[l,s,t,e],a[0]=s,a[1]=t,a[2]=e,a[3]=l,a[4]=u,a[5]=f):(u=a[4],f=a[5]),C.useEffect(u,f)}function Vw(t){const e=ie.c(20),{children:r,engagementDurationStrategy:a,isTelemetryEnabled:s,secretKey:l,sessionId:u,trackingId:f,userId:d,version:h}=t,g=a===void 0?"visibilitychange":a,m=s===void 0?!0:s,_=C.useRef(void 0);let y,b;e[0]!==l||e[1]!==u||e[2]!==f||e[3]!==d||e[4]!==h?(y=()=>{_.current||(_.current=new Bw(f,l,d,u),_.current.setParams({app_version:h,env:"production"}))},b=[l,u,f,d,h],e[0]=l,e[1]=u,e[2]=f,e[3]=d,e[4]=h,e[5]=y,e[6]=b):(y=e[5],b=e[6]),C.useEffect(y,b);let S,w;e[7]!==g?(S=()=>{if(!_.current)return;const z=_.current.setVisibility.bind(_.current);if(g==="visibilitychange")return document.addEventListener("visibilitychange",z),()=>{document.removeEventListener("visibilitychange",z)};if(g==="polling"){let Z=document.hasFocus();const q=window.setInterval(()=>{const te=document.hasFocus();te!==Z&&(z(),Z=te)},200);return()=>{window.clearInterval(q)}}},w=[g],e[7]=g,e[8]=S,e[9]=w):(S=e[8],w=e[9]),C.useEffect(S,w);let R;e[10]!==m?(R=(z,Z)=>z&&z!=="(UNSAFE_SKIP)"&&_.current&&m?_.current.event(z,Z):!1,e[10]=m,e[11]=R):R=e[11];const T=Fe(R);let D;e[12]!==m?(D=(z,Z)=>m&&_.current?_.current.event("screen_view",{page_title:z,screen_class:Z}):!1,e[12]=m,e[13]=D):D=e[13];const N=Fe(D);let A,k;e[14]!==T||e[15]!==N?(k={event:T,screenView:N},e[14]=T,e[15]=N,e[16]=k):k=e[16],A=k;const U=A;let I;return e[17]!==U||e[18]!==r?(I=x.jsx(c9.Provider,{value:U,children:r}),e[17]=U,e[18]=r,e[19]=I):I=e[19],I}function u9(t){const e=ie.c(4),{className:r}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={fill:"currentcolor"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=x.jsxs("g",{children:[x.jsx("path",{d:"M376.77 340.58c-25.9-14.93-51.8-29.87-77.7-44.8-20.95 25.56-52.76 41.87-88.39 41.87s-68.05-16.64-88.99-42.63c-26.92 15.97-53.83 31.95-80.75 47.92-.92.67-8.55 6.42-8.87 16.69-.31 9.76 6.23 15.82 7.16 16.65 70.85 48.5 124.6 82.67 143.72 92.95 5.14 2.76 14.68 7.53 27.09 7.37 11.78-.15 20.73-4.63 25.48-7.2 18.89-10.21 73.24-45.05 145.07-94.39 3.05-2.59 8.6-8.11 8.71-15.38.13-8.24-6.16-15.38-12.53-19.05ZM414.12 92.76c-3.31-4.33-7.01-6.96-9.51-8.52-9.89-6.14-69.23-38.1-150.88-81.04-3.36-1.41-12.82-4.9-19.56-.42-5.53 3.67-7.08 10.94-7.08 15.27.02 30.77.04 61.55.07 92.32 55.29 7.99 97.77 55.55 97.77 113.04 0 14.72-2.82 28.78-7.89 41.7 21.93 11.68 48.48 25.65 78.46 41.19.6.37 7.39 4.44 15.06 1.15 7.65-3.29 9.39-10.98 9.53-11.68.25-62.27.51-124.53.76-186.8-.46-3.29-1.84-9.82-6.73-16.22ZM96.43 223.42c0-57.32 42.22-104.77 97.26-112.98.02-30.79.05-61.59.07-92.38 0-4.63-1.73-11.43-7.08-15.27-6.36-4.57-15.08-2.37-18.38-1.37-82.34 44-142.18 76.68-152.06 82.82-2.28 1.41-6.09 4.04-9.51 8.52C1.84 99.16.46 105.69 0 108.98c.25 62.27.51 124.53.76 186.8.14.7 1.88 8.39 9.53 11.68 7.67 3.3 14.46-.77 15.06-1.15 30.17-15.64 56.87-29.69 78.88-41.41-5.02-12.86-7.8-26.84-7.8-41.48Z"}),x.jsx("circle",{cx:"210.68",cy:"222.36",r:"72.66"})]}),e[1]=s):s=e[1];let l;return e[2]!==r?(l=x.jsx("svg",{className:r,style:a,viewBox:"0 0 420.84 476.6",children:s}),e[2]=r,e[3]=l):l=e[3],l}const f9=C.createContext("");function d9(t){const e=ie.c(21),{children:r,onSelect:a}=t,s=C.useId(),l=C.useRef(null),u=ft();let f;e[0]!==r?(f=r.slice(1).filter(Boolean),e[0]=r,e[1]=f):f=e[1];const d=f;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={alignItems:"center",display:"inline-flex",justifyContent:"center",position:"relative"},e[2]=h):h=e[2];let g;e[3]!==a||e[4]!==u?(g=T=>{var N;a==null||a(T.target.value);const D=(N=T.target.options.item(T.target.selectedIndex))==null?void 0:N.getAttribute("data-actionid");D&&u.event(D)},e[3]=a,e[4]=u,e[5]=g):g=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m={cursor:"pointer",inset:0,opacity:0,position:"absolute"},e[6]=m):m=e[6];let _,y;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=x.jsx("hr",{}),y=x.jsx("option",{hidden:!0,value:""}),e[7]=_,e[8]=y):(_=e[7],y=e[8]);let b;e[9]!==d?(b=d.length>0?d:x.jsx("option",{disabled:!0,children:"No available options"}),e[9]=d,e[10]=b):b=e[10];let S;e[11]!==s||e[12]!==g||e[13]!==b?(S=x.jsxs("select",{className:"peer [color-scheme:light_dark]",id:s,onChange:g,ref:l,style:m,value:"",children:[_,y,b]}),e[11]=s,e[12]=g,e[13]=b,e[14]=S):S=e[14];let w;e[15]!==r[0]||e[16]!==s?(w=x.jsx(f9.Provider,{value:s,children:r[0]}),e[15]=r[0],e[16]=s,e[17]=w):w=e[17];let R;return e[18]!==S||e[19]!==w?(R=x.jsxs("div",{style:h,children:[S,w]}),e[18]=S,e[19]=w,e[20]=R):R=e[20],R}function h9(t){const e=ie.c(5),{children:r,className:a}=t,s=C.useContext(f9);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={display:"flex"},e[0]=l):l=e[0];let u;return e[1]!==r||e[2]!==a||e[3]!==s?(u=x.jsx("label",{className:a,htmlFor:s,inert:!0,style:l,children:r}),e[1]=r,e[2]=a,e[3]=s,e[4]=u):u=e[4],u}function p9(t){const e=ie.c(4),{actionId:r,children:a,value:s}=t;let l;return e[0]!==r||e[1]!==a||e[2]!==s?(l=x.jsx("option",{"data-actionid":r,value:s,children:a},s),e[0]=r,e[1]=a,e[2]=s,e[3]=l):l=e[3],l}function Gw(t){const e=ie.c(3),{children:r,label:a}=t;let s;return e[0]!==r||e[1]!==a?(s=x.jsx("optgroup",{label:a,children:r}),e[0]=r,e[1]=a,e[2]=s):s=e[2],s}function Kw(t){if(t.length===0)return;const e=[];let r;for(const a of t){const s="group"in a?a.group??"":"";r!==s?(r=s,e.push([s,[a]])):e.at(-1)[1].push(a)}return e}function $1(t){const e=ie.c(9),{children:r,className:a,onDismiss:s}=t,l=C.useRef(null);let u,f;e[0]!==s?(u=()=>{const m=l.current;if(!m)return;m.showModal();const _=function(S){S.preventDefault(),s()},y=function(S){S.target===l.current&&(l.current.close(),s())};return m.addEventListener("cancel",_),m.addEventListener("click",y),()=>{m.removeEventListener("cancel",_),m.removeEventListener("click",y)}},f=[s],e[0]=s,e[1]=u,e[2]=f):(u=e[1],f=e[2]),C.useLayoutEffect(u,f);let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={padding:0},e[3]=d):d=e[3];let h;e[4]!==r?(h=x.jsx("div",{children:r}),e[4]=r,e[5]=h):h=e[5];let g;return e[6]!==a||e[7]!==h?(g=x.jsx("dialog",{className:a,ref:l,style:d,children:h}),e[6]=a,e[7]=h,e[8]=g):g=e[8],g}var oh={exports:{}},xo={},lh={exports:{}},ch={};/** + * @license React + * scheduler.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var H_;function Fw(){return H_||(H_=1,function(t){function e(M,G){var Y=M.length;M.push(G);e:for(;0>>1,j=M[W];if(0>>1;Ws(ne,Y))res(de,ne)?(M[W]=de,M[re]=Y,W=re):(M[W]=ne,M[ee]=Y,W=ee);else if(res(de,Y))M[W]=de,M[re]=Y,W=re;else break e}}return G}function s(M,G){var Y=M.sortIndex-G.sortIndex;return Y!==0?Y:M.id-G.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var u=Date,f=u.now();t.unstable_now=function(){return u.now()-f}}var d=[],h=[],g=1,m=null,_=3,y=!1,b=!1,S=!1,w=!1,R=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function N(M){for(var G=r(h);G!==null;){if(G.callback===null)a(h);else if(G.startTime<=M)a(h),G.sortIndex=G.expirationTime,e(d,G);else break;G=r(h)}}function A(M){if(S=!1,N(M),!b)if(r(d)!==null)b=!0,k||(k=!0,te());else{var G=r(h);G!==null&&ae(A,G.startTime-M)}}var k=!1,U=-1,I=5,z=-1;function Z(){return w?!0:!(t.unstable_now()-zM&&Z());){var W=m.callback;if(typeof W=="function"){m.callback=null,_=m.priorityLevel;var j=W(m.expirationTime<=M);if(M=t.unstable_now(),typeof j=="function"){m.callback=j,N(M),G=!0;break t}m===r(d)&&a(d),N(M)}else a(d);m=r(d)}if(m!==null)G=!0;else{var H=r(h);H!==null&&ae(A,H.startTime-M),G=!1}}break e}finally{m=null,_=Y,y=!1}G=void 0}}finally{G?te():k=!1}}}var te;if(typeof D=="function")te=function(){D(q)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,he=ue.port2;ue.port1.onmessage=q,te=function(){he.postMessage(null)}}else te=function(){R(q,0)};function ae(M,G){U=R(function(){M(t.unstable_now())},G)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(M){M.callback=null},t.unstable_forceFrameRate=function(M){0>M||125W?(M.sortIndex=Y,e(h,M),r(d)===null&&M===r(h)&&(S?(T(U),U=-1):S=!0,ae(A,Y-W))):(M.sortIndex=j,e(d,M),b||y||(b=!0,k||(k=!0,te()))),M},t.unstable_shouldYield=Z,t.unstable_wrapCallback=function(M){var G=_;return function(){var Y=_;_=G;try{return M.apply(this,arguments)}finally{_=Y}}}}(ch)),ch}var z_;function Yw(){return z_||(z_=1,lh.exports=Fw()),lh.exports}var uh={exports:{}},Ct={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var q_;function Xw(){if(q_)return Ct;q_=1;var t=us();function e(d){var h="https://react.dev/errors/"+d;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),uh.exports=Xw(),uh.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var V_;function Zw(){if(V_)return xo;V_=1;var t=Yw(),e=us(),r=g9();function a(n){var i="https://react.dev/errors/"+n;if(1j||(n.current=W[j],W[j]=null,j--)}function ne(n,i){j++,W[j]=n.current,n.current=i}var re=H(null),de=H(null),oe=H(null),le=H(null);function se(n,i){switch(ne(oe,i),ne(de,n),ne(re,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?mm(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=mm(i),n=vm(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}ee(re),ne(re,n)}function me(){ee(re),ee(de),ee(oe)}function _e(n){n.memoizedState!==null&&ne(le,n);var i=re.current,o=vm(i,n.type);i!==o&&(ne(de,n),ne(re,o))}function et(n){de.current===n&&(ee(re),ee(de)),le.current===n&&(ee(le),ao._currentValue=Y)}var dt=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,Ot=t.unstable_cancelCallback,Nn=t.unstable_shouldYield,Ht=t.unstable_requestPaint,at=t.unstable_now,lr=t.unstable_getCurrentPriorityLevel,Mn=t.unstable_ImmediatePriority,Ln=t.unstable_UserBlockingPriority,cr=t.unstable_NormalPriority,ur=t.unstable_LowPriority,$n=t.unstable_IdlePriority,fr=t.log,dr=t.unstable_setDisableYieldValue,en=null,st=null;function zt(n){if(typeof fr=="function"&&dr(n),st&&typeof st.setStrictMode=="function")try{st.setStrictMode(en,n)}catch{}}var Se=Math.clz32?Math.clz32:el,qt=Math.log,hr=Math.LN2;function el(n){return n>>>=0,n===0?32:31-(qt(n)/hr|0)|0}var tl=256,nl=4194304;function Fr(n){var i=n&42;if(i!==0)return i;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function rl(n,i,o){var c=n.pendingLanes;if(c===0)return 0;var p=0,v=n.suspendedLanes,E=n.pingedLanes;n=n.warmLanes;var O=c&134217727;return O!==0?(c=O&~v,c!==0?p=Fr(c):(E&=O,E!==0?p=Fr(E):o||(o=O&~n,o!==0&&(p=Fr(o))))):(O=c&~v,O!==0?p=Fr(O):E!==0?p=Fr(E):o||(o=c&~n,o!==0&&(p=Fr(o)))),p===0?0:i!==0&&i!==p&&!(i&v)&&(v=p&-p,o=i&-i,v>=o||v===32&&(o&4194048)!==0)?i:p}function ps(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function Ob(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function W1(){var n=tl;return tl<<=1,!(tl&4194048)&&(tl=256),n}function e0(){var n=nl;return nl<<=1,!(nl&62914560)&&(nl=4194304),n}function wu(n){for(var i=[],o=0;31>o;o++)i.push(n);return i}function gs(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Ab(n,i,o,c,p,v){var E=n.pendingLanes;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=o,n.entangledLanes&=o,n.errorRecoveryDisabledLanes&=o,n.shellSuspendCounter=0;var O=n.entanglements,L=n.expirationTimes,V=n.hiddenUpdates;for(o=E&~o;0)":-1p||L[c]!==V[p]){var X=` +`+L[c].replace(" at new "," at ");return n.displayName&&X.includes("")&&(X=X.replace("",n.displayName)),X}while(1<=c&&0<=p);break}}}finally{Ru=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?ra(o):""}function Mb(n){switch(n.tag){case 26:case 27:case 5:return ra(n.type);case 16:return ra("Lazy");case 13:return ra("Suspense");case 19:return ra("SuspenseList");case 0:case 15:return Du(n.type,!1);case 11:return Du(n.type.render,!1);case 1:return Du(n.type,!0);case 31:return ra("Activity");default:return""}}function u0(n){try{var i="";do i+=Mb(n),n=n.return;while(n);return i}catch(o){return` +Error generating stack: `+o.message+` +`+o.stack}}function tn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function f0(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Lb(n){var i=f0(n)?"checked":"value",o=Object.getOwnPropertyDescriptor(n.constructor.prototype,i),c=""+n[i];if(!n.hasOwnProperty(i)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var p=o.get,v=o.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return p.call(this)},set:function(E){c=""+E,v.call(this,E)}}),Object.defineProperty(n,i,{enumerable:o.enumerable}),{getValue:function(){return c},setValue:function(E){c=""+E},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function sl(n){n._valueTracker||(n._valueTracker=Lb(n))}function d0(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var o=i.getValue(),c="";return n&&(c=f0(n)?n.checked?"true":"false":n.value),n=c,n!==o?(i.setValue(n),!0):!1}function ol(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var $b=/[\n"\\]/g;function nn(n){return n.replace($b,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function ju(n,i,o,c,p,v,E,O){n.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?n.type=E:n.removeAttribute("type"),i!=null?E==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+tn(i)):n.value!==""+tn(i)&&(n.value=""+tn(i)):E!=="submit"&&E!=="reset"||n.removeAttribute("value"),i!=null?ku(n,E,tn(i)):o!=null?ku(n,E,tn(o)):c!=null&&n.removeAttribute("value"),p==null&&v!=null&&(n.defaultChecked=!!v),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?n.name=""+tn(O):n.removeAttribute("name")}function h0(n,i,o,c,p,v,E,O){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.type=v),i!=null||o!=null){if(!(v!=="submit"&&v!=="reset"||i!=null))return;o=o!=null?""+tn(o):"",i=i!=null?""+tn(i):o,O||i===n.value||(n.value=i),n.defaultValue=i}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=O?n.checked:!!c,n.defaultChecked=!!c,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(n.name=E)}function ku(n,i,o){i==="number"&&ol(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function ia(n,i,o,c){if(n=n.options,i){i={};for(var p=0;p"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Uu=!1;if(In)try{var ys={};Object.defineProperty(ys,"passive",{get:function(){Uu=!0}}),window.addEventListener("test",ys,ys),window.removeEventListener("test",ys,ys)}catch{Uu=!1}var gr=null,Iu=null,cl=null;function b0(){if(cl)return cl;var n,i=Iu,o=i.length,c,p="value"in gr?gr.value:gr.textContent,v=p.length;for(n=0;n=Es),T0=" ",O0=!1;function A0(n,i){switch(n){case"keyup":return u5.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function R0(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var la=!1;function d5(n,i){switch(n){case"compositionend":return R0(i);case"keypress":return i.which!==32?null:(O0=!0,T0);case"textInput":return n=i.data,n===T0&&O0?null:n;default:return null}}function h5(n,i){if(la)return n==="compositionend"||!Bu&&A0(n,i)?(n=b0(),cl=Iu=gr=null,la=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:o,offset:i-n};n=c}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=U0(o)}}function P0(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?P0(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function H0(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=ol(n.document);i instanceof n.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)n=i.contentWindow;else break;i=ol(n.document)}return i}function Ku(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var S5=In&&"documentMode"in document&&11>=document.documentMode,ca=null,Fu=null,Ts=null,Yu=!1;function z0(n,i,o){var c=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Yu||ca==null||ca!==ol(c)||(c=ca,"selectionStart"in c&&Ku(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Ts&&Cs(Ts,c)||(Ts=c,c=Wl(Fu,"onSelect"),0>=E,p-=E,Hn=1<<32-Se(i)+p|o<v?v:8;var E=M.T,O={};M.T=O,Mf(n,!1,i,o);try{var L=p(),V=M.S;if(V!==null&&V(O,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var X=D5(L,c);zs(n,i,X,Yt(n))}else zs(n,i,c,Yt(n))}catch(Q){zs(n,i,{then:function(){},status:"rejected",reason:Q},Yt())}finally{G.p=v,M.T=E}}function L5(){}function kf(n,i,o,c){if(n.tag!==5)throw Error(a(476));var p=qp(n).queue;zp(n,p,i,Y,o===null?L5:function(){return Bp(n),o(c)})}function qp(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:Y},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:o},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function Bp(n){var i=qp(n).next.queue;zs(n,i,{},Yt())}function Nf(){return xt(ao)}function Vp(){return lt().memoizedState}function Gp(){return lt().memoizedState}function $5(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var o=Yt();n=_r(o);var c=yr(i,n,o);c!==null&&(Xt(c,i,o),Ls(c,i,o)),i={cache:cf()},n.payload=i;return}i=i.return}}function U5(n,i,o){var c=Yt();o={lane:c,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null},Nl(n)?Fp(i,o):(o=Qu(n,i,o,c),o!==null&&(Xt(o,n,c),Yp(o,i,c)))}function Kp(n,i,o){var c=Yt();zs(n,i,o,c)}function zs(n,i,o,c){var p={lane:c,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null};if(Nl(n))Fp(i,p);else{var v=n.alternate;if(n.lanes===0&&(v===null||v.lanes===0)&&(v=i.lastRenderedReducer,v!==null))try{var E=i.lastRenderedState,O=v(E,o);if(p.hasEagerState=!0,p.eagerState=O,Bt(O,E))return ml(n,i,p,0),Ge===null&&gl(),!1}catch{}finally{}if(o=Qu(n,i,p,c),o!==null)return Xt(o,n,c),Yp(o,i,c),!0}return!1}function Mf(n,i,o,c){if(c={lane:2,revertLane:dd(),action:c,hasEagerState:!1,eagerState:null,next:null},Nl(n)){if(i)throw Error(a(479))}else i=Qu(n,o,c,2),i!==null&&Xt(i,n,2)}function Nl(n){var i=n.alternate;return n===Te||i!==null&&i===Te}function Fp(n,i){ya=Ol=!0;var o=n.pending;o===null?i.next=i:(i.next=o.next,o.next=i),n.pending=i}function Yp(n,i,o){if(o&4194048){var c=i.lanes;c&=n.pendingLanes,o|=c,i.lanes=o,n0(n,o)}}var Ml={readContext:xt,use:Rl,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt},Xp={readContext:xt,use:Rl,useCallback:function(n,i){return Mt().memoizedState=[n,i===void 0?null:i],n},useContext:xt,useEffect:kp,useImperativeHandle:function(n,i,o){o=o!=null?o.concat([n]):null,kl(4194308,4,$p.bind(null,i,n),o)},useLayoutEffect:function(n,i){return kl(4194308,4,n,i)},useInsertionEffect:function(n,i){kl(4,2,n,i)},useMemo:function(n,i){var o=Mt();i=i===void 0?null:i;var c=n();if(si){zt(!0);try{n()}finally{zt(!1)}}return o.memoizedState=[c,i],c},useReducer:function(n,i,o){var c=Mt();if(o!==void 0){var p=o(i);if(si){zt(!0);try{o(i)}finally{zt(!1)}}}else p=i;return c.memoizedState=c.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},c.queue=n,n=n.dispatch=U5.bind(null,Te,n),[c.memoizedState,n]},useRef:function(n){var i=Mt();return n={current:n},i.memoizedState=n},useState:function(n){n=Af(n);var i=n.queue,o=Kp.bind(null,Te,i);return i.dispatch=o,[n.memoizedState,o]},useDebugValue:Df,useDeferredValue:function(n,i){var o=Mt();return jf(o,n,i)},useTransition:function(){var n=Af(!1);return n=zp.bind(null,Te,n.queue,!0,!1),Mt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,o){var c=Te,p=Mt();if(Me){if(o===void 0)throw Error(a(407));o=o()}else{if(o=i(),Ge===null)throw Error(a(349));je&124||mp(c,i,o)}p.memoizedState=o;var v={value:o,getSnapshot:i};return p.queue=v,kp(_p.bind(null,c,v,n),[n]),c.flags|=2048,Sa(9,jl(),vp.bind(null,c,v,o,i),null),o},useId:function(){var n=Mt(),i=Ge.identifierPrefix;if(Me){var o=zn,c=Hn;o=(c&~(1<<32-Se(c)-1)).toString(32)+o,i="«"+i+"R"+o,o=Al++,0ye?(mt=ge,ge=null):mt=ge.sibling;var Ne=K(P,ge,B[ye],J);if(Ne===null){ge===null&&(ge=mt);break}n&&ge&&Ne.alternate===null&&i(P,ge),$=v(Ne,$,ye),Oe===null?fe=Ne:Oe.sibling=Ne,Oe=Ne,ge=mt}if(ye===B.length)return o(P,ge),Me&&ei(P,ye),fe;if(ge===null){for(;yeye?(mt=ge,ge=null):mt=ge.sibling;var $r=K(P,ge,Ne.value,J);if($r===null){ge===null&&(ge=mt);break}n&&ge&&$r.alternate===null&&i(P,ge),$=v($r,$,ye),Oe===null?fe=$r:Oe.sibling=$r,Oe=$r,ge=mt}if(Ne.done)return o(P,ge),Me&&ei(P,ye),fe;if(ge===null){for(;!Ne.done;ye++,Ne=B.next())Ne=Q(P,Ne.value,J),Ne!==null&&($=v(Ne,$,ye),Oe===null?fe=Ne:Oe.sibling=Ne,Oe=Ne);return Me&&ei(P,ye),fe}for(ge=c(ge);!Ne.done;ye++,Ne=B.next())Ne=F(ge,P,ye,Ne.value,J),Ne!==null&&(n&&Ne.alternate!==null&&ge.delete(Ne.key===null?ye:Ne.key),$=v(Ne,$,ye),Oe===null?fe=Ne:Oe.sibling=Ne,Oe=Ne);return n&&ge.forEach(function(P3){return i(P,P3)}),Me&&ei(P,ye),fe}function qe(P,$,B,J){if(typeof B=="object"&&B!==null&&B.type===b&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case _:e:{for(var fe=B.key;$!==null;){if($.key===fe){if(fe=B.type,fe===b){if($.tag===7){o(P,$.sibling),J=p($,B.props.children),J.return=P,P=J;break e}}else if($.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===I&&Jp(fe)===$.type){o(P,$.sibling),J=p($,B.props),Bs(J,B),J.return=P,P=J;break e}o(P,$);break}else i(P,$);$=$.sibling}B.type===b?(J=Qr(B.props.children,P.mode,J,B.key),J.return=P,P=J):(J=_l(B.type,B.key,B.props,null,P.mode,J),Bs(J,B),J.return=P,P=J)}return E(P);case y:e:{for(fe=B.key;$!==null;){if($.key===fe)if($.tag===4&&$.stateNode.containerInfo===B.containerInfo&&$.stateNode.implementation===B.implementation){o(P,$.sibling),J=p($,B.children||[]),J.return=P,P=J;break e}else{o(P,$);break}else i(P,$);$=$.sibling}J=tf(B,P.mode,J),J.return=P,P=J}return E(P);case I:return fe=B._init,B=fe(B._payload),qe(P,$,B,J)}if(ae(B))return be(P,$,B,J);if(te(B)){if(fe=te(B),typeof fe!="function")throw Error(a(150));return B=fe.call(B),ve(P,$,B,J)}if(typeof B.then=="function")return qe(P,$,Ll(B),J);if(B.$$typeof===D)return qe(P,$,El(P,B),J);$l(P,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,$!==null&&$.tag===6?(o(P,$.sibling),J=p($,B),J.return=P,P=J):(o(P,$),J=ef(B,P.mode,J),J.return=P,P=J),E(P)):o(P,$)}return function(P,$,B,J){try{qs=0;var fe=qe(P,$,B,J);return Ea=null,fe}catch(ge){if(ge===Ns||ge===xl)throw ge;var Oe=Vt(29,ge,null,P.mode);return Oe.lanes=J,Oe.return=P,Oe}finally{}}}var wa=Qp(!0),Wp=Qp(!1),ln=H(null),xn=null;function Sr(n){var i=n.alternate;ne(ut,ut.current&1),ne(ln,n),xn===null&&(i===null||_a.current!==null||i.memoizedState!==null)&&(xn=n)}function eg(n){if(n.tag===22){if(ne(ut,ut.current),ne(ln,n),xn===null){var i=n.alternate;i!==null&&i.memoizedState!==null&&(xn=n)}}else Er()}function Er(){ne(ut,ut.current),ne(ln,ln.current)}function Gn(n){ee(ln),xn===n&&(xn=null),ee(ut)}var ut=H(0);function Ul(n){for(var i=n;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||xd(o)))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if(i.flags&128)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}function Lf(n,i,o,c){i=n.memoizedState,o=o(c,i),o=o==null?i:g({},i,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var $f={enqueueSetState:function(n,i,o){n=n._reactInternals;var c=Yt(),p=_r(c);p.payload=i,o!=null&&(p.callback=o),i=yr(n,p,c),i!==null&&(Xt(i,n,c),Ls(i,n,c))},enqueueReplaceState:function(n,i,o){n=n._reactInternals;var c=Yt(),p=_r(c);p.tag=1,p.payload=i,o!=null&&(p.callback=o),i=yr(n,p,c),i!==null&&(Xt(i,n,c),Ls(i,n,c))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var o=Yt(),c=_r(o);c.tag=2,i!=null&&(c.callback=i),i=yr(n,c,o),i!==null&&(Xt(i,n,o),Ls(i,n,o))}};function tg(n,i,o,c,p,v,E){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,v,E):i.prototype&&i.prototype.isPureReactComponent?!Cs(o,c)||!Cs(p,v):!0}function ng(n,i,o,c){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,c),i.state!==n&&$f.enqueueReplaceState(i,i.state,null)}function oi(n,i){var o=i;if("ref"in i){o={};for(var c in i)c!=="ref"&&(o[c]=i[c])}if(n=n.defaultProps){o===i&&(o=g({},o));for(var p in n)o[p]===void 0&&(o[p]=n[p])}return o}var Il=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)};function rg(n){Il(n)}function ig(n){console.error(n)}function ag(n){Il(n)}function Pl(n,i){try{var o=n.onUncaughtError;o(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function sg(n,i,o){try{var c=n.onCaughtError;c(o.value,{componentStack:o.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Uf(n,i,o){return o=_r(o),o.tag=3,o.payload={element:null},o.callback=function(){Pl(n,i)},o}function og(n){return n=_r(n),n.tag=3,n}function lg(n,i,o,c){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var v=c.value;n.payload=function(){return p(v)},n.callback=function(){sg(i,o,c)}}var E=o.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(n.callback=function(){sg(i,o,c),typeof p!="function"&&(Ar===null?Ar=new Set([this]):Ar.add(this));var O=c.stack;this.componentDidCatch(c.value,{componentStack:O!==null?O:""})})}function P5(n,i,o,c,p){if(o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=o.alternate,i!==null&&Ds(i,o,p,!0),o=ln.current,o!==null){switch(o.tag){case 13:return xn===null?od():o.alternate===null&&We===0&&(We=3),o.flags&=-257,o.flags|=65536,o.lanes=p,c===df?o.flags|=16384:(i=o.updateQueue,i===null?o.updateQueue=new Set([c]):i.add(c),cd(n,c,p)),!1;case 22:return o.flags|=65536,c===df?o.flags|=16384:(i=o.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},o.updateQueue=i):(o=i.retryQueue,o===null?i.retryQueue=new Set([c]):o.add(c)),cd(n,c,p)),!1}throw Error(a(435,o.tag))}return cd(n,c,p),od(),!1}if(Me)return i=ln.current,i!==null?(!(i.flags&65536)&&(i.flags|=256),i.flags|=65536,i.lanes=p,c!==af&&(n=Error(a(422),{cause:c}),Rs(rn(n,o)))):(c!==af&&(i=Error(a(423),{cause:c}),Rs(rn(i,o))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,c=rn(c,o),p=Uf(n.stateNode,c,p),gf(n,p),We!==4&&(We=2)),!1;var v=Error(a(520),{cause:c});if(v=rn(v,o),Zs===null?Zs=[v]:Zs.push(v),We!==4&&(We=2),i===null)return!0;c=rn(c,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,n=p&-p,o.lanes|=n,n=Uf(o.stateNode,c,n),gf(o,n),!1;case 1:if(i=o.type,v=o.stateNode,(o.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Ar===null||!Ar.has(v))))return o.flags|=65536,p&=-p,o.lanes|=p,p=og(p),lg(p,n,o,c),gf(o,p),!1}o=o.return}while(o!==null);return!1}var cg=Error(a(461)),pt=!1;function yt(n,i,o,c){i.child=n===null?Wp(i,null,o,c):wa(i,n.child,o,c)}function ug(n,i,o,c,p){o=o.render;var v=i.ref;if("ref"in c){var E={};for(var O in c)O!=="ref"&&(E[O]=c[O])}else E=c;return ii(i),c=bf(n,i,o,E,v,p),O=Sf(),n!==null&&!pt?(Ef(n,i,p),Kn(n,i,p)):(Me&&O&&nf(i),i.flags|=1,yt(n,i,c,p),i.child)}function fg(n,i,o,c,p){if(n===null){var v=o.type;return typeof v=="function"&&!Wu(v)&&v.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=v,dg(n,i,v,c,p)):(n=_l(o.type,null,c,i,i.mode,p),n.ref=i.ref,n.return=i,i.child=n)}if(v=n.child,!Gf(n,p)){var E=v.memoizedProps;if(o=o.compare,o=o!==null?o:Cs,o(E,c)&&n.ref===i.ref)return Kn(n,i,p)}return i.flags|=1,n=Pn(v,c),n.ref=i.ref,n.return=i,i.child=n}function dg(n,i,o,c,p){if(n!==null){var v=n.memoizedProps;if(Cs(v,c)&&n.ref===i.ref)if(pt=!1,i.pendingProps=c=v,Gf(n,p))n.flags&131072&&(pt=!0);else return i.lanes=n.lanes,Kn(n,i,p)}return If(n,i,o,c,p)}function hg(n,i,o){var c=i.pendingProps,p=c.children,v=n!==null?n.memoizedState:null;if(c.mode==="hidden"){if(i.flags&128){if(c=v!==null?v.baseLanes|o:o,n!==null){for(p=i.child=n.child,v=0;p!==null;)v=v|p.lanes|p.childLanes,p=p.sibling;i.childLanes=v&~c}else i.childLanes=0,i.child=null;return pg(n,i,c,o)}if(o&536870912)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&wl(i,v!==null?v.cachePool:null),v!==null?dp(i,v):vf(),eg(i);else return i.lanes=i.childLanes=536870912,pg(n,i,v!==null?v.baseLanes|o:o,o)}else v!==null?(wl(i,v.cachePool),dp(i,v),Er(),i.memoizedState=null):(n!==null&&wl(i,null),vf(),Er());return yt(n,i,p,o),i.child}function pg(n,i,o,c){var p=ff();return p=p===null?null:{parent:ct._currentValue,pool:p},i.memoizedState={baseLanes:o,cachePool:p},n!==null&&wl(i,null),vf(),eg(i),n!==null&&Ds(n,i,c,!0),null}function Hl(n,i){var o=i.ref;if(o===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(a(284));(n===null||n.ref!==o)&&(i.flags|=4194816)}}function If(n,i,o,c,p){return ii(i),o=bf(n,i,o,c,void 0,p),c=Sf(),n!==null&&!pt?(Ef(n,i,p),Kn(n,i,p)):(Me&&c&&nf(i),i.flags|=1,yt(n,i,o,p),i.child)}function gg(n,i,o,c,p,v){return ii(i),i.updateQueue=null,o=pp(i,c,o,p),hp(n),c=Sf(),n!==null&&!pt?(Ef(n,i,v),Kn(n,i,v)):(Me&&c&&nf(i),i.flags|=1,yt(n,i,o,v),i.child)}function mg(n,i,o,c,p){if(ii(i),i.stateNode===null){var v=ha,E=o.contextType;typeof E=="object"&&E!==null&&(v=xt(E)),v=new o(c,v),i.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=$f,i.stateNode=v,v._reactInternals=i,v=i.stateNode,v.props=c,v.state=i.memoizedState,v.refs={},hf(i),E=o.contextType,v.context=typeof E=="object"&&E!==null?xt(E):ha,v.state=i.memoizedState,E=o.getDerivedStateFromProps,typeof E=="function"&&(Lf(i,o,E,c),v.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(E=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),E!==v.state&&$f.enqueueReplaceState(v,v.state,null),Us(i,c,v,p),$s(),v.state=i.memoizedState),typeof v.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(n===null){v=i.stateNode;var O=i.memoizedProps,L=oi(o,O);v.props=L;var V=v.context,X=o.contextType;E=ha,typeof X=="object"&&X!==null&&(E=xt(X));var Q=o.getDerivedStateFromProps;X=typeof Q=="function"||typeof v.getSnapshotBeforeUpdate=="function",O=i.pendingProps!==O,X||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(O||V!==E)&&ng(i,v,c,E),vr=!1;var K=i.memoizedState;v.state=K,Us(i,c,v,p),$s(),V=i.memoizedState,O||K!==V||vr?(typeof Q=="function"&&(Lf(i,o,Q,c),V=i.memoizedState),(L=vr||tg(i,o,L,c,K,V,E))?(X||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(i.flags|=4194308)):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=V),v.props=c,v.state=V,v.context=E,c=L):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{v=i.stateNode,pf(n,i),E=i.memoizedProps,X=oi(o,E),v.props=X,Q=i.pendingProps,K=v.context,V=o.contextType,L=ha,typeof V=="object"&&V!==null&&(L=xt(V)),O=o.getDerivedStateFromProps,(V=typeof O=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(E!==Q||K!==L)&&ng(i,v,c,L),vr=!1,K=i.memoizedState,v.state=K,Us(i,c,v,p),$s();var F=i.memoizedState;E!==Q||K!==F||vr||n!==null&&n.dependencies!==null&&Sl(n.dependencies)?(typeof O=="function"&&(Lf(i,o,O,c),F=i.memoizedState),(X=vr||tg(i,o,X,c,K,F,L)||n!==null&&n.dependencies!==null&&Sl(n.dependencies))?(V||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(c,F,L),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(c,F,L)),typeof v.componentDidUpdate=="function"&&(i.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof v.componentDidUpdate!="function"||E===n.memoizedProps&&K===n.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||E===n.memoizedProps&&K===n.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=F),v.props=c,v.state=F,v.context=L,c=X):(typeof v.componentDidUpdate!="function"||E===n.memoizedProps&&K===n.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||E===n.memoizedProps&&K===n.memoizedState||(i.flags|=1024),c=!1)}return v=c,Hl(n,i),c=(i.flags&128)!==0,v||c?(v=i.stateNode,o=c&&typeof o.getDerivedStateFromError!="function"?null:v.render(),i.flags|=1,n!==null&&c?(i.child=wa(i,n.child,null,p),i.child=wa(i,null,o,p)):yt(n,i,o,p),i.memoizedState=v.state,n=i.child):n=Kn(n,i,p),n}function vg(n,i,o,c){return As(),i.flags|=256,yt(n,i,o,c),i.child}var Pf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Hf(n){return{baseLanes:n,cachePool:ip()}}function zf(n,i,o){return n=n!==null?n.childLanes&~o:0,i&&(n|=cn),n}function _g(n,i,o){var c=i.pendingProps,p=!1,v=(i.flags&128)!==0,E;if((E=v)||(E=n!==null&&n.memoizedState===null?!1:(ut.current&2)!==0),E&&(p=!0,i.flags&=-129),E=(i.flags&32)!==0,i.flags&=-33,n===null){if(Me){if(p?Sr(i):Er(),Me){var O=Qe,L;if(L=O){e:{for(L=O,O=wn;L.nodeType!==8;){if(!O){O=null;break e}if(L=vn(L.nextSibling),L===null){O=null;break e}}O=L}O!==null?(i.memoizedState={dehydrated:O,treeContext:Wr!==null?{id:Hn,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},L=Vt(18,null,null,0),L.stateNode=O,L.return=i,i.child=L,At=i,Qe=null,L=!0):L=!1}L||ni(i)}if(O=i.memoizedState,O!==null&&(O=O.dehydrated,O!==null))return xd(O)?i.lanes=32:i.lanes=536870912,null;Gn(i)}return O=c.children,c=c.fallback,p?(Er(),p=i.mode,O=zl({mode:"hidden",children:O},p),c=Qr(c,p,o,null),O.return=i,c.return=i,O.sibling=c,i.child=O,p=i.child,p.memoizedState=Hf(o),p.childLanes=zf(n,E,o),i.memoizedState=Pf,c):(Sr(i),qf(i,O))}if(L=n.memoizedState,L!==null&&(O=L.dehydrated,O!==null)){if(v)i.flags&256?(Sr(i),i.flags&=-257,i=Bf(n,i,o)):i.memoizedState!==null?(Er(),i.child=n.child,i.flags|=128,i=null):(Er(),p=c.fallback,O=i.mode,c=zl({mode:"visible",children:c.children},O),p=Qr(p,O,o,null),p.flags|=2,c.return=i,p.return=i,c.sibling=p,i.child=c,wa(i,n.child,null,o),c=i.child,c.memoizedState=Hf(o),c.childLanes=zf(n,E,o),i.memoizedState=Pf,i=p);else if(Sr(i),xd(O)){if(E=O.nextSibling&&O.nextSibling.dataset,E)var V=E.dgst;E=V,c=Error(a(419)),c.stack="",c.digest=E,Rs({value:c,source:null,stack:null}),i=Bf(n,i,o)}else if(pt||Ds(n,i,o,!1),E=(o&n.childLanes)!==0,pt||E){if(E=Ge,E!==null&&(c=o&-o,c=c&42?1:xu(c),c=c&(E.suspendedLanes|o)?0:c,c!==0&&c!==L.retryLane))throw L.retryLane=c,da(n,c),Xt(E,n,c),cg;O.data==="$?"||od(),i=Bf(n,i,o)}else O.data==="$?"?(i.flags|=192,i.child=n.child,i=null):(n=L.treeContext,Qe=vn(O.nextSibling),At=i,Me=!0,ti=null,wn=!1,n!==null&&(sn[on++]=Hn,sn[on++]=zn,sn[on++]=Wr,Hn=n.id,zn=n.overflow,Wr=i),i=qf(i,c.children),i.flags|=4096);return i}return p?(Er(),p=c.fallback,O=i.mode,L=n.child,V=L.sibling,c=Pn(L,{mode:"hidden",children:c.children}),c.subtreeFlags=L.subtreeFlags&65011712,V!==null?p=Pn(V,p):(p=Qr(p,O,o,null),p.flags|=2),p.return=i,c.return=i,c.sibling=p,i.child=c,c=p,p=i.child,O=n.child.memoizedState,O===null?O=Hf(o):(L=O.cachePool,L!==null?(V=ct._currentValue,L=L.parent!==V?{parent:V,pool:V}:L):L=ip(),O={baseLanes:O.baseLanes|o,cachePool:L}),p.memoizedState=O,p.childLanes=zf(n,E,o),i.memoizedState=Pf,c):(Sr(i),o=n.child,n=o.sibling,o=Pn(o,{mode:"visible",children:c.children}),o.return=i,o.sibling=null,n!==null&&(E=i.deletions,E===null?(i.deletions=[n],i.flags|=16):E.push(n)),i.child=o,i.memoizedState=null,o)}function qf(n,i){return i=zl({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function zl(n,i){return n=Vt(22,n,null,i),n.lanes=0,n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},n}function Bf(n,i,o){return wa(i,n.child,null,o),n=qf(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function yg(n,i,o){n.lanes|=i;var c=n.alternate;c!==null&&(c.lanes|=i),of(n.return,i,o)}function Vf(n,i,o,c,p){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:o,tailMode:p}:(v.isBackwards=i,v.rendering=null,v.renderingStartTime=0,v.last=c,v.tail=o,v.tailMode=p)}function bg(n,i,o){var c=i.pendingProps,p=c.revealOrder,v=c.tail;if(yt(n,i,c.children,o),c=ut.current,c&2)c=c&1|2,i.flags|=128;else{if(n!==null&&n.flags&128)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&yg(n,o,i);else if(n.tag===19)yg(n,o,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}c&=1}switch(ne(ut,c),p){case"forwards":for(o=i.child,p=null;o!==null;)n=o.alternate,n!==null&&Ul(n)===null&&(p=o),o=o.sibling;o=p,o===null?(p=i.child,i.child=null):(p=o.sibling,o.sibling=null),Vf(i,!1,p,o,v);break;case"backwards":for(o=null,p=i.child,i.child=null;p!==null;){if(n=p.alternate,n!==null&&Ul(n)===null){i.child=p;break}n=p.sibling,p.sibling=o,o=p,p=n}Vf(i,!0,o,null,v);break;case"together":Vf(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function Kn(n,i,o){if(n!==null&&(i.dependencies=n.dependencies),Or|=i.lanes,!(o&i.childLanes))if(n!==null){if(Ds(n,i,o,!1),(o&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(a(153));if(i.child!==null){for(n=i.child,o=Pn(n,n.pendingProps),i.child=o,o.return=i;n.sibling!==null;)n=n.sibling,o=o.sibling=Pn(n,n.pendingProps),o.return=i;o.sibling=null}return i.child}function Gf(n,i){return n.lanes&i?!0:(n=n.dependencies,!!(n!==null&&Sl(n)))}function H5(n,i,o){switch(i.tag){case 3:se(i,i.stateNode.containerInfo),mr(i,ct,n.memoizedState.cache),As();break;case 27:case 5:_e(i);break;case 4:se(i,i.stateNode.containerInfo);break;case 10:mr(i,i.type,i.memoizedProps.value);break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(Sr(i),i.flags|=128,null):o&i.child.childLanes?_g(n,i,o):(Sr(i),n=Kn(n,i,o),n!==null?n.sibling:null);Sr(i);break;case 19:var p=(n.flags&128)!==0;if(c=(o&i.childLanes)!==0,c||(Ds(n,i,o,!1),c=(o&i.childLanes)!==0),p){if(c)return bg(n,i,o);i.flags|=128}if(p=i.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),ne(ut,ut.current),c)break;return null;case 22:case 23:return i.lanes=0,hg(n,i,o);case 24:mr(i,ct,n.memoizedState.cache)}return Kn(n,i,o)}function Sg(n,i,o){if(n!==null)if(n.memoizedProps!==i.pendingProps)pt=!0;else{if(!Gf(n,o)&&!(i.flags&128))return pt=!1,H5(n,i,o);pt=!!(n.flags&131072)}else pt=!1,Me&&i.flags&1048576&&J0(i,bl,i.index);switch(i.lanes=0,i.tag){case 16:e:{n=i.pendingProps;var c=i.elementType,p=c._init;if(c=p(c._payload),i.type=c,typeof c=="function")Wu(c)?(n=oi(c,n),i.tag=1,i=mg(null,i,c,n,o)):(i.tag=0,i=If(null,i,c,n,o));else{if(c!=null){if(p=c.$$typeof,p===N){i.tag=11,i=ug(null,i,c,n,o);break e}else if(p===U){i.tag=14,i=fg(null,i,c,n,o);break e}}throw i=he(c)||c,Error(a(306,i,""))}}return i;case 0:return If(n,i,i.type,i.pendingProps,o);case 1:return c=i.type,p=oi(c,i.pendingProps),mg(n,i,c,p,o);case 3:e:{if(se(i,i.stateNode.containerInfo),n===null)throw Error(a(387));c=i.pendingProps;var v=i.memoizedState;p=v.element,pf(n,i),Us(i,c,null,o);var E=i.memoizedState;if(c=E.cache,mr(i,ct,c),c!==v.cache&&lf(i,[ct],o,!0),$s(),c=E.element,v.isDehydrated)if(v={element:c,isDehydrated:!1,cache:E.cache},i.updateQueue.baseState=v,i.memoizedState=v,i.flags&256){i=vg(n,i,c,o);break e}else if(c!==p){p=rn(Error(a(424)),i),Rs(p),i=vg(n,i,c,o);break e}else{switch(n=i.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(Qe=vn(n.firstChild),At=i,Me=!0,ti=null,wn=!0,o=Wp(i,null,c,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(As(),c===p){i=Kn(n,i,o);break e}yt(n,i,c,o)}i=i.child}return i;case 26:return Hl(n,i),n===null?(o=Cm(i.type,null,i.pendingProps,null))?i.memoizedState=o:Me||(o=i.type,n=i.pendingProps,c=tc(oe.current).createElement(o),c[wt]=i,c[kt]=n,St(c,o,n),ht(c),i.stateNode=c):i.memoizedState=Cm(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return _e(i),n===null&&Me&&(c=i.stateNode=Em(i.type,i.pendingProps,oe.current),At=i,wn=!0,p=Qe,jr(i.type)?(Cd=p,Qe=vn(c.firstChild)):Qe=p),yt(n,i,i.pendingProps.children,o),Hl(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&Me&&((p=c=Qe)&&(c=p3(c,i.type,i.pendingProps,wn),c!==null?(i.stateNode=c,At=i,Qe=vn(c.firstChild),wn=!1,p=!0):p=!1),p||ni(i)),_e(i),p=i.type,v=i.pendingProps,E=n!==null?n.memoizedProps:null,c=v.children,Sd(p,v)?c=null:E!==null&&Sd(p,E)&&(i.flags|=32),i.memoizedState!==null&&(p=bf(n,i,k5,null,null,o),ao._currentValue=p),Hl(n,i),yt(n,i,c,o),i.child;case 6:return n===null&&Me&&((n=o=Qe)&&(o=g3(o,i.pendingProps,wn),o!==null?(i.stateNode=o,At=i,Qe=null,n=!0):n=!1),n||ni(i)),null;case 13:return _g(n,i,o);case 4:return se(i,i.stateNode.containerInfo),c=i.pendingProps,n===null?i.child=wa(i,null,c,o):yt(n,i,c,o),i.child;case 11:return ug(n,i,i.type,i.pendingProps,o);case 7:return yt(n,i,i.pendingProps,o),i.child;case 8:return yt(n,i,i.pendingProps.children,o),i.child;case 12:return yt(n,i,i.pendingProps.children,o),i.child;case 10:return c=i.pendingProps,mr(i,i.type,c.value),yt(n,i,c.children,o),i.child;case 9:return p=i.type._context,c=i.pendingProps.children,ii(i),p=xt(p),c=c(p),i.flags|=1,yt(n,i,c,o),i.child;case 14:return fg(n,i,i.type,i.pendingProps,o);case 15:return dg(n,i,i.type,i.pendingProps,o);case 19:return bg(n,i,o);case 31:return c=i.pendingProps,o=i.mode,c={mode:c.mode,children:c.children},n===null?(o=zl(c,o),o.ref=i.ref,i.child=o,o.return=i,i=o):(o=Pn(n.child,c),o.ref=i.ref,i.child=o,o.return=i,i=o),i;case 22:return hg(n,i,o);case 24:return ii(i),c=xt(ct),n===null?(p=ff(),p===null&&(p=Ge,v=cf(),p.pooledCache=v,v.refCount++,v!==null&&(p.pooledCacheLanes|=o),p=v),i.memoizedState={parent:c,cache:p},hf(i),mr(i,ct,p)):(n.lanes&o&&(pf(n,i),Us(i,null,null,o),$s()),p=n.memoizedState,v=i.memoizedState,p.parent!==c?(p={parent:c,cache:c},i.memoizedState=p,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=p),mr(i,ct,c)):(c=v.cache,mr(i,ct,c),c!==p.cache&&lf(i,[ct],o,!0))),yt(n,i,i.pendingProps.children,o),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Fn(n){n.flags|=4}function Eg(n,i){if(i.type!=="stylesheet"||i.state.loading&4)n.flags&=-16777217;else if(n.flags|=16777216,!Dm(i)){if(i=ln.current,i!==null&&((je&4194048)===je?xn!==null:(je&62914560)!==je&&!(je&536870912)||i!==xn))throw Ms=df,ap;n.flags|=8192}}function ql(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?e0():536870912,n.lanes|=i,Oa|=i)}function Vs(n,i){if(!Me)switch(n.tailMode){case"hidden":i=n.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function Je(n){var i=n.alternate!==null&&n.alternate.child===n.child,o=0,c=0;if(i)for(var p=n.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=c,n.childLanes=o,i}function z5(n,i,o){var c=i.pendingProps;switch(rf(i),i.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(i),null;case 1:return Je(i),null;case 3:return o=i.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Bn(ct),me(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(Os(i)?Fn(i):n===null||n.memoizedState.isDehydrated&&!(i.flags&256)||(i.flags|=1024,ep())),Je(i),null;case 26:return o=i.memoizedState,n===null?(Fn(i),o!==null?(Je(i),Eg(i,o)):(Je(i),i.flags&=-16777217)):o?o!==n.memoizedState?(Fn(i),Je(i),Eg(i,o)):(Je(i),i.flags&=-16777217):(n.memoizedProps!==c&&Fn(i),Je(i),i.flags&=-16777217),null;case 27:et(i),o=oe.current;var p=i.type;if(n!==null&&i.stateNode!=null)n.memoizedProps!==c&&Fn(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Je(i),null}n=re.current,Os(i)?Q0(i):(n=Em(p,c,o),i.stateNode=n,Fn(i))}return Je(i),null;case 5:if(et(i),o=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==c&&Fn(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Je(i),null}if(n=re.current,Os(i))Q0(i);else{switch(p=tc(oe.current),n){case 1:n=p.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:n=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":n=p.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":n=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":n=p.createElement("div"),n.innerHTML=" + + +
+ +`; + +type SpikeStatus = + | "booting" + | "preloaded" + | "scene-ready" + | "child-ready"; + +export default function BridgedEditorSpike() { + const workerRef = useRef(null); + const containerRef = useRef(null); + const iframeRef = useRef(null); + const [status, setStatus] = useState("booting"); + const [parentLog, setParentLog] = useState([]); + const [editorLog, setEditorLog] = useState([]); + const [sceneUrl, setSceneUrl] = useState(null); + + useEffect(() => { + const w = new Worker( + new URL("../worker-server-spike/wss-worker.ts", import.meta.url), + { type: "module" }, + ); + workerRef.current = w; + const channel = new MessageChannel(); + + channel.port1.onmessage = (e) => w.postMessage(e.data); + + w.onmessage = (e) => { + const msg = e.data; + if (msg.type === "ready") { + setParentLog((l) => [...l, "[worker] ready"]); + return; + } + if (msg.type === "error") { + setParentLog((l) => [ + ...l, + `[worker err] ${msg.path}: ${msg.error}`, + ]); + } else if (msg.type === "message") { + setParentLog((l) => [ + ...l, + `[worker ok] ${msg.path}`, + ]); + } + channel.port1.postMessage(msg); + }; + + let portSent = false; + let preloaded = false; + let childReady = false; + let sceneReady: string | null = null; + function maybeSendPort() { + if (portSent) return; + if (!preloaded || !childReady || !sceneReady) return; + const iframe = iframeRef.current; + if (!iframe?.contentWindow) return; + iframe.contentWindow.postMessage( + { type: "bridge-port", sceneUrl: sceneReady }, + "*", + [channel.port2], + ); + portSent = true; + setStatus("child-ready"); + setParentLog((l) => [...l, "[parent] port + scene URL sent"]); + } + + (async () => { + for (const [vpath, repoPath] of Object.entries(FILES)) { + const r = await fetch(`/api/file?path=${encodeURIComponent(repoPath)}`); + if (!r.ok) continue; + const contents = await r.text(); + w.postMessage({ type: "fetch-file", path: vpath, contents }); + } + preloaded = true; + setStatus((s) => (s === "booting" ? "preloaded" : s)); + setParentLog((l) => [...l, "[worker] files preloaded"]); + maybeSendPort(); + })(); + + // Boot the WebContainer that hosts Vite + R3F (the scene renderer). + (async () => { + try { + if (containerRef.current) return; + setParentLog((l) => [...l, "[wc] booting…"]); + const container = await WebContainer.boot(); + containerRef.current = container; + await container.mount(sceneProject); + setParentLog((l) => [...l, "[wc] npm install…"]); + const install = await container.spawn("npm", ["install"]); + const installExit = await install.exit; + if (installExit !== 0) { + setParentLog((l) => [ + ...l, + `[wc] install failed (${installExit})`, + ]); + return; + } + setParentLog((l) => [...l, "[wc] starting vite…"]); + const dev = await container.spawn("npm", ["run", "dev"]); + dev.output.pipeTo( + new WritableStream({ + write(chunk) { + const trimmed = chunk.trim(); + if (trimmed) { + setParentLog((l) => [ + ...l, + `[vite] ${trimmed.slice(0, 200)}`, + ]); + } + }, + }), + ); + container.on("server-ready", (port, url) => { + setParentLog((l) => [...l, `[wc] server-ready ${port} ${url}`]); + sceneReady = url; + setSceneUrl(url); + setStatus((s) => (s === "preloaded" ? "scene-ready" : s)); + // Notify iframe if it's already up so the rewrite can install. + const iframe = iframeRef.current; + if (iframe?.contentWindow) { + iframe.contentWindow.postMessage( + { type: "scene-url", url }, + "*", + ); + } + maybeSendPort(); + }); + } catch (err) { + setParentLog((l) => [ + ...l, + `[wc] error: ${(err as Error).message}`, + ]); + } + })(); + + function onMsg(e: MessageEvent) { + const data = e.data; + if (!data || typeof data !== "object") return; + if (data.type === "child-ready") { + if (!childReady) setParentLog((l) => [...l, "[child] ready"]); + childReady = true; + maybeSendPort(); + } else if (data.type === "editor-log" && Array.isArray(data.lines)) { + setEditorLog((l) => [...l, ...data.lines]); + } + } + window.addEventListener("message", onMsg); + + return () => { + window.removeEventListener("message", onMsg); + w.terminate(); + channel.port1.close(); + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + return ( +
+
+ Bridged editor spike{" "} + + status: {status} + {sceneUrl && ( + <> + {" · scene: "} + {sceneUrl} + + )} + +
+
+