@fern-api/php-dynamic-snippets 1.25.0 → 1.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +44 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +164 -0
- package/dist/index.d.ts +164 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/package.json +9 -10
- package/cjs/DynamicSnippetsGenerator.cjs +0 -49
- package/cjs/DynamicSnippetsGenerator.cjs.map +0 -1
- package/cjs/DynamicSnippetsGenerator.d.cts +0 -18
- package/cjs/DynamicSnippetsGeneratorContext-CwkDTYOI.d.cts +0 -83
- package/cjs/EndpointSnippetGenerator.cjs +0 -49
- package/cjs/EndpointSnippetGenerator.cjs.map +0 -1
- package/cjs/EndpointSnippetGenerator.d.cts +0 -76
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs +0 -47
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +0 -1
- package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +0 -4
- package/cjs/context/DynamicTypeLiteralMapper.cjs +0 -47
- package/cjs/context/DynamicTypeLiteralMapper.cjs.map +0 -1
- package/cjs/context/DynamicTypeLiteralMapper.d.cts +0 -4
- package/cjs/context/FilePropertyMapper.cjs +0 -47
- package/cjs/context/FilePropertyMapper.cjs.map +0 -1
- package/cjs/context/FilePropertyMapper.d.cts +0 -4
- package/cjs/index.cjs +0 -49
- package/cjs/index.cjs.map +0 -1
- package/cjs/index.d.cts +0 -6
- package/esm/DynamicSnippetsGenerator.d.ts +0 -18
- package/esm/DynamicSnippetsGenerator.js +0 -2
- package/esm/DynamicSnippetsGenerator.js.map +0 -1
- package/esm/DynamicSnippetsGeneratorContext-CwkDTYOI.d.ts +0 -83
- package/esm/EndpointSnippetGenerator.d.ts +0 -76
- package/esm/EndpointSnippetGenerator.js +0 -2
- package/esm/EndpointSnippetGenerator.js.map +0 -1
- package/esm/chunk-34WVNBJS.js +0 -47
- package/esm/chunk-34WVNBJS.js.map +0 -1
- package/esm/chunk-BN32SYGE.js +0 -2
- package/esm/chunk-BN32SYGE.js.map +0 -1
- package/esm/chunk-F7LTKJMT.js +0 -2
- package/esm/chunk-F7LTKJMT.js.map +0 -1
- package/esm/chunk-MZ7AWQF7.js +0 -2
- package/esm/chunk-MZ7AWQF7.js.map +0 -1
- package/esm/chunk-P7HYTUQU.js +0 -4
- package/esm/chunk-P7HYTUQU.js.map +0 -1
- package/esm/chunk-Q7QB5SA5.js +0 -2
- package/esm/chunk-Q7QB5SA5.js.map +0 -1
- package/esm/chunk-U6JJRNQH.js +0 -2
- package/esm/chunk-U6JJRNQH.js.map +0 -1
- package/esm/context/DynamicSnippetsGeneratorContext.d.ts +0 -4
- package/esm/context/DynamicSnippetsGeneratorContext.js +0 -2
- package/esm/context/DynamicSnippetsGeneratorContext.js.map +0 -1
- package/esm/context/DynamicTypeLiteralMapper.d.ts +0 -4
- package/esm/context/DynamicTypeLiteralMapper.js +0 -2
- package/esm/context/DynamicTypeLiteralMapper.js.map +0 -1
- package/esm/context/FilePropertyMapper.d.ts +0 -4
- package/esm/context/FilePropertyMapper.js +0 -2
- package/esm/context/FilePropertyMapper.js.map +0 -1
- package/esm/index.d.ts +0 -6
- package/esm/index.js +0 -2
- package/esm/index.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../node_modules/.pnpm/@esbuild-plugins+node-globals-polyfill@0.2.3_esbuild@0.27.0/node_modules/@esbuild-plugins/node-globals-polyfill/process.js","../../../../../node_modules/.pnpm/@esbuild-plugins+node-globals-polyfill@0.2.3_esbuild@0.27.0/node_modules/@esbuild-plugins/node-globals-polyfill/Buffer.js","../../../../../node_modules/.pnpm/@esbuild-plugins+node-globals-polyfill@0.2.3_esbuild@0.27.0/node_modules/@esbuild-plugins/node-globals-polyfill/_buffer.js","../../src/DynamicSnippetsGenerator.ts","../../../../../packages/commons/core-utils/src/index.ts","../../../../../packages/commons/core-utils/src/assert.ts","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/lodash.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseToString.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayMap.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArray.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_WeakMap.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/noop.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludes.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIndexOf.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFindIndex.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNaN.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_strictIndexOf.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isIndex.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArrayLike.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isLength.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isPrototype.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/keys.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayLikeKeys.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTimes.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArguments.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsArguments.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isBuffer.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/stubFalse.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isTypedArray.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsTypedArray.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUnary.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nodeUtil.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseKeys.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeKeys.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overArg.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toString.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayPush.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/camelCase.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/capitalize.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/upperFirst.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createCaseFirst.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_castSlice.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSlice.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasUnicode.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stringToArray.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiToArray.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_unicodeToArray.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createCompounder.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayReduce.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/deburr.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_deburrLetter.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_basePropertyOf.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/words.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiWords.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasUnicodeWord.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_unicodeWords.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Stack.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackClear.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackDelete.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackGet.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackHas.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackSet.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getSymbols.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayFilter.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/stubArray.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getAllKeys.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetAllKeys.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getTag.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_DataView.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Promise.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Uint8Array.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsEqual.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsEqualDeep.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalArrays.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arraySome.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalByTag.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapToArray.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalObjects.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludesWith.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isEqual.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUniq.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createSet.js","../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqWith.js","../../../../../packages/commons/core-utils/src/objects/keys.ts","../../../../browser-compatible-base/src/ast/index.ts","../../../../browser-compatible-base/src/ast/AbstractAstNode.ts","../../../../browser-compatible-base/src/utils/stacktrace.ts","../../../../browser-compatible-base/src/ast/AbstractWriter.ts","../../../../browser-compatible-base/src/utils/index.ts","../../../../browser-compatible-base/src/ast/CodeBlock.ts","../../../../browser-compatible-base/src/ast/Argument.ts","../../../../browser-compatible-base/src/ast/Ternary.ts","../../../../browser-compatible-base/src/dynamic-snippets/index.ts","../../../../browser-compatible-base/src/dynamic-snippets/AbstractDynamicSnippetsGenerator.ts","../../../../browser-compatible-base/src/dynamic-snippets/Result.ts","../../../../browser-compatible-base/src/dynamic-snippets/AbstractDynamicSnippetsGeneratorContext.ts","../../../../../packages/cli/fern-definition/schema/src/index.ts","../../../../../packages/cli/fern-definition/schema/src/utils/HttpEndpointReferenceParser.ts","../../../../browser-compatible-base/src/dynamic-snippets/ErrorReporter.ts","../../../../browser-compatible-base/src/dynamic-snippets/Scope.ts","../../src/context/DynamicSnippetsGeneratorContext.ts","../../../codegen/src/index.ts","../../../codegen/src/ast/core/Constant.ts","../../../codegen/src/constants.ts","../../../codegen/src/php.ts","../../../codegen/src/ast/index.ts","../../../codegen/src/ast/Access.ts","../../../codegen/src/ast/Array.ts","../../../codegen/src/ast/core/AstNode.ts","../../../codegen/src/ast/core/Writer.ts","../../../codegen/src/ast/Attribute.ts","../../../codegen/src/ast/Class.ts","../../../codegen/src/ast/ClassReference.ts","../../../codegen/src/ast/Comment.ts","../../../codegen/src/ast/utils/convertToPhpVariableName.ts","../../../codegen/src/ast/utils/orderByAccess.ts","../../../codegen/src/ast/ClassInstantiation.ts","../../../codegen/src/ast/utils/writeArguments.ts","../../../codegen/src/ast/CodeBlock.ts","../../../codegen/src/ast/DataClass.ts","../../../codegen/src/ast/Parameter.ts","../../../codegen/src/ast/Type.ts","../../../codegen/src/ast/TypeLiteral.ts","../../../codegen/src/ast/core/index.ts","../../../codegen/src/ast/MethodInvocation.ts","../../../codegen/src/ast/utils/convertFromPhpVariableName.ts","../../../codegen/src/ast/Enum.ts","../../../codegen/src/ast/Method.ts","../../../codegen/src/ast/Field.ts","../../../codegen/src/ast/Map.ts","../../../codegen/src/ast/Trait.ts","../../../codegen/src/ast/MergeArrays.ts","../../../codegen/src/utils.ts","../../src/context/DynamicTypeLiteralMapper.ts","../../src/context/FilePropertyMapper.ts","../../src/EndpointSnippetGenerator.ts"],"sourcesContent":["// shim for using process in browser\n// based off https://github.com/defunctzombie/node-process/blob/master/browser.js\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined')\n}\nfunction defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined')\n}\nvar cachedSetTimeout = defaultSetTimout\nvar cachedClearTimeout = defaultClearTimeout\nif (typeof global.setTimeout === 'function') {\n cachedSetTimeout = setTimeout\n}\nif (typeof global.clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout\n}\n\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0)\n }\n // if setTimeout wasn't available but was latter defined\n if (\n (cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) &&\n setTimeout\n ) {\n cachedSetTimeout = setTimeout\n return setTimeout(fun, 0)\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0)\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0)\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0)\n }\n }\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker)\n }\n // if clearTimeout wasn't available but was latter defined\n if (\n (cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) &&\n clearTimeout\n ) {\n cachedClearTimeout = clearTimeout\n return clearTimeout(marker)\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker)\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker)\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker)\n }\n }\n}\nvar queue = []\nvar draining = false\nvar currentQueue\nvar queueIndex = -1\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return\n }\n draining = false\n if (currentQueue.length) {\n queue = currentQueue.concat(queue)\n } else {\n queueIndex = -1\n }\n if (queue.length) {\n drainQueue()\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return\n }\n var timeout = runTimeout(cleanUpNextTick)\n draining = true\n\n var len = queue.length\n while (len) {\n currentQueue = queue\n queue = []\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run()\n }\n }\n queueIndex = -1\n len = queue.length\n }\n currentQueue = null\n draining = false\n runClearTimeout(timeout)\n}\nfunction nextTick(fun) {\n var args = new Array(arguments.length - 1)\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i]\n }\n }\n queue.push(new Item(fun, args))\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue)\n }\n}\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun\n this.array = array\n}\nItem.prototype.run = function() {\n this.fun.apply(null, this.array)\n}\nvar title = 'browser'\nvar platform = 'browser'\nvar browser = true\nvar env = {}\nvar argv = []\nvar version = '' // empty string to avoid regexp issues\nvar versions = {}\nvar release = {}\nvar config = {}\n\nfunction noop() {}\n\nvar on = noop\nvar addListener = noop\nvar once = noop\nvar off = noop\nvar removeListener = noop\nvar removeAllListeners = noop\nvar emit = noop\n\nfunction binding(name) {\n throw new Error('process.binding is not supported')\n}\n\nfunction cwd() {\n return '/'\n}\nfunction chdir(dir) {\n throw new Error('process.chdir is not supported')\n}\nfunction umask() {\n return 0\n}\n\n// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js\nvar performance = global.performance || {}\nvar performanceNow =\n performance.now ||\n performance.mozNow ||\n performance.msNow ||\n performance.oNow ||\n performance.webkitNow ||\n function() {\n return new Date().getTime()\n }\n\n// generate timestamp or delta\n// see http://nodejs.org/api/process.html#process_process_hrtime\nfunction hrtime(previousTimestamp) {\n var clocktime = performanceNow.call(performance) * 1e-3\n var seconds = Math.floor(clocktime)\n var nanoseconds = Math.floor((clocktime % 1) * 1e9)\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0]\n nanoseconds = nanoseconds - previousTimestamp[1]\n if (nanoseconds < 0) {\n seconds--\n nanoseconds += 1e9\n }\n }\n return [seconds, nanoseconds]\n}\n\nvar startTime = new Date()\nfunction uptime() {\n var currentTime = new Date()\n var dif = currentTime - startTime\n return dif / 1000\n}\n\nexport var process = {\n nextTick: nextTick,\n title: title,\n browser: browser,\n env: env,\n argv: argv,\n version: version,\n versions: versions,\n on: on,\n addListener: addListener,\n once: once,\n off: off,\n removeListener: removeListener,\n removeAllListeners: removeAllListeners,\n emit: emit,\n binding: binding,\n cwd: cwd,\n chdir: chdir,\n umask: umask,\n hrtime: hrtime,\n platform: platform,\n release: release,\n config: config,\n uptime: uptime,\n}\n\n// replace process.env.VAR with define\n\nconst defines = {}\nObject.keys(defines).forEach((key) => {\n const segs = key.split('.')\n let target = process\n for (let i = 0; i < segs.length; i++) {\n const seg = segs[i]\n if (i === segs.length - 1) {\n target[seg] = defines[key]\n } else {\n target = target[seg] || (target[seg] = {})\n }\n }\n})\n","// taken from https://github.com/calvinmetcalf/buffer-es6\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\nvar inited = false\nfunction init() {\n inited = true\n var code =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n }\n\n revLookup['-'.charCodeAt(0)] = 62\n revLookup['_'.charCodeAt(0)] = 63\n}\n\nfunction base64toByteArray(b64) {\n if (!inited) {\n init()\n }\n var i, j, l, tmp, placeHolders, arr\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n\n // base64 is 4/3 + up to two characters of the original data\n arr = new Arr((len * 3) / 4 - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xff\n arr[L++] = (tmp >> 8) & 0xff\n arr[L++] = tmp & 0xff\n }\n\n if (placeHolders === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xff\n } else if (placeHolders === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xff\n arr[L++] = tmp & 0xff\n }\n\n return arr\n}\n\nfunction tripletToBase64(num) {\n return (\n lookup[(num >> 18) & 0x3f] +\n lookup[(num >> 12) & 0x3f] +\n lookup[(num >> 6) & 0x3f] +\n lookup[num & 0x3f]\n )\n}\n\nfunction encodeChunk(uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2]\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction base64fromByteArray(uint8) {\n if (!inited) {\n init()\n }\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(\n encodeChunk(\n uint8,\n i,\n i + maxChunkLength > len2 ? len2 : i + maxChunkLength,\n ),\n )\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3f]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3f]\n output += lookup[(tmp << 2) & 0x3f]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n\nvar INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT =\n global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : true\n\nfunction kMaxLength() {\n return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff\n}\n\nfunction createBuffer(that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nexport function Buffer(arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string',\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function(arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from(that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function(value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nBuffer.kMaxLength = kMaxLength()\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (\n typeof Symbol !== 'undefined' &&\n Symbol.species &&\n Buffer[Symbol.species] === Buffer\n ) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n // Object.defineProperty(Buffer, Symbol.species, {\n // value: null,\n // configurable: true\n // })\n }\n}\n\nfunction assertSize(size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc(that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function(size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe(that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function(size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function(size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString(that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike(that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer(that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError(\"'offset' is out of bounds\")\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError(\"'length' is out of bounds\")\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject(that, obj) {\n if (internalIsBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if (\n (typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) ||\n 'length' in obj\n ) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError(\n 'First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.',\n )\n}\n\nfunction checked(length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError(\n 'Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' +\n kMaxLength().toString(16) +\n ' bytes',\n )\n }\n return length | 0\n}\n\nexport function SlowBuffer(length) {\n if (+length != length) {\n // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\nBuffer.isBuffer = isBuffer\nfunction internalIsBuffer(b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare(a, b) {\n if (!internalIsBuffer(a) || !internalIsBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding(encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat(list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!internalIsBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength(string, encoding) {\n if (internalIsBuffer(string)) {\n return string.length\n }\n if (\n typeof ArrayBuffer !== 'undefined' &&\n typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)\n ) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString(encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase)\n throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap(b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16() {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32() {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64() {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString() {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals(b) {\n if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\n\nBuffer.prototype.compare = function compare(\n target,\n start,\n end,\n thisStart,\n thisEnd,\n) {\n if (!internalIsBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (\n start < 0 ||\n end > target.length ||\n thisStart < 0 ||\n thisEnd > this.length\n ) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : buffer.length - 1\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xff // Search for a byte value [0-255]\n if (\n Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function'\n ) {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(\n buffer,\n val,\n byteOffset,\n )\n } else {\n return Uint8Array.prototype.lastIndexOf.call(\n buffer,\n val,\n byteOffset,\n )\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (\n encoding === 'ucs2' ||\n encoding === 'ucs-2' ||\n encoding === 'utf16le' ||\n encoding === 'utf-16le'\n ) {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read(buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (\n read(arr, i) ===\n read(val, foundIndex === -1 ? 0 : i - foundIndex)\n ) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength)\n return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength)\n byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite(buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write(buf, string, offset, length) {\n return blitBuffer(\n utf8ToBytes(string, buf.length - offset),\n buf,\n offset,\n length,\n )\n}\n\nfunction asciiWrite(buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write(buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write(buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write(buf, string, offset, length) {\n return blitBuffer(\n utf16leToBytes(string, buf.length - offset),\n buf,\n offset,\n length,\n )\n}\n\nBuffer.prototype.write = function write(string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported',\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if (\n (string.length > 0 && (length < 0 || offset < 0)) ||\n offset > this.length\n ) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase)\n throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON() {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0),\n }\n}\n\nfunction base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64fromByteArray(buf)\n } else {\n return base64fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence =\n firstByte > 0xef\n ? 4\n : firstByte > 0xdf\n ? 3\n : firstByte > 0xbf\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xc0) === 0x80) {\n tempCodePoint =\n ((firstByte & 0x1f) << 0x6) | (secondByte & 0x3f)\n if (tempCodePoint > 0x7f) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if (\n (secondByte & 0xc0) === 0x80 &&\n (thirdByte & 0xc0) === 0x80\n ) {\n tempCodePoint =\n ((firstByte & 0xf) << 0xc) |\n ((secondByte & 0x3f) << 0x6) |\n (thirdByte & 0x3f)\n if (\n tempCodePoint > 0x7ff &&\n (tempCodePoint < 0xd800 || tempCodePoint > 0xdfff)\n ) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if (\n (secondByte & 0xc0) === 0x80 &&\n (thirdByte & 0xc0) === 0x80 &&\n (fourthByte & 0xc0) === 0x80\n ) {\n tempCodePoint =\n ((firstByte & 0xf) << 0x12) |\n ((secondByte & 0x3f) << 0xc) |\n ((thirdByte & 0x3f) << 0x6) |\n (fourthByte & 0x3f)\n if (\n tempCodePoint > 0xffff &&\n tempCodePoint < 0x110000\n ) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xfffd\n bytesPerSequence = 1\n } else if (codePoint > 0xffff) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(((codePoint >>> 10) & 0x3ff) | 0xd800)\n codePoint = 0xdc00 | (codePoint & 0x3ff)\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray(codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, (i += MAX_ARGUMENTS_LENGTH)),\n )\n }\n return res\n}\n\nfunction asciiSlice(buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7f)\n }\n return ret\n}\n\nfunction latin1Slice(buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice(buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice(buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice(start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset(offset, ext, length) {\n if (offset % 1 !== 0 || offset < 0)\n throw new RangeError('offset is not uint')\n if (offset + ext > length)\n throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE(\n offset,\n byteLength,\n noAssert,\n) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE(\n offset,\n byteLength,\n noAssert,\n) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (\n (this[offset] | (this[offset + 1] << 8) | (this[offset + 2] << 16)) +\n this[offset + 3] * 0x1000000\n )\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (\n this[offset] * 0x1000000 +\n ((this[offset + 1] << 16) | (this[offset + 2] << 8) | this[offset + 3])\n )\n}\n\nBuffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return this[offset]\n return (0xff - this[offset] + 1) * -1\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return val & 0x8000 ? val | 0xffff0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return val & 0x8000 ? val | 0xffff0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (\n this[offset] |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n )\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (\n (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3]\n )\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754read(this, offset, false, 52, 8)\n}\n\nfunction checkInt(buf, value, offset, ext, max, min) {\n if (!internalIsBuffer(buf))\n throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min)\n throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE(\n value,\n offset,\n byteLength,\n noAssert,\n) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xff\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xff\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE(\n value,\n offset,\n byteLength,\n noAssert,\n) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xff\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xff\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = value & 0xff\n return offset + 1\n}\n\nfunction objectWriteUInt16(buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] =\n (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n ((littleEndian ? i : 1 - i) * 8)\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE(\n value,\n offset,\n noAssert,\n) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff\n this[offset + 1] = value >>> 8\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE(\n value,\n offset,\n noAssert,\n) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 8\n this[offset + 1] = value & 0xff\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32(buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> ((littleEndian ? i : 3 - i) * 8)) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE(\n value,\n offset,\n noAssert,\n) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = value >>> 24\n this[offset + 2] = value >>> 16\n this[offset + 1] = value >>> 8\n this[offset] = value & 0xff\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE(\n value,\n offset,\n noAssert,\n) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 24\n this[offset + 1] = value >>> 16\n this[offset + 2] = value >>> 8\n this[offset + 3] = value & 0xff\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE(\n value,\n offset,\n byteLength,\n noAssert,\n) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xff\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = (((value / mul) >> 0) - sub) & 0xff\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE(\n value,\n offset,\n byteLength,\n noAssert,\n) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xff\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = (((value / mul) >> 0) - sub) & 0xff\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = value & 0xff\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff\n this[offset + 1] = value >>> 8\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 8\n this[offset + 1] = value & 0xff\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff\n this[offset + 1] = value >>> 8\n this[offset + 2] = value >>> 16\n this[offset + 3] = value >>> 24\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 24\n this[offset + 1] = value >>> 16\n this[offset + 2] = value >>> 8\n this[offset + 3] = value & 0xff\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754(buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat(buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(\n buf,\n value,\n offset,\n 4,\n 3.4028234663852886e38,\n -3.4028234663852886e38,\n )\n }\n ieee754write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble(buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(\n buf,\n value,\n offset,\n 8,\n 1.7976931348623157e308,\n -1.7976931348623157e308,\n )\n }\n ieee754write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE(\n value,\n offset,\n noAssert,\n) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE(\n value,\n offset,\n noAssert,\n) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy(target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length)\n throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart,\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill(val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = internalIsBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean(str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim(str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex(n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes(string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xd7ff && codePoint < 0xe000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xdbff) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xef, 0xbf, 0xbd)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xef, 0xbf, 0xbd)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xdc00) {\n if ((units -= 3) > -1) bytes.push(0xef, 0xbf, 0xbd)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint =\n (((leadSurrogate - 0xd800) << 10) | (codePoint - 0xdc00)) +\n 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xef, 0xbf, 0xbd)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push((codePoint >> 0x6) | 0xc0, (codePoint & 0x3f) | 0x80)\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n (codePoint >> 0xc) | 0xe0,\n ((codePoint >> 0x6) & 0x3f) | 0x80,\n (codePoint & 0x3f) | 0x80,\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n (codePoint >> 0x12) | 0xf0,\n ((codePoint >> 0xc) & 0x3f) | 0x80,\n ((codePoint >> 0x6) & 0x3f) | 0x80,\n (codePoint & 0x3f) | 0x80,\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes(str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xff)\n }\n return byteArray\n}\n\nfunction utf16leToBytes(str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes(str) {\n return base64toByteArray(base64clean(str))\n}\n\nfunction blitBuffer(src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if (i + offset >= dst.length || i >= src.length) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan(val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nfunction isBuffer(obj) {\n return (\n obj != null &&\n (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj))\n )\n}\n\nfunction isFastBuffer(obj) {\n return (\n !!obj.constructor &&\n typeof obj.constructor.isBuffer === 'function' &&\n obj.constructor.isBuffer(obj)\n )\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer(obj) {\n return (\n typeof obj.readFloatLE === 'function' &&\n typeof obj.slice === 'function' &&\n isFastBuffer(obj.slice(0, 0))\n )\n}\n\nfunction ieee754read(buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? nBytes - 1 : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << -nBits) - 1)\n s >>= -nBits\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << -nBits) - 1)\n e >>= -nBits\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : (s ? -1 : 1) * Infinity\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nfunction ieee754write(buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0\n var i = isLE ? 0 : nBytes - 1\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (\n ;\n mLen >= 8;\n buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8\n ) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (\n ;\n eLen > 0;\n buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8\n ) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","export { Buffer } from '_node-buffer-polyfill_.js'\n","import {\n AbstractAstNode,\n AbstractDynamicSnippetsGenerator,\n FernGeneratorExec,\n Options\n} from \"@fern-api/browser-compatible-base-generator\";\nimport { FernIr } from \"@fern-api/dynamic-ir-sdk\";\nimport { DynamicSnippetsGeneratorContext } from \"./context/DynamicSnippetsGeneratorContext\";\nimport { EndpointSnippetGenerator } from \"./EndpointSnippetGenerator\";\n\nexport class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator<\n DynamicSnippetsGeneratorContext,\n EndpointSnippetGenerator\n> {\n constructor({\n ir,\n config\n }: {\n ir: FernIr.dynamic.DynamicIntermediateRepresentation;\n config: FernGeneratorExec.GeneratorConfig;\n }) {\n super(new DynamicSnippetsGeneratorContext({ ir, config }));\n }\n\n public async generate(\n request: FernIr.dynamic.EndpointSnippetRequest\n ): Promise<FernIr.dynamic.EndpointSnippetResponse> {\n return super.generate(request);\n }\n\n public generateSync(request: FernIr.dynamic.EndpointSnippetRequest): FernIr.dynamic.EndpointSnippetResponse {\n return super.generateSync(request);\n }\n\n public async generateSnippetAst(\n request: FernIr.dynamic.EndpointSnippetRequest,\n options?: Options\n ): Promise<AbstractAstNode> {\n return await super.generateSnippetAst(request, options);\n }\n\n protected createSnippetGenerator(context: DynamicSnippetsGeneratorContext): EndpointSnippetGenerator {\n return new EndpointSnippetGenerator({ context });\n }\n}\n","export { addPrefixToString } from \"./addPrefixToString\";\nexport {\n assert,\n assertDefined,\n assertNever,\n assertNeverNoThrow,\n assertNonNull,\n assertString,\n assertVoidNoThrow\n} from \"./assert\";\nexport { delay } from \"./delay/delay\";\nexport { withMinimumTime } from \"./delay/withMinimumTime\";\nexport { EMPTY_ARRAY, EMPTY_OBJECT } from \"./empty\";\nexport * as Examples from \"./examples\";\nexport { extractErrorMessage } from \"./extractErrorMessage\";\nexport { getDuplicates } from \"./getDuplicates\";\nexport { identity } from \"./identity\";\nexport { isNonNullish } from \"./isNonNullish\";\nexport { MediaType } from \"./mediaType\";\nexport { mergeWithOverrides } from \"./mergeWithOverrides\";\nexport { noop } from \"./noop\";\nexport {\n haveSameNullishness,\n nullIfNullish,\n nullIfSomeNullish,\n undefinedIfNullish,\n undefinedIfSomeNullish\n} from \"./nullishUtils\";\nexport { type ObjectPropertiesVisitor, visitObject, visitObjectAsync } from \"./ObjectPropertiesVisitor\";\nexport { type Entries, entries } from \"./objects/entries\";\nexport { isPlainObject } from \"./objects/isPlainObject\";\nexport { keys } from \"./objects/keys\";\nexport { mapValues } from \"./objects/mapValues\";\nexport { type Values, values } from \"./objects/values\";\nexport { parseEndpointLocator } from \"./parseEndpointLocator\";\nexport { PLATFORM, type Platform } from \"./platform\";\nexport { removeSuffix } from \"./removeSuffix\";\nexport { replaceEnvVariables } from \"./replaceEnvVars\";\nexport { SymbolRegistry, type SymbolRegistryOptions } from \"./SymbolRegistry\";\nexport { SKIP_MARKER, sanitizeNullValues } from \"./sanitizeNullValues\";\nexport { diffSemverOrThrow, parseSemverOrThrow } from \"./semverUtils\";\nexport { type SetRequired } from \"./setRequired\";\nexport { stripLeadingSlash } from \"./stripLeadingSlash\";\nexport { titleCase } from \"./titleCase\";\nexport type { ContainerRunner, Digit, Letter, LowercaseLetter, UppercaseLetter } from \"./types\";\nexport { validateAgainstJsonSchema } from \"./validateAgainstJsonSchema\";\nexport { visitDiscriminatedUnion } from \"./visitDiscriminatedUnion\";\nexport type { WithoutQuestionMarks } from \"./withoutQuestionMarks\";\n","/**\n * Asserts that a condition is truthy, throwing an exception with the specified message if it is falsy.\n */\nexport function assert(condition: unknown, message?: string): asserts condition {\n if (!condition) {\n throw new Error(message ?? \"Expected condition to be truthy but got falsy.\");\n }\n}\n\nexport function assertDefined<T>(val: T, message?: string): asserts val is Exclude<T, undefined> {\n if (val === undefined) {\n throw new Error(message ?? \"Expected value to be defined but got undefined.\");\n }\n}\n\nexport function assertNonNull<T>(val: T, message?: string): asserts val is Exclude<T, null> {\n if (val === null) {\n throw new Error(message ?? \"Expected value to be non-null but got null.\");\n }\n}\n\nexport function assertString(val: unknown, message?: string): asserts val is string {\n if (typeof val !== \"string\") {\n throw new Error(message ?? `Expected value to be a string but got ${typeof val}.`);\n }\n}\n\nexport function assertNever(x: never): never {\n throw new Error(\"Unexpected value: \" + JSON.stringify(x));\n}\n\n// biome-ignore lint/suspicious/noEmptyBlockStatements: allow\nexport function assertNeverNoThrow(_: never): void {}\n\n// biome-ignore lint/suspicious/noEmptyBlockStatements: allow\nexport function assertVoidNoThrow(_x: void): void {}\n","/**\n * @license\n * Lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"es\" -o ./`\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\nexport { default as add } from './add.js';\nexport { default as after } from './after.js';\nexport { default as ary } from './ary.js';\nexport { default as assign } from './assign.js';\nexport { default as assignIn } from './assignIn.js';\nexport { default as assignInWith } from './assignInWith.js';\nexport { default as assignWith } from './assignWith.js';\nexport { default as at } from './at.js';\nexport { default as attempt } from './attempt.js';\nexport { default as before } from './before.js';\nexport { default as bind } from './bind.js';\nexport { default as bindAll } from './bindAll.js';\nexport { default as bindKey } from './bindKey.js';\nexport { default as camelCase } from './camelCase.js';\nexport { default as capitalize } from './capitalize.js';\nexport { default as castArray } from './castArray.js';\nexport { default as ceil } from './ceil.js';\nexport { default as chain } from './chain.js';\nexport { default as chunk } from './chunk.js';\nexport { default as clamp } from './clamp.js';\nexport { default as clone } from './clone.js';\nexport { default as cloneDeep } from './cloneDeep.js';\nexport { default as cloneDeepWith } from './cloneDeepWith.js';\nexport { default as cloneWith } from './cloneWith.js';\nexport { default as commit } from './commit.js';\nexport { default as compact } from './compact.js';\nexport { default as concat } from './concat.js';\nexport { default as cond } from './cond.js';\nexport { default as conforms } from './conforms.js';\nexport { default as conformsTo } from './conformsTo.js';\nexport { default as constant } from './constant.js';\nexport { default as countBy } from './countBy.js';\nexport { default as create } from './create.js';\nexport { default as curry } from './curry.js';\nexport { default as curryRight } from './curryRight.js';\nexport { default as debounce } from './debounce.js';\nexport { default as deburr } from './deburr.js';\nexport { default as defaultTo } from './defaultTo.js';\nexport { default as defaults } from './defaults.js';\nexport { default as defaultsDeep } from './defaultsDeep.js';\nexport { default as defer } from './defer.js';\nexport { default as delay } from './delay.js';\nexport { default as difference } from './difference.js';\nexport { default as differenceBy } from './differenceBy.js';\nexport { default as differenceWith } from './differenceWith.js';\nexport { default as divide } from './divide.js';\nexport { default as drop } from './drop.js';\nexport { default as dropRight } from './dropRight.js';\nexport { default as dropRightWhile } from './dropRightWhile.js';\nexport { default as dropWhile } from './dropWhile.js';\nexport { default as each } from './each.js';\nexport { default as eachRight } from './eachRight.js';\nexport { default as endsWith } from './endsWith.js';\nexport { default as entries } from './entries.js';\nexport { default as entriesIn } from './entriesIn.js';\nexport { default as eq } from './eq.js';\nexport { default as escape } from './escape.js';\nexport { default as escapeRegExp } from './escapeRegExp.js';\nexport { default as every } from './every.js';\nexport { default as extend } from './extend.js';\nexport { default as extendWith } from './extendWith.js';\nexport { default as fill } from './fill.js';\nexport { default as filter } from './filter.js';\nexport { default as find } from './find.js';\nexport { default as findIndex } from './findIndex.js';\nexport { default as findKey } from './findKey.js';\nexport { default as findLast } from './findLast.js';\nexport { default as findLastIndex } from './findLastIndex.js';\nexport { default as findLastKey } from './findLastKey.js';\nexport { default as first } from './first.js';\nexport { default as flatMap } from './flatMap.js';\nexport { default as flatMapDeep } from './flatMapDeep.js';\nexport { default as flatMapDepth } from './flatMapDepth.js';\nexport { default as flatten } from './flatten.js';\nexport { default as flattenDeep } from './flattenDeep.js';\nexport { default as flattenDepth } from './flattenDepth.js';\nexport { default as flip } from './flip.js';\nexport { default as floor } from './floor.js';\nexport { default as flow } from './flow.js';\nexport { default as flowRight } from './flowRight.js';\nexport { default as forEach } from './forEach.js';\nexport { default as forEachRight } from './forEachRight.js';\nexport { default as forIn } from './forIn.js';\nexport { default as forInRight } from './forInRight.js';\nexport { default as forOwn } from './forOwn.js';\nexport { default as forOwnRight } from './forOwnRight.js';\nexport { default as fromPairs } from './fromPairs.js';\nexport { default as functions } from './functions.js';\nexport { default as functionsIn } from './functionsIn.js';\nexport { default as get } from './get.js';\nexport { default as groupBy } from './groupBy.js';\nexport { default as gt } from './gt.js';\nexport { default as gte } from './gte.js';\nexport { default as has } from './has.js';\nexport { default as hasIn } from './hasIn.js';\nexport { default as head } from './head.js';\nexport { default as identity } from './identity.js';\nexport { default as inRange } from './inRange.js';\nexport { default as includes } from './includes.js';\nexport { default as indexOf } from './indexOf.js';\nexport { default as initial } from './initial.js';\nexport { default as intersection } from './intersection.js';\nexport { default as intersectionBy } from './intersectionBy.js';\nexport { default as intersectionWith } from './intersectionWith.js';\nexport { default as invert } from './invert.js';\nexport { default as invertBy } from './invertBy.js';\nexport { default as invoke } from './invoke.js';\nexport { default as invokeMap } from './invokeMap.js';\nexport { default as isArguments } from './isArguments.js';\nexport { default as isArray } from './isArray.js';\nexport { default as isArrayBuffer } from './isArrayBuffer.js';\nexport { default as isArrayLike } from './isArrayLike.js';\nexport { default as isArrayLikeObject } from './isArrayLikeObject.js';\nexport { default as isBoolean } from './isBoolean.js';\nexport { default as isBuffer } from './isBuffer.js';\nexport { default as isDate } from './isDate.js';\nexport { default as isElement } from './isElement.js';\nexport { default as isEmpty } from './isEmpty.js';\nexport { default as isEqual } from './isEqual.js';\nexport { default as isEqualWith } from './isEqualWith.js';\nexport { default as isError } from './isError.js';\nexport { default as isFinite } from './isFinite.js';\nexport { default as isFunction } from './isFunction.js';\nexport { default as isInteger } from './isInteger.js';\nexport { default as isLength } from './isLength.js';\nexport { default as isMap } from './isMap.js';\nexport { default as isMatch } from './isMatch.js';\nexport { default as isMatchWith } from './isMatchWith.js';\nexport { default as isNaN } from './isNaN.js';\nexport { default as isNative } from './isNative.js';\nexport { default as isNil } from './isNil.js';\nexport { default as isNull } from './isNull.js';\nexport { default as isNumber } from './isNumber.js';\nexport { default as isObject } from './isObject.js';\nexport { default as isObjectLike } from './isObjectLike.js';\nexport { default as isPlainObject } from './isPlainObject.js';\nexport { default as isRegExp } from './isRegExp.js';\nexport { default as isSafeInteger } from './isSafeInteger.js';\nexport { default as isSet } from './isSet.js';\nexport { default as isString } from './isString.js';\nexport { default as isSymbol } from './isSymbol.js';\nexport { default as isTypedArray } from './isTypedArray.js';\nexport { default as isUndefined } from './isUndefined.js';\nexport { default as isWeakMap } from './isWeakMap.js';\nexport { default as isWeakSet } from './isWeakSet.js';\nexport { default as iteratee } from './iteratee.js';\nexport { default as join } from './join.js';\nexport { default as kebabCase } from './kebabCase.js';\nexport { default as keyBy } from './keyBy.js';\nexport { default as keys } from './keys.js';\nexport { default as keysIn } from './keysIn.js';\nexport { default as last } from './last.js';\nexport { default as lastIndexOf } from './lastIndexOf.js';\nexport { default as lodash } from './wrapperLodash.js';\nexport { default as lowerCase } from './lowerCase.js';\nexport { default as lowerFirst } from './lowerFirst.js';\nexport { default as lt } from './lt.js';\nexport { default as lte } from './lte.js';\nexport { default as map } from './map.js';\nexport { default as mapKeys } from './mapKeys.js';\nexport { default as mapValues } from './mapValues.js';\nexport { default as matches } from './matches.js';\nexport { default as matchesProperty } from './matchesProperty.js';\nexport { default as max } from './max.js';\nexport { default as maxBy } from './maxBy.js';\nexport { default as mean } from './mean.js';\nexport { default as meanBy } from './meanBy.js';\nexport { default as memoize } from './memoize.js';\nexport { default as merge } from './merge.js';\nexport { default as mergeWith } from './mergeWith.js';\nexport { default as method } from './method.js';\nexport { default as methodOf } from './methodOf.js';\nexport { default as min } from './min.js';\nexport { default as minBy } from './minBy.js';\nexport { default as mixin } from './mixin.js';\nexport { default as multiply } from './multiply.js';\nexport { default as negate } from './negate.js';\nexport { default as next } from './next.js';\nexport { default as noop } from './noop.js';\nexport { default as now } from './now.js';\nexport { default as nth } from './nth.js';\nexport { default as nthArg } from './nthArg.js';\nexport { default as omit } from './omit.js';\nexport { default as omitBy } from './omitBy.js';\nexport { default as once } from './once.js';\nexport { default as orderBy } from './orderBy.js';\nexport { default as over } from './over.js';\nexport { default as overArgs } from './overArgs.js';\nexport { default as overEvery } from './overEvery.js';\nexport { default as overSome } from './overSome.js';\nexport { default as pad } from './pad.js';\nexport { default as padEnd } from './padEnd.js';\nexport { default as padStart } from './padStart.js';\nexport { default as parseInt } from './parseInt.js';\nexport { default as partial } from './partial.js';\nexport { default as partialRight } from './partialRight.js';\nexport { default as partition } from './partition.js';\nexport { default as pick } from './pick.js';\nexport { default as pickBy } from './pickBy.js';\nexport { default as plant } from './plant.js';\nexport { default as property } from './property.js';\nexport { default as propertyOf } from './propertyOf.js';\nexport { default as pull } from './pull.js';\nexport { default as pullAll } from './pullAll.js';\nexport { default as pullAllBy } from './pullAllBy.js';\nexport { default as pullAllWith } from './pullAllWith.js';\nexport { default as pullAt } from './pullAt.js';\nexport { default as random } from './random.js';\nexport { default as range } from './range.js';\nexport { default as rangeRight } from './rangeRight.js';\nexport { default as rearg } from './rearg.js';\nexport { default as reduce } from './reduce.js';\nexport { default as reduceRight } from './reduceRight.js';\nexport { default as reject } from './reject.js';\nexport { default as remove } from './remove.js';\nexport { default as repeat } from './repeat.js';\nexport { default as replace } from './replace.js';\nexport { default as rest } from './rest.js';\nexport { default as result } from './result.js';\nexport { default as reverse } from './reverse.js';\nexport { default as round } from './round.js';\nexport { default as sample } from './sample.js';\nexport { default as sampleSize } from './sampleSize.js';\nexport { default as set } from './set.js';\nexport { default as setWith } from './setWith.js';\nexport { default as shuffle } from './shuffle.js';\nexport { default as size } from './size.js';\nexport { default as slice } from './slice.js';\nexport { default as snakeCase } from './snakeCase.js';\nexport { default as some } from './some.js';\nexport { default as sortBy } from './sortBy.js';\nexport { default as sortedIndex } from './sortedIndex.js';\nexport { default as sortedIndexBy } from './sortedIndexBy.js';\nexport { default as sortedIndexOf } from './sortedIndexOf.js';\nexport { default as sortedLastIndex } from './sortedLastIndex.js';\nexport { default as sortedLastIndexBy } from './sortedLastIndexBy.js';\nexport { default as sortedLastIndexOf } from './sortedLastIndexOf.js';\nexport { default as sortedUniq } from './sortedUniq.js';\nexport { default as sortedUniqBy } from './sortedUniqBy.js';\nexport { default as split } from './split.js';\nexport { default as spread } from './spread.js';\nexport { default as startCase } from './startCase.js';\nexport { default as startsWith } from './startsWith.js';\nexport { default as stubArray } from './stubArray.js';\nexport { default as stubFalse } from './stubFalse.js';\nexport { default as stubObject } from './stubObject.js';\nexport { default as stubString } from './stubString.js';\nexport { default as stubTrue } from './stubTrue.js';\nexport { default as subtract } from './subtract.js';\nexport { default as sum } from './sum.js';\nexport { default as sumBy } from './sumBy.js';\nexport { default as tail } from './tail.js';\nexport { default as take } from './take.js';\nexport { default as takeRight } from './takeRight.js';\nexport { default as takeRightWhile } from './takeRightWhile.js';\nexport { default as takeWhile } from './takeWhile.js';\nexport { default as tap } from './tap.js';\nexport { default as template } from './template.js';\nexport { default as templateSettings } from './templateSettings.js';\nexport { default as throttle } from './throttle.js';\nexport { default as thru } from './thru.js';\nexport { default as times } from './times.js';\nexport { default as toArray } from './toArray.js';\nexport { default as toFinite } from './toFinite.js';\nexport { default as toInteger } from './toInteger.js';\nexport { default as toIterator } from './toIterator.js';\nexport { default as toJSON } from './toJSON.js';\nexport { default as toLength } from './toLength.js';\nexport { default as toLower } from './toLower.js';\nexport { default as toNumber } from './toNumber.js';\nexport { default as toPairs } from './toPairs.js';\nexport { default as toPairsIn } from './toPairsIn.js';\nexport { default as toPath } from './toPath.js';\nexport { default as toPlainObject } from './toPlainObject.js';\nexport { default as toSafeInteger } from './toSafeInteger.js';\nexport { default as toString } from './toString.js';\nexport { default as toUpper } from './toUpper.js';\nexport { default as transform } from './transform.js';\nexport { default as trim } from './trim.js';\nexport { default as trimEnd } from './trimEnd.js';\nexport { default as trimStart } from './trimStart.js';\nexport { default as truncate } from './truncate.js';\nexport { default as unary } from './unary.js';\nexport { default as unescape } from './unescape.js';\nexport { default as union } from './union.js';\nexport { default as unionBy } from './unionBy.js';\nexport { default as unionWith } from './unionWith.js';\nexport { default as uniq } from './uniq.js';\nexport { default as uniqBy } from './uniqBy.js';\nexport { default as uniqWith } from './uniqWith.js';\nexport { default as uniqueId } from './uniqueId.js';\nexport { default as unset } from './unset.js';\nexport { default as unzip } from './unzip.js';\nexport { default as unzipWith } from './unzipWith.js';\nexport { default as update } from './update.js';\nexport { default as updateWith } from './updateWith.js';\nexport { default as upperCase } from './upperCase.js';\nexport { default as upperFirst } from './upperFirst.js';\nexport { default as value } from './value.js';\nexport { default as valueOf } from './valueOf.js';\nexport { default as values } from './values.js';\nexport { default as valuesIn } from './valuesIn.js';\nexport { default as without } from './without.js';\nexport { default as words } from './words.js';\nexport { default as wrap } from './wrap.js';\nexport { default as wrapperAt } from './wrapperAt.js';\nexport { default as wrapperChain } from './wrapperChain.js';\nexport { default as wrapperCommit } from './commit.js';\nexport { default as wrapperLodash } from './wrapperLodash.js';\nexport { default as wrapperNext } from './next.js';\nexport { default as wrapperPlant } from './plant.js';\nexport { default as wrapperReverse } from './wrapperReverse.js';\nexport { default as wrapperToIterator } from './toIterator.js';\nexport { default as wrapperValue } from './wrapperValue.js';\nexport { default as xor } from './xor.js';\nexport { default as xorBy } from './xorBy.js';\nexport { default as xorWith } from './xorWith.js';\nexport { default as zip } from './zip.js';\nexport { default as zipObject } from './zipObject.js';\nexport { default as zipObjectDeep } from './zipObjectDeep.js';\nexport { default as zipWith } from './zipWith.js';\nexport { default } from './lodash.default.js';\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import Symbol from './_Symbol.js';\nimport arrayMap from './_arrayMap.js';\nimport isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default baseToString;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nexport default arrayMap;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nexport default isArray;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nexport default WeakMap;\n","import baseIsNative from './_baseIsNative.js';\nimport getValue from './_getValue.js';\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nexport default getNative;\n","import isFunction from './isFunction.js';\nimport isMasked from './_isMasked.js';\nimport isObject from './isObject.js';\nimport toSource from './_toSource.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nexport default baseIsNative;\n","import baseGetTag from './_baseGetTag.js';\nimport isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nexport default isFunction;\n","import coreJsData from './_coreJsData.js';\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nexport default isMasked;\n","import root from './_root.js';\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nexport default coreJsData;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nexport default toSource;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nexport default getValue;\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nexport default noop;\n","import baseIndexOf from './_baseIndexOf.js';\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nexport default arrayIncludes;\n","import baseFindIndex from './_baseFindIndex.js';\nimport baseIsNaN from './_baseIsNaN.js';\nimport strictIndexOf from './_strictIndexOf.js';\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nexport default baseIndexOf;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nexport default baseFindIndex;\n","/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nexport default baseIsNaN;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nexport default strictIndexOf;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nexport default isIndex;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nexport default eq;\n","import isFunction from './isFunction.js';\nimport isLength from './isLength.js';\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nexport default isArrayLike;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nexport default isLength;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nexport default isPrototype;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeys from './_baseKeys.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nexport default keys;\n","import baseTimes from './_baseTimes.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isIndex from './_isIndex.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default arrayLikeKeys;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nexport default baseTimes;\n","import baseIsArguments from './_baseIsArguments.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nexport default isArguments;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nexport default baseIsArguments;\n","import root from './_root.js';\nimport stubFalse from './stubFalse.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nexport default isBuffer;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nexport default stubFalse;\n","import baseIsTypedArray from './_baseIsTypedArray.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nexport default isTypedArray;\n","import baseGetTag from './_baseGetTag.js';\nimport isLength from './isLength.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nexport default baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nexport default baseUnary;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nexport default nodeUtil;\n","import isPrototype from './_isPrototype.js';\nimport nativeKeys from './_nativeKeys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeys;\n","import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n","import mapCacheClear from './_mapCacheClear.js';\nimport mapCacheDelete from './_mapCacheDelete.js';\nimport mapCacheGet from './_mapCacheGet.js';\nimport mapCacheHas from './_mapCacheHas.js';\nimport mapCacheSet from './_mapCacheSet.js';\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nexport default MapCache;\n","import Hash from './_Hash.js';\nimport ListCache from './_ListCache.js';\nimport Map from './_Map.js';\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nexport default mapCacheClear;\n","import hashClear from './_hashClear.js';\nimport hashDelete from './_hashDelete.js';\nimport hashGet from './_hashGet.js';\nimport hashHas from './_hashHas.js';\nimport hashSet from './_hashSet.js';\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nexport default Hash;\n","import nativeCreate from './_nativeCreate.js';\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nexport default hashClear;\n","import getNative from './_getNative.js';\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nexport default nativeCreate;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default hashDelete;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nexport default hashGet;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nexport default hashHas;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nexport default hashSet;\n","import listCacheClear from './_listCacheClear.js';\nimport listCacheDelete from './_listCacheDelete.js';\nimport listCacheGet from './_listCacheGet.js';\nimport listCacheHas from './_listCacheHas.js';\nimport listCacheSet from './_listCacheSet.js';\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nexport default ListCache;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nexport default listCacheClear;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nexport default listCacheDelete;\n","import eq from './eq.js';\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nexport default assocIndexOf;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nexport default listCacheGet;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nexport default listCacheHas;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nexport default listCacheSet;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nexport default Map;\n","import getMapData from './_getMapData.js';\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default mapCacheDelete;\n","import isKeyable from './_isKeyable.js';\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nexport default getMapData;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nexport default isKeyable;\n","import getMapData from './_getMapData.js';\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nexport default mapCacheGet;\n","import getMapData from './_getMapData.js';\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nexport default mapCacheHas;\n","import getMapData from './_getMapData.js';\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nexport default mapCacheSet;\n","import baseToString from './_baseToString.js';\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nexport default toString;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nexport default arrayPush;\n","import capitalize from './capitalize.js';\nimport createCompounder from './_createCompounder.js';\n\n/**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\nvar camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n});\n\nexport default camelCase;\n","import toString from './toString.js';\nimport upperFirst from './upperFirst.js';\n\n/**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\nfunction capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n}\n\nexport default capitalize;\n","import createCaseFirst from './_createCaseFirst.js';\n\n/**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\nvar upperFirst = createCaseFirst('toUpperCase');\n\nexport default upperFirst;\n","import castSlice from './_castSlice.js';\nimport hasUnicode from './_hasUnicode.js';\nimport stringToArray from './_stringToArray.js';\nimport toString from './toString.js';\n\n/**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\nfunction createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n}\n\nexport default createCaseFirst;\n","import baseSlice from './_baseSlice.js';\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nexport default castSlice;\n","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nexport default baseSlice;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nexport default hasUnicode;\n","import asciiToArray from './_asciiToArray.js';\nimport hasUnicode from './_hasUnicode.js';\nimport unicodeToArray from './_unicodeToArray.js';\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n}\n\nexport default stringToArray;\n","/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n return string.split('');\n}\n\nexport default asciiToArray;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n return string.match(reUnicode) || [];\n}\n\nexport default unicodeToArray;\n","import arrayReduce from './_arrayReduce.js';\nimport deburr from './deburr.js';\nimport words from './words.js';\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\";\n\n/** Used to match apostrophes. */\nvar reApos = RegExp(rsApos, 'g');\n\n/**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\nfunction createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n}\n\nexport default createCompounder;\n","/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\nexport default arrayReduce;\n","import deburrLetter from './_deburrLetter.js';\nimport toString from './toString.js';\n\n/** Used to match Latin Unicode letters (excluding mathematical operators). */\nvar reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n/** Used to compose unicode character classes. */\nvar rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;\n\n/** Used to compose unicode capture groups. */\nvar rsCombo = '[' + rsComboRange + ']';\n\n/**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\nvar reComboMark = RegExp(rsCombo, 'g');\n\n/**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\nfunction deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n}\n\nexport default deburr;\n","import basePropertyOf from './_basePropertyOf.js';\n\n/** Used to map Latin Unicode letters to basic Latin letters. */\nvar deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n};\n\n/**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\nvar deburrLetter = basePropertyOf(deburredLetters);\n\nexport default deburrLetter;\n","/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n}\n\nexport default basePropertyOf;\n","import asciiWords from './_asciiWords.js';\nimport hasUnicodeWord from './_hasUnicodeWord.js';\nimport toString from './toString.js';\nimport unicodeWords from './_unicodeWords.js';\n\n/**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\nfunction words(string, pattern, guard) {\n string = toString(string);\n pattern = guard ? undefined : pattern;\n\n if (pattern === undefined) {\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n }\n return string.match(pattern) || [];\n}\n\nexport default words;\n","/** Used to match words composed of alphanumeric characters. */\nvar reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n/**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction asciiWords(string) {\n return string.match(reAsciiWord) || [];\n}\n\nexport default asciiWords;\n","/** Used to detect strings that need a more robust regexp to match words. */\nvar reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n/**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\nfunction hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n}\n\nexport default hasUnicodeWord;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\",\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;\n\n/** Used to match complex or compound words. */\nvar reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n].join('|'), 'g');\n\n/**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n}\n\nexport default unicodeWords;\n","import ListCache from './_ListCache.js';\nimport stackClear from './_stackClear.js';\nimport stackDelete from './_stackDelete.js';\nimport stackGet from './_stackGet.js';\nimport stackHas from './_stackHas.js';\nimport stackSet from './_stackSet.js';\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nexport default Stack;\n","import ListCache from './_ListCache.js';\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nexport default stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nexport default stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nexport default stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nexport default stackHas;\n","import ListCache from './_ListCache.js';\nimport Map from './_Map.js';\nimport MapCache from './_MapCache.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nexport default stackSet;\n","import arrayFilter from './_arrayFilter.js';\nimport stubArray from './stubArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nexport default getSymbols;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nexport default arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nexport default stubArray;\n","import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbols from './_getSymbols.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nexport default getAllKeys;\n","import arrayPush from './_arrayPush.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nexport default baseGetAllKeys;\n","import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nexport default getTag;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nexport default Uint8Array;\n","import baseIsEqualDeep from './_baseIsEqualDeep.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nexport default baseIsEqual;\n","import Stack from './_Stack.js';\nimport equalArrays from './_equalArrays.js';\nimport equalByTag from './_equalByTag.js';\nimport equalObjects from './_equalObjects.js';\nimport getTag from './_getTag.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nexport default baseIsEqualDeep;\n","import SetCache from './_SetCache.js';\nimport arraySome from './_arraySome.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nexport default equalArrays;\n","import MapCache from './_MapCache.js';\nimport setCacheAdd from './_setCacheAdd.js';\nimport setCacheHas from './_setCacheHas.js';\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nexport default SetCache;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nexport default setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nexport default setCacheHas;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nexport default arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nexport default cacheHas;\n","import Symbol from './_Symbol.js';\nimport Uint8Array from './_Uint8Array.js';\nimport eq from './eq.js';\nimport equalArrays from './_equalArrays.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nexport default equalByTag;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nexport default mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nexport default setToArray;\n","import getAllKeys from './_getAllKeys.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nexport default equalObjects;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nexport default arrayIncludesWith;\n","import baseIsEqual from './_baseIsEqual.js';\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nexport default isEqual;\n","import SetCache from './_SetCache.js';\nimport arrayIncludes from './_arrayIncludes.js';\nimport arrayIncludesWith from './_arrayIncludesWith.js';\nimport cacheHas from './_cacheHas.js';\nimport createSet from './_createSet.js';\nimport setToArray from './_setToArray.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nexport default baseUniq;\n","import Set from './_Set.js';\nimport noop from './noop.js';\nimport setToArray from './_setToArray.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nexport default createSet;\n","import baseUniq from './_baseUniq.js';\n\n/**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\nfunction uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n}\n\nexport default uniqWith;\n","export function keys<T extends object>(object: T): (keyof T)[] {\n return Object.keys(object) as (keyof T)[];\n}\n","export { AbstractAstNode } from \"./AbstractAstNode\";\nexport { AbstractFormatter, NopFormatter } from \"./AbstractFormatter\";\nexport { AbstractWriter } from \"./AbstractWriter\";\nexport {\n type Argument,\n type Arguments,\n hasNamedArgument,\n isNamedArgument,\n type NamedArgument,\n type UnnamedArgument\n} from \"./Argument\";\nexport { CodeBlock } from \"./CodeBlock\";\nexport { Ternary } from \"./Ternary\";\n","import { tag } from \"../utils/stacktrace\";\nimport { AbstractWriter } from \"./AbstractWriter\";\n\nexport abstract class AbstractAstNode {\n /**\n * Every AST node knows how to write itself to a string.\n */\n public abstract write(writer: AbstractWriter): void;\n\n public constructor() {\n // when FERN_STACK_TRACK is defined this will track the stack trace of the current AstNode.\n // otherwise this has absolutely no effect whatsoever.\n tag(this);\n }\n}\n","/**\n * Global flag that enables or disables stack tracing functionality throughout the application.\n * This is controlled via the FERN_STACK_TRACK environment variable.\n *\n * When enabled (truthy environment variable value), stack traces will be captured and processed\n * by the stacktrace functions in this module. When disabled, the stacktrace() function returns\n * an empty array for performance optimization.\n *\n * @example\n * // Enable tracing by setting the environment variable\n * // FERN_STACK_TRACK=1 <cmdline>\n */\nconst key = process.env[\"FERN_STACK_TRACK\"]?.toLowerCase() ?? \"\";\n\nexport const enableStackTracking = key !== \"\" && key !== \"0\" && key !== \"false\";\n\n/** The style of comments desired for the stack tracking comments\n *\n * can be \"single\", \"multiline\", or \"box\".\n * if not set to one of those, defaults to \"single\".\n */\nexport const trackingType = [\"single\", \"multiline\", \"box\"].includes(key) ? key : \"single\";\n\nif (enableStackTracking) {\n // we're going to put a hard max limit on the stack trace to prevent infinite recursion and excessive stack generation\n Error.stackTraceLimit = 50;\n}\n\n/**\n * Configuration options for controlling stack trace capture and filtering behavior.\n */\ninterface StackTraceOptions {\n /**\n * Maximum number of stack frames to return after filtering.\n *\n * Maximum may never exceed 50.\n * @default 50\n */\n maxFrames?: number;\n\n /**\n * Number of frames to skip from the beginning of the filtered stack trace.\n * Useful for omitting wrapper functions from the output.\n * @default 0\n */\n skip?: number;\n\n /**\n * Array of function name substrings that trigger an early stop when encountered.\n * When a frame's function name includes any of these strings, that frame and all\n * subsequent frames will be excluded from the output.\n *\n * implicitly includes \"runInteractiveTask\"\n * @default []\n */\n stopOn?: string[];\n\n /**\n * Array of file path substrings to filter out. Any frame whose path contains\n * any of these strings will be excluded from the output.\n * @default []\n */\n filterPaths?: string[];\n\n /**\n * Array of function name substrings to filter out. Any frame whose function name\n * contains any of these strings will be excluded from the output.\n *\n * implicitly includes \"SdkGeneratorCLI\", \"runCli\",\"Frames.trace\",\"Frames.tag\", \"at\", \"stacktrace\"\n * @default []\n */\n filterFunctions?: string[];\n\n /**\n * Whether to filter out Node.js internal frames (paths starting with \"node:\").\n * @default true\n */\n filterNode?: boolean;\n\n /**\n * Whether to filter out .js files, which typically indicate non-source files\n * without source map information.\n * @default true\n */\n filterJs?: boolean;\n\n /**\n * A function to format the file path of the stack trace frame.\n * @default (filename) => filename\n */\n formatFilename?: (filename: string) => string;\n}\n\n/**\n * Represents a single parsed stack trace frame containing function, file path, and position information.\n */\nexport interface StackTraceFrame {\n /**\n * The function name or context. May include special formatting like \"alias()=> { ... }\"\n * for certain Object methods, or be an empty string for anonymous contexts.\n */\n fn: string;\n\n /**\n * The file path where this frame originated. This will typically be the full path\n * to the source file.\n */\n path: string;\n\n /**\n * The line and column position in the format \"line:column\" (e.g., \"42:13\").\n */\n position: string;\n}\n\nconst globalFunctionFilters = new Set<string>([\"SdkGeneratorCLI\", \"runCli\", \"LoggerImpl\", \"Array.forEach\"]);\nconst globalFileFilters = new Set<string>([\"stacktrace\"]);\n\n/**\n * Adds a function name to the global function filters for stack traces\n * @param filter - The function name to add to the global function filters.\n */\nexport function addGlobalFunctionFilter(filter: string): void {\n if (enableStackTracking) {\n globalFunctionFilters.add(filter);\n }\n}\n\n/**\n * Adds a file path to the global file filters for stack traces.\n * @param filter - The file path to add to the global file filters.\n */\nexport function addGlobalFileFilter(filter: string): void {\n if (enableStackTracking) {\n globalFileFilters.add(filter);\n }\n}\n\n/**\n * Captures and parses the current call stack, returning an array of stack frames with filtering options.\n *\n * This function creates a new Error object to capture the stack trace, then parses each frame\n * to extract function names, file paths, and positions. It applies multiple filtering strategies\n * to exclude unwanted frames (e.g., Node.js internals, .js files, specific functions).\n *\n * The function only operates when `enableStackTracking` is true. If tracing is disabled, it returns\n * an empty array for performance optimization.\n *\n * @param options - Configuration options for stack trace capture and filtering\n * @returns Array of parsed stack trace frames, filtered and limited according to the options\n *\n * @example\n * // Capture the first 10 frames, skipping the first 2\n * const frames = stacktrace({ maxFrames: 10, skip: 2 });\n *\n * @example\n * // Capture frames until hitting \"main\" function, filter out test files\n * const frames = stacktrace({\n * stopOn: [\"main\"],\n * filterPaths: [\"/test/\"],\n * filterFunctions: [\"runTests\"]\n * });\n *\n * @remarks\n * The function applies filters in the following order:\n * 1. Parses each stack frame using regex to extract function, path, line, and column\n * 2. Applies early-stop logic when encountering functions in the `stopOn` array\n * 3. Formats special function names (e.g., \"Object.alias\" → \"alias()=> { ... }\")\n * 4. Filters out:\n * - The stacktrace function itself (\"at\", \"stacktrace\")\n * - Functions matching `filterFunctions` (substring match)\n * - Node.js internal frames (if `filterNode` is true)\n * - .js files (if `filterJs` is true)\n * - Paths matching `filterPaths` (substring match)\n * 5. Applies `skip` and `maxFrames` to limit the output\n */\nexport function stacktrace({\n maxFrames = 50,\n skip = 0,\n filterPaths = [],\n filterFunctions = [],\n stopOn = [],\n filterNode = true,\n filterJs = true,\n formatFilename = (filename) => filename\n}: StackTraceOptions = {}): StackTraceFrame[] {\n if (!enableStackTracking) {\n return [];\n }\n filterFunctions = [...filterFunctions, ...globalFunctionFilters];\n filterPaths = [...filterPaths, ...globalFileFilters];\n stopOn = [...stopOn, \"runInteractiveTask\"];\n let stop = false;\n return (\n (new Error().stack ?? \"\")\n .split(\"\\n\")\n .map((line) => {\n const match = line.match(/at\\s+(.*)\\s+\\((.*):(\\d+):(\\d+)\\)/);\n if (match && match.length === 5) {\n let [, fn, path, line, column] = match;\n if (!fn || !path || !line || !column) {\n return undefined;\n }\n\n if (stop || stopOn.some((s) => fn?.includes(s))) {\n stop = true;\n return undefined;\n }\n\n switch (fn) {\n case \"Object.<anonymous>\":\n fn = \"\";\n break;\n case \"Object.object\":\n case \"Object.alias\":\n case \"Object.union\":\n case \"Object.enum\":\n case \"Object.undiscriminatedUnion\":\n fn = `${fn.substring(fn.indexOf(\".\") + 1)}()=> { ... }`;\n break;\n }\n return {\n fn,\n path: formatFilename(path),\n position: `${line}:${column}`\n } as StackTraceFrame;\n }\n return undefined;\n })\n .filter(\n (each) =>\n each &&\n !filterFunctions.some((f) => each.fn.includes(f)) && // substring match for filter functions\n !(filterNode && each.path?.startsWith(\"node:\")) && // starts with node:\n !(filterJs && each.path?.endsWith(\".js\")) && // ends with .js (meaning likely not a source file - no source map info)\n !filterPaths.some((p) => each.path.includes(p)) // substring match for filter paths\n ) as StackTraceFrame[]\n ).slice(skip, skip + maxFrames);\n}\n\n/**\n * Returns a formatted stack trace string at the current location for debugging purposes.\n *\n * This is a convenience function that wraps `stacktrace()` and formats the output as a\n * human-readable string. It's particularly useful for logging or debugging to understand\n * the execution flow and call hierarchy.\n *\n * The function supports both single-line and multi-line output formats. Single-line format\n * concatenates all frames into one line (useful for compact logging), while multi-line format\n * adds newlines and indentation for better readability.\n *\n * @param options - Configuration options for stack trace capture, filtering, and formatting\n * @param options.multiline - Whether to format the output with newlines and indentation.\n * When true, each frame is on its own line with 4-space indent.\n * When false (default), all frames are concatenated on one line.\n * @returns A formatted string containing the stack trace information, prefixed with \"stacktrace - \"\n *\n * @example\n * // Single-line format (compact)\n * console.log(at());\n * // Output: \"stacktrace - myFunction - /path/to/file.ts:42:13anotherFunc - /path/to/other.ts:17:5\"\n *\n * @example\n * // Multi-line format (readable)\n * console.log(at({ multiline: true, maxFrames: 5 }));\n * // Output:\n * // stacktrace -\n * // myFunction - /path/to/file.ts:42:13\n * // anotherFunc - /path/to/other.ts:17:5\n * // main - /path/to/index.ts:10:1\n *\n * @example\n * // Custom filtering for specific use case\n * console.log(at({\n * maxFrames: 10,\n * skip: 1,\n * filterPaths: [\"foo.ts\"],\n * multiline: true\n * }));\n *\n * @remarks\n * This function automatically skips itself from the stack trace output by default.\n * The \"at\" function name is filtered by the underlying `stacktrace()` function.\n */\nexport function at({\n maxFrames = 50,\n skip = 0,\n filterPaths = [],\n filterFunctions = [],\n stopOn = [\"runInteractiveTask\"],\n filterNode = true,\n filterJs = true,\n multiline = false,\n formatFilename = (filename) => filename\n}: StackTraceOptions & { multiline?: boolean } = {}): string {\n return enableStackTracking\n ? `${stacktrace({ maxFrames, skip, filterPaths, filterFunctions, stopOn, filterNode, filterJs, formatFilename })\n .map((each) => `${multiline ? \"\\n \" : \" > \"}${each.fn} - ${each.path}:${each.position}`)\n .join(\"\")}`\n : \"\";\n}\n\n/** This class allows the developer to attach stack trace information to objects */\nexport class StackTraces {\n private readonly maxFrames: number;\n private readonly skip: number;\n private readonly filterPaths: string[];\n private readonly filterFunctions: string[];\n private readonly stopOn: string[];\n private readonly filterNode: boolean;\n private readonly filterJs: boolean;\n private readonly multiline: boolean;\n private readonly formatFilename: (filename: string) => string;\n private tracking = new WeakMap<object, Set<StackTraceFrame>>();\n\n constructor({\n maxFrames = 50,\n skip = 0,\n filterPaths = [],\n filterFunctions = [],\n stopOn = [],\n filterNode = true,\n filterJs = true,\n multiline = false,\n formatFilename = (filename) => filename\n }: StackTraceOptions & { multiline?: boolean } = {}) {\n this.maxFrames = maxFrames;\n this.skip = skip;\n this.filterPaths = filterPaths;\n this.filterFunctions = filterFunctions;\n this.stopOn = stopOn;\n this.filterNode = filterNode;\n this.filterJs = filterJs;\n this.multiline = multiline;\n this.formatFilename = formatFilename;\n }\n\n /**\n * Tags the current stack trace with the given object.\n *\n * This can be called multiple times to add more stack trace information to the object.\n *\n * @param obj - The object to tag the stack trace with.\n */\n tag(obj: object): void {\n const current = this.tracking.get(obj) || new Set<StackTraceFrame>();\n stacktrace({\n maxFrames: this.maxFrames,\n skip: this.skip,\n filterPaths: this.filterPaths,\n filterFunctions: this.filterFunctions,\n stopOn: this.stopOn,\n filterNode: this.filterNode,\n filterJs: this.filterJs,\n formatFilename: this.formatFilename\n }).forEach((frame) => current.add(frame));\n this.tracking.set(obj, current);\n }\n\n /**\n * Returns a formatted stack trace string for the given object.\n * @param obj - The object to get the stack trace for.\n * @returns A formatted string containing the stack trace information.\n */\n trace(obj: object): string {\n if (!enableStackTracking) {\n return \"\";\n }\n const frames = this.tracking.get(obj);\n if (!frames) {\n return \"\";\n }\n\n return [...frames]\n .map((each) => `${this.multiline ? \"\\n \" : \"\"}${each.fn} - ${each.path}:${each.position}`)\n .join(\"\");\n }\n\n /**\n * Gets the stack trace frames for the given object.\n *\n * Note: This will only work when FERN_STACK_TRACK is defined and the .startTracking() function has been called.\n * Otherwise this will return an empty array.\n *\n * @param obj - The object to get the stack trace frames for.\n * @returns The stack trace frames for the given object.\n */\n frames(obj: object): StackTraceFrame[] {\n const frames = this.tracking.get(obj);\n if (!frames) {\n return [];\n }\n return [...frames];\n }\n\n /**\n * Frees the stack trace information for the given object.\n * @param obj - The object to free the stack trace information for.\n */\n free(obj: object): void {\n this.tracking.delete(obj);\n }\n\n /**\n * Clears all stack trace information.\n */\n clear(): void {\n this.tracking = new WeakMap<object, Set<StackTraceFrame>>();\n }\n}\n\nlet stackTraces: StackTraces | undefined;\n/**\n * Starts tracking the stack trace of the current object.\n *\n * Note: This will only start tracking when FERN_STACK_TRACK is defined.\n *\n * @param options - Configuration options for stack trace capture and filtering\n * @returns The stack traces object.\n */\nexport function startTracking({\n maxFrames = 50,\n skip = 0,\n filterPaths = [],\n filterFunctions = [],\n stopOn = [],\n filterNode = true,\n filterJs = true,\n multiline = false,\n formatFilename = (filename) => filename\n}: StackTraceOptions & { multiline?: boolean } = {}) {\n if (!enableStackTracking) {\n return;\n }\n stackTraces ??= new StackTraces({\n maxFrames,\n skip,\n filterPaths,\n filterFunctions,\n stopOn,\n filterNode,\n filterJs,\n multiline,\n formatFilename\n });\n}\n\n/**\n * Tags the current stack trace with the given object.\n *\n * Note: This will only work when FERN_STACK_TRACK is defined and the .startTracking() function has been called.\n * Otherwise this will do nothing whatsoever.\n *\n * @param obj - The object to tag the stack trace with.\n */\nexport function tag(obj: object) {\n stackTraces?.tag(obj);\n}\n\n/**\n * Returns a formatted stack trace string for the given object.\n *\n * Note: This will only work when FERN_STACK_TRACK is defined and the .startTracking() function has been called.\n * Otherwise this will do nothing whatsoever.\n *\n * @param obj - The object to get the stack trace for.\n * @returns A formatted string containing the stack trace information.\n */\nexport function trace(obj: object) {\n return stackTraces?.trace(obj) ?? \"\";\n}\n\n/**\n * Frees the stack trace information for the given object.\n *\n * Note: This will only work when FERN_STACK_TRACK is defined and the .startTracking() function has been called.\n * Otherwise this will do nothing whatsoever.\n *\n * @param obj - The object to free the stack trace information for.\n */\nexport function free(obj: object) {\n stackTraces?.free(obj);\n}\n\n/**\n * Gets the stack trace frames for the given object.\n *\n * Note: This will only work when FERN_STACK_TRACK is defined and the .startTracking() function has been called.\n * Otherwise this will return an empty array.\n *\n * @param obj - The object to get the stack trace frames for.\n * @returns The stack trace frames for the given object.\n */\nexport function getFramesForTaggedObject(obj: object): StackTraceFrame[] {\n return stackTraces?.frames(obj) ?? [];\n}\n","import { enableStackTracking } from \"../utils\";\nimport {\n getFramesForTaggedObject,\n StackTraceFrame,\n stacktrace,\n startTracking,\n trackingType\n} from \"../utils/stacktrace\";\nimport { AbstractAstNode } from \"./AbstractAstNode\";\nimport { CodeBlock } from \"./CodeBlock\";\n\nconst TAB_SIZE = 4;\n// this will start tracking only when FERN_STACK_TRACK is defined\n// otherwise this has absolutely no effect whatsoever.\nstartTracking({ skip: 0, maxFrames: 15, filterFunctions: [\"Abstract\"] });\n\nexport class AbstractWriter {\n /* The buffer of lines being written */\n protected readonly lineBuffer: string[] = [];\n\n /* The contents being written */\n public get buffer() {\n if (enableStackTracking && this.nodeStackFrames.length > 0) {\n // if we're emitting tracking comments, let's ensure we get the last little bit of info.\n // by appending a newline to the buffer before returning it.\n // (this can be useful when using toString() to get a node's content.)\n this.writeInternal(\"\\n\");\n }\n return this.lineBuffer.join(\"\\n\") + (this.lastCharacterIsNewline ? \"\\n\" : \"\");\n }\n\n /* Indentation level (multiple of 4) */\n private indentLevel = 0;\n /* Whether anything has been written to the buffer */\n private hasWrittenAnything = false;\n /* Whether the last character written was a semi colon */\n private lastCharacterIsSemicolon = false;\n /* Whether the last character written was a newline */\n private lastCharacterIsNewline = false;\n /* The stack traces associated with the current node */\n private nodeStackFrames: StackTraceFrame[] = [];\n\n /**\n * Writes arbitrary text and nodes\n * @param text\n */\n public write(...parts: (string | AbstractAstNode | undefined)[]): void {\n for (const text of parts) {\n if (text != null) {\n if (typeof text === \"string\") {\n const textEndsInNewline = text.length > 0 && text.endsWith(\"\\n\");\n // temporarily remove the trailing newline, since we don't want to add the indent prefix after it\n const textWithoutNewline = textEndsInNewline ? text.substring(0, text.length - 1) : text;\n\n const indent = this.getIndentString();\n let indentedText = textWithoutNewline.replaceAll(\"\\n\", `\\n${indent}`);\n if (this.isAtStartOfLine()) {\n indentedText = indent + indentedText;\n }\n if (textEndsInNewline) {\n indentedText += \"\\n\";\n }\n this.writeInternal(indentedText);\n } else {\n this.writeNode(text);\n }\n }\n }\n }\n\n public writeStatement(...parts: (string | AbstractAstNode | undefined)[]): void {\n this.write(...parts);\n this.write(\";\");\n this.writeNewLineIfLastLineNot();\n }\n\n /**\n * Writes arbitrary text without indentation\n * @param text\n */\n public writeNoIndent(text: string): void {\n const currIndentLevel = this.indentLevel;\n this.indentLevel = 0;\n this.write(text);\n this.indentLevel = currIndentLevel;\n }\n\n /**\n * Writes a node\n * @param node\n */\n public writeNode(node: AbstractAstNode): void {\n if (enableStackTracking) {\n this.nodeStackFrames.push(...getFramesForTaggedObject(node));\n }\n node.write(this);\n\n // if we're using box or multiline comments, write a newline after every node so it emits a comment for the node\n // since we're dumping a lot of data anyway, might as well be explicit about it.\n if (enableStackTracking && trackingType !== \"single\") {\n this.writeInternal(\"\\n\");\n }\n }\n\n /**\n * Writes a node or string\n * @param input\n */\n public writeNodeOrString(input: AbstractAstNode | string): void {\n if (typeof input === \"string\") {\n this.write(input);\n return;\n }\n\n this.writeNode(input);\n }\n\n /**\n * Writes a node but then suffixes with a `;` and new line\n * @param node\n */\n public writeNodeStatement(node: AbstractAstNode): void {\n this.writeNode(node);\n this.write(\";\");\n this.writeNewLineIfLastLineNot();\n }\n\n /**\n * Writes text but then suffixes with a `;`\n * @param node\n */\n public writeTextStatement(text: string): void {\n const codeBlock = new CodeBlock(text);\n codeBlock.write(this);\n if (!text.endsWith(\";\")) {\n this.write(\";\");\n }\n this.writeNewLineIfLastLineNot();\n }\n\n /**\n * Starts a control flow block\n * @param prefix\n * @param statement\n */\n public controlFlow(prefix: string, statement: AbstractAstNode): void {\n const codeBlock = new CodeBlock(prefix);\n codeBlock.write(this);\n this.write(\" (\", statement, \")\");\n this.pushScope();\n }\n\n /**\n * Starts a control flow block\n * @param prefix\n * @param statement\n */\n public controlFlowWithoutStatement(prefix: string): void {\n const codeBlock = new CodeBlock(prefix);\n codeBlock.write(this);\n this.pushScope();\n }\n\n /**\n * Ends a control flow block\n */\n public endControlFlow(): void {\n this.popScope();\n }\n\n /**\n * Starts a control flow without a newline from the previous control flow block\n * @param prefix\n * @param statement\n */\n public contiguousControlFlow(prefix: string, statement: AbstractAstNode): void {\n this.dedent();\n this.write(\"} \");\n const codeBlock = new CodeBlock(prefix);\n codeBlock.write(this);\n this.write(\" (\", statement, \")\");\n this.pushScope();\n }\n\n /**\n * Starts a control flow alternative block\n * @param prefix\n */\n public alternativeControlFlow(prefix: string): void {\n this.dedent();\n this.write(\"} \");\n const codeBlock = new CodeBlock(prefix);\n codeBlock.write(this);\n this.pushScope();\n }\n\n public pushScope() {\n this.writeLine(\"{\");\n this.indent();\n }\n\n public popScope(withNewline = true) {\n this.dedent();\n this.writeNewLineIfLastLineNot();\n if (withNewline) {\n this.writeLine(\"}\");\n } else {\n this.write(\"}\");\n }\n }\n\n /* Only writes a newline if last line in the buffer is not a newline */\n public writeLine(...parts: (string | AbstractAstNode | undefined)[]): void {\n this.write(...(parts.length === 0 ? [\"\"] : parts));\n this.writeNewLineIfLastLineNot();\n }\n\n /* Always writes newline */\n public newLine(): void {\n this.writeInternal(\"\\n\");\n }\n\n public writeSemicolonIfLastCharacterIsNot(): void {\n if (!this.lastCharacterIsSemicolon) {\n this.writeInternal(\";\");\n }\n }\n\n public writeNewLineIfLastLineNot(): void {\n if (!this.lastCharacterIsNewline) {\n this.writeInternal(\"\\n\");\n }\n }\n\n public indent(): void {\n this.indentLevel++;\n }\n\n public dedent(): void {\n this.indentLevel--;\n }\n\n public delimit<T extends AbstractAstNode>({\n nodes,\n delimiter,\n writeFunction\n }: {\n nodes: T[];\n delimiter: string;\n writeFunction: (node: T) => void;\n }): void {\n if (nodes.length > 0) {\n const firstNode = nodes[0];\n if (firstNode != null) {\n writeFunction(firstNode);\n }\n for (let i = 1; i < nodes.length; i++) {\n this.write(delimiter);\n const node = nodes[i];\n if (node != null) {\n writeFunction(node);\n }\n }\n }\n }\n\n public toString(): string {\n return this.buffer;\n }\n\n /*******************************\n * Helper Methods\n *******************************/\n private writeInternal(text: string) {\n if (text.length === 0) {\n return;\n }\n\n const appendToLastLine = !this.lastCharacterIsNewline;\n\n this.hasWrittenAnything = true;\n this.lastCharacterIsNewline = text.endsWith(\"\\n\");\n this.lastCharacterIsSemicolon = text.endsWith(\";\");\n\n const lines = text.split(\"\\n\");\n\n const appendTrackingComment =\n enableStackTracking && !this.shouldSkipTracking(lines) && this.lastCharacterIsNewline;\n\n if (appendToLastLine) {\n this.lastLine = `${this.lastLine}${lines.shift() || \"\"}`;\n }\n\n if (this.lastCharacterIsNewline) {\n lines.pop();\n }\n\n this.lineBuffer.push(...lines);\n\n if (appendTrackingComment) {\n this.appendTrackingComment();\n }\n }\n\n /**\n * Sets the last line of the buffer\n * @param line - The line to set\n */\n protected set lastLine(line: string) {\n if (this.lineBuffer.length > 0) {\n this.lineBuffer[this.lineBuffer.length - 1] = line;\n } else {\n this.lineBuffer.push(line);\n }\n }\n\n /**\n * Gets the last line of the buffer\n * @returns The last line of the buffer\n */\n protected get lastLine() {\n return this.lineBuffer[this.lineBuffer.length - 1] || \"\";\n }\n\n /**\n * Determines if the tracking comment should be skipped\n * @param lines - The that are being written out\n *\n * @returns True if the tracking comment should be skipped\n */\n protected shouldSkipTracking(lines: string[]) {\n return false;\n }\n\n /**\n * Formats the stack trace frames into a string\n * @param stack - The stack trace to format\n * @param prefix - The prefix to add to the stack trace\n * @returns The formatted stack trace\n */\n protected formatStack(stack: StackTraceFrame[], prefix = \"\") {\n return stack.map((each) => `${prefix ? `(${prefix}) ` : \"\"} ${each.fn} - ${each.path} : ${each.position}`);\n }\n\n /**\n * Filters out frames that start with the name of the current class\n *\n * This will filter out frames that start with the name of the current class that inherits from AbstractWriter.\n *\n * You can override this function to filter out more things.\n * @param stack - The stack trace to filter\n * @returns The filtered stack trace\n */\n protected filterStack(stack: StackTraceFrame[]) {\n return stack.filter((each) => !each.fn.startsWith(`${this.constructor.name}.`));\n }\n\n /**\n * Prepares the stack trace and calls the appropriate tracking comment formatter\n */\n protected appendTrackingComment() {\n const stack = [\n // adds the stack frames of the current function call\n ...this.formatStack(this.filterStack(stacktrace({ maxFrames: 15, skip: 3 }))),\n\n // adds the stack frames of any AstNodes that have been written since the last tracking comment\n ...this.formatStack(this.filterStack(this.nodeStackFrames), \"node\")\n ];\n // reset the ast node stack frames\n this.nodeStackFrames.length = 0;\n\n switch (trackingType) {\n case \"single\":\n return this.singleLineTrackingComment(stack);\n\n case \"multiline\":\n return this.multiLineTrackingComment(stack);\n\n case \"box\":\n return this.boxTrackingComment(stack);\n }\n }\n\n /**\n * Creates a single line tracking comment\n *\n * Override this to change the format of the comment.\n *\n * @param stack - The stack trace to add to the comment\n */\n protected singleLineTrackingComment(stack: string[]) {\n this.lastLine = `${this.lastLine} // ${stack.join(\" \")}`;\n }\n /**\n * Creates a multi line tracking comment\n *\n * Override this to change the format of the comment.\n *\n * @param stack - The stack trace to add to the comment\n */\n protected multiLineTrackingComment(stack: string[]) {\n this.lineBuffer.push(...stack.map((each) => ` // ${each}`));\n }\n /**\n * Creates a box tracking comment\n *\n * Override this to change the format of the comment.\n *\n * @param stack - The stack trace to add to the comment\n */\n protected boxTrackingComment(stack: string[]) {\n this.lineBuffer.push(\"/*\", ...stack.map((each) => ` ${each}`), \"*/\");\n }\n\n private isAtStartOfLine(): boolean {\n return this.lastCharacterIsNewline || !this.hasWrittenAnything;\n }\n\n private getIndentString(): string {\n return \" \".repeat(this.indentLevel * this.getTabSize());\n }\n\n protected getTabSize(): number {\n return TAB_SIZE;\n }\n}\n","export { getPackageName } from \"./getPackageName\";\nexport { getSdkVersion } from \"./getSdkVersion\";\nexport {\n addGlobalFileFilter,\n addGlobalFunctionFilter,\n at,\n enableStackTracking,\n getFramesForTaggedObject,\n StackTraces,\n stacktrace\n} from \"./stacktrace\";\n","import { AbstractAstNode } from \"./AbstractAstNode\";\nimport { AbstractWriter } from \"./AbstractWriter\";\n\nexport declare namespace CodeBlock {\n /* Write arbitrary code */\n type Arg<T extends AbstractWriter> = string | AbstractAstNode | ((writer: T) => void);\n}\n\nexport class CodeBlock<T extends AbstractWriter> extends AbstractAstNode {\n private value: CodeBlock.Arg<T>;\n\n constructor(value: CodeBlock.Arg<T>) {\n super();\n this.value = value;\n }\n\n public write(writer: T): void {\n if (typeof this.value === \"string\") {\n writer.write(this.value);\n // if function\n } else if (typeof this.value === \"function\") {\n this.value(writer);\n } else {\n this.value.write(writer);\n }\n }\n}\n","import { AbstractAstNode } from \"./AbstractAstNode\";\n\nexport type Argument = NamedArgument | UnnamedArgument;\n\nexport type Arguments = NamedArgument[] | UnnamedArgument[];\n\nexport interface NamedArgument {\n name: string;\n assignment: AbstractAstNode | string;\n docs?: string;\n}\n\nexport type UnnamedArgument = AbstractAstNode;\n\nexport function isNamedArgument(argument: NamedArgument | UnnamedArgument): argument is NamedArgument {\n return (argument as NamedArgument)?.name != null && (argument as NamedArgument)?.assignment != null;\n}\n\nexport function hasNamedArgument(arguments_: Arguments): boolean {\n return arguments_.length > 0 && arguments_[0] != null && isNamedArgument(arguments_[0]);\n}\n","import { AbstractAstNode } from \"./AbstractAstNode\";\nimport { AbstractWriter } from \"./AbstractWriter\";\n\nexport declare namespace Ternary {\n interface Args {\n /* The condition to check */\n condition: AbstractAstNode;\n /* The true expression */\n true_: AbstractAstNode;\n /* The false expression */\n false_: AbstractAstNode;\n }\n}\n\nexport class Ternary extends AbstractAstNode {\n private condition: AbstractAstNode;\n private true_: AbstractAstNode;\n private false_: AbstractAstNode;\n\n constructor({ condition, true_, false_ }: Ternary.Args) {\n super();\n\n this.condition = condition;\n this.true_ = true_;\n this.false_ = false_;\n }\n\n public write(writer: AbstractWriter): void {\n writer.writeNode(this.condition);\n writer.write(\" ? \");\n writer.writeNode(this.true_);\n writer.write(\" : \");\n writer.writeNode(this.false_);\n }\n}\n","export { AbstractDynamicSnippetsGenerator } from \"./AbstractDynamicSnippetsGenerator\";\nexport { AbstractDynamicSnippetsGeneratorContext } from \"./AbstractDynamicSnippetsGeneratorContext\";\nexport { type DiscriminatedUnionTypeInstance } from \"./DiscriminatedUnionTypeInstance\";\nexport { ErrorReporter, Severity } from \"./ErrorReporter\";\nexport { type Options, Style } from \"./Options\";\nexport { Result } from \"./Result\";\nexport { Scope } from \"./Scope\";\nexport { type TypeInstance } from \"./TypeInstance\";\nexport { DynamicSnippetsTestRunner } from \"./test-utils/DynamicSnippetsTestRunner\";\n","import { FernIr } from \"@fern-api/dynamic-ir-sdk\";\nimport { AbstractAstNode } from \"../ast\";\nimport { AbstractDynamicSnippetsGeneratorContext } from \"./AbstractDynamicSnippetsGeneratorContext\";\nimport { AbstractEndpointSnippetGenerator } from \"./AbstractEndpointSnippetGenerator\";\nimport { Options } from \"./Options\";\nimport { Result } from \"./Result\";\n\nexport abstract class AbstractDynamicSnippetsGenerator<\n Context extends AbstractDynamicSnippetsGeneratorContext,\n EndpointSnippetGenerator extends AbstractEndpointSnippetGenerator<Context>\n> {\n public constructor(public readonly context: Context) {}\n\n protected abstract createSnippetGenerator(context: Context): EndpointSnippetGenerator;\n\n public async generate(\n request: FernIr.dynamic.EndpointSnippetRequest,\n options: Options = {}\n ): Promise<FernIr.dynamic.EndpointSnippetResponse> {\n const endpoints = this.context.resolveEndpointLocationOrThrow(request.endpoint);\n if (endpoints.length === 0) {\n throw new Error(`No endpoints found that match \"${request.endpoint.method} ${request.endpoint.path}\"`);\n }\n const result = new Result();\n for (const endpoint of endpoints) {\n const context = this.context.clone() as Context;\n const snippetGenerator = this.createSnippetGenerator(context);\n try {\n const snippet = await snippetGenerator.generateSnippet({ endpoint, request, options });\n if (context.errors.empty()) {\n return {\n snippet,\n errors: undefined\n };\n }\n result.update({ context, snippet });\n } catch (error) {\n if (result.err == null) {\n result.err = error as Error;\n }\n }\n }\n return result.getResponseOrThrow({ endpoint: request.endpoint });\n }\n\n public async generateSnippetAst(\n request: FernIr.dynamic.EndpointSnippetRequest,\n options: Options = {}\n ): Promise<AbstractAstNode> {\n const endpoints = this.context.resolveEndpointLocationOrThrow(request.endpoint);\n if (endpoints.length === 0) {\n throw new Error(`No endpoints found that match \"${request.endpoint.method} ${request.endpoint.path}\"`);\n }\n let lastError: Error | undefined = undefined;\n for (const endpoint of endpoints) {\n const context = this.context.clone() as Context;\n const snippetGenerator = this.createSnippetGenerator(context);\n try {\n const ast = await snippetGenerator.generateSnippetAst({ endpoint, request, options });\n return ast;\n } catch (error) {\n lastError = error as Error;\n }\n }\n if (lastError != null) {\n throw lastError;\n }\n throw new Error(\n `Failed to generate snippet AST for endpoint: ${request.endpoint.method} ${request.endpoint.path}`\n );\n }\n\n public generateSync(\n request: FernIr.dynamic.EndpointSnippetRequest,\n options: Options = {}\n ): FernIr.dynamic.EndpointSnippetResponse {\n const endpoints = this.context.resolveEndpointLocationOrThrow(request.endpoint);\n if (endpoints.length === 0) {\n throw new Error(`No endpoints found that match \"${request.endpoint.method} ${request.endpoint.path}\"`);\n }\n const result = new Result();\n for (const endpoint of endpoints) {\n const context = this.context.clone() as Context;\n const snippetGenerator = this.createSnippetGenerator(context);\n try {\n const snippet = snippetGenerator.generateSnippetSync({ endpoint, request, options });\n if (context.errors.empty()) {\n return {\n snippet,\n errors: undefined\n };\n }\n result.update({ context, snippet });\n } catch (error) {\n if (result.err == null) {\n result.err = error as Error;\n }\n }\n }\n return result.getResponseOrThrow({ endpoint: request.endpoint });\n }\n}\n","import { FernIr } from \"@fern-api/dynamic-ir-sdk\";\n\nimport { AbstractDynamicSnippetsGeneratorContext } from \"./AbstractDynamicSnippetsGeneratorContext\";\nimport { ErrorReporter } from \"./ErrorReporter\";\n\nexport class Result {\n public reporter: ErrorReporter | undefined;\n public snippet: string | undefined;\n public err: Error | undefined;\n\n constructor() {\n this.snippet = undefined;\n this.reporter = undefined;\n this.err = undefined;\n }\n\n public update({ context, snippet }: { context: AbstractDynamicSnippetsGeneratorContext; snippet: string }): void {\n if (this.shouldUpdate({ snippet, reporter: context.errors })) {\n this.reporter = context.errors.clone();\n this.snippet = snippet;\n }\n }\n\n public getResponseOrThrow({\n endpoint\n }: {\n endpoint: FernIr.dynamic.EndpointLocation;\n }): FernIr.dynamic.EndpointSnippetResponse {\n if (this.snippet != null && this.reporter != null) {\n return {\n snippet: this.snippet,\n errors: this.reporter.toDynamicSnippetErrors()\n };\n }\n throw this.err ?? new Error(`Failed to generate snippet for endpoint \"${endpoint.method} ${endpoint.path}\"`);\n }\n\n private shouldUpdate({ snippet, reporter }: { snippet: string; reporter: ErrorReporter }): boolean {\n if (this.reporter == null || (this.reporter.size() > 0 && reporter.size() === 0)) {\n return true;\n }\n return snippet.length > (this.snippet?.length ?? 0);\n }\n}\n","import { assertNever, keys } from \"@fern-api/core-utils\";\nimport { FernIr } from \"@fern-api/dynamic-ir-sdk\";\nimport { HttpEndpointReferenceParser } from \"@fern-api/fern-definition-schema\";\n\nimport { FernGeneratorExec } from \"../GeneratorNotificationService\";\nimport { DiscriminatedUnionTypeInstance } from \"./DiscriminatedUnionTypeInstance\";\nimport { ErrorReporter, Severity } from \"./ErrorReporter\";\nimport { Options } from \"./Options\";\nimport { TypeInstance } from \"./TypeInstance\";\n\nexport abstract class AbstractDynamicSnippetsGeneratorContext {\n public config: FernGeneratorExec.GeneratorConfig;\n public options: Options;\n public errors: ErrorReporter;\n\n private _ir: FernIr.dynamic.DynamicIntermediateRepresentation;\n private httpEndpointReferenceParser: HttpEndpointReferenceParser;\n\n constructor({\n ir,\n config,\n options = {}\n }: {\n ir: FernIr.dynamic.DynamicIntermediateRepresentation;\n config: FernGeneratorExec.GeneratorConfig;\n options?: Options;\n }) {\n this._ir = ir;\n this.config = config;\n this.options = options;\n this.errors = new ErrorReporter();\n this.httpEndpointReferenceParser = new HttpEndpointReferenceParser();\n }\n\n public abstract clone(): AbstractDynamicSnippetsGeneratorContext;\n\n public associateQueryParametersByWireValue({\n parameters,\n values\n }: {\n parameters: FernIr.dynamic.NamedParameter[];\n values: FernIr.dynamic.Values;\n }): TypeInstance[] {\n const instances: TypeInstance[] = [];\n for (const [key, value] of Object.entries(values)) {\n this.errors.scope(key);\n try {\n const parameter = parameters.find((param) => param.name.wireValue === key);\n if (parameter == null) {\n throw this.newParameterNotRecognizedError(key);\n }\n // If this query parameter supports allow-multiple, the user-provided values\n // must be wrapped in an array.\n const typeInstanceValue =\n this.isListTypeReference(parameter.typeReference) && !Array.isArray(value) ? [value] : value;\n instances.push({\n name: parameter.name,\n typeReference: parameter.typeReference,\n value: typeInstanceValue\n });\n } finally {\n this.errors.unscope();\n }\n }\n return instances;\n }\n\n public associateByWireValueOrDefault({\n parameters,\n values\n }: {\n parameters: FernIr.dynamic.NamedParameter[];\n values: FernIr.dynamic.Values;\n }): TypeInstance[] {\n const instances: TypeInstance[] = [];\n for (const parameter of parameters) {\n this.errors.scope(parameter.name.wireValue);\n try {\n let value = values[parameter.name.wireValue];\n\n if (value == null) {\n if (parameter.typeReference.type === \"primitive\" && parameter.typeReference.value === \"STRING\") {\n // synthesize a parameter value for string parameters that are missing data\n value = `<${parameter.name.wireValue}>`;\n } else {\n this.errors.add({\n severity: Severity.Critical,\n message: this.newParameterNotRecognizedError(parameter.name.wireValue).message\n });\n continue;\n }\n }\n\n instances.push({\n name: parameter.name,\n typeReference: parameter.typeReference,\n value\n });\n } finally {\n this.errors.unscope();\n }\n }\n\n return instances;\n }\n\n public associateByWireValue({\n parameters,\n values,\n ignoreMissingParameters\n }: {\n parameters: FernIr.dynamic.NamedParameter[];\n values: FernIr.dynamic.Values;\n ignoreMissingParameters?: boolean;\n }): TypeInstance[] {\n const instances: TypeInstance[] = [];\n for (const [key, value] of Object.entries(values)) {\n this.errors.scope(key);\n try {\n const parameter = parameters.find((param) => param.name.wireValue === key);\n if (parameter == null) {\n if (ignoreMissingParameters) {\n // Required for request payloads that include more information than\n // just the target parameters (e.g. union base properties).\n continue;\n }\n this.errors.add({\n severity: Severity.Critical,\n message: this.newParameterNotRecognizedError(key).message\n });\n continue;\n }\n instances.push({\n name: parameter.name,\n typeReference: parameter.typeReference,\n value\n });\n } finally {\n this.errors.unscope();\n }\n }\n return instances;\n }\n\n /**\n * Similar to `associateByWireValue` but it builds TypeInstance objects by iterating over schema parameters rather\n * than snippet values. Skips non-nullable parameters that are missing from the snippet object.\n */\n public getExampleObjectProperties({\n parameters,\n snippetObject\n }: {\n parameters: FernIr.dynamic.NamedParameter[];\n snippetObject: unknown;\n }): TypeInstance[] {\n const objectRecord = (\n typeof snippetObject === \"object\" && snippetObject !== null && !Array.isArray(snippetObject)\n ? snippetObject\n : {}\n ) as Record<string, unknown>;\n const instances: TypeInstance[] = [];\n for (const parameter of parameters) {\n const value = objectRecord[parameter.name.wireValue];\n if (value == null) {\n if (parameter.typeReference.type === \"nullable\") {\n instances.push({\n name: parameter.name,\n typeReference: parameter.typeReference,\n value: null\n });\n }\n } else {\n instances.push({\n name: parameter.name,\n typeReference: parameter.typeReference,\n value\n });\n }\n }\n return instances;\n }\n\n public getSingleFileValue({\n property,\n record\n }: {\n property: FernIr.dynamic.FileUploadRequestBodyProperty.File_;\n record: Record<string, unknown>;\n }): string | undefined {\n const fileValue = record[property.wireValue];\n if (fileValue == null) {\n return undefined;\n }\n if (typeof fileValue !== \"string\") {\n this.errors.add({\n severity: Severity.Critical,\n message: `Expected file value to be a string, got ${typeof fileValue}`\n });\n return undefined;\n }\n return fileValue;\n }\n\n public getFileArrayValues({\n property,\n record\n }: {\n property: FernIr.dynamic.FileUploadRequestBodyProperty.FileArray;\n record: Record<string, unknown>;\n }): string[] | undefined {\n const fileArrayValue = record[property.wireValue];\n if (fileArrayValue == null) {\n return undefined;\n }\n if (!Array.isArray(fileArrayValue)) {\n this.errors.add({\n severity: Severity.Critical,\n message: `Expected file array value to be an array of strings, got ${typeof fileArrayValue}`\n });\n return undefined;\n }\n const stringValues: string[] = [];\n for (const value of fileArrayValue) {\n if (typeof value !== \"string\") {\n this.errors.add({\n severity: Severity.Critical,\n message: `Expected file array value to be an array of strings, got ${typeof value}`\n });\n return undefined;\n }\n stringValues.push(value);\n }\n return stringValues;\n }\n\n public getRecord(value: unknown): Record<string, unknown> | undefined {\n if (typeof value !== \"object\" || Array.isArray(value)) {\n this.errors.add({\n severity: Severity.Critical,\n message: `Expected object with key, value pairs but got: ${\n Array.isArray(value) ? \"array\" : typeof value\n }`\n });\n return undefined;\n }\n if (value == null) {\n return {};\n }\n return value as Record<string, unknown>;\n }\n\n public resolveNamedType({ typeId }: { typeId: FernIr.dynamic.TypeId }): FernIr.dynamic.NamedType | undefined {\n const namedType = this._ir.types[typeId];\n if (namedType == null) {\n this.errors.add({\n severity: Severity.Critical,\n message: `Type identified by \"${typeId}\" could not be found`\n });\n return undefined;\n }\n return namedType;\n }\n\n public resolveDiscriminatedUnionTypeInstance({\n discriminatedUnion,\n value\n }: {\n discriminatedUnion: FernIr.dynamic.DiscriminatedUnionType;\n value: unknown;\n }): DiscriminatedUnionTypeInstance | undefined {\n const record = this.getRecord(value);\n if (record == null) {\n return undefined;\n }\n\n const discriminantFieldName = discriminatedUnion.discriminant.wireValue;\n const discriminantValue = record[discriminantFieldName];\n if (discriminantValue == null) {\n this.errors.add({\n severity: Severity.Critical,\n message: this.newParameterNotRecognizedError(discriminantFieldName).message\n });\n return undefined;\n }\n if (typeof discriminantValue !== \"string\") {\n this.errors.add({\n severity: Severity.Critical,\n message: `Expected discriminant value to be a string but got: ${typeof discriminantValue}`\n });\n return undefined;\n }\n\n const singleDiscriminatedUnionType = discriminatedUnion.types[discriminantValue];\n if (singleDiscriminatedUnionType == null) {\n this.errors.add({\n severity: Severity.Critical,\n message: `No type found for discriminant value \"${discriminantValue}\"`\n });\n return undefined;\n }\n\n // Remove the discriminant from the record so that the value is valid for the type.\n const { [discriminantFieldName]: _, ...filtered } = record;\n\n return {\n singleDiscriminatedUnionType,\n discriminantValue: singleDiscriminatedUnionType.discriminantValue,\n value: filtered\n };\n }\n\n public resolveEndpointOrThrow(rawEndpoint: string): FernIr.dynamic.Endpoint[] {\n const parsedEndpoint = this.httpEndpointReferenceParser.tryParse(rawEndpoint);\n if (parsedEndpoint == null) {\n throw new Error(`Failed to parse endpoint reference \"${rawEndpoint}\"`);\n }\n return this.resolveEndpointLocationOrThrow(parsedEndpoint);\n }\n\n public resolveEndpointLocation(location: FernIr.dynamic.EndpointLocation): FernIr.dynamic.Endpoint[] {\n const endpoints: FernIr.dynamic.Endpoint[] = [];\n for (const endpoint of Object.values(this._ir.endpoints)) {\n if (this.parsedEndpointMatches({ endpoint, parsedEndpoint: location })) {\n endpoints.push(endpoint);\n }\n }\n\n return endpoints;\n }\n\n public resolveEndpointLocationOrThrow(location: FernIr.dynamic.EndpointLocation): FernIr.dynamic.Endpoint[] {\n const endpoints = this.resolveEndpointLocation(location);\n if (endpoints.length === 0) {\n throw new Error(`Failed to find endpoint identified by \"${location.method} ${location.path}\"`);\n }\n return endpoints;\n }\n\n public needsRequestParameter({\n request,\n inlinePathParameters,\n inlineFileProperties\n }: {\n request: FernIr.dynamic.InlinedRequest;\n inlinePathParameters: boolean;\n inlineFileProperties: boolean;\n }): boolean {\n if (this.includePathParametersInWrappedRequest({ request, inlinePathParameters })) {\n return true;\n }\n if (request.queryParameters != null && request.queryParameters.length > 0) {\n return true;\n }\n if (request.headers != null && request.headers.length > 0) {\n return true;\n }\n if (request.body != null) {\n return this.includeRequestBodyInWrappedRequest({ body: request.body, inlineFileProperties });\n }\n if (request.metadata?.onlyPathParameters) {\n return false;\n }\n return true;\n }\n\n public includePathParametersInWrappedRequest({\n request,\n inlinePathParameters\n }: {\n request: FernIr.dynamic.InlinedRequest;\n inlinePathParameters: boolean;\n }): boolean {\n return inlinePathParameters && (request.metadata?.includePathParameters ?? false);\n }\n\n public isFileUploadRequestBody(\n body: FernIr.dynamic.InlinedRequestBody\n ): body is FernIr.dynamic.InlinedRequestBody.FileUpload {\n switch (body.type) {\n case \"fileUpload\":\n return true;\n case \"properties\":\n case \"referenced\":\n return false;\n default:\n assertNever(body);\n }\n }\n\n public resolveEnvironmentName(environmentID: string): FernIr.Name | undefined {\n if (this._ir.environments == null) {\n return undefined;\n }\n const environments = this._ir.environments.environments;\n switch (environments.type) {\n case \"singleBaseUrl\": {\n const environment = environments.environments.find((env) => env.id === environmentID);\n if (environment == null) {\n return undefined;\n }\n return environment.name;\n }\n case \"multipleBaseUrls\": {\n const environment = environments.environments.find((env) => env.id === environmentID);\n if (environment == null) {\n return undefined;\n }\n return environment.name;\n }\n default:\n assertNever(environments);\n }\n }\n\n public isSingleEnvironmentID(\n environment: FernIr.dynamic.EnvironmentValues\n ): environment is FernIr.dynamic.EnvironmentId {\n return typeof environment === \"string\";\n }\n\n public isMultiEnvironmentValues(\n environment: FernIr.dynamic.EnvironmentValues\n ): environment is FernIr.dynamic.MultipleEnvironmentUrlValues {\n return typeof environment === \"object\";\n }\n\n public validateMultiEnvironmentUrlValues(\n multiEnvironmentUrlValues: FernIr.dynamic.MultipleEnvironmentUrlValues\n ): boolean {\n if (this._ir.environments == null) {\n this.errors.add({\n severity: Severity.Critical,\n message:\n \"Multiple environments are not supported for single base URL environments; use the baseUrl option instead\"\n });\n return false;\n }\n const environments = this._ir.environments.environments;\n switch (environments.type) {\n case \"singleBaseUrl\": {\n this.errors.add({\n severity: Severity.Critical,\n message:\n \"Multiple environments are not supported for single base URL environments; use the baseUrl option instead\"\n });\n return false;\n }\n case \"multipleBaseUrls\": {\n const firstEnvironment = environments.environments[0];\n if (firstEnvironment == null) {\n this.errors.add({\n severity: Severity.Critical,\n message: \"Multiple environments are not supported; use the baseUrl option instead\"\n });\n return false;\n }\n const expectedKeys = new Set(keys(firstEnvironment.urls));\n for (const key of keys(multiEnvironmentUrlValues)) {\n if (expectedKeys.has(key)) {\n expectedKeys.delete(key);\n }\n }\n if (expectedKeys.size > 0) {\n this.errors.add({\n severity: Severity.Critical,\n message: `The provided environments are invalid; got: [${Object.keys(multiEnvironmentUrlValues).join(\", \")}], expected: [${keys(firstEnvironment.urls).join(\", \")}]`\n });\n return false;\n }\n return true;\n }\n }\n }\n\n public getValueAsNumber({ value }: { value: unknown }): number | undefined {\n if (typeof value !== \"number\") {\n this.errors.add({\n severity: Severity.Critical,\n message: this.newTypeMismatchError({ expected: \"number\", value }).message\n });\n return undefined;\n }\n return value;\n }\n\n public getValueAsBoolean({ value }: { value: unknown }): boolean | undefined {\n if (typeof value !== \"boolean\") {\n this.errors.add({\n severity: Severity.Critical,\n message: this.newTypeMismatchError({ expected: \"boolean\", value }).message\n });\n return undefined;\n }\n return value;\n }\n\n public getValueAsString({ value }: { value: unknown }): string | undefined {\n if (typeof value !== \"string\") {\n this.errors.add({\n severity: Severity.Critical,\n message: this.newTypeMismatchError({ expected: \"string\", value }).message\n });\n return undefined;\n }\n return value;\n }\n\n public isOptional(typeReference: FernIr.dynamic.TypeReference): boolean {\n switch (typeReference.type) {\n case \"nullable\":\n return this.isOptional(typeReference.value);\n case \"optional\":\n return true;\n case \"named\": {\n const resolvedType = this.resolveNamedType({ typeId: typeReference.value });\n if (resolvedType == null) {\n return false;\n }\n if (resolvedType.type === \"alias\") {\n return this.isNullable(resolvedType.typeReference);\n }\n return false;\n }\n }\n return false;\n }\n\n public isNullable(typeReference: FernIr.dynamic.TypeReference): boolean {\n switch (typeReference.type) {\n case \"nullable\":\n return true;\n case \"optional\":\n return this.isNullable(typeReference.value);\n case \"named\": {\n const resolvedType = this.resolveNamedType({ typeId: typeReference.value });\n if (resolvedType == null) {\n return false;\n }\n if (resolvedType.type === \"alias\") {\n return this.isNullable(resolvedType.typeReference);\n }\n return false;\n }\n }\n return false;\n }\n\n public newAuthMismatchError({\n auth,\n values\n }: {\n auth: FernIr.dynamic.Auth;\n values: FernIr.dynamic.AuthValues;\n }): Error {\n return new Error(`Expected auth type ${auth.type}, got ${values.type}`);\n }\n\n public newParameterNotRecognizedError(parameterName: string): Error {\n return new Error(`\"${parameterName}\" is not a recognized parameter for this endpoint`);\n }\n\n public newTypeMismatchError({ expected, value }: { expected: string; value: unknown }): Error {\n return new Error(`Expected ${expected}, got ${typeof value}`);\n }\n\n private includeRequestBodyInWrappedRequest({\n body,\n inlineFileProperties\n }: {\n body: FernIr.dynamic.InlinedRequestBody;\n inlineFileProperties: boolean;\n }): boolean {\n switch (body.type) {\n case \"properties\":\n case \"referenced\":\n return true;\n case \"fileUpload\":\n return this.includeFileUploadBodyInWrappedRequest({ fileUpload: body, inlineFileProperties });\n default:\n assertNever(body);\n }\n }\n\n private includeFileUploadBodyInWrappedRequest({\n fileUpload,\n inlineFileProperties\n }: {\n fileUpload: FernIr.dynamic.FileUploadRequestBody;\n inlineFileProperties: boolean;\n }): boolean {\n return (\n this.fileUploadHasBodyProperties({ fileUpload }) ||\n (inlineFileProperties && this.fileUploadHasFileProperties({ fileUpload }))\n );\n }\n\n private fileUploadHasBodyProperties({ fileUpload }: { fileUpload: FernIr.dynamic.FileUploadRequestBody }): boolean {\n return fileUpload.properties.some((property) => {\n switch (property.type) {\n case \"file\":\n case \"fileArray\":\n return false;\n case \"bodyProperty\":\n return true;\n default:\n assertNever(property);\n }\n });\n }\n\n private fileUploadHasFileProperties({ fileUpload }: { fileUpload: FernIr.dynamic.FileUploadRequestBody }): boolean {\n return fileUpload.properties.some((property) => {\n switch (property.type) {\n case \"file\":\n case \"fileArray\":\n return true;\n case \"bodyProperty\":\n return false;\n default:\n assertNever(property);\n }\n });\n }\n\n private isListTypeReference(typeReference: FernIr.dynamic.TypeReference): boolean {\n if (typeReference.type === \"optional\") {\n return this.isListTypeReference(typeReference.value);\n }\n return typeReference.type === \"list\" || typeReference.type === \"set\";\n }\n\n private parsedEndpointMatches({\n endpoint,\n parsedEndpoint\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n parsedEndpoint: HttpEndpointReferenceParser.Parsed;\n }): boolean {\n return endpoint.location.method === parsedEndpoint.method && endpoint.location.path === parsedEndpoint.path;\n }\n}\n","export { EXAMPLE_REFERENCE_PREFIX, YAML_SCHEMA_VERSION } from \"./constants\";\nexport { type NodePath, type NodePathItem } from \"./NodePath\";\nexport * as RawSchemas from \"./schemas\";\nexport { type DefinitionFileSchema, type PackageMarkerFileSchema, type RootApiFileSchema } from \"./schemas\";\nexport * from \"./utils/auth\";\nexport * from \"./utils/generics\";\nexport { getRequestBody } from \"./utils/getRequestBody\";\nexport { getResponseBodyType } from \"./utils/getResponseBodyType\";\nexport { HttpEndpointReferenceParser } from \"./utils/HttpEndpointReferenceParser\";\nexport { isInlineRequestBody } from \"./utils/isInlineRequestBody\";\nexport { isOpenApiSourceSchema } from \"./utils/isOpenApiSourceSchema\";\nexport { isRawProtobufSourceSchema } from \"./utils/isRawProtobufSourceSchema\";\nexport { isRawTextType } from \"./utils/isRawTextType\";\nexport { type BytesRequest, parseBytesRequest } from \"./utils/parseBytesRequest\";\nexport { parseFileUploadRequest, type RawFileUploadRequest } from \"./utils/parseFileUploadRequest\";\nexport { parseRawBytesType, type RawBytesType } from \"./utils/parseRawBytesType\";\nexport { parseRawFileType, type RawFileType } from \"./utils/parseRawFileType\";\nexport { parseRawTextType, type RawTextType } from \"./utils/parseRawTextType\";\nexport { RawPrimitiveType } from \"./utils/RawPrimitiveType\";\nexport { recursivelyVisitRawTypeReference } from \"./utils/recursivelyVisitRawTypeReference\";\nexport { visitExampleCodeSampleSchema } from \"./utils/visitExampleCodeSampleSchema\";\nexport { type ExampleResponseSchemaVisitor, visitExampleResponseSchema } from \"./utils/visitExampleResponseSchema\";\nexport { isAnyAuthSchemes, isSingleAuthScheme, type RawApiAuthVisitor, visitRawApiAuth } from \"./utils/visitRawApiAuth\";\nexport {\n type AuthSchemeDeclarationVisitor,\n isHeaderAuthScheme,\n visitRawAuthSchemeDeclaration\n} from \"./utils/visitRawAuthSchemeDeclaration\";\nexport {\n isRawMultipleBaseUrlsEnvironment,\n isRawSingleBaseUrlEnvironment,\n visitRawEnvironmentDeclaration\n} from \"./utils/visitRawEnvironmentDeclaration\";\nexport {\n isVariablePathParameter,\n type PathParameterDeclarationVisitor,\n visitRawPathParameter\n} from \"./utils/visitRawPathParameter\";\nexport {\n isRawAliasDefinition,\n isRawDiscriminatedUnionDefinition,\n isRawEnumDefinition,\n isRawObjectDefinition,\n isRawUndiscriminatedUnionDefinition,\n type RawTypeDeclarationVisitor,\n visitRawTypeDeclaration\n} from \"./utils/visitRawTypeDeclaration\";\nexport { FernContainerRegex, visitRawTypeReference } from \"./utils/visitRawTypeReference\";\n","export declare namespace HttpEndpointReferenceParser {\n interface Parsed {\n path: string;\n method: Method;\n }\n\n type Method = \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"PATCH\" | \"HEAD\";\n\n export type ValidationResult = Valid | Invalid;\n\n interface Valid {\n type: \"valid\";\n }\n\n interface Invalid {\n type: \"invalid\";\n }\n}\n\n/**\n * Parses an HTTP endpoint reference like `POST /users/get`\n */\nexport class HttpEndpointReferenceParser {\n //eslint-disable-next-line\n private REFERENCE_REGEX = /^(GET|POST|PUT|DELETE|PATCH|HEAD)\\s(\\/\\S*)$/;\n\n public validate(reference: string): HttpEndpointReferenceParser.ValidationResult {\n const validFormat = this.REFERENCE_REGEX.test(reference);\n if (!validFormat) {\n return { type: \"invalid\" };\n }\n return { type: \"valid\" };\n }\n\n public tryParse(reference: string): HttpEndpointReferenceParser.Parsed | undefined {\n const validationResponse = this.validate(reference);\n if (validationResponse.type === \"invalid\") {\n return undefined;\n }\n const match = reference.match(this.REFERENCE_REGEX);\n if (match == null || match[1] == null || match[2] == null) {\n return undefined;\n }\n return {\n method: match[1] as HttpEndpointReferenceParser.Method,\n path: match[2]\n };\n }\n}\n","export const Severity = {\n Critical: \"CRITICAL\",\n Warning: \"WARNING\"\n} as const;\n\nexport declare namespace ErrorReporter {\n type Path = readonly PathItem[];\n\n type PathItem = string | ArrayPathItem;\n\n type Severity = (typeof Severity)[keyof typeof Severity];\n\n interface ArrayPathItem {\n index: number;\n }\n\n interface Error {\n path?: Path;\n severity: Severity;\n message: string;\n }\n}\n\ninterface Error_ {\n severity: \"CRITICAL\" | \"WARNING\";\n path: string[] | undefined;\n message: string;\n}\n\nexport class ErrorReporter {\n private errors: ErrorReporter.Error[];\n private path: ErrorReporter.PathItem[];\n\n constructor() {\n this.errors = [];\n this.path = [];\n }\n\n public add(err: Omit<ErrorReporter.Error, \"path\">): void {\n this.errors.push({\n ...err,\n path: [...this.path]\n });\n }\n\n public scope(path: ErrorReporter.PathItem): void {\n this.path.push(path);\n }\n\n public unscope(): void {\n this.path.pop();\n }\n\n public getBySeverity(severity: ErrorReporter.Severity): ErrorReporter.Error[] {\n return this.errors.filter((err) => err.severity === severity);\n }\n\n public empty(): boolean {\n return this.errors.length === 0;\n }\n\n public size(): number {\n return this.errors.length;\n }\n\n public clone(): ErrorReporter {\n const clone = new ErrorReporter();\n clone.errors = [...this.errors];\n clone.path = [...this.path];\n return clone;\n }\n\n public reset(): void {\n this.errors = [];\n this.path = [];\n }\n\n public toDynamicSnippetErrors(): Error_[] {\n return this.errors.map((err) => ({\n severity: err.severity,\n path: err.path != null ? this.pathToStringArray(err.path) : undefined,\n message: err.message\n }));\n }\n\n private pathToStringArray(path: ErrorReporter.Path): string[] {\n const result: string[] = [];\n for (const item of path) {\n if (typeof item === \"string\") {\n result.push(item);\n continue;\n }\n result[result.length - 1] += `[${item.index}]`;\n }\n return result;\n }\n}\n","export const Scope = {\n PathParameters: \"pathParameters\",\n QueryParameters: \"queryParameters\",\n Headers: \"headers\",\n RequestBody: \"requestBody\"\n} as const;\n\nexport type Scope = (typeof Scope)[keyof typeof Scope];\n","import {\n AbstractDynamicSnippetsGeneratorContext,\n FernGeneratorExec\n} from \"@fern-api/browser-compatible-base-generator\";\nimport { FernIr } from \"@fern-api/dynamic-ir-sdk\";\nimport { BasePhpCustomConfigSchema, getSafeClassName, php } from \"@fern-api/php-codegen\";\nimport { camelCase, upperFirst } from \"lodash-es\";\n\nimport { DynamicTypeLiteralMapper } from \"./DynamicTypeLiteralMapper\";\nimport { FilePropertyMapper } from \"./FilePropertyMapper\";\n\nconst RESERVED_METHOD_NAMES = [\"use\", \"clone\", \"list\"];\nconst REQUEST_NAMESPACE = \"Requests\";\nconst TYPES_NAMESPACE = \"Types\";\n\nexport class DynamicSnippetsGeneratorContext extends AbstractDynamicSnippetsGeneratorContext {\n public ir: FernIr.dynamic.DynamicIntermediateRepresentation;\n public customConfig: BasePhpCustomConfigSchema | undefined;\n public dynamicTypeLiteralMapper: DynamicTypeLiteralMapper;\n public filePropertyMapper: FilePropertyMapper;\n public rootNamespace: string;\n constructor({\n ir,\n config\n }: {\n ir: FernIr.dynamic.DynamicIntermediateRepresentation;\n config: FernGeneratorExec.GeneratorConfig;\n }) {\n super({ ir, config });\n this.ir = ir;\n this.customConfig =\n config.customConfig != null ? (config.customConfig as BasePhpCustomConfigSchema) : undefined;\n this.dynamicTypeLiteralMapper = new DynamicTypeLiteralMapper({ context: this });\n this.filePropertyMapper = new FilePropertyMapper({ context: this });\n this.rootNamespace = getRootNamespace({\n organization: config.organization,\n namespaceOverride: this.customConfig?.namespace\n });\n }\n\n public clone(): DynamicSnippetsGeneratorContext {\n return new DynamicSnippetsGeneratorContext({\n ir: this.ir,\n config: this.config\n });\n }\n\n public getParameterName(name: FernIr.Name): string {\n return this.prependUnderscoreIfNeeded(name.camelCase.unsafeName);\n }\n\n public getPropertyName(name: FernIr.Name): string {\n return this.prependUnderscoreIfNeeded(name.camelCase.unsafeName);\n }\n\n public getMethodName(name: FernIr.Name): string {\n // TODO: Propogate reserved keywords through IR via CasingsGenerator.\n const unsafeName = name.camelCase.unsafeName;\n if (RESERVED_METHOD_NAMES.includes(unsafeName)) {\n return unsafeName;\n }\n return name.camelCase.safeName;\n }\n\n public getClassName(name: FernIr.Name): string {\n return getSafeClassName(name.pascalCase.safeName);\n }\n\n public getRootClientClassName(): string {\n if (this.customConfig?.clientName != null) {\n return this.customConfig.clientName;\n }\n if (this.customConfig?.[\"client-class-name\"] != null) {\n return this.customConfig?.[\"client-class-name\"];\n }\n return this.getComputedClientName();\n }\n\n public getEnvironmentsClassReference(): php.ClassReference {\n return php.classReference({\n name: \"Environments\",\n namespace: this.rootNamespace\n });\n }\n\n public getRequestNamespace(fernFilepath: FernIr.dynamic.FernFilepath): string {\n return this.getNamespace(fernFilepath, REQUEST_NAMESPACE);\n }\n\n public getTypesNamespace(fernFilepath: FernIr.dynamic.FernFilepath): string {\n return this.getNamespace(fernFilepath, TYPES_NAMESPACE);\n }\n\n public getNamespace(fernFilepath: FernIr.dynamic.FernFilepath, suffix?: string): string {\n let parts = fernFilepath.allParts.map((path) => path.pascalCase.safeName);\n parts = suffix != null ? [...parts, suffix] : parts;\n return [this.rootNamespace, ...parts].join(\"\\\\\");\n }\n\n public getEnvironmentClassAccessFromID(environmentID: string): php.AstNode | undefined {\n const environmentName = this.resolveEnvironmentName(environmentID);\n if (environmentName == null) {\n return undefined;\n }\n return php.codeblock((writer) => {\n writer.writeNode(this.getEnvironmentClassReference(environmentName));\n writer.write(\"::\");\n writer.write(this.getClassName(environmentName));\n });\n }\n\n public getEnvironmentClassReference(name: FernIr.Name): php.ClassReference {\n return php.classReference({\n name: \"Environments\",\n namespace: this.rootNamespace\n });\n }\n\n private prependUnderscoreIfNeeded(input: string): string {\n // https://www.php.net/manual/en/language.variables.basics.php\n if (!/^[a-zA-Z_]/.test(input)) {\n return `_${input}`;\n }\n return input;\n }\n\n private getComputedClientName(): string {\n return `${this.getOrganizationPascalCase()}Client`;\n }\n\n private getOrganizationPascalCase(): string {\n return `${upperFirst(camelCase(this.config.organization))}`;\n }\n}\n\nfunction getRootNamespace({\n organization,\n namespaceOverride\n}: {\n organization: string;\n namespaceOverride?: string;\n}): string {\n return namespaceOverride ?? `${upperFirst(camelCase(organization))}`;\n}\n","export { GLOBAL_NAMESPACE, SELF, STATIC } from \"./ast/core/Constant\";\nexport { PHP_RESERVED_KEYWORDS } from \"./constants\";\nexport { BasePhpCustomConfigSchema } from \"./custom-config/BasePhpCustomConfigSchema\";\nexport * as php from \"./php\";\nexport { getSafeClassName } from \"./utils\";\n","export const GLOBAL_NAMESPACE = \"\";\nexport const SELF = \"self\";\nexport const STATIC = \"static\";\n","// PHP reserved keywords (case-insensitive) that cannot be used as class names\n// Source: https://www.php.net/manual/en/reserved.keywords.php\nexport const PHP_RESERVED_KEYWORDS = new Set([\n \"abstract\",\n \"and\",\n \"array\",\n \"as\",\n \"break\",\n \"callable\",\n \"case\",\n \"catch\",\n \"class\",\n \"clone\",\n \"const\",\n \"continue\",\n \"declare\",\n \"default\",\n \"die\",\n \"do\",\n \"echo\",\n \"else\",\n \"elseif\",\n \"empty\",\n \"enddeclare\",\n \"endfor\",\n \"endforeach\",\n \"endif\",\n \"endswitch\",\n \"endwhile\",\n \"eval\",\n \"exit\",\n \"extends\",\n \"final\",\n \"finally\",\n \"fn\",\n \"for\",\n \"foreach\",\n \"function\",\n \"global\",\n \"goto\",\n \"if\",\n \"implements\",\n \"include\",\n \"include_once\",\n \"instanceof\",\n \"insteadof\",\n \"interface\",\n \"isset\",\n \"list\",\n \"match\",\n \"namespace\",\n \"new\",\n \"or\",\n \"print\",\n \"private\",\n \"protected\",\n \"public\",\n \"readonly\",\n \"require\",\n \"require_once\",\n \"return\",\n \"static\",\n \"switch\",\n \"throw\",\n \"trait\",\n \"try\",\n \"unset\",\n \"use\",\n \"var\",\n \"while\",\n \"xor\",\n \"yield\",\n \"yield_from\",\n \"__halt_compiler\"\n]);\n","import { Ternary } from \"@fern-api/browser-compatible-base-generator\";\n\nimport {\n Array as Array_,\n Attribute,\n Class,\n ClassInstantiation,\n ClassReference,\n CodeBlock,\n Enum,\n Field,\n Map,\n Method,\n MethodInvocation,\n Parameter,\n Trait\n} from \"./ast\";\nimport { AstNode } from \"./ast/core/AstNode\";\nimport { DataClass } from \"./ast/DataClass\";\nimport { MergeArrays } from \"./ast/MergeArrays\";\nimport { convertToPhpVariableName } from \"./ast/utils/convertToPhpVariableName\";\n\nexport function array(args: Array_.Args): Array_ {\n return new Array_(args);\n}\n\nexport function attribute(args: Attribute.Args): Attribute {\n return new Attribute(args);\n}\n\nexport function class_(args: Class.Args): Class {\n return new Class(args);\n}\n\nexport function trait(args: Trait.Args): Trait {\n return new Trait(args);\n}\n\nexport function classReference(args: ClassReference.Args): ClassReference {\n return new ClassReference(args);\n}\n\nexport function codeblock(arg: CodeBlock.Arg): CodeBlock {\n return new CodeBlock(arg);\n}\n\nexport function dataClass(args: DataClass.Args): DataClass {\n return new DataClass(args);\n}\n\nexport function enum_(args: Enum.Args): Enum {\n return new Enum(args);\n}\n\nexport function field(args: Field.Args): Field {\n return new Field(args);\n}\n\nexport function instantiateClass(args: ClassInstantiation.Args): ClassInstantiation {\n return new ClassInstantiation(args);\n}\n\nexport function invokeMethod(args: MethodInvocation.Args): MethodInvocation {\n return new MethodInvocation(args);\n}\n\nexport function throwException(args: ClassInstantiation.Args): AstNode {\n return codeblock((writer) => {\n writer.write(\"throw \");\n writer.writeNode(instantiateClass(args));\n });\n}\n\nexport function map(args: Map.Args): Map {\n return new Map(args);\n}\n\nexport function method(args: Method.Args): Method {\n return new Method(args);\n}\n\nexport function parameter(args: Parameter.Args): Parameter {\n return new Parameter(args);\n}\n\nexport function ternary(args: Ternary.Args): Ternary {\n return new Ternary(args);\n}\n\nexport function assignVariable(variableRef: AstNode, variableValue: string | AstNode): AstNode {\n return codeblock((writer) => {\n writer.writeNodeOrString(variableRef);\n writer.write(\" = \");\n writer.writeNodeOrString(variableValue);\n });\n}\n\nexport function variable(name: string): AstNode {\n return codeblock(convertToPhpVariableName(name));\n}\n\nexport function string(stringValue: string): AstNode {\n return codeblock(`\"${stringValue}\"`);\n}\n\nexport function mergeArrays(...args: MergeArrays.Args): MergeArrays {\n return new MergeArrays(args);\n}\n\n/**\n * Escapes a string for safe usage in PHP code (e.g., enum values, string literals).\n */\nexport function escapePhpString(str: string): string {\n return str\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/\"/g, '\\\\\"')\n .replace(/\\n/g, \"\\\\n\")\n .replace(/\\r/g, \"\\\\r\")\n .replace(/\\t/g, \"\\\\t\")\n .replace(/\\$/g, \"\\\\$\");\n}\n\nexport function this_(): AstNode {\n return new CodeBlock((writer) => {\n writer.write(\"$this\");\n });\n}\n\nexport {\n Access,\n Array,\n Attribute,\n Class,\n ClassInstantiation,\n ClassReference,\n CodeBlock,\n type ConstructorField,\n DataClass,\n Enum,\n Field,\n Map,\n Method,\n MethodInvocation,\n Parameter,\n Trait,\n Type,\n TypeLiteral,\n Writer\n} from \"./ast\";\nexport { AstNode } from \"./ast/core/AstNode\";\n","export { Access } from \"./Access\";\nexport { Array_ as Array } from \"./Array\";\nexport { Attribute } from \"./Attribute\";\nexport { Class } from \"./Class\";\nexport { ClassInstantiation } from \"./ClassInstantiation\";\nexport { ClassReference } from \"./ClassReference\";\nexport { CodeBlock } from \"./CodeBlock\";\nexport { SELF, STATIC } from \"./core/Constant\";\nexport { Writer } from \"./core/Writer\";\nexport { DataClass } from \"./DataClass\";\nexport { Enum } from \"./Enum\";\nexport { Field } from \"./Field\";\nexport { Map } from \"./Map\";\nexport { Method } from \"./Method\";\nexport { MethodInvocation } from \"./MethodInvocation\";\nexport { Parameter } from \"./Parameter\";\nexport { Trait } from \"./Trait\";\nexport { Type } from \"./Type\";\nexport { type ConstructorField, TypeLiteral } from \"./TypeLiteral\";\n","export type Access = \"public\" | \"public readonly\" | \"protected\" | \"private\";\n\nexport const Access = {\n Public: \"public\",\n PublicReadonly: \"public readonly\",\n Protected: \"protected\",\n Private: \"private\"\n} as const;\n","import { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\n\nexport declare namespace Array_ {\n interface Args {\n entries: AstNode[] | undefined;\n }\n}\n\nexport class Array_ extends AstNode {\n private entries: AstNode[];\n\n constructor({ entries }: Array_.Args) {\n super();\n this.entries = entries ?? [];\n }\n\n public write(writer: Writer): void {\n writer.write(\"[\");\n this.entries.forEach((entry, index) => {\n if (index > 0) {\n writer.write(\", \");\n }\n entry.write(writer);\n });\n writer.write(\"]\");\n }\n}\n","import { AbstractAstNode } from \"@fern-api/browser-compatible-base-generator\";\n\nimport { BasePhpCustomConfigSchema } from \"../../custom-config/BasePhpCustomConfigSchema\";\nimport { Writer } from \"./Writer\";\n\nexport abstract class AstNode extends AbstractAstNode {\n /**\n * Writes the node to a string.\n */\n public toString(param: {\n namespace: string;\n rootNamespace: string;\n customConfig: BasePhpCustomConfigSchema;\n skipImports?: boolean;\n }): string {\n if (param == null) {\n // You are likely implicitly calling toString() inside a string interpolation or concatenation.\n // Don't do this:\n // - astNode.toString()\n // - `${astNode}`\n // - \"Foo<\" + astNode + \">\"\n\n throw new Error(\"Internal error; AstNode.toString method called incorrectly.\");\n }\n const { namespace, rootNamespace, customConfig, skipImports = false } = param;\n\n const writer = new Writer({\n namespace,\n rootNamespace,\n customConfig\n });\n this.write(writer);\n return writer.toString(skipImports);\n }\n\n /**\n * Writes the node to a string.\n */\n public async toStringAsync({\n namespace,\n rootNamespace,\n customConfig\n }: {\n namespace: string;\n rootNamespace: string;\n customConfig: BasePhpCustomConfigSchema;\n }): Promise<string> {\n const writer = new Writer({\n namespace,\n rootNamespace,\n customConfig\n });\n this.write(writer);\n return writer.toString();\n }\n}\n","import { AbstractWriter } from \"@fern-api/browser-compatible-base-generator\";\n\nimport { BasePhpCustomConfigSchema } from \"../../custom-config/BasePhpCustomConfigSchema\";\nimport { ClassReference } from \"../ClassReference\";\nimport { GLOBAL_NAMESPACE } from \"./Constant\";\n\n/* A fully qualified type name _without_ the initial backslash */\ntype FullyQualifiedName = string;\n\ninterface ParsedFullyQualifiedName {\n namespace: string;\n name: string;\n}\n\nfunction parseFullyQualifiedName(rawFullyQualifiedName: string): ParsedFullyQualifiedName {\n return {\n namespace: rawFullyQualifiedName.substring(0, rawFullyQualifiedName.lastIndexOf(\"\\\\\")),\n name: rawFullyQualifiedName.substring(rawFullyQualifiedName.lastIndexOf(\"\\\\\") + 1)\n };\n}\n\nexport declare namespace Writer {\n interface Args {\n /* The namespace that is being written to */\n namespace: string;\n /* The root namespace of the project */\n rootNamespace: string;\n /* Custom generator config */\n customConfig: BasePhpCustomConfigSchema;\n }\n}\n\nexport class Writer extends AbstractWriter {\n /* The namespace that is being written to */\n public namespace: string;\n /* The root namespace of the project */\n public rootNamespace: string;\n /* Custom generator config */\n public customConfig: BasePhpCustomConfigSchema;\n\n /* Import statements */\n private references: Record<FullyQualifiedName, ClassReference[]> = {};\n\n constructor({ namespace, rootNamespace, customConfig }: Writer.Args) {\n super();\n this.namespace = namespace;\n this.rootNamespace = rootNamespace;\n this.customConfig = customConfig;\n }\n\n public addReference(reference: ClassReference): void {\n if (reference.namespace == null) {\n return;\n }\n\n // If there's a naming conflict, tell the reference to use its qualified name\n const conflictingReferences = Object.keys(this.references)\n // Filter out the current namespace.\n .filter((seenRef) => {\n const parsed = parseFullyQualifiedName(seenRef);\n return parsed.namespace !== reference.namespace && parsed.name === reference.name;\n });\n\n if (conflictingReferences.length > 0) {\n reference.requireFullyQualified();\n return;\n }\n\n const fullyQualifiedName =\n reference.namespace === GLOBAL_NAMESPACE ? reference.name : `${reference.namespace}\\\\${reference.name}`;\n const references = (this.references[fullyQualifiedName] ??= []);\n\n references.push(reference);\n }\n\n public toString(skipImports = false): string {\n if (skipImports) {\n return this.buffer;\n }\n\n const namespace = `namespace ${this.namespace};`;\n const imports = this.stringifyImports();\n if (imports.length > 0) {\n return `${namespace}\n\n${imports}\n\n${this.buffer}`;\n }\n return namespace + \"\\n\\n\" + this.buffer;\n }\n\n private stringifyImports(): string {\n const referenceKeys = Object.keys(this.references);\n if (referenceKeys.length === 0) {\n return \"\";\n }\n return (\n referenceKeys\n // Filter out the current namespace.\n .filter((reference) => parseFullyQualifiedName(reference).namespace !== this.namespace)\n .map((ref) => `use ${ref};`)\n .join(\"\\n\")\n );\n }\n}\n","import { ClassReference } from \"./ClassReference\";\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\n\nexport declare namespace Attribute {\n interface Args {\n /* Reference to the attribute class reference */\n reference: ClassReference;\n /* Arguments included in the attribute, if any */\n arguments?: (string | AstNode)[];\n }\n}\n\nexport class Attribute extends AstNode {\n private reference: ClassReference;\n private arguments: (string | AstNode)[];\n\n constructor(args: Attribute.Args) {\n super();\n this.reference = args.reference;\n this.arguments = args.arguments ?? [];\n }\n\n public write(writer: Writer): void {\n writer.addReference(this.reference);\n writer.write(`${this.reference.name}`);\n if (this.arguments.length > 0) {\n writer.write(\"(\");\n this.arguments.forEach((argument, index) => {\n if (index > 0) {\n writer.write(\",\");\n }\n if (typeof argument === \"string\") {\n writer.write(argument);\n } else {\n argument.write(writer);\n }\n });\n writer.write(\")\");\n }\n }\n}\n","import { Access } from \"./Access\";\nimport { ClassReference } from \"./ClassReference\";\nimport { CodeBlock } from \"./CodeBlock\";\nimport { Comment } from \"./Comment\";\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { Field } from \"./Field\";\nimport { Method } from \"./Method\";\nimport { Parameter } from \"./Parameter\";\nimport { orderByAccess } from \"./utils/orderByAccess\";\n\nexport declare namespace Class {\n interface Args {\n /* The name of the PHP# class */\n name: string;\n /* The namespace of the PHP class */\n namespace: string;\n /* Defaults to false */\n abstract?: boolean;\n /* Docs associated with the class */\n docs?: string;\n /* The class to inherit from if any */\n parentClassReference?: AstNode;\n /* The traits that this class uses, if any */\n traits?: ClassReference[];\n }\n\n interface Constructor {\n /* The parameters of the constructor */\n parameters: Parameter[];\n /* The access of the constructor */\n access?: Access;\n /* The body of the constructor */\n body?: CodeBlock;\n }\n}\n\nexport class Class extends AstNode {\n public readonly name: string;\n public readonly namespace: string;\n public readonly abstract: boolean;\n public readonly docs: string | undefined;\n public readonly parentClassReference: AstNode | undefined;\n public readonly traits: ClassReference[];\n\n public readonly fields: Field[] = [];\n public readonly methods: Method[] = [];\n private constructor_: Class.Constructor | undefined;\n\n constructor({ name, namespace, abstract, docs, parentClassReference, traits }: Class.Args) {\n super();\n this.name = name;\n this.namespace = namespace;\n this.abstract = abstract ?? false;\n this.docs = docs;\n this.parentClassReference = parentClassReference;\n this.traits = traits ?? [];\n }\n\n public addConstructor(constructor: Class.Constructor): void {\n this.constructor_ = constructor;\n }\n\n public addField(field: Field): void {\n this.fields.push(field);\n }\n\n public addMethod(method: Method): void {\n this.methods.push(method);\n }\n\n public addMethods(methods: Method[]): void {\n this.methods.push(...methods);\n }\n\n public addTrait(traitClassReference: ClassReference): void {\n this.traits.push(traitClassReference);\n }\n\n public write(writer: Writer): void {\n // required to fully de-conflict imports\n writer.addReference(new ClassReference({ name: this.name, namespace: this.namespace }));\n if (this.abstract) {\n writer.write(\"abstract \");\n }\n this.writeComment(writer);\n writer.write(`class ${this.name} `);\n if (this.parentClassReference != null) {\n writer.write(\"extends \");\n this.parentClassReference.write(writer);\n }\n writer.newLine();\n writer.writeLine(\"{\");\n writer.indent();\n if (this.traits.length > 0) {\n writer.write(\"use \");\n this.traits.forEach((trait, index) => {\n if (index > 0) {\n writer.write(\",\");\n }\n writer.writeNode(trait);\n });\n writer.writeTextStatement(\"\");\n writer.newLine();\n }\n\n this.writeFields({ writer, fields: orderByAccess(this.fields) });\n if (this.constructor != null || this.methods.length > 0) {\n writer.newLine();\n }\n\n if (this.constructor_ != null) {\n this.writeConstructor({ writer, constructor: this.constructor_ });\n if (this.methods.length > 0) {\n writer.newLine();\n }\n }\n\n this.writeMethods({ writer, methods: orderByAccess(this.methods) });\n\n writer.dedent();\n writer.writeLine(\"}\");\n return;\n }\n\n private writeComment(writer: Writer): void {\n if (this.docs == null) {\n return undefined;\n }\n const comment = new Comment({ docs: this.docs });\n comment.write(writer);\n }\n\n private writeConstructor({ writer, constructor }: { writer: Writer; constructor: Class.Constructor }): void {\n this.writeConstructorComment({ writer, constructor });\n if (constructor.access != null) {\n writer.write(`${constructor.access} `);\n }\n writer.write(\"function __construct(\");\n writer.indent();\n constructor.parameters.forEach((parameter, index) => {\n if (index === 0) {\n writer.newLine();\n }\n parameter.write(writer);\n writer.writeLine(\",\");\n });\n writer.dedent();\n writer.writeLine(\")\");\n writer.writeLine(\"{\");\n writer.indent();\n constructor.body?.write(writer);\n writer.writeNewLineIfLastLineNot();\n writer.dedent();\n writer.writeLine(\"}\");\n }\n\n private writeConstructorComment({ writer, constructor }: { writer: Writer; constructor: Class.Constructor }): void {\n if (constructor.parameters.length === 0) {\n return;\n }\n const comment = new Comment();\n for (const parameter of constructor.parameters) {\n comment.addTag(parameter.getCommentTag());\n }\n comment.write(writer);\n }\n\n private writeFields({ writer, fields }: { writer: Writer; fields: Field[] }): void {\n fields\n .filter((field) => !field.inherited)\n .forEach((field, index) => {\n if (index > 0) {\n writer.newLine();\n }\n field.write(writer);\n writer.writeNewLineIfLastLineNot();\n });\n }\n\n private writeMethods({ writer, methods }: { writer: Writer; methods: Method[] }): void {\n methods.forEach((method, index) => {\n if (index > 0) {\n writer.newLine();\n }\n method.write(writer);\n writer.writeNewLineIfLastLineNot();\n });\n }\n}\n","import { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { Type } from \"./Type\";\n\nexport declare namespace ClassReference {\n interface Args {\n /* The name of the PHP class */\n name: string;\n /* The namespace of the PHP class */\n namespace: string;\n generics?: Type[];\n }\n}\n\nexport class ClassReference extends AstNode {\n public readonly name: string;\n public readonly namespace: string;\n public readonly generics?: Type[];\n private fullyQualified: boolean;\n\n constructor({ name, namespace, generics }: ClassReference.Args) {\n super();\n this.name = name;\n this.namespace = namespace;\n this.generics = generics;\n this.fullyQualified = false;\n }\n\n public requireFullyQualified(): void {\n this.fullyQualified = true;\n }\n\n public write(writer: Writer): void {\n writer.addReference(this);\n const refString = this.fullyQualified ? `\\\\${this.namespace}\\\\${this.name}` : this.name;\n writer.write(`${refString}`);\n }\n}\n","import { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { Type } from \"./Type\";\nimport { convertToPhpVariableName } from \"./utils/convertToPhpVariableName\";\n\nexport type TagType = \"param\" | \"property\" | \"return\" | \"throws\" | \"var\";\n\nexport const TagType = {\n Param: \"param\",\n Property: \"property\",\n Returns: \"return\",\n Throws: \"throws\",\n Var: \"var\"\n} as const;\n\nexport declare namespace Comment {\n interface Args {\n /* The preface docs of the comment, if any */\n docs?: string;\n }\n\n interface Tag {\n /* The type of the comment tag (e.g. @param) */\n tagType: TagType;\n /* The type included in the @<tag> comment */\n type: Type;\n /* The name of the variable in the @<tag> comment, if any */\n name?: string;\n /* The in-line docs associated with the type, if any */\n docs?: string;\n }\n}\n\nexport class Comment extends AstNode {\n public readonly docs: string | undefined;\n\n private tags: Comment.Tag[] = [];\n\n constructor({ docs }: Comment.Args = {}) {\n super();\n this.docs = docs;\n }\n\n public addTag(tag: Comment.Tag): void {\n this.tags.push({\n ...tag,\n name: tag.name != null ? convertToPhpVariableName(tag.name) : undefined\n });\n }\n\n public write(writer: Writer): void {\n writer.writeLine(\"/**\");\n if (this.docs != null) {\n this.docs.split(\"\\n\").forEach((line) => {\n writer.writeLine(` * ${line}`);\n });\n if (this.tags.length > 0) {\n writer.writeLine(\" *\");\n }\n }\n for (const tag of this.tags) {\n this.writeTag({ writer, tag });\n }\n writer.writeLine(\" */\");\n }\n\n private writeTag({ writer, tag }: { writer: Writer; tag: Comment.Tag }): void {\n const docsSplit = tag.docs != null ? tag.docs.split(\"\\n\") : undefined;\n if (docsSplit != null && docsSplit.length > 1) {\n docsSplit.forEach((line) => {\n writer.writeLine(` * ${line}`);\n });\n writer.writeLine(\" *\");\n }\n\n writer.write(` * @${tag.tagType} `);\n tag.type.write(writer, { comment: true });\n if (tag.name != null) {\n writer.write(` ${tag.name}`);\n }\n\n if (docsSplit != null && docsSplit.length === 1) {\n writer.write(` ${docsSplit[0]}`);\n }\n\n writer.newLine();\n }\n}\n","/**\n * Converts the the given name into a valid PHP variable name\n * (i.e. it includes the required '$' prefix).\n */\nexport function convertToPhpVariableName(name: string): string {\n if (name.startsWith(\"$\")) {\n return name;\n }\n return `$${name}`;\n}\n","import { Access } from \"../Access\";\n\ninterface Accessible {\n access: Access;\n}\n\nexport function orderByAccess<T extends Accessible>(items: T[]): T[] {\n return _orderByAccess(items, [Access.Public, Access.PublicReadonly, Access.Protected, Access.Private]);\n}\n\nfunction _orderByAccess<T extends Accessible>(items: T[], order: Access[]): T[] {\n return order.reduce<T[]>((result, access) => [...result, ...items.filter((item) => item.access === access)], []);\n}\n","import { Arguments } from \"@fern-api/browser-compatible-base-generator\";\n\nimport { ClassReference } from \"./ClassReference\";\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { writeArguments } from \"./utils/writeArguments\";\n\nexport declare namespace ClassInstantiation {\n interface Args {\n /* The class reference to instantiate */\n classReference: ClassReference;\n /* The arguments passed into the class constructor */\n arguments_: Arguments;\n /* Write the instantiation across multiple lines */\n multiline?: boolean;\n }\n}\n\nexport class ClassInstantiation extends AstNode {\n public readonly classReference: ClassReference;\n public readonly arguments_: Arguments;\n private multiline: boolean;\n\n constructor({ classReference, arguments_, multiline }: ClassInstantiation.Args) {\n super();\n this.classReference = classReference;\n this.arguments_ = arguments_;\n this.multiline = multiline ?? false;\n }\n\n public write(writer: Writer): void {\n writer.write(\"new \");\n writer.writeNode(this.classReference);\n writeArguments({ writer, arguments_: this.arguments_, multiline: this.multiline });\n }\n}\n","import { Argument, Arguments, isNamedArgument } from \"@fern-api/browser-compatible-base-generator\";\n\nimport { Writer } from \"../core/Writer\";\n\nexport function writeArguments({\n writer,\n arguments_,\n multiline\n}: {\n writer: Writer;\n arguments_: Arguments;\n multiline?: boolean;\n}): void {\n if (arguments_.length === 0) {\n writer.write(\"()\");\n return;\n }\n if (multiline) {\n writeMultiline({ writer, arguments_ });\n return;\n }\n writeCompact({ writer, arguments_ });\n}\n\nfunction writeMultiline({ writer, arguments_ }: { writer: Writer; arguments_: Arguments }): void {\n writer.writeLine(\"(\");\n writer.indent();\n for (const argument of arguments_) {\n writeArgument({ writer, argument, writeCompact: false });\n writer.writeLine(\",\");\n }\n writer.dedent();\n writer.write(\")\");\n}\n\nfunction writeCompact({ writer, arguments_ }: { writer: Writer; arguments_: Arguments }): void {\n writer.write(\"(\");\n arguments_.forEach((argument, index) => {\n if (index > 0) {\n writer.write(\", \");\n }\n writeArgument({ writer, argument, writeCompact: true });\n });\n writer.write(\")\");\n}\n\nfunction writeArgument({\n writer,\n argument,\n writeCompact\n}: {\n writer: Writer;\n argument: Argument;\n writeCompact: boolean;\n}): void {\n if (isNamedArgument(argument)) {\n if (argument.docs) {\n if (writeCompact) {\n writer.write(`/* ${argument.docs} */ `);\n } else {\n writer.writeLine(`/* ${argument.docs} */`);\n }\n }\n writer.write(`${argument.name}: `);\n writer.writeNodeOrString(argument.assignment);\n } else {\n argument.write(writer);\n }\n}\n","import { CodeBlock as CommonCodeBlock } from \"@fern-api/browser-compatible-base-generator\";\n\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\n\nexport declare namespace CodeBlock {\n /* Write arbitrary code */\n type Arg = CommonCodeBlock.Arg<Writer>;\n}\n\nexport class CodeBlock extends AstNode {\n private arg: CodeBlock.Arg;\n\n public constructor(arg: CodeBlock.Arg) {\n super();\n this.arg = arg;\n }\n\n public write(writer: Writer): void {\n const commonCodeBlock = new CommonCodeBlock(this.arg);\n return commonCodeBlock.write(writer);\n }\n}\n","import { php } from \"..\";\nimport { Access, ClassReference } from \"../php\";\nimport { Class } from \"./Class\";\nimport { CodeBlock } from \"./CodeBlock\";\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { Field } from \"./Field\";\nimport { Method } from \"./Method\";\nimport { Parameter } from \"./Parameter\";\nimport { Type } from \"./Type\";\nimport { convertFromPhpVariableName } from \"./utils/convertFromPhpVariableName\";\nimport { orderByAccess } from \"./utils/orderByAccess\";\n\nconst CONSTRUCTOR_PARAMETER_NAME = \"values\";\n\nexport declare namespace DataClass {\n interface Args extends Class.Args {\n constructorAccess?: Access;\n }\n}\n\nexport class DataClass extends AstNode {\n public readonly name: string;\n public readonly namespace: string;\n private readonly constructorAccess: Access;\n private class_: Class;\n\n constructor({ name, namespace, abstract, docs, parentClassReference, traits, constructorAccess }: DataClass.Args) {\n super();\n this.name = name;\n this.namespace = namespace;\n this.constructorAccess = constructorAccess ?? \"public\";\n this.class_ = new Class({ name, namespace, abstract, docs, parentClassReference, traits });\n }\n\n public addField(field: Field): void {\n this.class_.addField(field);\n }\n\n public addMethod(method: Method): void {\n this.class_.addMethod(method);\n }\n public addTrait(traitClassReference: ClassReference): void {\n this.class_.addTrait(traitClassReference);\n }\n\n public write(writer: Writer): void {\n const orderedFields = orderByAccess(this.class_.fields).map(\n (field) =>\n ({\n ...field,\n name: convertFromPhpVariableName(field.name)\n }) as Field\n );\n this.class_.addConstructor({\n access: this.constructorAccess,\n parameters: this.getConstructorParameters({ orderedFields }),\n body: php.codeblock((writer) => {\n if (orderedFields.length > 0) {\n for (const field of orderedFields) {\n writer.write(`$this->${field.name} = $${CONSTRUCTOR_PARAMETER_NAME}['${field.name}']`);\n if (field.type.isOptional()) {\n writer.write(\" ?? null\");\n }\n writer.write(\";\");\n }\n } else {\n writer.writeLine(`unset($${CONSTRUCTOR_PARAMETER_NAME});`);\n }\n })\n });\n this.class_.write(writer);\n }\n\n private allFieldsAreOptional(): boolean {\n return this.class_.fields.every((field) => field.type.isOptional());\n }\n\n private getConstructorParameters({ orderedFields }: { orderedFields: Field[] }): Parameter[] {\n return [\n new Parameter({\n name: CONSTRUCTOR_PARAMETER_NAME,\n type: Type.typeDict(\n orderedFields.map((field) => ({\n key: field.name,\n valueType: field.type,\n optional: field.type.isOptional()\n })),\n {\n multiline: true\n }\n ),\n initializer: this.allFieldsAreOptional() ? new CodeBlock(\"[]\") : undefined\n })\n ];\n }\n}\n","import { Access } from \"./Access\";\nimport { CodeBlock } from \"./CodeBlock\";\nimport { Comment } from \"./Comment\";\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { Type } from \"./Type\";\nimport { convertToPhpVariableName } from \"./utils/convertToPhpVariableName\";\n\nexport declare namespace Parameter {\n interface Args {\n /* The name of the parameter */\n name: string;\n /* The type of the parameter */\n type: Type;\n /* Docs for the parameter */\n docs?: string;\n /* The initializer for the parameter */\n initializer?: CodeBlock;\n /* The access of the parameter */\n access?: Access;\n /* If the parameter is readonly */\n readonly_?: boolean;\n }\n}\n\nexport class Parameter extends AstNode {\n public readonly name: string;\n public readonly type: Type;\n public readonly docs: string | undefined;\n public readonly initializer: CodeBlock | undefined;\n public readonly access: Access | undefined;\n public readonly readonly_: boolean;\n\n constructor({ name, type, docs, initializer, access, readonly_ }: Parameter.Args) {\n super();\n this.name = convertToPhpVariableName(name);\n this.type = type;\n this.docs = docs;\n this.initializer = initializer;\n this.access = access;\n this.readonly_ = readonly_ ?? false;\n }\n\n public getCommentTag(): Comment.Tag {\n return {\n tagType: \"param\",\n type: this.type,\n name: this.name,\n docs: this.docs\n };\n }\n\n public write(writer: Writer): void {\n if (this.access != null) {\n writer.write(`${this.access} `);\n }\n if (this.readonly_) {\n writer.write(\"readonly \");\n }\n this.type.write(writer);\n writer.write(` ${this.name}`);\n if (this.initializer != null) {\n writer.write(\" = \");\n this.initializer.write(writer);\n } else if (this.type.isOptional()) {\n writer.write(\" = null\");\n }\n }\n}\n","import { assertNever } from \"@fern-api/core-utils\";\nimport { isEqual, uniqWith } from \"lodash-es\";\n\nimport { BasePhpCustomConfigSchema } from \"../custom-config/BasePhpCustomConfigSchema\";\nimport { ClassReference } from \"./ClassReference\";\nimport { AstNode } from \"./core/AstNode\";\nimport { GLOBAL_NAMESPACE } from \"./core/Constant\";\nimport { Writer } from \"./core/Writer\";\nimport { TypeLiteral } from \"./TypeLiteral\";\n\ntype InternalType =\n | Array_\n | Bool\n | Date\n | DateTime\n | EnumString\n | Float\n | Int\n | Map\n | Mixed\n | Null\n | Object_\n | Optional\n | Reference\n | String_\n | TypeDict\n | Union\n | Literal;\n\ninterface Int {\n type: \"int\";\n}\n\ninterface String_ {\n type: \"string\";\n}\n\ninterface Bool {\n type: \"bool\";\n}\n\ninterface Float {\n type: \"float\";\n}\n\ninterface Date {\n type: \"date\";\n}\n\ninterface DateTime {\n type: \"dateTime\";\n}\n\ninterface Null {\n type: \"null\";\n}\n\ninterface Mixed {\n type: \"mixed\";\n}\n\ninterface Object_ {\n type: \"object\";\n}\n\ninterface Array_ {\n type: \"array\";\n value: Type;\n}\n\ninterface Map {\n type: \"map\";\n keyType: Type;\n valueType: Type;\n}\n\ninterface TypeDict {\n type: \"typeDict\";\n entries: TypeDictEntry[];\n multiline?: boolean;\n}\n\ninterface Union {\n type: \"union\";\n types: Type[];\n}\n\ninterface TypeDictEntry {\n key: string;\n valueType: Type;\n optional?: boolean;\n}\n\ninterface Optional {\n type: \"optional\";\n value: Type;\n}\n\ninterface Reference {\n type: \"reference\";\n value: ClassReference;\n}\n\ninterface EnumString {\n type: \"enumString\";\n value: ClassReference;\n}\n\ntype LiteralString = TypeLiteral & {\n internalType: {\n type: \"string\";\n value: string;\n };\n};\n\ntype LiteralBoolean = TypeLiteral & {\n internalType: {\n type: \"boolean\";\n value: boolean;\n };\n};\n\ntype LiteralValue = LiteralString | LiteralBoolean;\n\ninterface Literal {\n type: \"literal\";\n value: LiteralValue;\n}\n\n/* A PHP parameter to a method */\nexport class Type extends AstNode {\n private constructor(public readonly internalType: InternalType) {\n super();\n }\n\n public write(writer: Writer, { comment }: { comment?: boolean } = {}): void {\n switch (this.internalType.type) {\n case \"int\":\n writer.write(\"int\");\n break;\n case \"string\":\n writer.write(\"string\");\n break;\n case \"bool\":\n writer.write(\"bool\");\n break;\n case \"float\":\n writer.write(\"float\");\n break;\n case \"date\":\n writer.addReference(DateTimeClassReference);\n writer.write(\"DateTime\");\n break;\n case \"dateTime\":\n writer.addReference(DateTimeClassReference);\n writer.write(\"DateTime\");\n break;\n case \"mixed\":\n writer.write(\"mixed\");\n break;\n case \"object\":\n writer.write(\"object\");\n break;\n case \"array\":\n if (!comment) {\n writer.write(\"array\");\n break;\n }\n writer.write(\"array<\");\n this.internalType.value.write(writer, { comment });\n writer.write(\">\");\n break;\n case \"map\": {\n if (!comment) {\n writer.write(\"array\");\n break;\n }\n writer.write(\"array<\");\n this.internalType.keyType.write(writer, { comment });\n writer.write(\", \");\n this.internalType.valueType.write(writer, { comment });\n writer.write(\">\");\n break;\n }\n case \"null\": {\n writer.write(\"null\");\n break;\n }\n case \"typeDict\": {\n if (!comment) {\n writer.write(\"array\");\n break;\n }\n if (this.internalType.multiline) {\n writer.writeLine(\"array{\");\n\n // NOTE: Put all required types before all optional parameters\n // since this is required by PHPStan\n const requiredTypes = this.internalType.entries.filter((entry) => !entry.valueType.isOptional());\n const optionalTypes = this.internalType.entries.filter((entry) => entry.valueType.isOptional());\n const orderedEntries = [...requiredTypes, ...optionalTypes];\n\n for (const entry of orderedEntries) {\n writer.write(\" * \");\n this.writeTypeDictEntry({ writer, entry, comment });\n writer.writeLine(\",\");\n }\n writer.write(\" * }\");\n break;\n }\n writer.write(\"array{\");\n this.internalType.entries.forEach((entry, index) => {\n if (index > 0) {\n writer.write(\", \");\n }\n this.writeTypeDictEntry({ writer, entry, comment });\n });\n writer.write(\"}\");\n break;\n }\n case \"union\": {\n this.writeUnion({ writer, unionTypes: this.internalType.types, comment });\n break;\n }\n case \"optional\": {\n const internalType = this.internalType.value.internalType;\n const isMixed = internalType.type === \"mixed\";\n const isUnion = internalType.type === \"union\";\n if (!isUnion && !isMixed) {\n writer.write(\"?\");\n }\n this.internalType.value.write(writer, { comment });\n if (isUnion && !this.unionHasOptional(internalType.types)) {\n writer.write(\"|\");\n writer.writeNode(Type.null());\n }\n break;\n }\n case \"reference\":\n if (comment) {\n writer.writeNode(this.internalType.value);\n const generics = this.internalType.value.generics;\n\n if (generics && generics.length > 0) {\n writer.write(\"<\");\n generics.forEach((generic, index) => {\n if (index > 0) {\n writer.write(\", \");\n }\n generic.write(writer, { comment });\n });\n writer.write(\">\");\n }\n } else {\n writer.writeNode(this.internalType.value);\n }\n break;\n case \"enumString\":\n if (comment) {\n writer.write(\"value-of<\");\n writer.writeNode(this.internalType.value);\n writer.write(\">\");\n } else {\n writer.write(\"string\");\n }\n break;\n case \"literal\":\n if (comment) {\n writer.writeNode(this.internalType.value);\n } else {\n switch (this.internalType.value.internalType.type) {\n case \"string\":\n writer.write(\"string\");\n break;\n case \"boolean\":\n writer.write(\"bool\");\n break;\n default:\n assertNever(this.internalType.value.internalType);\n }\n }\n break;\n default:\n assertNever(this.internalType);\n }\n }\n\n public toOptionalIfNotAlready(): Type {\n if (this.internalType.type === \"optional\") {\n return this;\n }\n return Type.optional(this);\n }\n\n public underlyingTypeIfOptional(): Type | undefined {\n if (this.internalType.type === \"optional\") {\n return this.internalType.value;\n }\n return undefined;\n }\n\n public underlyingType(): Type {\n return this.underlyingTypeIfOptional() ?? this;\n }\n\n public isOptional(): boolean {\n return this.internalType.type === \"optional\";\n }\n\n public getClassReference(): ClassReference {\n switch (this.internalType.type) {\n case \"date\":\n case \"dateTime\":\n return new ClassReference({\n name: \"DateTime\",\n namespace: GLOBAL_NAMESPACE\n });\n\n case \"enumString\":\n case \"reference\":\n return this.internalType.value;\n\n case \"int\":\n case \"string\":\n case \"bool\":\n case \"float\":\n case \"object\":\n case \"map\":\n case \"array\":\n case \"null\":\n case \"mixed\":\n case \"optional\":\n case \"typeDict\":\n case \"union\":\n case \"literal\":\n throw new Error(\"Cannot get class reference for \" + this.internalType.type);\n default:\n assertNever(this.internalType);\n }\n }\n\n /* Static factory methods for creating a Type */\n public static int(): Type {\n return new this({\n type: \"int\"\n });\n }\n\n public static string(): Type {\n return new this({\n type: \"string\"\n });\n }\n\n public static bool(): Type {\n return new this({\n type: \"bool\"\n });\n }\n\n public static float(): Type {\n return new this({\n type: \"float\"\n });\n }\n\n public static date(): Type {\n return new this({\n type: \"date\"\n });\n }\n\n public static dateTime(): Type {\n return new this({\n type: \"dateTime\"\n });\n }\n\n public static mixed(): Type {\n return new this({\n type: \"mixed\"\n });\n }\n\n public static object(): Type {\n return new this({\n type: \"object\"\n });\n }\n\n public static array(value: Type): Type {\n return new this({\n type: \"array\",\n value\n });\n }\n\n public static map(keyType: Type, valueType: Type): Type {\n return new this({\n type: \"map\",\n keyType,\n valueType\n });\n }\n\n public static typeDict(entries: TypeDictEntry[], { multiline }: { multiline?: boolean } = {}): Type {\n return new this({\n type: \"typeDict\",\n entries,\n multiline\n });\n }\n\n public static union(types: Type[]): Type {\n // Recursively flatten nested unions and deduplicate\n const flattenedTypes = this.flattenUnionTypes(types);\n\n // Deduplicate types to avoid duplicates like array|array\n const uniqueTypes = uniqWith(flattenedTypes, isEqual);\n\n return new this({\n type: \"union\",\n types: uniqueTypes\n });\n }\n\n private static flattenUnionTypes(types: Type[]): Type[] {\n const flattened: Type[] = [];\n\n for (const type of types) {\n if (type.internalType.type === \"union\") {\n // Recursively flatten nested unions\n flattened.push(...this.flattenUnionTypes(type.internalType.types));\n } else {\n flattened.push(type);\n }\n }\n\n return flattened;\n }\n\n public static optional(value: Type): Type {\n // Avoids double optional.\n if (this.isAlreadyOptional(value)) {\n return value;\n }\n return new this({\n type: \"optional\",\n value\n });\n }\n\n public static null(): Type {\n return new this({\n type: \"null\"\n });\n }\n\n public static reference(value: ClassReference): Type {\n return new this({\n type: \"reference\",\n value\n });\n }\n\n public static enumString(value: ClassReference): Type {\n return new this({\n type: \"enumString\",\n value\n });\n }\n\n public static literalString(value: string): Type {\n return new this({\n type: \"literal\",\n value: TypeLiteral.string(value) as LiteralString\n });\n }\n\n public static literalBoolean(value: boolean): Type {\n return new this({\n type: \"literal\",\n value: TypeLiteral.boolean(value) as LiteralBoolean\n });\n }\n\n private static isAlreadyOptional(value: Type) {\n return value.internalType.type === \"optional\";\n }\n\n private writeUnion({\n writer,\n unionTypes,\n comment\n }: {\n writer: Writer;\n unionTypes: Type[];\n comment: boolean | undefined;\n }): void {\n const uniqueTypes = this.getUniqueTypes({ types: unionTypes, comment, writer });\n const types = this.unwrapOptionalTypes(uniqueTypes);\n\n const hasMixed = types.filter((type) => type.underlyingType().internalType.type === \"mixed\").length > 0;\n if (hasMixed && !comment) {\n writer.write(\"mixed\");\n return;\n }\n\n if (types.length > 0 && comment) {\n writer.writeLine(\"(\");\n types.forEach((type, index) => {\n if (index > 0) {\n writer.write(\" * |\");\n } else {\n writer.write(\" * \");\n }\n if (hasMixed) {\n type = type.underlyingType();\n }\n type.write(writer, { comment });\n writer.writeLine();\n index++;\n });\n writer.write(\" * )\");\n return;\n }\n\n types.forEach((type, index) => {\n if (index > 0) {\n writer.write(\"|\");\n }\n if (hasMixed) {\n type = type.underlyingType();\n }\n type.write(writer, { comment });\n index++;\n });\n }\n\n private writeTypeDictEntry({\n writer,\n entry,\n comment\n }: {\n writer: Writer;\n entry: TypeDictEntry;\n comment?: boolean;\n }) {\n writer.write(entry.key);\n if (entry.optional) {\n writer.write(\"?\");\n }\n writer.write(\": \");\n entry.valueType.write(writer, { comment });\n }\n\n private getUniqueTypes({\n writer,\n types,\n comment\n }: {\n writer: Writer;\n types: Type[];\n comment: boolean | undefined;\n }): Type[] {\n // First, do semantic deduplication using lodash isEqual\n const semanticallyUnique = uniqWith(types, isEqual);\n\n // Then, do string-based deduplication for cases where different semantic types\n // render to the same string (e.g., array<string,mixed> and array<Recipient> both become \"array\")\n const typeStrings = new Set();\n return semanticallyUnique.filter((type) => {\n const typeString = type.toString({\n namespace: writer.namespace,\n rootNamespace: writer.rootNamespace,\n customConfig: writer.customConfig,\n comment\n });\n\n // Handle potential duplicates, such as strings (due to enums) and arrays.\n if (typeStrings.has(typeString)) {\n return false;\n }\n typeStrings.add(typeString);\n return true;\n });\n }\n\n /**\n * Unwraps optional types and adds the 'null' type if there are any optional types.\n */\n private unwrapOptionalTypes(types: Type[]): Type[] {\n let hasOptional = false;\n const result = types.map((type) => {\n if (type.internalType.type === \"optional\") {\n hasOptional = true;\n return type.internalType.value;\n }\n return type;\n });\n if (hasOptional) {\n result.push(Type.null());\n }\n return result;\n }\n\n /**\n * Determines if the union has one or more optional types.\n */\n private unionHasOptional(types: Type[]): boolean {\n return types.filter((type) => type.internalType.type === \"optional\").length > 0;\n }\n\n /**\n * Writes the type to a string.\n */\n public toString({\n namespace,\n rootNamespace,\n customConfig,\n comment\n }: {\n namespace: string;\n rootNamespace: string;\n customConfig: BasePhpCustomConfigSchema;\n comment?: boolean;\n }): string {\n const writer = new Writer({\n namespace,\n rootNamespace,\n customConfig\n });\n this.write(writer, { comment: comment ?? false });\n return writer.toString();\n }\n}\n\nexport const DateTimeClassReference = new ClassReference({\n namespace: GLOBAL_NAMESPACE,\n name: \"DateTime\"\n});\n","import { assertNever } from \"@fern-api/core-utils\";\n\nimport { ClassInstantiation } from \"./ClassInstantiation\";\nimport { ClassReference } from \"./ClassReference\";\nimport { CodeBlock } from \"./CodeBlock\";\nimport { AstNode, Writer } from \"./core\";\nimport { MethodInvocation } from \"./MethodInvocation\";\n\ntype InternalTypeLiteral =\n | Boolean_\n | Class_\n | DateTime\n | File\n | Float\n | List\n | Map\n | Number_\n | Reference\n | String_\n | Unknown_\n | Null_\n | Nop;\n\ninterface Boolean_ {\n type: \"boolean\";\n value: boolean;\n}\n\ninterface Class_ {\n type: \"class\";\n reference: ClassReference;\n fields: ConstructorField[];\n}\n\nexport interface ConstructorField {\n name: string;\n value: TypeLiteral;\n}\n\ninterface DateTime {\n type: \"datetime\";\n value: string;\n}\n\ninterface File {\n type: \"file\";\n value: string;\n}\n\ninterface Float {\n type: \"float\";\n value: number;\n}\n\ninterface List {\n type: \"list\";\n values: TypeLiteral[];\n}\n\ninterface Map {\n type: \"map\";\n entries: MapEntry[];\n}\n\ninterface MapEntry {\n key: TypeLiteral;\n value: TypeLiteral;\n}\n\ninterface Number_ {\n type: \"number\";\n value: number;\n}\n\ninterface Reference {\n type: \"reference\";\n value: AstNode;\n}\n\ninterface String_ {\n type: \"string\";\n value: string;\n}\n\ninterface Unknown_ {\n type: \"unknown\";\n value: unknown;\n}\n\ninterface Null_ {\n type: \"null\";\n}\n\ninterface Nop {\n type: \"nop\";\n}\n\nexport class TypeLiteral extends AstNode {\n private constructor(public readonly internalType: InternalTypeLiteral) {\n super();\n }\n\n public write(writer: Writer): void {\n switch (this.internalType.type) {\n case \"list\": {\n this.writeList({ writer, list: this.internalType });\n break;\n }\n case \"boolean\": {\n writer.write(this.internalType.value.toString());\n break;\n }\n case \"class\": {\n this.writeClass({ writer, class_: this.internalType });\n break;\n }\n case \"file\": {\n writer.writeNode(buildFileFromString({ writer, value: this.internalType.value }));\n break;\n }\n case \"float\": {\n writer.write(this.internalType.value.toString());\n break;\n }\n case \"number\": {\n writer.write(this.internalType.value.toString());\n break;\n }\n case \"map\": {\n this.writeMap({ writer, map: this.internalType });\n break;\n }\n case \"reference\": {\n writer.writeNode(this.internalType.value);\n break;\n }\n case \"datetime\": {\n writer.writeNode(buildDateTimeFromString({ writer, value: this.internalType.value }));\n break;\n }\n case \"string\": {\n if (this.internalType.value.includes(\"\\n\")) {\n this.writeStringWithHeredoc({ writer, value: this.internalType.value });\n break;\n }\n if (this.internalType.value.includes(\"'\")) {\n writer.write(`\"${this.internalType.value.replaceAll('\"', '\\\\\"')}\"`);\n break;\n }\n writer.write(`'${this.internalType.value}'`);\n break;\n }\n case \"unknown\": {\n this.writeUnknown({ writer, value: this.internalType.value });\n break;\n }\n case \"null\": {\n writer.write(\"null\");\n break;\n }\n case \"nop\":\n break;\n default:\n assertNever(this.internalType);\n }\n }\n\n public isClass(): this is Class_ {\n return (this.internalType as Class_).type === \"class\";\n }\n\n public asClassOrThrow(): Class_ {\n if (this.isClass()) {\n return this.internalType as Class_;\n }\n throw new Error(\"Internal error; ts.TypeLiteral is not a class\");\n }\n\n private writeStringWithHeredoc({ writer, value }: { writer: Writer; value: string }): void {\n writer.writeLine(\"<<<EOT\");\n writer.writeNoIndent(value);\n writer.newLine();\n writer.writeNoIndent(\"EOT\");\n }\n\n private writeClass({ writer, class_: class_ }: { writer: Writer; class_: Class_ }): void {\n writer.writeNode(\n new ClassInstantiation({\n classReference: class_.reference,\n arguments_: [\n TypeLiteral.map({\n entries: class_.fields.map((field) => ({\n key: TypeLiteral.string(field.name),\n value: field.value\n }))\n })\n ]\n })\n );\n }\n\n private writeList({ writer, list }: { writer: Writer; list: List }): void {\n const values = filterNopValues({ values: list.values });\n if (values.length === 0) {\n writer.write(\"[]\");\n return;\n }\n\n writer.writeLine(\"[\");\n writer.indent();\n for (const value of values) {\n value.write(writer);\n writer.writeLine(\",\");\n }\n writer.dedent();\n writer.write(\"]\");\n }\n\n private writeMap({ writer, map }: { writer: Writer; map: Map }): void {\n const entries = filterNopMapEntries({ entries: map.entries });\n if (entries.length === 0) {\n writer.write(\"[]\");\n return;\n }\n\n writer.writeLine(\"[\");\n writer.indent();\n for (const entry of entries) {\n entry.key.write(writer);\n writer.write(\" => \");\n entry.value.write(writer);\n writer.writeLine(\",\");\n }\n writer.dedent();\n writer.write(\"]\");\n }\n\n /* Static factory methods for creating a TypeLiteral */\n public static list({ values }: { values: TypeLiteral[] }): TypeLiteral {\n return new this({\n type: \"list\",\n values\n });\n }\n\n public static boolean(value: boolean): TypeLiteral {\n return new this({ type: \"boolean\", value });\n }\n\n public static class_({\n reference,\n fields\n }: {\n reference: ClassReference;\n fields: ConstructorField[];\n }): TypeLiteral {\n return new this({ type: \"class\", reference, fields });\n }\n\n public static file(value: string): TypeLiteral {\n return new this({ type: \"file\", value });\n }\n\n public static float(value: number): TypeLiteral {\n return new this({ type: \"float\", value });\n }\n\n public static datetime(value: string): TypeLiteral {\n return new this({ type: \"datetime\", value });\n }\n\n public static number(value: number): TypeLiteral {\n return new this({ type: \"number\", value });\n }\n\n public static map({ entries }: { entries: MapEntry[] }): TypeLiteral {\n return new this({\n type: \"map\",\n entries\n });\n }\n\n public static reference(value: AstNode): TypeLiteral {\n return new this({\n type: \"reference\",\n value\n });\n }\n\n public static string(value: string): TypeLiteral {\n return new this({\n type: \"string\",\n value\n });\n }\n\n public static unknown(value: unknown): TypeLiteral {\n return new this({ type: \"unknown\", value });\n }\n\n public static null(): TypeLiteral {\n return new this({ type: \"null\" });\n }\n\n public static nop(): TypeLiteral {\n return new this({ type: \"nop\" });\n }\n\n public static isNop(typeLiteral: TypeLiteral): boolean {\n return typeLiteral.internalType.type === \"nop\";\n }\n\n private writeUnknown({ writer, value }: { writer: Writer; value: unknown }): void {\n switch (typeof value) {\n case \"boolean\":\n writer.write(value.toString());\n return;\n case \"string\":\n writer.write(value.includes('\"') ? `\\`${value}\\`` : `\"${value}\"`);\n return;\n case \"number\":\n writer.write(value.toString());\n return;\n case \"object\":\n if (value == null) {\n writer.write(\"null\");\n return;\n }\n if (Array.isArray(value)) {\n this.writeUnknownArray({ writer, value });\n return;\n }\n this.writeUnknownMap({ writer, value });\n return;\n default:\n throw new Error(`Internal error; unsupported unknown type: ${typeof value}`);\n }\n }\n\n private writeUnknownArray({\n writer,\n value\n }: {\n writer: Writer;\n // biome-ignore lint/suspicious/noExplicitAny: allow\n value: any[];\n }): void {\n if (value.length === 0) {\n writer.write(\"[]\");\n return;\n }\n writer.writeLine(\"[\");\n writer.indent();\n for (const element of value) {\n writer.writeNode(TypeLiteral.unknown(element));\n writer.writeLine(\",\");\n }\n writer.dedent();\n writer.write(\"]\");\n }\n\n private writeUnknownMap({ writer, value }: { writer: Writer; value: object }): void {\n const entries = Object.entries(value);\n if (entries.length === 0) {\n writer.write(\"[]\");\n return;\n }\n writer.writeLine(\"[\");\n writer.indent();\n for (const [key, val] of entries) {\n writer.write(`'${key}' => `);\n writer.writeNode(TypeLiteral.unknown(val));\n writer.writeLine(\",\");\n }\n writer.dedent();\n writer.write(\"]\");\n }\n}\n\nfunction buildDateTimeFromString({ writer, value }: { writer: Writer; value: string }): ClassInstantiation {\n return new ClassInstantiation({\n classReference: new ClassReference({\n name: \"DateTime\",\n namespace: \"\"\n }),\n arguments_: [new CodeBlock(`'${value}'`)]\n });\n}\nfunction buildFileFromString({ writer, value }: { writer: Writer; value: string }): MethodInvocation {\n return new MethodInvocation({\n on: new ClassReference({\n name: \"File\",\n namespace: `${writer.rootNamespace}\\\\Utils`\n }),\n method: \"createFromString\",\n arguments_: [new CodeBlock(`\"${value}\"`)]\n });\n}\n\nfunction filterNopMapEntries({ entries }: { entries: MapEntry[] }): MapEntry[] {\n return entries.filter((entry) => !TypeLiteral.isNop(entry.key) && !TypeLiteral.isNop(entry.value));\n}\n\nfunction filterNopValues({ values }: { values: TypeLiteral[] }): TypeLiteral[] {\n return values.filter((value) => !TypeLiteral.isNop(value));\n}\n","export { AstNode } from \"./AstNode\";\nexport { GLOBAL_NAMESPACE, SELF, STATIC } from \"./Constant\";\nexport { Writer } from \"./Writer\";\n","import { Arguments } from \"@fern-api/browser-compatible-base-generator\";\n\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { writeArguments } from \"./utils/writeArguments\";\n\nexport declare namespace MethodInvocation {\n interface Args {\n /* The method to invoke */\n method: string;\n /* The arguments passed to the method */\n arguments_: Arguments;\n /* In the event of an instance method, you'll want to invoke it on said instance */\n on?: AstNode;\n /* If the method is static */\n static_?: boolean;\n /* Write the invocation across multiple lines */\n multiline?: boolean;\n }\n}\n\nexport class MethodInvocation extends AstNode {\n private method: string;\n private arguments_: Arguments;\n private multiline: boolean;\n private static_: boolean;\n private on: AstNode | undefined;\n\n constructor({ method, arguments_, static_, multiline, on }: MethodInvocation.Args) {\n super();\n\n this.method = method;\n this.arguments_ = arguments_;\n this.static_ = static_ ?? false;\n this.multiline = multiline ?? false;\n this.on = on;\n }\n\n public write(writer: Writer): void {\n if (this.on != null) {\n this.on.write(writer);\n writer.write(this.getMethodAccessor());\n }\n writer.write(this.method);\n writeArguments({ writer, arguments_: this.arguments_, multiline: this.multiline });\n }\n\n private getMethodAccessor(): string {\n return this.static_ ? \"::\" : \"->\";\n }\n}\n","/**\n * Converts the the given name from its PHP variable name\n * (i.e. it removes the '$' prefix, if any).\n */\nexport function convertFromPhpVariableName(name: string): string {\n return name.startsWith(\"$\") ? name.slice(1) : name;\n}\n","import { escapePhpString } from \"../php\";\nimport { ClassReference } from \"./ClassReference\";\nimport { CodeBlock } from \"./CodeBlock\";\nimport { Comment } from \"./Comment\";\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { Method } from \"./Method\";\nimport { Type } from \"./Type\";\n\nexport declare namespace Enum {\n interface Args {\n /* The name of the PHP enum */\n name: string;\n /* The namespace of the PHP enum*/\n namespace: string;\n /* If present, specifies that the enum is backed by this type */\n backing?: \"string\" | \"int\";\n /* Docs associated with the class */\n docs?: string;\n /* Whether the class should implement the JsonSerializable interface */\n serializable?: boolean;\n }\n\n interface Member {\n /* The name of the enum field */\n name: string;\n /* The value of the enum field */\n value?: string | number;\n }\n}\n\nexport class Enum extends AstNode {\n public readonly name: string;\n public readonly namespace: string;\n public readonly backing: \"string\" | \"int\" | undefined;\n public readonly docs: string | undefined;\n public readonly members: Enum.Member[] = [];\n public readonly serializable: boolean;\n\n constructor({ name, namespace, backing, docs, serializable }: Enum.Args) {\n super();\n this.name = name;\n this.namespace = namespace;\n this.backing = backing;\n this.docs = docs;\n this.serializable = serializable ?? false;\n }\n\n public addMember(member: Enum.Member): void {\n this.members.push(member);\n }\n\n public write(writer: Writer): void {\n this.writeComment(writer);\n writer.write(\"enum \");\n writer.writeLine(`${this.name}`);\n if (this.backing != null) {\n writer.write(` : ${this.backing}`);\n }\n if (this.serializable) {\n writer.addReference(\n new ClassReference({\n name: \"JsonSerializable\",\n namespace: \"\"\n })\n );\n writer.writeLine(\" implements JsonSerializable\");\n }\n writer.writeLine(\" {\");\n writer.indent();\n for (const member of this.members) {\n writer.write(`case ${member.name}`);\n if (member.value != null) {\n if (typeof member.value === \"string\") {\n // Use escapePhpString to escape the string value\n const escapedValue = escapePhpString(member.value);\n writer.write(` = \"${escapedValue}\"`);\n } else {\n writer.write(` = ${member.value}`);\n }\n }\n writer.writeTextStatement(\"\");\n }\n if (this.serializable) {\n writer.newLine();\n writer.writeNode(\n new Method({\n name: \"jsonSerialize\",\n return_: Type.string(),\n access: \"public\",\n parameters: [],\n body: new CodeBlock(\"return $this->value;\")\n })\n );\n }\n writer.writeNewLineIfLastLineNot();\n writer.dedent();\n writer.writeLine(\"}\");\n }\n\n public writeComment(writer: Writer): void {\n if (this.docs == null) {\n return undefined;\n }\n const comment = new Comment({ docs: this.docs });\n comment.write(writer);\n }\n}\n","import { Access } from \"./Access\";\nimport { ClassReference } from \"./ClassReference\";\nimport { CodeBlock } from \"./CodeBlock\";\nimport { Comment } from \"./Comment\";\nimport { AstNode } from \"./core/AstNode\";\nimport { SELF, STATIC } from \"./core/Constant\";\nimport { Writer } from \"./core/Writer\";\nimport { Parameter } from \"./Parameter\";\nimport { Type } from \"./Type\";\n\nexport declare namespace Method {\n interface Args {\n /* The name of the method */\n name: string;\n /* The access of the method */\n access: Access;\n /* The parameters of the method */\n parameters: Parameter[];\n /* The exceptions that can be thrown, if any */\n throws?: ClassReference[];\n /* The return type of the method */\n return_?: Type | typeof STATIC | typeof SELF;\n /* The body of the method */\n body?: CodeBlock;\n /* Documentation for the method */\n docs?: string;\n /* The class this method belongs to, if any */\n classReference?: ClassReference;\n /* Whether this method is static */\n static_?: boolean;\n }\n}\n\nexport class Method extends AstNode {\n public readonly name: string;\n public readonly access: Access;\n public readonly parameters: Parameter[];\n public readonly throws: ClassReference[];\n public readonly return_: Type | typeof STATIC | typeof SELF | undefined;\n public readonly body: CodeBlock | undefined;\n public readonly docs: string | undefined;\n public readonly classReference: ClassReference | undefined;\n public readonly static_: boolean;\n\n constructor({ name, access, parameters, throws, return_, body, docs, classReference, static_ }: Method.Args) {\n super();\n this.name = name;\n this.access = access;\n this.parameters = parameters;\n this.throws = throws ?? [];\n this.return_ = return_;\n this.body = body;\n this.docs = docs;\n this.classReference = classReference;\n this.static_ = static_ ?? false;\n }\n\n public write(writer: Writer): void {\n this.writeComment(writer);\n writer.write(`${this.access}${this.static_ ? \" static\" : \"\"} function ${this.name}(`);\n\n // NOTE: Put all required parameters before all optional parameters\n // since this is required by PHPStan\n const requiredParameters = this.parameters.filter((param) => !param.type.isOptional());\n const optionalParameters = this.parameters.filter((param) => param.type.isOptional());\n\n const orderedParameters = [...requiredParameters, ...optionalParameters];\n\n orderedParameters.forEach((parameter, index) => {\n if (index > 0) {\n writer.write(\", \");\n }\n parameter.write(writer);\n });\n writer.write(\"): \");\n if (this.return_ != null) {\n writer.writeNodeOrString(this.return_);\n } else {\n writer.write(\"void\");\n }\n writer.writeLine(\" {\");\n\n writer.indent();\n this.body?.write(writer);\n writer.dedent();\n\n writer.writeLine(\"}\");\n }\n\n private writeComment(writer: Writer): void {\n const comment = new Comment({ docs: this.docs });\n for (const parameter of this.parameters) {\n comment.addTag({\n tagType: \"param\",\n type: parameter.type,\n name: parameter.name,\n docs: parameter.docs\n });\n }\n if (this.return_ != null && this.return_ !== SELF && this.return_ !== STATIC) {\n comment.addTag({\n tagType: \"return\",\n type: this.return_\n });\n }\n for (const throw_ of this.throws) {\n comment.addTag({\n tagType: \"throws\",\n type: Type.reference(throw_)\n });\n }\n writer.writeNode(comment);\n }\n}\n","import { Access } from \"./Access\";\nimport { Attribute } from \"./Attribute\";\nimport { CodeBlock } from \"./CodeBlock\";\nimport { Comment } from \"./Comment\";\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { Type } from \"./Type\";\nimport { convertToPhpVariableName } from \"./utils/convertToPhpVariableName\";\n\nexport declare namespace Field {\n export interface Args {\n /* The name of the field */\n name: string;\n /* The type of the field */\n type: Type;\n /* The access level of the method */\n access: Access;\n /* Whether the the field is a readonly value */\n readonly_?: boolean;\n /* The initializer for the field */\n initializer?: CodeBlock;\n /* The docs (used for describing the field) */\n docs?: string;\n /* Docs included in-line */\n inlineDocs?: string;\n /* Field attributes */\n attributes?: Attribute[];\n /* Indicates that this field is inherited and should not be written to the class. */\n inherited?: boolean;\n }\n}\n\nexport class Field extends AstNode {\n public readonly name: string;\n public readonly type: Type;\n public readonly access: Access;\n private readonly_: boolean;\n private initializer: CodeBlock | undefined;\n private docs: string | undefined;\n private inlineDocs: string | undefined;\n private attributes: Attribute[];\n public readonly inherited: boolean;\n\n constructor({ name, type, access, readonly_, initializer, docs, inlineDocs, attributes, inherited }: Field.Args) {\n super();\n this.name = convertToPhpVariableName(name);\n this.type = type;\n this.access = access;\n this.readonly_ = readonly_ ?? false;\n this.initializer = initializer;\n this.docs = docs;\n this.inlineDocs = inlineDocs;\n this.attributes = attributes ?? [];\n this.inherited = inherited ?? false;\n }\n\n public write(writer: Writer): void {\n this.writeComment(writer);\n this.writeAttributesIfPresent(writer);\n\n writer.write(`${this.access} `);\n if (this.readonly_) {\n writer.write(\"readonly \");\n }\n\n this.type.write(writer);\n writer.write(` ${this.name}`);\n\n if (this.initializer != null) {\n writer.write(\" = \");\n this.initializer.write(writer);\n }\n writer.write(\";\");\n\n if (this.inlineDocs != null) {\n writer.write(` // ${this.inlineDocs}`);\n }\n writer.newLine();\n }\n\n private writeComment(writer: Writer): void {\n const comment = new Comment();\n comment.addTag({\n tagType: \"var\",\n type: this.type,\n name: this.name,\n docs: this.docs\n });\n comment.write(writer);\n }\n\n private writeAttributesIfPresent(writer: Writer): void {\n if (this.attributes.length > 0) {\n writer.write(\"#[\");\n this.attributes.forEach((attribute, index) => {\n if (index > 0) {\n writer.write(\", \");\n }\n attribute.write(writer);\n });\n writer.writeLine(\"]\");\n }\n }\n}\n","import { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\n\nexport declare namespace Map {\n interface Args {\n entries: Entry[] | undefined;\n multiline?: boolean;\n }\n\n interface Entry {\n key: AstNode;\n value: AstNode;\n }\n}\n\nexport class Map extends AstNode {\n private entries: Map.Entry[];\n private multiline: boolean;\n\n constructor({ entries, multiline }: Map.Args) {\n super();\n this.entries = entries ?? [];\n this.multiline = multiline ?? false;\n }\n\n public write(writer: Writer): void {\n if (this.multiline) {\n this.writeMultiline(writer);\n return;\n }\n this.writeCompact(writer);\n }\n\n private writeMultiline(writer: Writer): void {\n writer.writeLine(\"[\");\n writer.indent();\n for (const { key, value } of this.entries) {\n key.write(writer);\n writer.write(\" => \");\n value.write(writer);\n writer.writeLine(\",\");\n }\n writer.dedent();\n writer.write(\"]\");\n }\n\n private writeCompact(writer: Writer): void {\n writer.write(\"[\");\n for (const [index, { key, value }] of this.entries.entries()) {\n if (index > 0) {\n writer.write(\", \");\n }\n key.write(writer);\n writer.write(\" => \");\n value.write(writer);\n }\n writer.write(\"]\");\n }\n}\n","import { ClassReference } from \"./ClassReference\";\nimport { Comment } from \"./Comment\";\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { Field } from \"./Field\";\nimport { Method } from \"./Method\";\nimport { orderByAccess } from \"./utils/orderByAccess\";\n\nexport declare namespace Trait {\n interface Args {\n /* The name of the PHP trait */\n name: string;\n /* The namespace of the PHP trait */\n namespace: string;\n /* Docs associated with the trait */\n docs?: string;\n /* The traits that this trait uses, if any */\n traits?: ClassReference[];\n }\n}\n\nexport class Trait extends AstNode {\n public readonly name: string;\n public readonly namespace: string;\n public readonly docs: string | undefined;\n public readonly traits: ClassReference[];\n\n public readonly fields: Field[] = [];\n public readonly methods: Method[] = [];\n\n constructor({ name, namespace, docs, traits }: Trait.Args) {\n super();\n this.name = name;\n this.namespace = namespace;\n this.docs = docs;\n this.traits = traits ?? [];\n }\n\n public addField(field: Field): void {\n this.fields.push(field);\n }\n\n public addMethod(method: Method): void {\n this.methods.push(method);\n }\n\n public write(writer: Writer): void {\n this.writeComment(writer);\n writer.write(`trait ${this.name} `);\n writer.newLine();\n writer.writeLine(\"{\");\n writer.indent();\n\n if (this.traits.length > 0) {\n writer.write(\"use \");\n this.traits.forEach((trait, index) => {\n if (index > 0) {\n writer.write(\",\");\n }\n writer.writeNode(trait);\n });\n writer.writeTextStatement(\"\");\n writer.newLine();\n }\n\n this.writeFields({ writer, fields: orderByAccess(this.fields) });\n if (this.fields.length > 0 && this.methods.length > 0) {\n writer.newLine();\n }\n this.writeMethods({ writer, methods: orderByAccess(this.methods) });\n\n writer.dedent();\n writer.writeLine(\"}\");\n return;\n }\n\n private writeComment(writer: Writer): void {\n const comment = new Comment({ docs: this.docs });\n for (const field of this.fields) {\n comment.addTag({\n tagType: \"property\",\n type: field.type,\n name: field.name\n });\n }\n comment.write(writer);\n }\n\n private writeFields({ writer, fields }: { writer: Writer; fields: Field[] }): void {\n fields.forEach((field, index) => {\n if (index > 0) {\n writer.newLine();\n }\n field.write(writer);\n writer.writeNewLineIfLastLineNot();\n });\n }\n\n private writeMethods({ writer, methods }: { writer: Writer; methods: Method[] }): void {\n methods.forEach((method, index) => {\n if (index > 0) {\n writer.newLine();\n }\n method.write(writer);\n writer.writeNewLineIfLastLineNot();\n });\n }\n}\n","import { AbstractAstNode } from \"@fern-api/browser-compatible-base-generator\";\n\nimport { codeblock } from \"../php\";\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { writeArguments } from \"./utils/writeArguments\";\n\nexport declare namespace MergeArrays {\n export type Arg =\n | string\n | AstNode\n | {\n ref: string | AstNode;\n fallback: string;\n };\n export type Args = Arg[];\n}\n\nexport class MergeArrays extends AstNode {\n public readonly arrays: (\n | string\n | AstNode\n | {\n ref: string | AstNode;\n fallback: string | AstNode;\n }\n )[];\n\n constructor(arrays: MergeArrays.Args) {\n super();\n this.arrays = arrays;\n }\n\n public write(writer: Writer): void {\n writer.write(\"array_merge\");\n writeArguments({\n writer,\n arguments_: this.arrays.map<AbstractAstNode>((array) => {\n return codeblock((writer: Writer) => {\n if (typeof array === \"string\" || array instanceof AstNode) {\n writer.writeNodeOrString(array);\n return;\n }\n writer.writeNodeOrString(array.ref);\n if (array.fallback) {\n writer.write(\" ?? \");\n writer.writeNodeOrString(array.fallback);\n }\n });\n })\n });\n }\n}\n","import { PHP_RESERVED_KEYWORDS } from \"./constants\";\n\n/**\n * Returns a safe class name, adding a trailing underscore if the name\n * conflicts with a PHP reserved keyword.\n */\nexport function getSafeClassName(className: string): string {\n // Check if the class name is a reserved keyword (case-insensitive)\n if (PHP_RESERVED_KEYWORDS.has(className.toLowerCase())) {\n // Add trailing underscore to avoid collision\n return `${className}_`;\n }\n\n return className;\n}\n","import { DiscriminatedUnionTypeInstance, Severity } from \"@fern-api/browser-compatible-base-generator\";\nimport { assertNever } from \"@fern-api/core-utils\";\nimport { FernIr } from \"@fern-api/dynamic-ir-sdk\";\nimport { php } from \"@fern-api/php-codegen\";\n\nimport { DynamicSnippetsGeneratorContext } from \"./DynamicSnippetsGeneratorContext\";\n\nexport declare namespace DynamicTypeLiteralMapper {\n interface Args {\n typeReference: FernIr.dynamic.TypeReference;\n value: unknown;\n as?: ConvertedAs;\n }\n\n // Identifies what the type is being converted as, which sometimes influences how\n // the type is instantiated.\n type ConvertedAs = \"key\";\n}\n\nexport class DynamicTypeLiteralMapper {\n private context: DynamicSnippetsGeneratorContext;\n\n constructor({ context }: { context: DynamicSnippetsGeneratorContext }) {\n this.context = context;\n }\n\n public convert(args: DynamicTypeLiteralMapper.Args): php.TypeLiteral {\n // eslint-disable-next-line eqeqeq\n if (args.value === null) {\n if (this.context.isNullable(args.typeReference)) {\n return php.TypeLiteral.null();\n }\n this.context.errors.add({\n severity: Severity.Critical,\n message: \"Expected non-null value, but got null\"\n });\n return php.TypeLiteral.nop();\n }\n if (args.value === undefined) {\n return php.TypeLiteral.nop();\n }\n switch (args.typeReference.type) {\n case \"list\":\n case \"set\":\n return this.convertList({ list: args.typeReference.value, value: args.value });\n case \"literal\":\n return this.convertLiteral({ literalType: args.typeReference.value, value: args.value });\n case \"map\":\n return this.convertMap({ map: args.typeReference, value: args.value });\n case \"named\": {\n const named = this.context.resolveNamedType({ typeId: args.typeReference.value });\n if (named == null) {\n return php.TypeLiteral.nop();\n }\n return this.convertNamed({ named, value: args.value, as: args.as });\n }\n case \"optional\":\n return this.convert({ typeReference: args.typeReference.value, value: args.value, as: args.as });\n case \"nullable\":\n return this.convert({ typeReference: args.typeReference.value, value: args.value, as: args.as });\n case \"primitive\":\n return this.convertPrimitive({ primitive: args.typeReference.value, value: args.value, as: args.as });\n case \"unknown\":\n return this.convertUnknown({ value: args.value });\n default:\n assertNever(args.typeReference);\n }\n }\n\n private convertLiteral({\n literalType,\n value\n }: {\n literalType: FernIr.dynamic.LiteralType;\n value: unknown;\n }): php.TypeLiteral {\n switch (literalType.type) {\n case \"boolean\": {\n const bool = this.context.getValueAsBoolean({ value });\n if (bool == null) {\n return php.TypeLiteral.nop();\n }\n return php.TypeLiteral.boolean(bool);\n }\n case \"string\": {\n const str = this.context.getValueAsString({ value });\n if (str == null) {\n return php.TypeLiteral.nop();\n }\n return php.TypeLiteral.string(str);\n }\n default:\n assertNever(literalType);\n }\n }\n\n private convertList({ list, value }: { list: FernIr.dynamic.TypeReference; value: unknown }): php.TypeLiteral {\n if (!Array.isArray(value)) {\n this.context.errors.add({\n severity: Severity.Critical,\n message: `Expected array but got: ${typeof value}`\n });\n return php.TypeLiteral.nop();\n }\n return php.TypeLiteral.list({\n values: value.map((v, index) => {\n this.context.errors.scope({ index });\n try {\n return this.convert({ typeReference: list, value: v });\n } finally {\n this.context.errors.unscope();\n }\n })\n });\n }\n\n private convertMap({ map, value }: { map: FernIr.dynamic.MapType; value: unknown }): php.TypeLiteral {\n if (typeof value !== \"object\" || value == null) {\n this.context.errors.add({\n severity: Severity.Critical,\n message: `Expected object but got: ${value == null ? \"null\" : typeof value}`\n });\n return php.TypeLiteral.nop();\n }\n return php.TypeLiteral.map({\n entries: Object.entries(value).map(([key, value]) => {\n this.context.errors.scope(key);\n try {\n return {\n key: this.convert({ typeReference: map.key, value: key, as: \"key\" }),\n value: this.convert({ typeReference: map.value, value })\n };\n } finally {\n this.context.errors.unscope();\n }\n })\n });\n }\n\n private convertNamed({\n named,\n value,\n as\n }: {\n named: FernIr.dynamic.NamedType;\n value: unknown;\n as?: DynamicTypeLiteralMapper.ConvertedAs;\n }): php.TypeLiteral {\n switch (named.type) {\n case \"alias\": {\n return this.convert({ typeReference: named.typeReference, value, as });\n }\n case \"discriminatedUnion\":\n return this.convertDiscriminatedUnion({\n discriminatedUnion: named,\n value\n });\n case \"enum\":\n return this.convertEnum({ enum_: named, value });\n case \"object\":\n return this.convertObject({ object_: named, value });\n case \"undiscriminatedUnion\":\n return this.convertUndiscriminatedUnion({ undiscriminatedUnion: named, value });\n default:\n assertNever(named);\n }\n }\n\n private convertDiscriminatedUnion({\n discriminatedUnion,\n value\n }: {\n discriminatedUnion: FernIr.dynamic.DiscriminatedUnionType;\n value: unknown;\n }): php.TypeLiteral {\n const discriminatedUnionTypeInstance = this.context.resolveDiscriminatedUnionTypeInstance({\n discriminatedUnion,\n value\n });\n if (discriminatedUnionTypeInstance == null) {\n return php.TypeLiteral.nop();\n }\n const unionVariant = discriminatedUnionTypeInstance.singleDiscriminatedUnionType;\n const unionProperties = this.convertDiscriminatedUnionProperties({\n discriminatedUnionTypeInstance,\n unionVariant\n });\n if (unionProperties == null) {\n return php.TypeLiteral.nop();\n }\n return php.TypeLiteral.reference(\n php.codeblock((writer) => {\n writer.writeNode(\n php.invokeMethod({\n on: php.classReference({\n name: this.context.getClassName(discriminatedUnion.declaration.name),\n namespace: this.context.getTypesNamespace(discriminatedUnion.declaration.fernFilepath)\n }),\n method: this.context.getMethodName(unionVariant.discriminantValue.name),\n arguments_: this.convertDiscriminatedUnionVariantArgs({\n discriminatedUnionTypeInstance,\n unionVariant,\n unionProperties\n }),\n static_: true\n })\n );\n })\n );\n }\n\n private convertDiscriminatedUnionProperties({\n discriminatedUnionTypeInstance,\n unionVariant\n }: {\n discriminatedUnionTypeInstance: DiscriminatedUnionTypeInstance;\n unionVariant: FernIr.dynamic.SingleDiscriminatedUnionType;\n }): php.ConstructorField[] | undefined {\n switch (unionVariant.type) {\n case \"samePropertiesAsObject\": {\n const named = this.context.resolveNamedType({\n typeId: unionVariant.typeId\n });\n if (named == null) {\n return undefined;\n }\n const converted = this.convertNamed({ named, value: discriminatedUnionTypeInstance.value });\n if (!converted.isClass()) {\n this.context.errors.add({\n severity: Severity.Critical,\n message: \"Internal error; expected union value to be an object\"\n });\n return undefined;\n }\n const object_ = converted.asClassOrThrow();\n return object_.fields;\n }\n case \"singleProperty\": {\n try {\n this.context.errors.scope(unionVariant.discriminantValue.wireValue);\n const record = this.context.getRecord(discriminatedUnionTypeInstance.value);\n if (record == null) {\n return [\n {\n name: this.context.getPropertyName(unionVariant.discriminantValue.name),\n value: this.convert({\n typeReference: unionVariant.typeReference,\n value: discriminatedUnionTypeInstance.value\n })\n }\n ];\n }\n return [\n {\n name: this.context.getPropertyName(unionVariant.discriminantValue.name),\n value: this.convert({\n typeReference: unionVariant.typeReference,\n value: record[unionVariant.discriminantValue.wireValue]\n })\n }\n ];\n } finally {\n this.context.errors.unscope();\n }\n }\n case \"noProperties\":\n return [];\n default:\n assertNever(unionVariant);\n }\n }\n\n private convertDiscriminatedUnionVariantArgs({\n discriminatedUnionTypeInstance,\n unionVariant,\n unionProperties\n }: {\n discriminatedUnionTypeInstance: DiscriminatedUnionTypeInstance;\n unionVariant: FernIr.dynamic.SingleDiscriminatedUnionType;\n unionProperties: php.ConstructorField[];\n }): php.AstNode[] {\n const baseFields = this.getBaseFields({\n discriminatedUnionTypeInstance,\n singleDiscriminatedUnionType: unionVariant\n });\n if (unionVariant.type === \"singleProperty\") {\n const record = this.context.getRecord(discriminatedUnionTypeInstance.value);\n if (record == null && unionProperties.length === 1) {\n // The union is a single value without any base properties, e.g.\n return [\n ...baseFields,\n this.convert({\n typeReference: unionVariant.typeReference,\n value: discriminatedUnionTypeInstance.value\n })\n ];\n }\n }\n if (unionVariant.type === \"samePropertiesAsObject\") {\n const named = this.context.resolveNamedType({\n typeId: unionVariant.typeId\n });\n if (named == null) {\n return [];\n }\n return [\n ...baseFields,\n php.TypeLiteral.class_({\n reference: php.classReference({\n name: this.context.getClassName(named.declaration.name),\n namespace: this.context.getTypesNamespace(named.declaration.fernFilepath)\n }),\n fields: unionProperties\n })\n ];\n }\n return baseFields;\n }\n\n private getBaseFields({\n discriminatedUnionTypeInstance,\n singleDiscriminatedUnionType\n }: {\n discriminatedUnionTypeInstance: DiscriminatedUnionTypeInstance;\n singleDiscriminatedUnionType: FernIr.dynamic.SingleDiscriminatedUnionType;\n }): php.AstNode[] {\n const properties = this.context.associateByWireValue({\n parameters: singleDiscriminatedUnionType.properties ?? [],\n values: this.context.getRecord(discriminatedUnionTypeInstance.value) ?? {},\n\n // We're only selecting the base properties here. The rest of the properties\n // are handled by the union variant.\n ignoreMissingParameters: true\n });\n return properties.map((property) => {\n this.context.errors.scope(property.name.wireValue);\n try {\n return this.convert(property);\n } finally {\n this.context.errors.unscope();\n }\n });\n }\n\n private convertObject({ object_, value }: { object_: FernIr.dynamic.ObjectType; value: unknown }): php.TypeLiteral {\n const properties = this.context.associateByWireValue({\n parameters: object_.properties,\n values: this.context.getRecord(value) ?? {}\n });\n return php.TypeLiteral.class_({\n reference: php.classReference({\n name: this.context.getClassName(object_.declaration.name),\n namespace: this.context.getTypesNamespace(object_.declaration.fernFilepath)\n }),\n fields: properties.map((property) => {\n this.context.errors.scope(property.name.wireValue);\n try {\n return {\n name: this.context.getPropertyName(property.name.name),\n value: this.convert(property)\n };\n } finally {\n this.context.errors.unscope();\n }\n })\n });\n }\n\n private convertEnum({ enum_, value }: { enum_: FernIr.dynamic.EnumType; value: unknown }): php.TypeLiteral {\n const name = this.getEnumValueName({ enum_, value });\n if (name == null) {\n return php.TypeLiteral.nop();\n }\n return php.TypeLiteral.reference(\n php.codeblock((writer) => {\n writer.writeNode(\n php.classReference({\n name: this.context.getClassName(enum_.declaration.name),\n namespace: this.context.getTypesNamespace(enum_.declaration.fernFilepath)\n })\n );\n writer.write(\"::\");\n writer.write(name);\n writer.write(\"->value\");\n })\n );\n }\n\n private getEnumValueName({ enum_, value }: { enum_: FernIr.dynamic.EnumType; value: unknown }): string | undefined {\n if (typeof value !== \"string\") {\n this.context.errors.add({\n severity: Severity.Critical,\n message: `Expected enum value string, got: ${typeof value}`\n });\n return undefined;\n }\n const enumValue = enum_.values.find((v) => v.wireValue === value);\n if (enumValue == null) {\n this.context.errors.add({\n severity: Severity.Critical,\n message: `An enum value named \"${value}\" does not exist in this context`\n });\n return undefined;\n }\n return this.context.getClassName(enumValue.name);\n }\n\n private convertUndiscriminatedUnion({\n undiscriminatedUnion,\n value\n }: {\n undiscriminatedUnion: FernIr.dynamic.UndiscriminatedUnionType;\n value: unknown;\n }): php.TypeLiteral {\n const result = this.findMatchingUndiscriminatedUnionType({\n undiscriminatedUnion,\n value\n });\n if (result == null) {\n return php.TypeLiteral.nop();\n }\n return result;\n }\n\n private findMatchingUndiscriminatedUnionType({\n undiscriminatedUnion,\n value\n }: {\n undiscriminatedUnion: FernIr.dynamic.UndiscriminatedUnionType;\n value: unknown;\n }): php.TypeLiteral | undefined {\n for (const typeReference of undiscriminatedUnion.types) {\n try {\n return this.convert({ typeReference, value });\n } catch (e) {\n continue;\n }\n }\n this.context.errors.add({\n severity: Severity.Critical,\n message: `None of the types in the undiscriminated union matched the given \"${typeof value}\" value`\n });\n return undefined;\n }\n\n private convertUnknown({ value }: { value: unknown }): php.TypeLiteral {\n return php.TypeLiteral.unknown(value);\n }\n\n private convertPrimitive({\n primitive,\n value,\n as\n }: {\n primitive: FernIr.dynamic.PrimitiveTypeV1;\n value: unknown;\n as?: DynamicTypeLiteralMapper.ConvertedAs;\n }): php.TypeLiteral {\n switch (primitive) {\n case \"INTEGER\":\n case \"LONG\":\n case \"UINT\":\n case \"UINT_64\": {\n const num = this.getValueAsNumber({ value, as });\n if (num == null) {\n return php.TypeLiteral.nop();\n }\n return php.TypeLiteral.number(num);\n }\n case \"FLOAT\":\n case \"DOUBLE\": {\n const num = this.getValueAsNumber({ value });\n if (num == null) {\n return php.TypeLiteral.nop();\n }\n return php.TypeLiteral.float(num);\n }\n case \"BOOLEAN\": {\n const bool = this.getValueAsBoolean({ value, as });\n if (bool == null) {\n return php.TypeLiteral.nop();\n }\n return php.TypeLiteral.boolean(bool);\n }\n case \"DATE\":\n case \"DATE_TIME\": {\n const str = this.context.getValueAsString({ value });\n if (str == null) {\n return php.TypeLiteral.nop();\n }\n return php.TypeLiteral.datetime(str);\n }\n case \"BASE_64\":\n case \"UUID\":\n case \"BIG_INTEGER\":\n case \"STRING\": {\n const str = this.context.getValueAsString({ value });\n if (str == null) {\n return php.TypeLiteral.nop();\n }\n return php.TypeLiteral.string(str);\n }\n default:\n assertNever(primitive);\n }\n }\n\n private getValueAsNumber({\n value,\n as\n }: {\n value: unknown;\n as?: DynamicTypeLiteralMapper.ConvertedAs;\n }): number | undefined {\n const num = as === \"key\" ? (typeof value === \"string\" ? Number(value) : value) : value;\n return this.context.getValueAsNumber({ value: num });\n }\n\n private getValueAsBoolean({\n value,\n as\n }: {\n value: unknown;\n as?: DynamicTypeLiteralMapper.ConvertedAs;\n }): boolean | undefined {\n const bool =\n as === \"key\" ? (typeof value === \"string\" ? value === \"true\" : value === \"false\" ? false : value) : value;\n return this.context.getValueAsBoolean({ value: bool });\n }\n}\n","import { assertNever } from \"@fern-api/core-utils\";\nimport { FernIr } from \"@fern-api/dynamic-ir-sdk\";\nimport { php } from \"@fern-api/php-codegen\";\n\nimport { DynamicSnippetsGeneratorContext } from \"./DynamicSnippetsGeneratorContext\";\n\nexport interface FilePropertyInfo {\n fileFields: php.ConstructorField[];\n bodyPropertyFields: php.ConstructorField[];\n}\n\nexport class FilePropertyMapper {\n private context: DynamicSnippetsGeneratorContext;\n\n constructor({ context }: { context: DynamicSnippetsGeneratorContext }) {\n this.context = context;\n }\n\n public getFilePropertyInfo({\n body,\n value\n }: {\n body: FernIr.dynamic.FileUploadRequestBody;\n value: unknown;\n }): FilePropertyInfo {\n const result: FilePropertyInfo = {\n fileFields: [],\n bodyPropertyFields: []\n };\n const record = this.context.getRecord(value) ?? {};\n for (const property of body.properties) {\n switch (property.type) {\n case \"file\":\n result.fileFields.push({\n name: this.context.getPropertyName(property.name),\n value: this.getSingleFileProperty({ property, record })\n });\n break;\n case \"fileArray\":\n result.fileFields.push({\n name: this.context.getPropertyName(property.name),\n value: this.getArrayFileProperty({ property, record })\n });\n break;\n case \"bodyProperty\":\n result.bodyPropertyFields.push({\n name: this.context.getPropertyName(property.name.name),\n value: this.getBodyProperty({ property, record })\n });\n break;\n default:\n assertNever(property);\n }\n }\n return result;\n }\n\n private getSingleFileProperty({\n property,\n record\n }: {\n property: FernIr.dynamic.FileUploadRequestBodyProperty.File_;\n record: Record<string, unknown>;\n }): php.TypeLiteral {\n const fileValue = this.context.getSingleFileValue({ property, record });\n if (fileValue == null) {\n return php.TypeLiteral.nop();\n }\n return php.TypeLiteral.file(fileValue);\n }\n\n private getArrayFileProperty({\n property,\n record\n }: {\n property: FernIr.dynamic.FileUploadRequestBodyProperty.FileArray;\n record: Record<string, unknown>;\n }): php.TypeLiteral {\n const fileValues = this.context.getFileArrayValues({ property, record });\n if (fileValues == null) {\n return php.TypeLiteral.nop();\n }\n return php.TypeLiteral.list({ values: fileValues.map((value) => php.TypeLiteral.file(value)) });\n }\n\n private getBodyProperty({\n property,\n record\n }: {\n property: FernIr.dynamic.NamedParameter;\n record: Record<string, unknown>;\n }): php.TypeLiteral {\n const bodyPropertyValue = record[property.name.wireValue];\n if (bodyPropertyValue == null) {\n return php.TypeLiteral.nop();\n }\n return this.context.dynamicTypeLiteralMapper.convert({\n typeReference: property.typeReference,\n value: bodyPropertyValue\n });\n }\n}\n","import { AbstractAstNode, NamedArgument, Options, Scope, Severity } from \"@fern-api/browser-compatible-base-generator\";\nimport { assertNever } from \"@fern-api/core-utils\";\nimport { FernIr } from \"@fern-api/dynamic-ir-sdk\";\nimport { php } from \"@fern-api/php-codegen\";\n\nimport { DynamicSnippetsGeneratorContext } from \"./context/DynamicSnippetsGeneratorContext\";\nimport { FilePropertyInfo } from \"./context/FilePropertyMapper\";\n\nconst CLIENT_VAR_NAME = \"$client\";\nconst SNIPPET_NAMESPACE = \"Example\";\nconst PHP_PREFIX = \"<?php\\n\\n\";\n\nexport class EndpointSnippetGenerator {\n private context: DynamicSnippetsGeneratorContext;\n\n constructor({ context }: { context: DynamicSnippetsGeneratorContext }) {\n this.context = context;\n }\n\n public async generateSnippet({\n endpoint,\n request\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n request: FernIr.dynamic.EndpointSnippetRequest;\n }): Promise<string> {\n const code = this.buildCodeBlock({ endpoint, snippet: request });\n return (\n PHP_PREFIX +\n (await code.toStringAsync({\n namespace: SNIPPET_NAMESPACE,\n rootNamespace: SNIPPET_NAMESPACE,\n customConfig: this.context.customConfig ?? {}\n }))\n );\n }\n\n public generateSnippetSync({\n endpoint,\n request\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n request: FernIr.dynamic.EndpointSnippetRequest;\n }): string {\n const code = this.buildCodeBlock({ endpoint, snippet: request });\n return (\n PHP_PREFIX +\n code.toString({\n namespace: SNIPPET_NAMESPACE,\n rootNamespace: SNIPPET_NAMESPACE,\n customConfig: this.context.customConfig ?? {}\n })\n );\n }\n\n public async generateSnippetAst({\n endpoint,\n request,\n options\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n request: FernIr.dynamic.EndpointSnippetRequest;\n options?: Options;\n }): Promise<AbstractAstNode> {\n if (options?.skipClientInstantiation) {\n return this.buildCodeBlockWithoutClient({ endpoint, snippet: request });\n }\n return this.buildCodeBlock({ endpoint, snippet: request });\n }\n\n public buildCodeBlock({\n endpoint,\n snippet\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): php.AstNode {\n return php.codeblock((writer) => {\n writer.writeNodeStatement(this.constructClient({ endpoint, snippet }));\n writer.writeNodeStatement(this.callMethod({ endpoint, snippet }));\n });\n }\n\n public buildCodeBlockWithoutClient({\n endpoint,\n snippet\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): php.AstNode {\n return php.codeblock((writer) => {\n // Skip client instantiation - assume client is already available as $this->client\n writer.writeNodeStatement(this.callMethodOnExistingClient({ endpoint, snippet }));\n });\n }\n\n private constructClient({\n endpoint,\n snippet\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): php.CodeBlock {\n return php.codeblock((writer) => {\n writer.write(`${CLIENT_VAR_NAME} = `);\n writer.writeNode(this.getRootClientClassInstantiation(this.getConstructorArgs({ endpoint, snippet })));\n });\n }\n\n private callMethod({\n endpoint,\n snippet\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): php.MethodInvocation {\n return php.invokeMethod({\n on: php.codeblock(CLIENT_VAR_NAME),\n method: this.getMethod({ endpoint }),\n arguments_: this.getMethodArgs({ endpoint, snippet }),\n multiline: true\n });\n }\n\n private callMethodOnExistingClient({\n endpoint,\n snippet\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): php.MethodInvocation {\n const args = this.getMethodArgs({ endpoint, snippet });\n const requestOptions = this.getRequestOptions({ endpoint, snippet });\n if (!php.TypeLiteral.isNop(requestOptions)) {\n args.push(requestOptions);\n }\n return php.invokeMethod({\n on: php.codeblock(\"$this->client\"),\n method: this.getMethod({ endpoint }),\n arguments_: args,\n multiline: true\n });\n }\n\n /**\n * Builds request options from snippet headers for per-request options.\n * This is used when generating snippets for existing clients (e.g., wire tests)\n * where headers should be passed as method call options rather than client constructor options.\n * Only includes headers that are NOT already mapped to the request directly (i.e., not defined in the IR).\n */\n private getRequestOptions({\n endpoint,\n snippet\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): php.TypeLiteral {\n const headers = snippet.headers ?? {};\n const entries = Object.entries(headers);\n if (entries.length === 0) {\n return php.TypeLiteral.nop();\n }\n\n // Build a set of header names that are already mapped to the request directly\n const mappedHeaderNames = new Set<string>();\n\n // Add global headers from IR\n if (this.context.ir.headers != null) {\n for (const header of this.context.ir.headers) {\n mappedHeaderNames.add(header.name.wireValue.toLowerCase());\n }\n }\n\n // Add endpoint-level headers from inlined request\n if (endpoint.request.type === \"inlined\" && endpoint.request.headers != null) {\n for (const header of endpoint.request.headers) {\n mappedHeaderNames.add(header.name.wireValue.toLowerCase());\n }\n }\n\n // Filter out headers that are already mapped to the request\n const unmappedEntries = entries.filter(([name]) => !mappedHeaderNames.has(name.toLowerCase()));\n if (unmappedEntries.length === 0) {\n return php.TypeLiteral.nop();\n }\n\n return php.TypeLiteral.map({\n entries: [\n {\n key: php.TypeLiteral.string(\"headers\"),\n value: php.TypeLiteral.map({\n entries: unmappedEntries.map(([name, value]) => ({\n key: php.TypeLiteral.string(name),\n value: php.TypeLiteral.string(String(value))\n }))\n })\n }\n ]\n });\n }\n\n private getConstructorArgs({\n endpoint,\n snippet\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): NamedArgument[] {\n const authArgs: NamedArgument[] = [];\n if (endpoint.auth != null) {\n if (snippet.auth != null) {\n authArgs.push(...this.getConstructorAuthArgs({ auth: endpoint.auth, values: snippet.auth }));\n } else {\n // Provide default auth values for endpoints that require authentication\n if (endpoint.auth.type === \"inferred\") {\n // For inferred auth, provide default test values\n const defaultInferredAuthValues: FernIr.dynamic.InferredAuthValues = {\n type: \"inferred\"\n };\n authArgs.push(\n ...this.getConstructorInferredAuthArgs({\n auth: endpoint.auth,\n values: defaultInferredAuthValues\n })\n );\n } else {\n this.context.errors.add({\n severity: Severity.Warning,\n message: `Auth with ${endpoint.auth.type} configuration is required for this endpoint`\n });\n }\n }\n }\n\n const hasMultiUrlEnvironments = this.context.ir.environments?.environments.type === \"multipleBaseUrls\";\n const environmentArg = this.getConstructorEnvironmentArg({\n environment: snippet.environment,\n hasMultiUrlEnvironments\n });\n\n const optionArgs: php.ConstructorField[] = [];\n\n if (!hasMultiUrlEnvironments) {\n const baseUrlArgs = this.getConstructorBaseUrlArgs({\n baseUrl: snippet.baseURL,\n environment: snippet.environment\n });\n if (baseUrlArgs.length > 0) {\n optionArgs.push(...baseUrlArgs);\n }\n }\n\n this.context.errors.scope(Scope.Headers);\n if (this.context.ir.headers != null && snippet.headers != null) {\n optionArgs.push(\n ...this.getConstructorHeaderArgs({ headers: this.context.ir.headers, values: snippet.headers })\n );\n }\n this.context.errors.unscope();\n\n const args: NamedArgument[] = [...authArgs];\n\n if (environmentArg != null) {\n args.push(environmentArg);\n }\n\n if (optionArgs.length > 0) {\n args.push({\n name: \"options\",\n assignment: php.TypeLiteral.map({\n entries: optionArgs.map((arg) => ({\n key: php.TypeLiteral.string(arg.name),\n value: arg.value\n }))\n })\n });\n }\n\n return args;\n }\n\n private getConstructorAuthArgs({\n auth,\n values\n }: {\n auth: FernIr.dynamic.Auth;\n values: FernIr.dynamic.AuthValues;\n }): NamedArgument[] {\n if (values.type !== auth.type) {\n this.addError(this.context.newAuthMismatchError({ auth, values }).message);\n return [];\n }\n switch (auth.type) {\n case \"basic\":\n return values.type === \"basic\" ? this.getConstructorBasicAuthArgs({ auth, values }) : [];\n case \"bearer\":\n return values.type === \"bearer\" ? this.getConstructorBearerAuthArgs({ auth, values }) : [];\n case \"header\":\n return values.type === \"header\" ? this.getConstructorHeaderAuthArgs({ auth, values }) : [];\n case \"oauth\":\n return values.type === \"oauth\" ? this.getConstructorOAuthArgs({ auth, values }) : [];\n case \"inferred\":\n return values.type === \"inferred\" ? this.getConstructorInferredAuthArgs({ auth, values }) : [];\n default:\n assertNever(auth);\n }\n }\n\n private addError(message: string): void {\n this.context.errors.add({ severity: Severity.Critical, message });\n }\n\n private addWarning(message: string): void {\n this.context.errors.add({ severity: Severity.Warning, message });\n }\n\n private getConstructorBasicAuthArgs({\n auth,\n values\n }: {\n auth: FernIr.dynamic.BasicAuth;\n values: FernIr.dynamic.BasicAuthValues;\n }): NamedArgument[] {\n return [\n {\n name: this.context.getPropertyName(auth.username),\n assignment: php.TypeLiteral.string(values.username)\n },\n {\n name: this.context.getPropertyName(auth.password),\n assignment: php.TypeLiteral.string(values.password)\n }\n ];\n }\n\n private getConstructorEnvironmentArg({\n environment,\n hasMultiUrlEnvironments\n }: {\n environment: FernIr.dynamic.EnvironmentValues | undefined;\n hasMultiUrlEnvironments: boolean;\n }): NamedArgument | undefined {\n if (!hasMultiUrlEnvironments) {\n return undefined;\n }\n\n const environmentClassRef = this.context.getEnvironmentsClassReference();\n\n if (environment != null) {\n if (this.context.isSingleEnvironmentID(environment)) {\n const environmentName = this.context.resolveEnvironmentName(environment);\n if (environmentName == null) {\n this.addWarning(`Environment \"${environment}\" was not found`);\n return undefined;\n }\n const className = this.context.getClassName(environmentName);\n return {\n name: \"environment\",\n assignment: php.TypeLiteral.reference(\n php.codeblock((writer) => {\n writer.writeNode(environmentClassRef);\n writer.write(`::`);\n writer.write(className);\n writer.write(`()`);\n })\n )\n };\n }\n\n if (this.context.isMultiEnvironmentValues(environment)) {\n const result = this.resolveMultiEnvironmentName(environment);\n if (result == null) {\n this.addWarning(\"Invalid multi url environment\");\n return undefined;\n }\n if (result.type === \"named\") {\n return {\n name: \"environment\",\n assignment: php.TypeLiteral.reference(\n php.codeblock((writer) => {\n writer.writeNode(environmentClassRef);\n writer.write(`::`);\n writer.write(result.name);\n writer.write(`()`);\n })\n )\n };\n } else {\n return {\n name: \"environment\",\n assignment: php.TypeLiteral.reference(\n php.codeblock((writer) => {\n writer.writeNode(environmentClassRef);\n writer.write(`::custom(`);\n const entries = Object.entries(result.urls);\n entries.forEach(([paramName, url], index) => {\n writer.write(`${paramName}: '${url}'`);\n if (index < entries.length - 1) {\n writer.write(`, `);\n }\n });\n writer.write(`)`);\n })\n )\n };\n }\n }\n }\n\n const defaultName = this.getDefaultEnvironmentName();\n if (defaultName == null) {\n return undefined;\n }\n\n return {\n name: \"environment\",\n assignment: php.TypeLiteral.reference(\n php.codeblock((writer) => {\n writer.writeNode(environmentClassRef);\n writer.write(`::`);\n writer.write(defaultName);\n writer.write(`()`);\n })\n )\n };\n }\n\n private getDefaultEnvironmentName(): string | undefined {\n if (this.context.ir.environments?.environments.type !== \"multipleBaseUrls\") {\n return undefined;\n }\n\n const environmentsConfig = this.context.ir.environments.environments;\n if (environmentsConfig.type !== \"multipleBaseUrls\") {\n return undefined;\n }\n\n const environments = environmentsConfig.environments;\n if (environments.length === 0) {\n return undefined;\n }\n\n for (const env of environments) {\n const className = this.context.getClassName(env.name);\n if (className === \"Production\") {\n return className;\n }\n }\n\n const firstEnv = environments[0];\n if (firstEnv == null) {\n return undefined;\n }\n return this.context.getClassName(firstEnv.name);\n }\n\n private resolveMultiEnvironmentName(\n environment: FernIr.dynamic.MultipleEnvironmentUrlValues\n ): { type: \"named\"; name: string } | { type: \"custom\"; urls: Record<string, string> } | undefined {\n const baseUrlIds = Object.keys(environment);\n if (baseUrlIds.length === 0) {\n return undefined;\n }\n\n // Validate that all required base URLs are provided\n if (!this.context.validateMultiEnvironmentUrlValues(environment)) {\n return undefined;\n }\n\n const firstBaseUrlId = baseUrlIds[0];\n if (firstBaseUrlId == null) {\n return undefined;\n }\n\n const firstBaseUrlValue = environment[firstBaseUrlId];\n if (firstBaseUrlValue == null) {\n return undefined;\n }\n\n // Check if the first value is a valid environment ID (not just any string)\n const firstEnvironmentName = this.context.resolveEnvironmentName(firstBaseUrlValue);\n if (firstEnvironmentName != null) {\n // Check if all values point to the same environment\n const allSameEnvironment = baseUrlIds.every((baseUrlId) => {\n const value = environment[baseUrlId];\n if (value == null) {\n return false;\n }\n const envName = this.context.resolveEnvironmentName(value);\n return envName != null && value === firstBaseUrlValue;\n });\n\n if (allSameEnvironment) {\n return { type: \"named\", name: this.context.getClassName(firstEnvironmentName) };\n }\n }\n\n // Treat all values as custom URLs\n const urls: Record<string, string> = {};\n for (const baseUrlId of baseUrlIds) {\n const value = environment[baseUrlId];\n if (value == null) {\n continue;\n }\n const paramName = this.getBaseUrlPropertyName(baseUrlId);\n urls[paramName] = value;\n }\n\n if (Object.keys(urls).length > 0) {\n return { type: \"custom\", urls };\n }\n\n return undefined;\n }\n\n private getBaseUrlPropertyName(baseUrlId: string): string {\n if (this.context.ir.environments?.environments.type !== \"multipleBaseUrls\") {\n return baseUrlId;\n }\n\n const environmentsConfig = this.context.ir.environments.environments;\n if (environmentsConfig.type !== \"multipleBaseUrls\") {\n return baseUrlId;\n }\n\n const baseUrl = environmentsConfig.baseUrls.find((url) => url.id === baseUrlId);\n if (baseUrl == null) {\n return baseUrlId;\n }\n\n return baseUrl.name.camelCase.safeName;\n }\n\n private getConstructorBaseUrlArgs({\n baseUrl,\n environment\n }: {\n baseUrl: string | undefined;\n environment: FernIr.dynamic.EnvironmentValues | undefined;\n }): php.ConstructorField[] {\n const baseUrlArg = this.getBaseUrlArg({ baseUrl, environment });\n if (php.TypeLiteral.isNop(baseUrlArg)) {\n return [];\n }\n return [\n {\n name: \"baseUrl\",\n value: baseUrlArg\n }\n ];\n }\n\n private getBaseUrlArg({\n baseUrl,\n environment\n }: {\n baseUrl: string | undefined;\n environment: FernIr.dynamic.EnvironmentValues | undefined;\n }): php.TypeLiteral {\n if (baseUrl != null && environment != null) {\n this.context.errors.add({\n severity: Severity.Critical,\n message: \"Cannot specify both baseUrl and environment options\"\n });\n return php.TypeLiteral.nop();\n }\n if (baseUrl != null) {\n return php.TypeLiteral.string(baseUrl);\n }\n if (environment != null) {\n if (this.context.isSingleEnvironmentID(environment)) {\n const classReference = this.context.getEnvironmentClassAccessFromID(environment);\n if (classReference == null) {\n this.context.errors.add({\n severity: Severity.Warning,\n message: `Environment ${JSON.stringify(environment)} was not found`\n });\n return php.TypeLiteral.nop();\n }\n return php.TypeLiteral.reference(\n php.codeblock((writer) => {\n writer.writeNode(classReference);\n writer.write(\"->value\");\n })\n );\n }\n if (this.context.ir.environments?.environments.type === \"multipleBaseUrls\") {\n return php.TypeLiteral.nop();\n }\n }\n return php.TypeLiteral.nop();\n }\n\n private getConstructorBearerAuthArgs({\n auth,\n values\n }: {\n auth: FernIr.dynamic.BearerAuth;\n values: FernIr.dynamic.BearerAuthValues;\n }): NamedArgument[] {\n return [\n {\n name: this.context.getPropertyName(auth.token),\n assignment: php.TypeLiteral.string(values.token)\n }\n ];\n }\n\n private getConstructorHeaderAuthArgs({\n auth,\n values\n }: {\n auth: FernIr.dynamic.HeaderAuth;\n values: FernIr.dynamic.HeaderAuthValues;\n }): NamedArgument[] {\n return [\n {\n name: this.context.getPropertyName(auth.header.name.name),\n assignment: this.context.dynamicTypeLiteralMapper.convert({\n typeReference: auth.header.typeReference,\n value: values.value\n })\n }\n ];\n }\n\n private getConstructorOAuthArgs({\n auth,\n values\n }: {\n auth: FernIr.dynamic.OAuth;\n values: FernIr.dynamic.OAuthValues;\n }): NamedArgument[] {\n return [\n {\n name: this.context.getPropertyName(auth.clientId),\n assignment: php.TypeLiteral.string(values.clientId)\n },\n {\n name: this.context.getPropertyName(auth.clientSecret),\n assignment: php.TypeLiteral.string(values.clientSecret)\n }\n ];\n }\n\n private getConstructorInferredAuthArgs({\n auth,\n values\n }: {\n auth: FernIr.dynamic.InferredAuth;\n values: FernIr.dynamic.InferredAuthValues;\n }): NamedArgument[] {\n // For now, return empty array to avoid the RangeError issue\n // The inferred auth parameters should be extracted from the normal IR,\n // not the dynamic IR which doesn't contain the detailed endpoint information\n return [];\n }\n\n private getConstructorHeaderArgs({\n headers,\n values\n }: {\n headers: FernIr.dynamic.NamedParameter[];\n values: FernIr.dynamic.Values;\n }): php.ConstructorField[] {\n const args: php.ConstructorField[] = [];\n for (const header of headers) {\n const arg = this.getConstructorHeaderArg({ header, value: values.value });\n if (arg != null) {\n args.push({\n name: this.context.getPropertyName(header.name.name),\n value: arg\n });\n }\n }\n return args;\n }\n\n private getConstructorHeaderArg({\n header,\n value\n }: {\n header: FernIr.dynamic.NamedParameter;\n value: unknown;\n }): php.TypeLiteral | undefined {\n const typeLiteral = this.context.dynamicTypeLiteralMapper.convert({\n typeReference: header.typeReference,\n value\n });\n if (php.TypeLiteral.isNop(typeLiteral)) {\n // Literal header values (e.g. \"X-API-Version\") should not be included in the\n // client constructor.\n return undefined;\n }\n return typeLiteral;\n }\n\n private getMethodArgs({\n endpoint,\n snippet\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): php.TypeLiteral[] {\n switch (endpoint.request.type) {\n case \"inlined\":\n return this.getMethodArgsForInlinedRequest({ request: endpoint.request, snippet });\n case \"body\":\n return this.getMethodArgsForBodyRequest({ request: endpoint.request, snippet });\n default:\n assertNever(endpoint.request);\n }\n }\n\n private getMethodArgsForBodyRequest({\n request,\n snippet\n }: {\n request: FernIr.dynamic.BodyRequest;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): php.TypeLiteral[] {\n const args: php.TypeLiteral[] = [];\n\n this.context.errors.scope(Scope.PathParameters);\n const pathParameters = [...(this.context.ir.pathParameters ?? []), ...(request.pathParameters ?? [])];\n if (pathParameters.length > 0) {\n args.push(\n ...this.getPathParameters({ namedParameters: pathParameters, snippet }).map((field) => field.value)\n );\n }\n this.context.errors.unscope();\n\n this.context.errors.scope(Scope.RequestBody);\n if (request.body != null) {\n args.push(this.getBodyRequestArg({ body: request.body, value: snippet.requestBody }));\n }\n this.context.errors.unscope();\n\n return args;\n }\n\n private getBodyRequestArg({\n body,\n value\n }: {\n body: FernIr.dynamic.ReferencedRequestBodyType;\n value: unknown;\n }): php.TypeLiteral {\n switch (body.type) {\n case \"bytes\": {\n return this.getBytesBodyRequestArg({ value });\n }\n case \"typeReference\":\n return this.context.dynamicTypeLiteralMapper.convert({ typeReference: body.value, value });\n default:\n assertNever(body);\n }\n }\n\n private getBytesBodyRequestArg({ value }: { value: unknown }): php.TypeLiteral {\n this.context.errors.add({\n severity: Severity.Critical,\n message: \"The PHP SDK doesn't support bytes requests yet\"\n });\n return php.TypeLiteral.nop();\n }\n\n private getMethodArgsForInlinedRequest({\n request,\n snippet\n }: {\n request: FernIr.dynamic.InlinedRequest;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): php.TypeLiteral[] {\n const args: php.TypeLiteral[] = [];\n\n const inlinePathParameters = this.context.customConfig?.inlinePathParameters ?? false;\n\n this.context.errors.scope(Scope.PathParameters);\n const pathParameterFields: php.ConstructorField[] = [];\n const pathParameters = [...(this.context.ir.pathParameters ?? []), ...(request.pathParameters ?? [])];\n if (pathParameters.length > 0) {\n pathParameterFields.push(...this.getPathParameters({ namedParameters: pathParameters, snippet }));\n }\n this.context.errors.unscope();\n\n this.context.errors.scope(Scope.RequestBody);\n const filePropertyInfo = this.getFilePropertyInfo({ request, snippet });\n this.context.errors.unscope();\n\n if (!this.context.includePathParametersInWrappedRequest({ request, inlinePathParameters })) {\n args.push(...pathParameterFields.map((field) => field.value));\n }\n\n if (\n this.context.needsRequestParameter({\n request,\n inlinePathParameters,\n inlineFileProperties: true // The PHP SDK requires inlineFileProperties.\n })\n ) {\n args.push(\n this.getInlinedRequestArg({\n request,\n snippet,\n pathParameterFields: this.context.includePathParametersInWrappedRequest({\n request,\n inlinePathParameters\n })\n ? pathParameterFields\n : [],\n filePropertyInfo\n })\n );\n }\n return args;\n }\n\n private getFilePropertyInfo({\n request,\n snippet\n }: {\n request: FernIr.dynamic.InlinedRequest;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): FilePropertyInfo {\n if (request.body == null || !this.context.isFileUploadRequestBody(request.body)) {\n return {\n fileFields: [],\n bodyPropertyFields: []\n };\n }\n return this.context.filePropertyMapper.getFilePropertyInfo({\n body: request.body,\n value: snippet.requestBody\n });\n }\n\n private getInlinedRequestArg({\n request,\n snippet,\n pathParameterFields,\n filePropertyInfo\n }: {\n request: FernIr.dynamic.InlinedRequest;\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n pathParameterFields: php.ConstructorField[];\n filePropertyInfo: FilePropertyInfo;\n }): php.TypeLiteral {\n this.context.errors.scope(Scope.QueryParameters);\n const queryParameters = this.context.associateQueryParametersByWireValue({\n parameters: request.queryParameters ?? [],\n values: snippet.queryParameters ?? {}\n });\n const queryParameterFields = queryParameters.map((queryParameter) => ({\n name: this.context.getPropertyName(queryParameter.name.name),\n value: this.context.dynamicTypeLiteralMapper.convert(queryParameter)\n }));\n this.context.errors.unscope();\n\n this.context.errors.scope(Scope.Headers);\n const headers = this.context.associateByWireValue({\n parameters: request.headers ?? [],\n values: snippet.headers ?? {}\n });\n const headerFields = headers.map((header) => ({\n name: this.context.getPropertyName(header.name.name),\n value: this.context.dynamicTypeLiteralMapper.convert(header)\n }));\n this.context.errors.unscope();\n\n this.context.errors.scope(Scope.RequestBody);\n const requestBodyFields =\n request.body != null\n ? this.getInlinedRequestBodyConstructorFields({\n body: request.body,\n value: snippet.requestBody,\n filePropertyInfo\n })\n : [];\n this.context.errors.unscope();\n\n return php.TypeLiteral.class_({\n reference: php.classReference({\n name: this.context.getClassName(request.declaration.name),\n namespace: this.context.getRequestNamespace(request.declaration.fernFilepath)\n }),\n fields: [...pathParameterFields, ...queryParameterFields, ...headerFields, ...requestBodyFields]\n });\n }\n\n private getInlinedRequestBodyConstructorFields({\n body,\n value,\n filePropertyInfo\n }: {\n body: FernIr.dynamic.InlinedRequestBody;\n value: unknown;\n filePropertyInfo: FilePropertyInfo;\n }): php.ConstructorField[] {\n switch (body.type) {\n case \"properties\":\n return this.getInlinedRequestBodyPropertyConstructorFields({ parameters: body.value, value });\n case \"referenced\":\n return [this.getReferencedRequestBodyPropertyConstructorField({ body, value })];\n case \"fileUpload\":\n return this.getFileUploadRequestBodyConstructorFields({ filePropertyInfo });\n default:\n assertNever(body);\n }\n }\n\n private getFileUploadRequestBodyConstructorFields({\n filePropertyInfo\n }: {\n filePropertyInfo: FilePropertyInfo;\n }): php.ConstructorField[] {\n return [...filePropertyInfo.fileFields, ...filePropertyInfo.bodyPropertyFields];\n }\n\n private getReferencedRequestBodyPropertyConstructorField({\n body,\n value\n }: {\n body: FernIr.dynamic.ReferencedRequestBody;\n value: unknown;\n }): php.ConstructorField {\n return {\n name: this.context.getPropertyName(body.bodyKey),\n value: this.getReferencedRequestBodyPropertyTypeLiteral({ body: body.bodyType, value })\n };\n }\n\n private getReferencedRequestBodyPropertyTypeLiteral({\n body,\n value\n }: {\n body: FernIr.dynamic.ReferencedRequestBodyType;\n value: unknown;\n }): php.TypeLiteral {\n switch (body.type) {\n case \"bytes\":\n return this.getBytesBodyRequestArg({ value });\n case \"typeReference\":\n return this.context.dynamicTypeLiteralMapper.convert({ typeReference: body.value, value });\n default:\n assertNever(body);\n }\n }\n\n private getInlinedRequestBodyPropertyConstructorFields({\n parameters,\n value\n }: {\n parameters: FernIr.dynamic.NamedParameter[];\n value: unknown;\n }): php.ConstructorField[] {\n const fields: php.ConstructorField[] = [];\n\n const bodyProperties = this.context.associateByWireValue({\n parameters,\n values: this.context.getRecord(value) ?? {}\n });\n for (const parameter of bodyProperties) {\n fields.push({\n name: this.context.getPropertyName(parameter.name.name),\n value: this.context.dynamicTypeLiteralMapper.convert(parameter)\n });\n }\n\n return fields;\n }\n\n private getPathParameters({\n namedParameters,\n snippet\n }: {\n namedParameters: FernIr.dynamic.NamedParameter[];\n snippet: FernIr.dynamic.EndpointSnippetRequest;\n }): php.ConstructorField[] {\n const args: php.ConstructorField[] = [];\n\n const pathParameters = this.context.associateByWireValue({\n parameters: namedParameters,\n values: snippet.pathParameters ?? {}\n });\n for (const parameter of pathParameters) {\n args.push({\n name: this.context.getPropertyName(parameter.name.name),\n value: this.context.dynamicTypeLiteralMapper.convert(parameter)\n });\n }\n\n return args;\n }\n\n private getMethod({ endpoint }: { endpoint: FernIr.dynamic.Endpoint }): string {\n if (endpoint.declaration.fernFilepath.allParts.length > 0) {\n return `${endpoint.declaration.fernFilepath.allParts\n .map((val) => this.context.getPropertyName(val))\n .join(\"->\")}->${this.context.getMethodName(endpoint.declaration.name)}`;\n }\n return this.context.getMethodName(endpoint.declaration.name);\n }\n\n private getRootClientClassInstantiation(arguments_: NamedArgument[]): php.ClassInstantiation {\n return php.instantiateClass({\n classReference: php.classReference({\n name: this.context.getRootClientClassName(),\n namespace: this.context.rootNamespace\n }),\n arguments_,\n multiline: true\n });\n }\n}\n"],"mappings":"8jCAGA,SAASA,IAAmB,CACxB,MAAM,IAAI,MAAM,iCAAiC,CACrD,CACA,SAASC,IAAsB,CAC3B,MAAM,IAAI,MA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L,CACJ,ElL5+BO,IAAMC,GAAN,cAAuCC,EAG5C,CACE,YAAY,CACR,GAAAC,EACA,OAAAC,CACJ,EAGG,CACC,MAAM,IAAIC,GAAgC,CAAE,GAAAF,EAAI,OAAAC,CAAO,CAAC,CAAC,CAC7D,CAEA,MAAa,SACTE,EAC+C,CAC/C,OAAO,MAAM,SAASA,CAAO,CACjC,CAEO,aAAaA,EAAwF,CACxG,OAAO,MAAM,aAAaA,CAAO,CACrC,CAEA,MAAa,mBACTA,EACAC,EACwB,CACxB,OAAO,MAAM,MAAM,mBAAmBD,EAASC,CAAO,CAC1D,CAEU,uBAAuBC,EAAoE,CACjG,OAAO,IAAIC,GAAyB,CAAE,QAAAD,CAAQ,CAAC,CACnD,CACJ","names":["defaultSetTimout","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","e","runClearTimeout","marker","cachedClearTimeout","cleanUpNextTick","draining","currentQueue","queue","queueIndex","drainQueue","timeout","len","nextTick","args","i","Item","array","noop","binding","name","cwd","chdir","dir","umask","hrtime","previousTimestamp","clocktime","performanceNow","performance","seconds","nanoseconds","uptime","currentTime","dif","startTime","title","platform","browser","env","argv","version","versions","release","config","on","addListener","once","off","removeListener","removeAllListeners","emit","process","defines","init_process","__esmMin","key","segs","target","seg","init","inited","code","i","len","lookup","revLookup","base64toByteArray","b64","j","l","tmp","placeHolders","arr","Arr","L","tripletToBase64","num","encodeChunk","uint8","start","end","output","base64fromByteArray","extraBytes","parts","maxChunkLength","len2","kMaxLength","Buffer","createBuffer","that","length","arg","encodingOrOffset","allocUnsafe","from","value","fromArrayBuffer","fromString","fromObject","assertSize","size","alloc","fill","encoding","checked","string","byteLength","actual","fromArrayLike","array","byteOffset","obj","internalIsBuffer","isnan","b","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","n","m","bidirectionalIndexOf","buffer","val","dir","arrayIndexOf","indexSize","arrLength","valLength","read","buf","foundIndex","found","hexWrite","offset","remaining","strLen","parsed","utf8Write","blitBuffer","asciiWrite","asciiToBytes","latin1Write","base64Write","ucs2Write","utf16leToBytes","res","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","codePoints","MAX_ARGUMENTS_LENGTH","ret","out","toHex","bytes","checkOffset","ext","checkInt","max","min","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","ieee754write","writeDouble","base64clean","str","stringtrim","INVALID_BASE64_RE","units","leadSurrogate","byteArray","c","hi","lo","src","dst","isBuffer","isFastBuffer","isSlowBuffer","ieee754read","isLE","mLen","nBytes","e","eLen","eMax","eBias","nBits","d","s","rt","init_Buffer","__esmMin","init_process","init_buffer","a","x","y","list","pos","target","thisStart","thisEnd","thisCopy","targetCopy","newBuf","sliceLen","mul","maxBytes","limit","sub","targetStart","init_buffer","__esmMin","init_Buffer","DynamicSnippetsGenerator_exports","__export","DynamicSnippetsGenerator","__toCommonJS","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","assertNever","x","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","freeGlobal","freeGlobal_default","freeSelf","root","freeGlobal_default","root_default","Symbol","root_default","Symbol_default","init_process","init_buffer","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","Symbol_default","getRawTag","value","isOwn","tag","unmasked","e","result","getRawTag_default","init_process","init_buffer","objectProto","nativeObjectToString","objectToString","value","objectToString_default","nullTag","undefinedTag","symToStringTag","Symbol_default","baseGetTag","value","getRawTag_default","objectToString_default","baseGetTag_default","init_process","init_buffer","isObjectLike","value","isObjectLike_default","symbolTag","isSymbol","value","isObjectLike_default","baseGetTag_default","isSymbol_default","init_process","init_buffer","init_process","init_buffer","arrayMap","array","iteratee","index","length","result","arrayMap_default","init_process","init_buffer","isArray","isArray_default","INFINITY","symbolProto","Symbol_default","symbolToString","baseToString","value","isArray_default","arrayMap_default","isSymbol_default","result","baseToString_default","init_process","init_buffer","isObject","value","type","isObject_default","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","asyncTag","funcTag","genTag","proxyTag","isFunction","value","isObject_default","tag","baseGetTag_default","isFunction_default","init_process","init_buffer","init_process","init_buffer","coreJsData","root_default","coreJsData_default","maskSrcKey","uid","coreJsData_default","isMasked","func","isMasked_default","init_process","init_buffer","funcProto","funcToString","toSource","func","e","toSource_default","reRegExpChar","reIsHostCtor","funcProto","objectProto","funcToString","hasOwnProperty","reIsNative","baseIsNative","value","isObject_default","isMasked_default","pattern","isFunction_default","toSource_default","baseIsNative_default","init_process","init_buffer","getValue","object","key","getValue_default","getNative","object","key","value","getValue_default","baseIsNative_default","getNative_default","WeakMap","getNative_default","root_default","WeakMap_default","init_process","init_buffer","noop","noop_default","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","baseFindIndex","array","predicate","fromIndex","fromRight","length","index","baseFindIndex_default","init_process","init_buffer","baseIsNaN","value","baseIsNaN_default","init_process","init_buffer","strictIndexOf","array","value","fromIndex","index","length","strictIndexOf_default","baseIndexOf","array","value","fromIndex","strictIndexOf_default","baseFindIndex_default","baseIsNaN_default","baseIndexOf_default","arrayIncludes","array","value","length","baseIndexOf_default","arrayIncludes_default","init_process","init_buffer","MAX_SAFE_INTEGER","reIsUint","isIndex","value","length","type","isIndex_default","init_process","init_buffer","eq","value","other","eq_default","init_process","init_buffer","init_process","init_buffer","MAX_SAFE_INTEGER","isLength","value","isLength_default","isArrayLike","value","isLength_default","isFunction_default","isArrayLike_default","init_process","init_buffer","objectProto","isPrototype","value","Ctor","proto","isPrototype_default","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","baseTimes","n","iteratee","index","result","baseTimes_default","init_process","init_buffer","init_process","init_buffer","argsTag","baseIsArguments","value","isObjectLike_default","baseGetTag_default","baseIsArguments_default","objectProto","hasOwnProperty","propertyIsEnumerable","isArguments","baseIsArguments_default","value","isObjectLike_default","isArguments_default","init_process","init_buffer","init_process","init_buffer","stubFalse","stubFalse_default","freeExports","freeModule","moduleExports","Buffer","root_default","nativeIsBuffer","isBuffer","stubFalse_default","isBuffer_default","init_process","init_buffer","init_process","init_buffer","argsTag","arrayTag","boolTag","dateTag","errorTag","funcTag","mapTag","numberTag","objectTag","regexpTag","setTag","stringTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","typedArrayTags","baseIsTypedArray","value","isObjectLike_default","isLength_default","baseGetTag_default","baseIsTypedArray_default","init_process","init_buffer","baseUnary","func","value","baseUnary_default","init_process","init_buffer","freeExports","freeModule","moduleExports","freeProcess","freeGlobal_default","nodeUtil","types","e","nodeUtil_default","nodeIsTypedArray","nodeUtil_default","isTypedArray","baseUnary_default","baseIsTypedArray_default","isTypedArray_default","objectProto","hasOwnProperty","arrayLikeKeys","value","inherited","isArr","isArray_default","isArg","isArguments_default","isBuff","isBuffer_default","isType","isTypedArray_default","skipIndexes","result","baseTimes_default","length","key","isIndex_default","arrayLikeKeys_default","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","overArg","func","transform","arg","overArg_default","nativeKeys","overArg_default","nativeKeys_default","objectProto","hasOwnProperty","baseKeys","object","isPrototype_default","nativeKeys_default","result","key","baseKeys_default","keys","object","isArrayLike_default","arrayLikeKeys_default","baseKeys_default","keys_default","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","nativeCreate","getNative_default","nativeCreate_default","hashClear","nativeCreate_default","hashClear_default","init_process","init_buffer","hashDelete","key","result","hashDelete_default","init_process","init_buffer","HASH_UNDEFINED","objectProto","hasOwnProperty","hashGet","key","data","nativeCreate_default","result","hashGet_default","init_process","init_buffer","objectProto","hasOwnProperty","hashHas","key","data","nativeCreate_default","hashHas_default","init_process","init_buffer","HASH_UNDEFINED","hashSet","key","value","data","nativeCreate_default","hashSet_default","Hash","entries","index","length","entry","hashClear_default","hashDelete_default","hashGet_default","hashHas_default","hashSet_default","Hash_default","init_process","init_buffer","init_process","init_buffer","listCacheClear","listCacheClear_default","init_process","init_buffer","init_process","init_buffer","assocIndexOf","array","key","length","eq_default","assocIndexOf_default","arrayProto","splice","listCacheDelete","key","data","index","assocIndexOf_default","lastIndex","listCacheDelete_default","init_process","init_buffer","listCacheGet","key","data","index","assocIndexOf_default","listCacheGet_default","init_process","init_buffer","listCacheHas","key","assocIndexOf_default","listCacheHas_default","init_process","init_buffer","listCacheSet","key","value","data","index","assocIndexOf_default","listCacheSet_default","ListCache","entries","index","length","entry","listCacheClear_default","listCacheDelete_default","listCacheGet_default","listCacheHas_default","listCacheSet_default","ListCache_default","init_process","init_buffer","Map","getNative_default","root_default","Map_default","mapCacheClear","Hash_default","Map_default","ListCache_default","mapCacheClear_default","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","isKeyable","value","type","isKeyable_default","getMapData","map","key","data","isKeyable_default","getMapData_default","mapCacheDelete","key","result","getMapData_default","mapCacheDelete_default","init_process","init_buffer","mapCacheGet","key","getMapData_default","mapCacheGet_default","init_process","init_buffer","mapCacheHas","key","getMapData_default","mapCacheHas_default","init_process","init_buffer","mapCacheSet","key","value","data","getMapData_default","size","mapCacheSet_default","MapCache","entries","index","length","entry","mapCacheClear_default","mapCacheDelete_default","mapCacheGet_default","mapCacheHas_default","mapCacheSet_default","MapCache_default","init_process","init_buffer","toString","value","baseToString_default","toString_default","init_process","init_buffer","arrayPush","array","values","index","length","offset","arrayPush_default","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","baseSlice","array","start","end","index","length","result","baseSlice_default","castSlice","array","start","end","length","baseSlice_default","castSlice_default","init_process","init_buffer","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsVarRange","rsZWJ","reHasUnicode","hasUnicode","string","hasUnicode_default","init_process","init_buffer","init_process","init_buffer","asciiToArray","string","asciiToArray_default","init_process","init_buffer","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsVarRange","rsAstral","rsCombo","rsFitz","rsModifier","rsNonAstral","rsRegional","rsSurrPair","rsZWJ","reOptMod","rsOptVar","rsOptJoin","rsSeq","rsSymbol","reUnicode","unicodeToArray","string","unicodeToArray_default","stringToArray","string","hasUnicode_default","unicodeToArray_default","asciiToArray_default","stringToArray_default","createCaseFirst","methodName","string","toString_default","strSymbols","hasUnicode_default","stringToArray_default","chr","trailing","castSlice_default","createCaseFirst_default","upperFirst","createCaseFirst_default","upperFirst_default","capitalize","string","upperFirst_default","toString_default","capitalize_default","init_process","init_buffer","init_process","init_buffer","arrayReduce","array","iteratee","accumulator","initAccum","index","length","arrayReduce_default","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","basePropertyOf","object","key","basePropertyOf_default","deburredLetters","deburrLetter","basePropertyOf_default","deburrLetter_default","reLatin","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsCombo","reComboMark","deburr","string","toString_default","deburrLetter_default","deburr_default","init_process","init_buffer","init_process","init_buffer","reAsciiWord","asciiWords","string","asciiWords_default","init_process","init_buffer","reHasUnicodeWord","hasUnicodeWord","string","hasUnicodeWord_default","init_process","init_buffer","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsDingbatRange","rsLowerRange","rsMathOpRange","rsNonCharRange","rsPunctuationRange","rsSpaceRange","rsUpperRange","rsVarRange","rsBreakRange","rsApos","rsBreak","rsCombo","rsDigits","rsDingbat","rsLower","rsMisc","rsFitz","rsModifier","rsNonAstral","rsRegional","rsSurrPair","rsUpper","rsZWJ","rsMiscLower","rsMiscUpper","rsOptContrLower","rsOptContrUpper","reOptMod","rsOptVar","rsOptJoin","rsOrdLower","rsOrdUpper","rsSeq","rsEmoji","reUnicodeWord","unicodeWords","string","unicodeWords_default","words","string","pattern","guard","toString_default","hasUnicodeWord_default","unicodeWords_default","asciiWords_default","words_default","rsApos","reApos","createCompounder","callback","string","arrayReduce_default","words_default","deburr_default","createCompounder_default","camelCase","createCompounder_default","result","word","index","capitalize_default","camelCase_default","init_process","init_buffer","init_process","init_buffer","stackClear","ListCache_default","stackClear_default","init_process","init_buffer","stackDelete","key","data","result","stackDelete_default","init_process","init_buffer","stackGet","key","stackGet_default","init_process","init_buffer","stackHas","key","stackHas_default","init_process","init_buffer","LARGE_ARRAY_SIZE","stackSet","key","value","data","ListCache_default","pairs","Map_default","MapCache_default","stackSet_default","Stack","entries","data","ListCache_default","stackClear_default","stackDelete_default","stackGet_default","stackHas_default","stackSet_default","Stack_default","init_process","init_buffer","init_process","init_buffer","arrayFilter","array","predicate","index","length","resIndex","result","value","arrayFilter_default","init_process","init_buffer","stubArray","stubArray_default","objectProto","propertyIsEnumerable","nativeGetSymbols","getSymbols","object","arrayFilter_default","symbol","stubArray_default","getSymbols_default","init_process","init_buffer","init_process","init_buffer","baseGetAllKeys","object","keysFunc","symbolsFunc","result","isArray_default","arrayPush_default","baseGetAllKeys_default","getAllKeys","object","baseGetAllKeys_default","keys_default","getSymbols_default","getAllKeys_default","init_process","init_buffer","init_process","init_buffer","DataView","getNative_default","root_default","DataView_default","init_process","init_buffer","Promise","getNative_default","root_default","Promise_default","init_process","init_buffer","Set","getNative_default","root_default","Set_default","mapTag","objectTag","promiseTag","setTag","weakMapTag","dataViewTag","dataViewCtorString","toSource_default","DataView_default","mapCtorString","Map_default","promiseCtorString","Promise_default","setCtorString","Set_default","weakMapCtorString","WeakMap_default","getTag","baseGetTag_default","value","result","Ctor","ctorString","getTag_default","init_process","init_buffer","Uint8Array","root_default","Uint8Array_default","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","HASH_UNDEFINED","setCacheAdd","value","setCacheAdd_default","init_process","init_buffer","setCacheHas","value","setCacheHas_default","SetCache","values","index","length","MapCache_default","setCacheAdd_default","setCacheHas_default","SetCache_default","init_process","init_buffer","arraySome","array","predicate","index","length","arraySome_default","init_process","init_buffer","cacheHas","cache","key","cacheHas_default","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","equalArrays","array","other","bitmask","customizer","equalFunc","stack","isPartial","arrLength","othLength","arrStacked","othStacked","index","result","seen","SetCache_default","arrValue","othValue","compared","arraySome_default","othIndex","cacheHas_default","equalArrays_default","init_process","init_buffer","init_process","init_buffer","mapToArray","map","index","result","value","key","mapToArray_default","init_process","init_buffer","setToArray","set","index","result","value","setToArray_default","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","boolTag","dateTag","errorTag","mapTag","numberTag","regexpTag","setTag","stringTag","symbolTag","arrayBufferTag","dataViewTag","symbolProto","Symbol_default","symbolValueOf","equalByTag","object","other","tag","bitmask","customizer","equalFunc","stack","Uint8Array_default","eq_default","convert","mapToArray_default","isPartial","setToArray_default","stacked","result","equalArrays_default","equalByTag_default","init_process","init_buffer","COMPARE_PARTIAL_FLAG","objectProto","hasOwnProperty","equalObjects","object","other","bitmask","customizer","equalFunc","stack","isPartial","objProps","getAllKeys_default","objLength","othProps","othLength","index","key","objStacked","othStacked","result","skipCtor","objValue","othValue","compared","objCtor","othCtor","equalObjects_default","COMPARE_PARTIAL_FLAG","argsTag","arrayTag","objectTag","objectProto","hasOwnProperty","baseIsEqualDeep","object","other","bitmask","customizer","equalFunc","stack","objIsArr","isArray_default","othIsArr","objTag","getTag_default","othTag","objIsObj","othIsObj","isSameTag","isBuffer_default","Stack_default","isTypedArray_default","equalArrays_default","equalByTag_default","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects_default","baseIsEqualDeep_default","baseIsEqual","value","other","bitmask","customizer","stack","isObjectLike_default","baseIsEqualDeep_default","baseIsEqual_default","init_process","init_buffer","arrayIncludesWith","array","value","comparator","index","length","arrayIncludesWith_default","init_process","init_buffer","isEqual","value","other","baseIsEqual_default","isEqual_default","init_process","init_buffer","init_process","init_buffer","INFINITY","createSet","Set_default","setToArray_default","values","noop_default","createSet_default","LARGE_ARRAY_SIZE","baseUniq","array","iteratee","comparator","index","includes","arrayIncludes_default","length","isCommon","result","seen","arrayIncludesWith_default","set","createSet_default","setToArray_default","cacheHas_default","SetCache_default","outer","value","computed","seenIndex","baseUniq_default","init_process","init_buffer","uniqWith","array","comparator","baseUniq_default","uniqWith_default","init_process","init_buffer","keys","object","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","_a","_b","key","process","enableStackTracking","trackingType","globalFunctionFilters","globalFileFilters","stacktrace","maxFrames","skip","filterPaths","filterFunctions","stopOn","filterNode","filterJs","formatFilename","filename","_a","enableStackTracking","globalFunctionFilters","globalFileFilters","stop","line","match","fn","path","column","s","each","_b","f","p","StackTraces","maxFrames","skip","filterPaths","filterFunctions","stopOn","filterNode","filterJs","multiline","formatFilename","filename","__publicField","obj","current","stacktrace","frame","enableStackTracking","frames","each","stackTraces","startTracking","tag","getFramesForTaggedObject","obj","_a","stackTraces","AbstractAstNode","tag","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","CodeBlock","AbstractAstNode","value","__publicField","writer","TAB_SIZE","startTracking","AbstractWriter","__publicField","enableStackTracking","parts","text","textEndsInNewline","textWithoutNewline","indent","indentedText","currIndentLevel","node","getFramesForTaggedObject","trackingType","input","CodeBlock","prefix","statement","withNewline","nodes","delimiter","writeFunction","firstNode","i","appendToLastLine","lines","appendTrackingComment","line","stack","each","stacktrace","init_process","init_buffer","isNamedArgument","argument","init_process","init_buffer","Ternary","AbstractAstNode","condition","true_","false_","__publicField","writer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","Result","__publicField","context","snippet","endpoint","_a","reporter","_b","AbstractDynamicSnippetsGenerator","context","__publicField","request","options","endpoints","result","Result","endpoint","snippetGenerator","snippet","error","lastError","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","HttpEndpointReferenceParser","__publicField","reference","match","init_process","init_buffer","Severity","ErrorReporter","_ErrorReporter","__publicField","err","__spreadProps","__spreadValues","path","severity","clone","result","item","AbstractDynamicSnippetsGeneratorContext","ir","config","options","__publicField","ErrorReporter","HttpEndpointReferenceParser","parameters","values","instances","key","value","parameter","param","typeInstanceValue","Severity","ignoreMissingParameters","snippetObject","objectRecord","property","record","fileValue","fileArrayValue","stringValues","typeId","namedType","discriminatedUnion","discriminantFieldName","discriminantValue","singleDiscriminatedUnionType","_a","_","filtered","__objRest","__restKey","rawEndpoint","parsedEndpoint","location","endpoints","endpoint","request","inlinePathParameters","inlineFileProperties","_b","body","assertNever","environmentID","environments","environment","env","multiEnvironmentUrlValues","firstEnvironment","expectedKeys","keys","typeReference","resolvedType","auth","parameterName","expected","fileUpload","init_process","init_buffer","Scope","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","SELF","STATIC","init_process","init_buffer","PHP_RESERVED_KEYWORDS","php_exports","__export","Access","Array_","AstNode","Attribute","Class","ClassInstantiation","ClassReference","CodeBlock","DataClass","Enum","Field","Map","Method","MethodInvocation","Parameter","Trait","Type","TypeLiteral","Writer","array","assignVariable","attribute","classReference","class_","codeblock","dataClass","enum_","escapePhpString","field","instantiateClass","invokeMethod","map","mergeArrays","method","parameter","string","ternary","this_","throwException","trait","variable","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","Access","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","parseFullyQualifiedName","rawFullyQualifiedName","Writer","AbstractWriter","namespace","rootNamespace","customConfig","__publicField","reference","_a","_b","seenRef","parsed","fullyQualifiedName","skipImports","imports","referenceKeys","ref","AstNode","AbstractAstNode","param","namespace","rootNamespace","customConfig","skipImports","writer","Writer","Array_","AstNode","entries","__publicField","writer","entry","index","init_process","init_buffer","Attribute","AstNode","args","_a","__publicField","writer","argument","index","init_process","init_buffer","init_process","init_buffer","ClassReference","AstNode","name","namespace","generics","__publicField","writer","refString","init_process","init_buffer","init_process","init_buffer","convertToPhpVariableName","name","Comment","AstNode","docs","__publicField","tag","__spreadProps","__spreadValues","convertToPhpVariableName","writer","line","docsSplit","init_process","init_buffer","orderByAccess","items","_orderByAccess","Access","order","result","access","item","Class","AstNode","name","namespace","abstract","docs","parentClassReference","traits","__publicField","constructor","field","method","methods","traitClassReference","writer","ClassReference","trait","index","orderByAccess","Comment","_a","parameter","comment","fields","init_process","init_buffer","init_process","init_buffer","writeArguments","writer","arguments_","multiline","writeMultiline","writeCompact","argument","writeArgument","index","isNamedArgument","ClassInstantiation","AstNode","classReference","arguments_","multiline","__publicField","writer","writeArguments","init_process","init_buffer","CodeBlock","AstNode","arg","__publicField","writer","init_process","init_buffer","init_process","init_buffer","Parameter","AstNode","name","type","docs","initializer","access","readonly_","__publicField","convertToPhpVariableName","writer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","MethodInvocation","AstNode","method","arguments_","static_","multiline","on","__publicField","writer","writeArguments","TypeLiteral","_TypeLiteral","AstNode","internalType","__publicField","writer","buildFileFromString","buildDateTimeFromString","assertNever","value","class_","ClassInstantiation","field","list","values","filterNopValues","map","entries","filterNopMapEntries","entry","reference","fields","typeLiteral","element","key","val","ClassReference","CodeBlock","MethodInvocation","Type","_Type","AstNode","internalType","__publicField","writer","comment","DateTimeClassReference","requiredTypes","entry","optionalTypes","orderedEntries","index","isMixed","isUnion","generics","generic","assertNever","_a","ClassReference","value","keyType","valueType","entries","multiline","types","flattenedTypes","uniqueTypes","uniqWith_default","isEqual_default","flattened","type","TypeLiteral","unionTypes","hasMixed","semanticallyUnique","typeStrings","typeString","hasOptional","result","namespace","rootNamespace","customConfig","Writer","init_process","init_buffer","convertFromPhpVariableName","name","CONSTRUCTOR_PARAMETER_NAME","DataClass","AstNode","name","namespace","abstract","docs","parentClassReference","traits","constructorAccess","__publicField","Class","field","method","traitClassReference","writer","orderedFields","orderByAccess","__spreadProps","__spreadValues","convertFromPhpVariableName","php_exports","Parameter","Type","CodeBlock","init_process","init_buffer","init_process","init_buffer","Method","AstNode","name","access","parameters","throws","return_","body","docs","classReference","static_","__publicField","writer","_a","requiredParameters","param","optionalParameters","parameter","index","comment","Comment","SELF","STATIC","throw_","Type","Enum","AstNode","name","namespace","backing","docs","serializable","__publicField","member","writer","ClassReference","escapedValue","escapePhpString","Method","Type","CodeBlock","Comment","init_process","init_buffer","Field","AstNode","name","type","access","readonly_","initializer","docs","inlineDocs","attributes","inherited","__publicField","convertToPhpVariableName","writer","comment","Comment","attribute","index","init_process","init_buffer","Map","AstNode","entries","multiline","__publicField","writer","key","value","index","init_process","init_buffer","Trait","AstNode","name","namespace","docs","traits","__publicField","field","method","writer","trait","index","orderByAccess","comment","Comment","fields","methods","init_process","init_buffer","MergeArrays","AstNode","arrays","__publicField","writer","writeArguments","array","codeblock","array","args","Array_","attribute","Attribute","class_","Class","trait","Trait","classReference","ClassReference","codeblock","arg","CodeBlock","dataClass","DataClass","enum_","Enum","field","Field","instantiateClass","ClassInstantiation","invokeMethod","MethodInvocation","throwException","writer","map","Map","method","Method","parameter","Parameter","ternary","Ternary","assignVariable","variableRef","variableValue","variable","name","convertToPhpVariableName","string","stringValue","mergeArrays","MergeArrays","escapePhpString","str","this_","init_process","init_buffer","getSafeClassName","className","PHP_RESERVED_KEYWORDS","init_process","init_buffer","DynamicTypeLiteralMapper","context","__publicField","args","php_exports","Severity","named","assertNever","literalType","value","bool","str","list","v","index","map","key","as","discriminatedUnion","discriminatedUnionTypeInstance","unionVariant","unionProperties","writer","converted","record","baseFields","singleDiscriminatedUnionType","_a","_b","property","object_","properties","enum_","name","enumValue","undiscriminatedUnion","result","typeReference","e","primitive","num","init_process","init_buffer","FilePropertyMapper","context","__publicField","body","value","_a","result","record","property","assertNever","fileValue","php_exports","fileValues","bodyPropertyValue","RESERVED_METHOD_NAMES","REQUEST_NAMESPACE","TYPES_NAMESPACE","DynamicSnippetsGeneratorContext","_DynamicSnippetsGeneratorContext","AbstractDynamicSnippetsGeneratorContext","ir","config","_a","__publicField","DynamicTypeLiteralMapper","FilePropertyMapper","getRootNamespace","name","unsafeName","getSafeClassName","_b","_c","php_exports","fernFilepath","suffix","parts","path","environmentID","environmentName","writer","input","upperFirst_default","camelCase_default","organization","namespaceOverride","init_process","init_buffer","CLIENT_VAR_NAME","SNIPPET_NAMESPACE","PHP_PREFIX","EndpointSnippetGenerator","context","__publicField","endpoint","request","_a","code","options","snippet","php_exports","writer","args","requestOptions","headers","entries","mappedHeaderNames","header","unmappedEntries","name","value","authArgs","defaultInferredAuthValues","Severity","hasMultiUrlEnvironments","environmentArg","optionArgs","baseUrlArgs","Scope","arg","auth","values","assertNever","message","environment","environmentClassRef","environmentName","className","result","paramName","url","index","defaultName","environmentsConfig","environments","env","firstEnv","baseUrlIds","firstBaseUrlId","firstBaseUrlValue","firstEnvironmentName","baseUrlId","urls","baseUrl","baseUrlArg","classReference","typeLiteral","_b","pathParameters","field","body","_c","_d","inlinePathParameters","pathParameterFields","filePropertyInfo","queryParameterFields","queryParameter","headerFields","requestBodyFields","parameters","fields","bodyProperties","parameter","namedParameters","val","arguments_","DynamicSnippetsGenerator","AbstractDynamicSnippetsGenerator","ir","config","DynamicSnippetsGeneratorContext","request","options","context","EndpointSnippetGenerator"]}
|