{
  "version": 3,
  "sources": ["../src/index.ts", "../src/syntactic-sugar.ts", "../src/utils/get.ts", "../src/expression-eval/expression-eval.ts", "../src/helpers/parse-expression-string.ts", "../src/json-configuration.ts", "../src/helpers/convert-functions.ts", "../src/helpers/instantiate-class.ts", "../src/helpers/execute-function.ts", "../src/helpers/parse-json.ts", "../src/json-converter.ts", "../src/transports/transport.ts", "../src/utils/shallow-equal-objects.ts"],
  "sourcesContent": ["// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n// @deck.gl/json: top-level exports\n\n// Generic JSON converter, usable by other wrapper modules\nexport {JSONConverter, type JSONConverterProps} from './json-converter';\nexport {JSONConfiguration, type JSONConfigurationProps} from './json-configuration';\n\n// Transports\nexport {Transport} from './transports/transport';\n\n// Helpers\nexport {convertFunctions as _convertFunctions} from './helpers/convert-functions';\nexport {parseExpressionString as _parseExpressionString} from './helpers/parse-expression-string';\nexport {shallowEqualObjects as _shallowEqualObjects} from './utils/shallow-equal-objects';\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nconst FUNCTION_IDENTIFIER = '@@=';\nconst CONSTANT_IDENTIFIER = '@@#';\nconst TYPE_KEY = '@@type';\nconst FUNCTION_KEY = '@@function';\n\nexport {FUNCTION_IDENTIFIER, CONSTANT_IDENTIFIER, TYPE_KEY, FUNCTION_KEY};\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n/**\n * Access properties of nested containers using dot-path notation\n * Returns `undefined` if any container is not valid, instead of throwing\n * @param  container - container that supports get\n * @param compositeKey - key to access, can be '.'-separated string\n * @return value in the final key of the nested container, or `undefined`\n */\nexport function get(container: Record<string, unknown>, compositeKey: string): unknown {\n  // Split the key into subkeys\n  const keyList = getKeys(compositeKey);\n  // Recursively get the value of each key;\n  let value: Record<string, unknown> | unknown = container;\n  for (const key of keyList) {\n    // If any intermediate subfield is not an object, return undefined\n    value = isObject(value) ? value[key] : undefined;\n  }\n  return value;\n}\n\n/**\n * Checks if argument is an \"indexable\" object (not a primitive value, nor null)\n * @param value - JavaScript value to be tested\n * @return true if argument is a JavaScript object\n */\nfunction isObject(value: unknown): value is Record<string, unknown> {\n  return value !== null && typeof value === 'object';\n}\n\n// Cache key to key arrays for speed\nconst keyMap: Record<string, string[]> = {};\n\n// Takes a string of '.' separated keys and returns an array of keys\n// - 'feature.geometry.type' => ['feature', 'geometry', 'type']\n// - 'feature' => ['feature']\nfunction getKeys(compositeKey: string): string[] {\n  if (typeof compositeKey === 'string') {\n    // else assume string and split around dots\n    let keyList = keyMap[compositeKey];\n    if (!keyList) {\n      keyList = compositeKey.split('.');\n      keyMap[compositeKey] = keyList;\n    }\n    return keyList;\n  }\n  // Wrap in array if needed\n  return Array.isArray(compositeKey) ? compositeKey : [compositeKey];\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n/**\n * Sources:\n * - Copyright (c) 2013 Stephen Oney, http://jsep.from.so/, MIT License\n * - Copyright (c) 2023 Don McCurdy, https://github.com/donmccurdy/expression-eval, MIT License\n */\n\nimport jsep from 'jsep';\n\n/** Default operator precedence from https://github.com/EricSmekens/jsep/blob/master/src/jsep.js#L55 */\nconst DEFAULT_PRECEDENCE = {\n  '||': 1,\n  '&&': 2,\n  '|': 3,\n  '^': 4,\n  '&': 5,\n  '==': 6,\n  '!=': 6,\n  '===': 6,\n  '!==': 6,\n  '<': 7,\n  '>': 7,\n  '<=': 7,\n  '>=': 7,\n  '<<': 8,\n  '>>': 8,\n  '>>>': 8,\n  '+': 9,\n  '-': 9,\n  '*': 10,\n  '/': 10,\n  '%': 10\n};\n\nconst binops = {\n  '||': (a: unknown, b: unknown) => {\n    return a || b;\n  },\n  '&&': (a: unknown, b: unknown) => {\n    return a && b;\n  },\n  '|': (a: number, b: number) => {\n    return a | b;\n  },\n  '^': (a: number, b: number) => {\n    return a ^ b;\n  },\n  '&': (a: number, b: number) => {\n    return a & b;\n  },\n  '==': (a: unknown, b: unknown) => {\n    // eslint-disable-next-line eqeqeq\n    return a == b;\n  },\n  '!=': (a: unknown, b: unknown) => {\n    // eslint-disable-next-line eqeqeq\n    return a != b;\n  },\n  '===': (a: unknown, b: unknown) => {\n    return a === b;\n  },\n  '!==': (a: unknown, b: unknown) => {\n    return a !== b;\n  },\n  '<': (a: number | string, b: number | string) => {\n    return a < b;\n  },\n  '>': (a: number | string, b: number | string) => {\n    return a > b;\n  },\n  '<=': (a: number | string, b: number | string) => {\n    return a <= b;\n  },\n  '>=': (a: number | string, b: number | string) => {\n    return a >= b;\n  },\n  '<<': (a: number, b: number) => {\n    return a << b;\n  },\n  '>>': (a: number, b: number) => {\n    return a >> b;\n  },\n  '>>>': (a: number, b: number) => {\n    return a >>> b;\n  },\n  '+': (a: unknown, b: unknown) => {\n    // @ts-expect-error\n    return a + b;\n  },\n  '-': (a: number, b: number) => {\n    return a - b;\n  },\n  '*': (a: number, b: number) => {\n    return a * b;\n  },\n  '/': (a: number, b: number) => {\n    return a / b;\n  },\n  '%': (a: number, b: number) => {\n    return a % b;\n  }\n};\n\nconst unops = {\n  '-': (a: number) => {\n    return -a;\n  },\n  '+': (a: unknown) => {\n    // @ts-expect-error\n    // eslint-disable-next-line no-implicit-coercion\n    return +a;\n  },\n  '~': (a: number) => {\n    return ~a;\n  },\n  '!': (a: unknown) => {\n    return !a;\n  }\n};\n\ndeclare type operand = number | string;\ndeclare type unaryCallback = (a: operand) => operand;\ndeclare type binaryCallback = (a: operand, b: operand) => operand;\n\ntype AnyExpression =\n  | jsep.ArrayExpression\n  | jsep.BinaryExpression\n  | jsep.MemberExpression\n  | jsep.CallExpression\n  | jsep.ConditionalExpression\n  | jsep.Identifier\n  | jsep.Literal\n  | jsep.LogicalExpression\n  | jsep.ThisExpression\n  | jsep.UnaryExpression;\n\nfunction evaluateArray(list, context) {\n  return list.map(function (v) {\n    return evaluate(v, context);\n  });\n}\n\nasync function evaluateArrayAsync(list, context) {\n  const res = await Promise.all(list.map(v => evalAsync(v, context)));\n  return res;\n}\n\nfunction evaluateMember(node: jsep.MemberExpression, context: object) {\n  const object = evaluate(node.object, context);\n  let key: string;\n  if (node.computed) {\n    key = evaluate(node.property, context);\n  } else {\n    key = (node.property as jsep.Identifier).name;\n  }\n  if (/^__proto__|prototype|constructor$/.test(key)) {\n    throw Error(`Access to member \"${key}\" disallowed.`);\n  }\n  return [object, object[key]];\n}\n\nasync function evaluateMemberAsync(node: jsep.MemberExpression, context: object) {\n  const object = await evalAsync(node.object, context);\n  let key: string;\n  if (node.computed) {\n    key = await evalAsync(node.property, context);\n  } else {\n    key = (node.property as jsep.Identifier).name;\n  }\n  if (/^__proto__|prototype|constructor$/.test(key)) {\n    throw Error(`Access to member \"${key}\" disallowed.`);\n  }\n  return [object, object[key]];\n}\n\n// eslint-disable-next-line complexity\nfunction evaluate(_node: jsep.Expression, context: object) {\n  const node = _node as AnyExpression;\n\n  switch (node.type) {\n    case 'ArrayExpression':\n      return evaluateArray(node.elements, context);\n\n    case 'BinaryExpression':\n      return binops[node.operator](evaluate(node.left, context), evaluate(node.right, context));\n\n    case 'CallExpression':\n      let caller: object;\n      let fn: Function;\n      let assign: unknown[];\n      if (node.callee.type === 'MemberExpression') {\n        assign = evaluateMember(node.callee as jsep.MemberExpression, context);\n        caller = assign[0] as object;\n        fn = assign[1] as Function;\n      } else {\n        fn = evaluate(node.callee, context);\n      }\n      if (typeof fn !== 'function') {\n        return undefined;\n      }\n      return fn.apply(caller!, evaluateArray(node.arguments, context));\n\n    case 'ConditionalExpression':\n      return evaluate(node.test, context)\n        ? evaluate(node.consequent, context)\n        : evaluate(node.alternate, context);\n\n    case 'Identifier':\n      return context[node.name];\n\n    case 'Literal':\n      return node.value;\n\n    case 'LogicalExpression':\n      if (node.operator === '||') {\n        return evaluate(node.left, context) || evaluate(node.right, context);\n      } else if (node.operator === '&&') {\n        return evaluate(node.left, context) && evaluate(node.right, context);\n      }\n      return binops[node.operator](evaluate(node.left, context), evaluate(node.right, context));\n\n    case 'MemberExpression':\n      return evaluateMember(node, context)[1];\n\n    case 'ThisExpression':\n      return context;\n\n    case 'UnaryExpression':\n      return unops[node.operator](evaluate(node.argument, context));\n\n    default:\n      return undefined;\n  }\n}\n\n// eslint-disable-next-line complexity\nasync function evalAsync(_node: jsep.Expression, context: object) {\n  const node = _node as AnyExpression;\n\n  // Brackets used for some case blocks here, to avoid edge cases related to variable hoisting.\n  // See: https://stackoverflow.com/questions/57759348/const-and-let-variable-shadowing-in-a-switch-statement\n  switch (node.type) {\n    case 'ArrayExpression':\n      return await evaluateArrayAsync(node.elements, context);\n\n    case 'BinaryExpression': {\n      const [left, right] = await Promise.all([\n        evalAsync(node.left, context),\n        evalAsync(node.right, context)\n      ]);\n      return binops[node.operator](left, right);\n    }\n\n    case 'CallExpression': {\n      let caller: object;\n      let fn: Function;\n      let assign: unknown[];\n      if (node.callee.type === 'MemberExpression') {\n        assign = await evaluateMemberAsync(node.callee as jsep.MemberExpression, context);\n        caller = assign[0] as object;\n        fn = assign[1] as Function;\n      } else {\n        fn = await evalAsync(node.callee, context);\n      }\n      if (typeof fn !== 'function') {\n        return undefined;\n      }\n      return await fn.apply(caller!, await evaluateArrayAsync(node.arguments, context));\n    }\n\n    case 'ConditionalExpression':\n      return (await evalAsync(node.test, context))\n        ? await evalAsync(node.consequent, context)\n        : await evalAsync(node.alternate, context);\n\n    case 'Identifier':\n      return context[node.name];\n\n    case 'Literal':\n      return node.value;\n\n    case 'LogicalExpression': {\n      if (node.operator === '||') {\n        return (await evalAsync(node.left, context)) || (await evalAsync(node.right, context));\n      } else if (node.operator === '&&') {\n        return (await evalAsync(node.left, context)) && (await evalAsync(node.right, context));\n      }\n\n      const [left, right] = await Promise.all([\n        evalAsync(node.left, context),\n        evalAsync(node.right, context)\n      ]);\n\n      return binops[node.operator](left, right);\n    }\n\n    case 'MemberExpression':\n      return (await evaluateMemberAsync(node, context))[1];\n\n    case 'ThisExpression':\n      return context;\n\n    case 'UnaryExpression':\n      return unops[node.operator](await evalAsync(node.argument, context));\n\n    default:\n      return undefined;\n  }\n}\n\nfunction compile(expression: string | jsep.Expression): (context: object) => any {\n  return evaluate.bind(null, jsep(expression));\n}\n\nfunction compileAsync(expression: string | jsep.Expression): (context: object) => Promise<any> {\n  return evalAsync.bind(null, jsep(expression));\n}\n\n// Added functions to inject Custom Unary Operators (and override existing ones)\nfunction addUnaryOp(operator: string, _function: unaryCallback): void {\n  jsep.addUnaryOp(operator);\n  unops[operator] = _function;\n}\n\n// Added functions to inject Custom Binary Operators (and override existing ones)\nfunction addBinaryOp(\n  operator: string,\n  precedenceOrFn: number | binaryCallback,\n  _function: binaryCallback\n): void {\n  if (_function) {\n    jsep.addBinaryOp(operator, precedenceOrFn as number);\n    binops[operator] = _function;\n  } else {\n    jsep.addBinaryOp(operator, DEFAULT_PRECEDENCE[operator] || 1);\n    binops[operator] = precedenceOrFn;\n  }\n}\n\nexport {jsep as parse, evaluate as eval, evalAsync, compile, compileAsync, addUnaryOp, addBinaryOp};\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {get} from '../utils/get';\n\n// expression-eval: Small jsep based expression parser that supports array and object indexing\nimport {parse, eval as evaluate} from '../expression-eval/expression-eval';\n\n/**\n * Accessor function produced from a parsed JSON expression string.\n */\ntype AccessorFunction = (row: Record<string, unknown>) => unknown;\n\n/**\n * Cache of compiled accessor expressions keyed by their original string form.\n */\nconst cachedExpressionMap: Record<string, AccessorFunction> = {\n  // Identity function\n  '-': object => object\n};\n\n/**\n * Generates an accessor function from a JSON string.\n * `-` maps to the identity accessor and `a.b.c` maps to nested property access.\n * @param propValue Expression string to compile.\n * @param configuration Active conversion configuration.\n * @returns A callable accessor compiled from the expression string.\n */\nexport function parseExpressionString(\n  propValue: string,\n  configuration?\n): (row: Record<string, unknown>) => unknown {\n  // NOTE: Can be null which represents invalid function. Return null so that prop can be omitted\n  if (propValue in cachedExpressionMap) {\n    return cachedExpressionMap[propValue];\n  }\n\n  let func;\n  // Compile with expression-eval\n  const ast = parse(propValue);\n  if (ast.type === 'Identifier') {\n    func = row => {\n      return get(row, propValue);\n    };\n  } else {\n    // NOTE: To avoid security risks, the arguments passed to the\n    // compiled expression must only give access to pure data (no globals etc)\n    // We disable function call syntax\n    traverse(ast, node => {\n      if (node.type === 'CallExpression') {\n        throw new Error('Function calls not allowed in JSON expressions');\n      }\n    });\n    // TODO Something like `expressionEval.eval(ast, {row});` would be useful for unpacking arrays\n    func = row => {\n      return evaluate(ast, row);\n    };\n  }\n\n  // Cache the compiled function\n  cachedExpressionMap[propValue] = func;\n  return func;\n}\n\n/**\n * Recursively visits nodes in an expression AST.\n * @param node AST node or node array to traverse.\n * @param visitor Callback invoked for each visited AST node.\n */\n// eslint-disable-next-line complexity\nfunction traverse(node, visitor) {\n  if (Array.isArray(node)) {\n    node.forEach(element => traverse(element, visitor));\n  } else if (node && typeof node === 'object') {\n    if (node.type) {\n      visitor(node);\n    }\n    for (const key in node) {\n      traverse(node[key], visitor);\n    }\n  }\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {TYPE_KEY, FUNCTION_KEY} from './syntactic-sugar';\n// TODO - default parsing code should not be part of the configuration.\nimport {parseExpressionString} from './helpers/parse-expression-string';\n\nconst isObject = value => value && typeof value === 'object';\n\n/**\n * Full `JSONConfiguration` input accepted by the constructor and `merge()`.\n */\nexport type JSONConfigurationProps = JSONConfigurationDataProps & {\n  /** Optional override for accessor-string compilation. */\n  convertFunction?: ConvertFunction;\n  /** Optional hook for mutating props before class/component instantiation. */\n  preProcessClassProps?: PreProcessClassProps;\n  /** Optional hook for mutating the converted result before it is returned. */\n  postProcessConvertedJson?: PostProcessConvertedJson;\n};\n\n/**\n * Serializable configuration entries consumed directly by the JSON conversion pipeline.\n */\ntype JSONConfigurationDataProps = {\n  /** Logger used for non-fatal conversion warnings. */\n  log?; // eslint-disable-line\n  /** Key used to resolve class instances from JSON objects. */\n  typeKey?: string;\n  /** Key used to resolve callable functions from JSON objects. */\n  functionKey?: string;\n  /** Class catalog used to resolve `@@type` references. */\n  classes?: Record<string, new (props: Record<string, unknown>) => unknown>;\n  /** Enumeration catalog used to resolve `@@#GROUP.VALUE` references. */\n  enumerations?: Record<string, any>;\n  /** Constant catalog used to resolve `@@#CONSTANT` references. */\n  constants?: Record<string, unknown>;\n  /** Function catalog used to resolve `@@function` references. */\n  functions?: Record<string, Function>;\n  /** React runtime used when instantiating configured React components. */\n  React?: {createElement: (Component, props, children) => any};\n  /** React component catalog used to resolve `@@type` references. */\n  reactComponents?: Record<string, Function>;\n};\n\n/**\n * Function used to compile `@@=` expression strings into accessors.\n */\ntype ConvertFunction = typeof parseExpressionString;\n/**\n * Hook that can rewrite props before a configured class or component is instantiated.\n */\ntype PreProcessClassProps = (\n  Class: unknown,\n  props: Record<string, unknown>\n) => Record<string, unknown>;\n/**\n * Hook that can rewrite the fully converted JSON payload before it is returned.\n */\ntype PostProcessConvertedJson = (json: unknown) => unknown;\n\n/**\n * Stores the catalogs and hooks used by `JSONConverter` to resolve JSON into runtime values.\n */\nexport class JSONConfiguration {\n  /** Default values used when a configuration key is omitted. */\n  static defaultProps: Required<JSONConfigurationDataProps> = {\n    log: console, // eslint-disable-lin,\n    typeKey: TYPE_KEY,\n    functionKey: FUNCTION_KEY,\n    classes: {},\n    reactComponents: {},\n    enumerations: {},\n    constants: {},\n    functions: {},\n    React: undefined!\n  };\n\n  /** Normalized configuration catalogs consumed by the conversion helpers. */\n  config: Required<JSONConfigurationDataProps> = {...JSONConfiguration.defaultProps};\n\n  /** Hook used to compile `@@=` accessor strings into executable functions. */\n  convertFunction: ConvertFunction = parseExpressionString;\n  /** Hook used to rewrite props before class/component instantiation. */\n  preProcessClassProps: PreProcessClassProps = (_Class, props) => props;\n  /** Hook used to rewrite the converted JSON result before it is returned. */\n  postProcessConvertedJson: PostProcessConvertedJson = json => json;\n\n  /**\n   * Creates a configuration from a single plain object.\n   * @param configuration Configuration catalogs and hooks to register.\n   */\n  constructor(configuration: JSONConfigurationProps) {\n    this.merge(configuration);\n  }\n\n  /**\n   * Merges additional configuration catalogs and hooks into the current instance.\n   * @param configuration Additional configuration values to merge.\n   */\n  merge(configuration: JSONConfigurationProps) {\n    for (const key in configuration) {\n      if (key in this.config) {\n        const value = configuration[key];\n        this.config[key] = isObject(this.config[key])\n          ? Object.assign(this.config[key], value)\n          : value;\n      } else if (key === 'convertFunction' && configuration.convertFunction) {\n        this.convertFunction = configuration.convertFunction;\n      } else if (key === 'preProcessClassProps' && configuration.preProcessClassProps) {\n        this.preProcessClassProps = configuration.preProcessClassProps;\n      } else if (key === 'postProcessConvertedJson' && configuration.postProcessConvertedJson) {\n        this.postProcessConvertedJson = configuration.postProcessConvertedJson;\n      }\n    }\n  }\n\n  /**\n   * Returns a plain-object snapshot of the current configuration, including hooks.\n   * @returns A complete configuration object suitable for cloning or re-use.\n   */\n  getProps(): JSONConfigurationProps {\n    return {\n      ...this.config,\n      convertFunction: this.convertFunction,\n      preProcessClassProps: this.preProcessClassProps,\n      postProcessConvertedJson: this.postProcessConvertedJson\n    };\n  }\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {parseExpressionString} from './parse-expression-string';\n\nimport {FUNCTION_IDENTIFIER} from '../syntactic-sugar';\nimport {type JSONConfiguration} from '../json-configuration';\n\n/**\n * Checks whether a prop value should be interpreted as an accessor expression.\n * @param value Prop value to inspect.\n * @returns `true` if the value has the function identifier prefix.\n */\nfunction hasFunctionIdentifier(value: unknown): value is string {\n  return typeof value === 'string' && value.startsWith(FUNCTION_IDENTIFIER);\n}\n\n/**\n * Removes the function identifier prefix from an accessor expression string.\n * @param value Accessor expression with the configured prefix.\n * @returns The expression body without the prefix.\n */\nfunction trimFunctionIdentifier(value: string): string {\n  return value.replace(FUNCTION_IDENTIFIER, '');\n}\n\n/**\n * Tries to determine if any props are \"function valued\"\n * and if so convert their string values to functions\n */\nexport function convertFunctions(\n  props: Record<string, unknown>,\n  configuration: JSONConfiguration\n): Record<string, unknown> {\n  // Use deck.gl prop types if available.\n  const replacedProps = {};\n  for (const propName in props) {\n    let propValue = props[propName];\n\n    // Parse string valued expressions\n    if (hasFunctionIdentifier(propValue)) {\n      // Parse string as \"expression\", return equivalent JavaScript function\n      const trimmedFunctionIdentifier = trimFunctionIdentifier(propValue);\n      propValue = parseExpressionString(trimmedFunctionIdentifier, configuration);\n    }\n\n    replacedProps[propName] = propValue;\n  }\n\n  return replacedProps;\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {JSONConfiguration} from '../json-configuration';\nimport {convertFunctions} from './convert-functions';\n\n/**\n * Constructor signature for configured class catalogs.\n */\ntype Constructor<T = unknown> = new (props: Record<string, unknown>) => T;\n\n/**\n * Instantiates a configured class or React component from a JSON `@@type` reference.\n * @param type Catalog key resolved from JSON.\n * @param props Props to pass into the resolved target.\n * @param configuration Active conversion configuration.\n * @returns The instantiated class/component, or `null` if the type is not registered.\n */\nexport function instantiateClass(\n  type: string,\n  props: Record<string, unknown>,\n  configuration: JSONConfiguration\n): unknown {\n  // Find the class\n  const Class = configuration.config.classes[type];\n  const Component = configuration.config.reactComponents[type];\n\n  // Check that the class is in the configuration.\n  if (!Class && !Component) {\n    const {log} = configuration.config; // eslint-disable-line\n    if (log) {\n      const stringProps = JSON.stringify(props, null, 0).slice(0, 40);\n      log.warn(`JSON converter: No registered class of type ${type}(${stringProps}...)  `);\n    }\n    return null;\n  }\n\n  if (Class) {\n    return instantiateJavaScriptClass(Class, props, configuration);\n  }\n\n  return instantiateReactComponent(Component, props, configuration);\n}\n\n/**\n * Instantiates a configured JavaScript class.\n * @param Class Resolved class constructor.\n * @param props Props passed to the constructor.\n * @param configuration Active conversion configuration.\n * @returns The instantiated class.\n */\nfunction instantiateJavaScriptClass<T = unknown>(\n  Class: Constructor<T>,\n  props: Record<string, unknown>,\n  configuration: JSONConfiguration\n): unknown {\n  if (configuration.preProcessClassProps) {\n    props = configuration.preProcessClassProps(Class, props);\n  }\n  props = convertFunctions(props, configuration);\n  return new Class(props);\n}\n\n/**\n * Instantiates a configured React component.\n * @param Component Resolved React component.\n * @param props Props passed to the component.\n * @param configuration Active conversion configuration.\n * @returns The created React element.\n */\nfunction instantiateReactComponent(Component, props, configuration: JSONConfiguration) {\n  const {React} = configuration.config;\n  const {children = []} = props;\n  delete props.children;\n  if (configuration.preProcessClassProps) {\n    props = configuration.preProcessClassProps(Component, props);\n  }\n\n  props = convertFunctions(props, configuration);\n\n  return React.createElement(Component, props, children);\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {type JSONConfiguration} from '../json-configuration';\n\n/**\n * Executes a configured JSON function reference.\n * @param targetFunction Function name resolved from JSON.\n * @param props Props passed to the configured function.\n * @param configuration Active conversion configuration.\n * @returns The function result, or `null` if the function is not registered.\n */\nexport function executeFunction(\n  targetFunction: string,\n  props: Record<string, unknown>,\n  configuration: JSONConfiguration\n) {\n  // Find the function\n  const matchedFunction = configuration.config.functions[targetFunction];\n\n  // Check that the function is in the configuration.\n  if (!matchedFunction) {\n    const {log} = configuration.config; // eslint-disable-line\n    if (log) {\n      const stringProps = JSON.stringify(props, null, 0).slice(0, 40);\n      log.warn(`JSON converter: No registered function ${targetFunction}(${stringProps}...)  `);\n    }\n    return null;\n  }\n\n  return matchedFunction(props);\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n// Accept JSON strings by parsing them\n// TODO - use a parser that provides meaninful error messages\nexport function parseJSON(json) {\n  return typeof json === 'string' ? JSON.parse(json) : json;\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {JSONConfiguration, JSONConfigurationProps} from './json-configuration';\nimport {FUNCTION_IDENTIFIER, CONSTANT_IDENTIFIER, FUNCTION_KEY} from './syntactic-sugar';\nimport {instantiateClass} from './helpers/instantiate-class';\nimport {executeFunction} from './helpers/execute-function';\nimport {parseJSON} from './helpers/parse-json';\n\nfunction isObject(value: unknown): value is Record<string, unknown> {\n  return Boolean(value) && typeof value === 'object';\n}\n\n/**\n * Properties accepted by `JSONConverter`.\n */\nexport type JSONConverterProps = {\n  /** Configuration catalogs and hooks used during conversion. */\n  configuration: JSONConfiguration | JSONConfigurationProps;\n  /** Optional callback fired when JSON input changes. */\n  onJSONChange: () => void;\n};\n\n/**\n * Converts JSON to \"props\" by \"hydrating\" classes, resolving enums and functions etc.\n *\n * Lightly processes `json` props, transform string values, and extract `views` and `layers`\n * @see https://github.com/visgl/deck.gl/blob/master/dev-docs/RFCs/v6.1/json-layers-rfc.md\n *\n * NOTES:\n * - This is intended to provide minimal necessary processing required to support\n *   existing deck.gl props via JSON. This is not an implementation of alternate JSON schemas.\n * - Optionally, error checking could be applied, but ideally should leverage\n *   non-JSON specific mechanisms like prop types.\n */\nexport class JSONConverter {\n  /** Logger used by downstream helpers for warnings. */\n  log = console; // eslint-disable-line\n  /** Active configuration used by the converter. */\n  configuration!: JSONConfiguration;\n  /** Callback invoked when the configured JSON input changes. */\n  onJSONChange: () => void = () => {};\n  /** Most recently converted JSON input. */\n  json: unknown = null;\n  /** Cached result for the most recently converted JSON input. */\n  convertedJson: unknown = null;\n\n  /**\n   * Creates a converter for a configuration object or `JSONConfiguration` instance.\n   * @param props Converter properties.\n   */\n  constructor(props) {\n    this.setProps(props);\n  }\n\n  /** Releases resources held by the converter. Present for API symmetry. */\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n  finalize() {}\n\n  /**\n   * Updates the active configuration and callbacks.\n   * @param props Converter properties or an already-created configuration instance.\n   */\n  setProps(props: JSONConverterProps | JSONConfiguration) {\n    // HANDLE CONFIGURATION PROPS\n    if ('configuration' in props) {\n      // Accept object or `JSONConfiguration`\n      this.configuration =\n        props.configuration instanceof JSONConfiguration\n          ? props.configuration\n          : new JSONConfiguration(props.configuration);\n    }\n\n    if ('onJSONChange' in props) {\n      this.onJSONChange = props.onJSONChange;\n    }\n  }\n\n  /**\n   * Merges additional configuration into the current converter.\n   * @param config Additional catalogs or hooks to merge.\n   */\n  mergeConfiguration(config: JSONConfiguration | JSONConfigurationProps) {\n    this.configuration.merge(config instanceof JSONConfiguration ? config.getProps() : config);\n  }\n\n  /**\n   * Converts a JSON object or JSON string into runtime props.\n   * @param json JSON payload to convert.\n   * @returns The converted runtime value.\n   */\n  convert(json: unknown): unknown {\n    // Use shallow equality to ensure we only convert same json once\n    if (!json || json === this.json) {\n      return this.convertedJson;\n    }\n    // Save json for shallow diffing\n    this.json = json;\n\n    // Accept JSON strings by parsing them\n    const parsedJSON = parseJSON(json);\n    if (!isObject(parsedJSON)) {\n      throw new Error('JSONConverter: expected an object');\n    }\n\n    // Convert the JSON\n    let convertedJson = convertJSON(parsedJSON, this.configuration);\n\n    convertedJson = this.configuration.postProcessConvertedJson(convertedJson);\n\n    this.convertedJson = convertedJson;\n    return convertedJson;\n  }\n\n  /**\n   * Backwards-compatible alias for `convert()`.\n   * @param json JSON payload to convert.\n   * @returns The converted runtime value.\n   */\n  convertJson(json) {\n    return this.convert(json);\n  }\n}\n\n/**\n * Clones the configuration before conversion so nested merges do not mutate the live converter state.\n * @param json Parsed JSON object to convert.\n * @param configuration Active configuration to clone.\n * @returns The converted runtime value.\n */\nfunction convertJSON(json: Record<string, unknown>, configuration: JSONConfiguration) {\n  // Fixup configuration\n  configuration = new JSONConfiguration(configuration.getProps());\n  return convertJSONRecursively(json, '', configuration);\n}\n\n/**\n * Recursively converts JSON values into runtime values using the provided configuration.\n * @param json JSON value to convert.\n * @param key Property key associated with the current value.\n * @param configuration Active conversion configuration.\n * @returns The converted runtime value.\n */\nfunction convertJSONRecursively(json: unknown, key, configuration) {\n  if (Array.isArray(json)) {\n    return json.map((element, i) => convertJSONRecursively(element, String(i), configuration));\n  }\n\n  if (isObject(json)) {\n    // If object.type is in configuration, instantiate\n    if (isClassInstance(json, configuration)) {\n      return convertClassInstance(json, configuration);\n    }\n\n    // If object.function is in configuration, convert object to function\n    if (FUNCTION_KEY in json) {\n      return convertFunctionObject(json, configuration);\n    }\n    return convertPlainObject(json, configuration);\n  }\n\n  // Single value\n  if (typeof json === 'string') {\n    return convertString(json, key, configuration);\n  }\n\n  // Return unchanged (number, boolean, ...)\n  return json;\n}\n\n/**\n * Checks whether a JSON object should be instantiated as a configured class/component.\n * @param json JSON object under inspection.\n * @param configuration Active conversion configuration.\n * @returns `true` if the object contains the configured type key.\n */\nfunction isClassInstance(json: Record<string, unknown>, configuration: JSONConfiguration) {\n  const {typeKey} = configuration.config;\n  const isClass = isObject(json) && Boolean(json[typeKey]);\n  return isClass;\n}\n\n/**\n * Instantiates a configured class/component from a JSON object.\n * @param json JSON object describing the class instance.\n * @param configuration Active conversion configuration.\n * @returns The instantiated runtime value.\n */\nfunction convertClassInstance(json: Record<string, unknown>, configuration: JSONConfiguration) {\n  // Extract the class type field\n  const {typeKey} = configuration.config;\n  const type = json[typeKey];\n\n  // Prepare a props object and ensure all values have been converted\n  let props = {...json};\n  delete props[typeKey];\n\n  props = convertPlainObject(props, configuration);\n\n  return instantiateClass(type as string, props, configuration);\n}\n\n/**\n * Executes a configured function from a JSON object.\n * @param json JSON object describing the function invocation.\n * @param configuration Active conversion configuration.\n * @returns The function result.\n */\nfunction convertFunctionObject(json, configuration: JSONConfiguration) {\n  // Extract the target function field\n  const {functionKey} = configuration.config;\n  const targetFunction = json[functionKey];\n\n  // Prepare a props object and ensure all values have been converted\n  let props = {...json};\n  delete props[functionKey];\n\n  props = convertPlainObject(props, configuration);\n\n  return executeFunction(targetFunction, props, configuration);\n}\n\n/**\n * Recursively converts each property in a plain object.\n * @param json Plain object to convert.\n * @param configuration Active conversion configuration.\n * @returns A converted object with the same keys.\n */\nfunction convertPlainObject(json: unknown, configuration: JSONConfiguration) {\n  if (!isObject(json)) {\n    throw new Error('convertPlainObject: expected an object');\n  }\n\n  const result = {};\n  for (const [key, value] of Object.entries(json)) {\n    result[key] = convertJSONRecursively(value, key, configuration);\n  }\n  return result;\n}\n\n/**\n * Converts a single string literal, handling configured function, constant, and enum syntax.\n * @param string String value to convert.\n * @param key Property key associated with the string value.\n * @param configuration Active conversion configuration.\n * @returns The converted runtime value or the original string.\n * @todo We could also support string syntax for hydrating other types, like regexps.\n */\nfunction convertString(string: string, key: string, configuration: JSONConfiguration) {\n  // Here the JSON value is supposed to be treated as a function\n  if (string.startsWith(FUNCTION_IDENTIFIER) && configuration.convertFunction) {\n    string = string.replace(FUNCTION_IDENTIFIER, '');\n    return configuration.convertFunction(string, configuration);\n  }\n  if (string.startsWith(CONSTANT_IDENTIFIER)) {\n    string = string.replace(CONSTANT_IDENTIFIER, '');\n    if (configuration.config.constants[string]) {\n      return configuration.config.constants[string];\n    }\n    // enum\n    const [enumVarName, enumValName] = string.split('.');\n    return configuration.config.enumerations[enumVarName][enumValName];\n  }\n  return string;\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n/**\n * Callback hooks invoked during the transport lifecycle.\n */\nexport type TransportCallbacks = {\n  /** Invoked when a transport connection is initialized. */\n  onInitialize: (message: any) => void;\n  /** Invoked when a transport connection is finalized. */\n  onFinalize: (message: any) => void;\n  /** Invoked when the transport receives a message. */\n  onMessage: (message: any) => void;\n};\n\n/* global document */\nconst state: TransportCallbacks = {\n  onInitialize: _ => _,\n  onFinalize: _ => _,\n  onMessage: _ => _\n};\n\n/** Helper class for Python / Jupyter integration */\nexport class Transport {\n  /**\n   * Registers lifecycle callbacks shared by all transport instances.\n   * @param callbacks Partial callback set to install.\n   */\n  static setCallbacks({onInitialize, onFinalize, onMessage}: Partial<TransportCallbacks>) {\n    if (onInitialize) {\n      state.onInitialize = onInitialize;\n    }\n    if (onFinalize) {\n      state.onFinalize = onFinalize;\n    }\n    if (onMessage) {\n      state.onMessage = onMessage;\n    }\n    // this._flushQueuedConnections();\n  }\n\n  /** Human-readable transport name. */\n  name: string;\n  /** Queue of inbound messages received before callbacks are ready. */\n  _messageQueue = [];\n  /** Arbitrary user data associated with the transport instance. */\n  userData = {};\n  /** Whether the transport has been finalized. */\n  _destroyed: boolean = false;\n\n  /**\n   * Creates a transport instance.\n   * @param name Human-readable transport name.\n   */\n  constructor(name = 'Transport') {\n    this.name = name;\n  }\n\n  /**\n   * Return a root DOM element for this transport connection\n   * @returns default implementation returns document.body\n   * Jupyter Notebook transports will return an element associated with the notebook cell\n   */\n  getRootDOMElement(): HTMLElement | null {\n    return typeof document !== 'undefined' ? document.body : null;\n  }\n\n  /**\n   * Sends a JSON message through the transport back-channel.\n   */\n  sendJSONMessage() {\n    // eslint-disable-next-line\n    console.error('Back-channel not implemented for this transport');\n  }\n\n  /**\n   * Sends a binary message through the transport back-channel.\n   */\n  sendBinaryMessage() {\n    // eslint-disable-next-line\n    console.error('Back-channel not implemented for this transport');\n  }\n\n  //\n  // API for transports (not intended for apps)\n  //\n\n  /**\n   * Marks the transport as initialized and emits the initialize callback.\n   * @param options Additional payload fields merged into the callback message.\n   */\n  _initialize(options = {}) {\n    const message = {transport: this, ...options};\n    state.onInitialize(message);\n\n    // console.debug('Resolving init promise', options); // eslint-disable-line\n    // this._initResolvers.resolve(message);\n  }\n\n  /**\n   * Marks the transport as finalized and emits the finalize callback.\n   * @param options Additional payload fields merged into the callback message.\n   */\n  _finalize(options = {}) {\n    const message = {transport: this, ...options};\n\n    // TODO - could potentially be called without Initialize being called\n    state.onFinalize(message);\n    this._destroyed = true;\n  }\n\n  /**\n   * Delivers a received message to the registered message callback.\n   * @param message Additional payload fields merged into the callback message.\n   */\n  _messageReceived(message = {}) {\n    message = {transport: this, ...message};\n\n    // TODO - this function could potentially be called before callback registered/ Initialize called\n    // if (!state.onMessage) {\n    //   console.error('Queueing transport message', message); // eslint-disable-line\n    //   this._messageQueue.push(message);\n    //   return;\n    // }\n\n    console.debug('Delivering transport message', message); // eslint-disable-line\n    state.onMessage(message);\n  }\n\n  /*\n  // This tries to handle the case that a transport connection initializes before the application\n  // has set the callbacks.\n  // Note: It is not clear that this can actually happen in the in initial Jupyter widget transport\n  _flushQueuedConnections() {\n    if (onInitialize) {\n      state._initPromise.then(initArgs => {\n        onInitialize(initArgs);\n\n        if (state._onMessage) {\n          // Send any queued messages\n          let message;\n          while ((message = this._messageQueue.pop())) {\n            console.debug('Delivering queued transport message', message); // eslint-disable-line\n            this._onMessage(message);\n          }\n        }\n      });\n    }\n  }\n  */\n\n  /**\n   * Serializes an object to JSON while tolerating circular references where possible.\n   * @param v Value to serialize.\n   * @returns A JSON string with cycles removed or deduplicated where possible.\n   */\n  static _stringifyJSONSafe(v) {\n    const cache = new Set();\n    return JSON.stringify(v, (key, value) => {\n      if (typeof value === 'object' && value !== null) {\n        if (cache.has(value)) {\n          // Circular reference found\n          try {\n            // If this value does not reference a parent it can be deduped\n            return JSON.parse(JSON.stringify(value));\n          } catch (err) {\n            // discard key if value cannot be deduped\n            return undefined;\n          }\n        }\n        // Store value in our set\n        cache.add(value);\n      }\n      return value;\n    });\n  }\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n// TODO - can we reuse the core util? Assuming we don't want to export it\n\n/* eslint-disable complexity */\n\n// Compares two objects to see if their keys are shallowly equal\nexport function shallowEqualObjects(a, b) {\n  if (a === b) {\n    return true;\n  }\n\n  if (typeof a !== 'object' || a === null || typeof b !== 'object' || b === null) {\n    return false;\n  }\n\n  if (Object.keys(a).length !== Object.keys(b).length) {\n    return false;\n  }\n\n  for (const key in a) {\n    if (!(key in b) || a[key] !== b[key]) {\n      return false;\n    }\n  }\n  for (const key in b) {\n    if (!(key in a)) {\n      return false;\n    }\n  }\n  return true;\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;ACIA,IAAM,sBAAsB;AAC5B,IAAM,sBAAsB;AAC5B,IAAM,WAAW;AACjB,I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